Browser-based auditor for Set-Cookie headers. Paste one or more headers, get a hardening grade and a list of missing or weak attributes per cookie.
Live demo: https://0xelitesystem.github.io/session-cookie-auditor/
Single HTML file. No build step, no dependencies, no network calls. Forensic-style output: monospaced finding blocks with redacted spans for cookie values.
- Paste one or more raw
Set-Cookieheaders into the box, one per line, with or without theSet-Cookie:prefix. Or click one of the sample buttons. - Click Audit.
- Read the grade and the findings for each cookie, then fix the missing or weak attributes on your server.
Cookie attributes like Secure, HttpOnly and SameSite are easy to miss and nothing complains when they are absent. This auditor grades the header text you paste, without sending it anywhere. It is one HTML file with no tracking and no network calls. MIT licensed.
For every parsed Set-Cookie header:
Secure, required if cookie carries authentication; flags cookies sent over plaintext.HttpOnly, required for session and authentication cookies; flags cookies accessible todocument.cookie.SameSite, flags missing attribute (treated asLaxby modern browsers, but explicit is safer),SameSite=NonewithoutSecure(rejected by Chrome), andSameSite=Noneon cookies that don't need cross-site context.Domain, flags overly broad scopes (parent domain when child would suffice).Path, flagsPath=/on cookies that should be scoped to a sub-path.Expires/Max-Age, flags missing values (session cookies are fine, but auth tokens with no rotation policy are a concern), unreasonably long lifetimes (>1 year), and conflicting values.__Host-and__Secure-prefixes, checks that cookies using these prefixes meet the prefix requirements; suggests prefixes for cookies that look auth-related.- Name patterns, heuristic match for names like
session,sid,token,auth,jwt,csrfto apply stricter rules.
A composite letter grade A, F per cookie, derived from missing critical attributes:
- A,
Secure,HttpOnly,SameSite=StrictorLax, scopedPathandDomain,__Host-or__Secure-prefix where applicable - B, one minor attribute missing or weak
- C,
SameSitemissing or attribute combination weakens isolation - D,
HttpOnlymissing on auth cookie, orSecuremissing - F, multiple critical attributes missing, or
SameSite=NonewithoutSecure
| Tag | Meaning |
|---|---|
| critical | Auth cookie exposed to JS, or sent over plaintext |
| high | CSRF defense missing or weakened |
| medium | Scope too broad, lifetime too long |
| low | Hygiene (missing prefix, vague name) |
| info | Observation without strong recommendation |
Not a runtime tester. It does not make HTTP requests, follow redirects, or evaluate how the cookie behaves under specific browser versions. It parses the literal header text you paste. For dynamic testing, use the browser devtools, Burp Suite, or OWASP ZAP.
Cookie values are masked in the output (only attribute structure is shown). Nothing leaves the browser. No analytics, no storage.
One exception: if you click the theme toggle, your light or dark choice is saved in your browser's localStorage under the key theme. Nothing you type is stored.
git clone https://github.com/0xelitesystem/session-cookie-auditor
cd session-cookie-auditorOpen index.html in any browser. Or serve the folder with python -m http.server 8000 and visit http://localhost:8000/.
No build step. The whole tool is one index.html file with its CSS and JavaScript inline.
Three samples are wired to header buttons: a hardened auth cookie, a permissive third-party tracking cookie, and a cookie with conflicting attributes.
Part of a 10-repo security audit set.
Browser-based audit tools:
- iam-policy-analyzer
- terraform-security-linter
- kubernetes-manifest-security-scanner
- regex-redos-checker
Reference collections:
- incident-response-runbooks
- ai-llm-security-audit
- api-security-audit-checklist
- secrets-leak-response-runbook
- threat-modeling-worksheets
Part of a catalog of single-file browser tools and plain-language references, all MIT licensed and dependency-free: 0xelitesystem.github.io. Built by elitesystem.ai.
MIT. See LICENSE.