|
| 1 | +<div align="center"> |
| 2 | + |
1 | 3 | # JWTForge — JWT Security Toolkit |
2 | 4 |
|
3 | | -A privacy-first, **fully client-side** JWT tooling site for security |
4 | | -professionals (pentesters, bug bounty hunters, AppSec engineers). It is the |
5 | | -"attacker-minded" alternative to jwt.io: decode and verify tokens, audit them |
6 | | -for security signals, and generate forged attack tokens with ready-to-run |
7 | | -artifacts. |
| 5 | +**The attacker-minded, fully client-side alternative to jwt.io.** |
| 6 | +Decode & verify JWTs, audit them for vulnerability signals, and forge |
| 7 | +attack tokens with ready-to-run artifacts — entirely in your browser. |
| 8 | + |
| 9 | +[**jwtforge.com**](https://jwtforge.com) · MIT licensed · built with Next.js + WebCrypto |
| 10 | + |
| 11 | +</div> |
| 12 | + |
| 13 | +--- |
8 | 14 |
|
9 | 15 | **Nothing ever leaves your browser.** No token, secret, or key is sent to a |
10 | | -server. The app makes no backend calls for any core feature. |
| 16 | +server; the app makes no backend calls for any core feature. The one optional |
| 17 | +outbound request is the JWKS-URL fetch on the Decode tab, which sends only the |
| 18 | +URL you type — never your token. Verify it yourself in DevTools → Network. |
11 | 19 |
|
12 | | -Live at **[jwtforge.com](https://jwtforge.com)**. |
| 20 | +### Why it exists |
| 21 | + |
| 22 | +jwt.io is great at decoding. JWTForge is built for the **security** side of |
| 23 | +JWTs that general decoders ignore: it surfaces vulnerability signals |
| 24 | +(`alg:none`, weak/symmetric algorithms, RS→HS algorithm confusion, |
| 25 | +`kid`/`jku`/`jwk` injection, sensitive claims) and generates working forged |
| 26 | +tokens plus copy/download artifacts (curl, `.http`, Burp Intruder, nuclei, |
| 27 | +`jwt_tool`) that you run from your own authorized environment. |
13 | 28 |
|
14 | 29 | ## Local development |
15 | 30 |
|
@@ -121,14 +136,31 @@ HS256/384/512 (HMAC), RS256/384/512 (RSASSA-PKCS1-v1_5), PS256/384/512 |
121 | 136 | Tailwind, ESLint, PostCSS/Autoprefixer, Vitest). No dependency ever processes |
122 | 137 | your token, secret, or keys. |
123 | 138 |
|
| 139 | +## Security posture |
| 140 | + |
| 141 | +A security tool should hold itself to its own standard: |
| 142 | + |
| 143 | +- **Nonce-based Content-Security-Policy** (`script-src 'self' 'nonce-…' |
| 144 | + 'strict-dynamic'` — no `unsafe-inline`), set per-request in `middleware.ts`, |
| 145 | + plus HSTS (preload), `X-Frame-Options: DENY`, `Referrer-Policy: no-referrer`, |
| 146 | + `X-Content-Type-Options: nosniff`, and a locked-down `Permissions-Policy`. |
| 147 | +- `connect-src 'self' https:` is the one deliberate allowance — it exists so the |
| 148 | + opt-in JWKS-URL fetch can reach an issuer you specify. The app makes no |
| 149 | + automatic outbound calls. |
| 150 | +- No runtime dependency ever processes your token, secret, or keys. |
| 151 | +- **Tested:** a Vitest suite asserts the crypto core, including that every |
| 152 | + attack generator emits a cryptographically valid forgery; GitHub Actions runs |
| 153 | + lint + tests + build on every push and PR. |
| 154 | + |
124 | 155 | ## Project layout |
125 | 156 |
|
126 | 157 | ``` |
127 | 158 | src/ |
128 | | - app/ # routes: / decode audit attack about (App Router) |
| 159 | + app/ # routes: / decode audit attack guides about (App Router) |
129 | 160 | components/ # UI: shared + decode/ and attack/ panels |
130 | | - lib/ # base64url, jwt, crypto, claims, audit, attacks, artifacts |
| 161 | + lib/ # base64url, jwt, crypto, claims, audit, attacks, artifacts, seo |
131 | 162 | workers/ # HS256 brute-force Web Worker |
| 163 | + middleware.ts # per-request nonce CSP |
132 | 164 | ``` |
133 | 165 |
|
134 | 166 | ## Deploy to Vercel |
|
0 commit comments