HIGH AI PREVALENCE: HIGH auth.secret.provider-key
A hard-coded credential matching a well-known provider's key format was found in the source.
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
These keys are designed to be revocable. Once one ships to git, the only safe action is to rotate it, even if the repo is private.
Move the value to an environment variable, a secret manager (AWS Secrets Manager, GCP Secret Manager, Doppler, 1Password CLI), or a .env file that's .gitignored.
Detected formats:
- Stripe live / test: sk_live_… / sk_test_… / pk_live_…
- OpenAI: sk-… / sk-proj-…
- Anthropic: sk-ant-…
- GitHub: ghp_… / gho_… / ghu_… / ghs_… / ghr_… / github_pat_…
- Google Workspace: GOCSPX-…
- Google API key: AIza…
- AWS Access Key: AKIA[0-9A-Z]{16}
- Slack Bot / User: xoxb-… / xoxp-…
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.secret.provider-key -- <reason>