MEDIUM AI PREVALENCE: HIGH auth.iac.tf-hardcoded-oauth-secret
A secret-like attribute (client_secret, token, password, api_key, private_key, ...) is assigned a hard-coded string literal in Terraform.
Why AI tools produce this: AI coding tools generate this anti-pattern by default, it appears in a large share of AI-written auth code.
Why this matters
The value ships in the repository and, because Terraform records arguments in state, it also lands in the state file, so it must be treated as leaked and rotated. Read it from a variable (var.*), a secret-manager data source (AWS Secrets Manager, Vault, GCP Secret Manager), or an environment-backed input instead, and keep the value out of both the code and the state where possible.
VULNERABLE
SAFE
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.iac.tf-hardcoded-oauth-secret -- <reason>