1.1 KiB
1.1 KiB
Secret Pattern Reference
Detection Categories
Critical
- OpenAI-like keys (
sk-...) - GitHub personal access tokens (
ghp_...) - AWS access key IDs (
AKIA...)
High
- Slack tokens (
xox...) - Private key PEM blocks
- Hardcoded assignments to
secret,token,password,api_key
Medium
- JWT-like tokens in plaintext
- Suspected credentials in docs/scripts that should be redacted
Severity Guidance
critical: immediate rotation required; treat as active incidenthigh: likely sensitive; investigate and rotate if real credentialmedium: possible exposure; verify context and sanitize where needed
Response Playbook
- Revoke or rotate exposed credential.
- Identify blast radius (services, environments, users).
- Remove from code/history where possible.
- Add preventive controls (pre-commit hooks, CI secret scans).
- Verify monitoring and access logs for abuse.
Preventive Baseline
- Commit only
.env.example, never.env. - Keep
.gitignorepatterns for env and key material. - Use secret managers for staging/prod.
- Redact sensitive values from logs and debug output.