HIGH AI PREVALENCE: LOW auth.express.static-dotfiles-allow
A static file handler is configured with dotfiles: 'allow', which serves dotfiles from the mounted directory.
Why AI tools produce this: AI coding tools rarely emit this on their own, but it still slips into assisted edits.
Why this matters
If that directory (or anything under it) contains .env, .git/, .npmrc, .aws/, or similar, an attacker can fetch them directly (for example GET /.env) and harvest OAuth client secrets, API keys, and database credentials.
Remove the option to keep the safe default (dotfiles: 'ignore'), or set dotfiles: 'deny' to return 403. Never serve dotfiles from a public web root; keep secrets out of any statically served directory.
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.express.static-dotfiles-allow -- <reason>