LS-CF-002: Cloudflare API Token¶
| Severity | HIGH |
| Blast radius | Cloudflare zone/account compromise (scope-dependent) |
| Rotate at | https://dash.cloudflare.com/profile/api-tokens |
--verify |
GET https://api.cloudflare.com/client/v4/user/tokens/verify |
If this leaks¶
Grants access scoped to whatever permissions the token was created with, which can range from read-only DNS access to full zone or account management.
What to do¶
- Rotate or revoke the credential at https://dash.cloudflare.com/profile/api-tokens.
- Check the provider's audit logs for use you don't recognise.
- Remove it from git history (
leakscan purge --help) and load it from an environment variable or secret manager instead.
Pattern¶
(?i)cloudflare(?:.{0,20})?api[_-]?token\s*[=:]\s*['\"]?([A-Za-z0-9_-]{40})['\"]?
Suppress¶
On one line: # leakscan:ignore LS-CF-002. For the whole project:
disable_rules: [LS-CF-002]