Real-World Code Search Recipes/Find JWT-like tokens

Search for three-part dot-separated JWT structures.

Section: Security and secrets hygiene

Find JWT-like tokens

bash
bash
rg -P '[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+' .
Explanation

This may produce false positives, but it is helpful for quick triage.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Security and secrets hygiene
Search for AWS access key patterns
Look for common credential shapes.
OpenIn sheetbashsame section
Find private key headers
Detect committed key material.
OpenIn sheetbashsame section
Find SSH key references
Inspect code and config for private key usage.
OpenIn sheetbashsame section
Find password-like env names
Search environment files for suspicious keys.
OpenIn sheetbashsame section
Find debug logging in source code
Locate `console.log` usage across a codebase.
OpenIn sheetbash1 tag match
Search for 5xx errors in logs
Find common server-side error lines.
OpenIn sheetbash1 tag match