jwt-security · git:20261120.76a1b83 · 2026-11-20 · sha256 03551157f756aa96
jwt-security git:20261120.76a1b83A
Immutable. This exact content never changes and is served at /api/v1/blob/03551157f756aa96.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_lispfwa2ig66f2vr/03551157f756aa96e041e6e60d936b5492dfef7a2a898aa6dd1f1b7248a18886.json
Then /plugin install jwt-security@markdownregistry-lispfwa2ig66f2vr in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
--- name: jwt-security description: Audits how an app signs, verifies, stores and expires JSON Web Tokens, and fixes algorithm confusion, weak secrets and unsafe browser storage. --- # JWT security Find where tokens are issued and verified, then check each against the failure list below. ## Steps 1. Search for the library calls (`jwt.sign`, `jwt.verify`, `jsonwebtoken`, `jose`, `PyJWT`, `jjwt`) and decoding without verification (`decode`, `jwt_decode` used for decisions). 2. Verification must pin the algorithm: pass an explicit `algorithms` list (for example only `RS256`). Reject `none`. Never let the token header choose the key type, which enables confusion between RS256 and HS256. 3. Secrets: HS256 keys must be random and at least 32 bytes, loaded from the environment. Flag short, guessable or committed keys. Prefer asymmetric keys when other services only verify. 4. Claims: require `exp` with short lifetimes (5 to 15 minutes for access tokens), check `iss` and `aud`, and use `nbf` where relevant. Never put secrets or personal data in the payload; it is only encoded. 5. Lookup by `kid` must use an allowlist, never a file path or query. 6. Storage: do not keep tokens in localStorage or sessionStorage. Use an `HttpOnly`, `Secure`, `SameSite` cookie, or hold the token in memory with a refresh cookie. 7. Refresh and revocation: rotate refresh tokens on use, store them hashed, and keep a denylist or version counter so logout and password change take effect. ## Rules - A decoded token is untrusted until verified. - Do not invent a custom signing scheme. ## Report Per issue: `path:line`, why it is exploitable, the replacement code. End with the safe settings you recommend.