JWT
Detects JSON Web Token candidates with three Base64url segments. A generic encoded-JSON candidate is discovery-only; a standard encoded algorithm header plus encoded JSON payload enforces at medium confidence, and HTTP or session transport binding raises the result to high confidence.
- Type
- regex
- Engine
- universal
- Confidence
- high
- Confidence justification
- High confidence: structurally constrained pattern with corroborative keyword support reduces false positive rates significantly. Added context gating and exclusion rules improve precision and reduce incidental matches.
- Detection quality
- Verified
- Jurisdictions
- global
- Regulations
- Criminal Code Act 1995 (Cth)
- Frameworks
- CIS Controls, ISO 27001, NIST CSF, PCI-DSS, SOC 2
- Data categories
- credentials, security
- Scope
- specific
- Risk rating
- 8
- Platform compatibility
- Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Compatible, Netskope: Compatible
Pattern
\beyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{3,}\b
Corroborative evidence keywords
api key, api_key, apikey, access key, secret key, private key, auth token, authorization, access token, bearer, conn str, connection string, connectionstring, cookie, credential, database, host, [object Object], oauth, passphrase (+33 more)
Proximity: 300 characters
Should match
eyJmb28iOiJiYXIifQ.eyJzdWIiOiIxMjMifQ.c2lnbmF0dXJl— Low-tier probe - three encoded segments without a standard alg headerJWT: eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJqb2UifQ.abc123-_def456— Medium-tier probe - labelled JWT with standard header and encoded payloadAuthorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U— High-tier probe - structurally plausible JWT bound to an Authorization header
Should not match
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0— Only 2 segments instead of 3notJWT.eyJzdWIiOiIxMjM0NTY3ODkwIn0.signature— First segment does not start with eyJeyJ.eyJ.sig— Segments too short to be valid JWTAuthorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIn0.REDACTED— Placeholder signature in a transport-bound JWTDocumentation example: Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIn0.c2ln— Documentation quoting a structurally valid JWT must not enforcesession=YWJjZGVm.Z2hpamts.bW5vcHFy— Sibling three-segment cookie value does not begin with encoded JSON
Known false positives
- Authentication-related terminology in software documentation, security training materials, or system architecture descriptions without actual credentials. Mitigation: Require proximity to credential-specific patterns (API keys, connection strings, tokens) rather than general security terminology.
- Code snippets and configuration examples containing credential-related keywords or placeholder values in developer documentation. Mitigation: Check for common placeholder patterns (example.com, localhost, 0000) and documentation file types to reduce false positives from technical writing.