AI Tools & Scripts
JWT Auth Safety Check
Check JWT login and API auth code before you ship: tokens read without a signature check, the none algorithm, hard-coded secrets, missing expiry, tokens in localStorage or URLs, weak cookies and flawed JWT library versions.
What you get: 1 file · 46.7 KB · ZIP
See purchase optionsProduct description
One jwt.decode(token) where jwt.verify was meant, or one process.env.JWT_SECRET || 'secret', is enough for anyone to sign in as any user. This skill finds those and ten other JWT mistakes before you ship, and tells you how to fix each one.
Your agent runs a scanner on your JavaScript/TypeScript, Python, Go, Java, PHP and Ruby code and your dependency files. It knows the real APIs of jsonwebtoken, jose, PyJWT, python-jose, golang-jwt, jjwt, java-jwt, Nimbus, firebase/php-jwt and ruby-jwt, skips comments, strings and tests, and follows a key variable to its value in the same file. It does not flag normal verified use: jwt.verify with algorithms, PyJWT decode with algorithms and a key, ParseWithClaims with a key function that checks the signing method. It never runs your code. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK (fix before shipping)
W01: tokens read without a signature check (jwt.decode, decodeJwt, verify_signature False, get_unverified_claims, ParseUnverified, java-jwt JWT.decode, JWT.decode(token, key, false), payloads base64-decoded by hand) in a function that never verifies the token
W02: the none algorithm ('none' in an algorithm list, UnsecuredJWT, SigningMethodNone, Algorithm.none(), jjwt unsecured() and parseClaimsJwt, Nimbus PlainJWT)
W03: the token picks the algorithm (PyJWT or python-jose decode without algorithms, get_default_algorithms(), header['alg'])
W04: hard-coded signing keys, passed directly or through a variable such as $key = '...', and fallback secrets such as process.env.JWT_SECRET || 'dev-secret'
REVIEW (check before release)
W11: tokens with no expiry or one longer than 30 days
W12: tokens in localStorage or sessionStorage
W13: token and session cookies without HttpOnly, Secure or SameSite, and document.cookie tokens
W14: ignoreExpiration, verify_exp off, skipped claims validation, leeway over 5 minutes
W15: JWKS (SSO) tokens accepted without audience and issuer checks
W16: tokens in URLs and query strings
W17: jsonwebtoken before 9, PyJWT before 2.4.0, python-jose 3.3.0 or older, firebase/php-jwt before 6, golang-jwt before v4.5.2 / v5.2.2, dgrijalva/jwt-go
W18: verify without a fixed algorithm list, golang-jwt key functions that never check the method, HS and RS mixed in one list
What's included
The scanner (Python 3.9+, standard library only)
A rules guide with the reason and safer approach for each rule
A risky and a safe example project (Node API, browser client, Python service, Java service), and the real report the scanner produces on the risky one
Limits
It reads code as text, not with a compiler: values are followed within one file, so keys or options defined in another file are not seen. Other JWT libraries (jwt-decode in the browser, lcobucci/jwt, Authlib, jwx, .NET) and lock files are not checked. NOT FLAGGED is not a guarantee.
Contents
One ZIP file with 22 files: SKILL.md, the scanner in scripts/ (5 Python files), references/rules.md (every rule with its reason and safer approach), and examples/ (14 example files plus report.md, the real scanner output on the risky example).
How to use: This is an agent skill: a folder with a SKILL.md file and Python scripts that an AI coding agent such as Claude Code, Cursor, or Codex CLI can run. Unzip it into your agent's skills folder (for Claude Code: ~/.claude/skills/), then ask your agent to check your project. The scripts also run on their own with Python 3.9 or newer, with nothing to install. They read your files only: no network access, and nothing is sent anywhere.
What you get
1 file · 46.7 KB
- jwt-auth-safety-check-1.0.0.zipZIP · 46.7 KB
AI Tools & Scripts
JWT Auth Safety Check
Check JWT login and API auth code before you ship: tokens read without a signature check, the none algorithm, hard-coded secrets, missing expiry, tokens in localStorage or URLs, weak cookies and flawed JWT library versions.
Included in Getly ProGet Pro
Tags
Frequently asked questions
Do I get access instantly?
Yes. This is a digital product - you can download it right after checkout, straight from your library.
Can I use it for commercial projects?
Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.
What's your refund policy?
You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.
What file formats and sizes will I get?
You'll download 1 file - ZIP - 46.7 KB in total.
Do I get free updates?
Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.
Price
$5.00



