Skip to main content

What it flags

A literal string, including a heredoc, assigned to a credential argument in a .tf file:
  • In a provider block, any secret-named argument such as access_key, secret_key, token, password or client_secret.
  • In a resource or module block, password, master_password, admin_password, administrator_login_password, root_password, client_secret, secret_key, api_key, api_token, auth_token or secret_string, and any argument whose name ends in _password or _secret, such as a module’s db_password.
The value is committed to version control and also lands in the Terraform state and plan output. The message shows only the first four characters. Rotate the committed credential after moving it out of the file. Not flagged: references such as var.db_password or data.aws_ssm_parameter.db.value, interpolated strings, URLs, values shorter than 8 characters, and placeholders such as change-me or example. Values in .tfvars files are not read by this rule.

Configuration

Set the rule to "off" in loadwise.config.json to drop its findings: