MEDIUM AI PREVALENCE: HIGH auth.jwt.no-algorithms-allowlist
jwt.verify(...) is called without an explicit algorithms allowlist.
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
Without pinning the accepted algorithms, a token signed with an unexpected algorithm (or even alg: none on older versions) can be accepted, opening the door to algorithm-confusion attacks.
Always pass the algorithm(s) you actually expect, e.g. { algorithms: ['RS256'] }.
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.jwt.no-algorithms-allowlist -- <reason>