MEDIUM AI PREVALENCE: MEDIUM auth.jwt.no-audience
JWT is being verified without checking the aud (audience) claim.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
A token issued for one of your services (e.g. an internal worker) can then be replayed against another service that trusts the same key, leading to confused-deputy attacks.
Pass { audience: 'your-api' } to jwt.verify (or validate the aud claim manually) on every verification path.
RFC 7519 §4.1.3 defines the aud claim explicitly for this use case.
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-audience -- <reason>