Cloudflare API Token

Detects Cloudflare API tokens - 40-character tokens that authenticate to the Cloudflare API. Because the raw token has no distinctive prefix, this pattern gates on nearby Cloudflare context to keep false positives low.

Type
regex
Engine
universal
Confidence
medium
Confidence justification
Medium confidence: the 40-character token body is generic, so detection requires an adjacent Cloudflare context label. This cuts false positives at the cost of missing unlabelled tokens.
Jurisdictions
global
Regulations
Criminal Code Act 1995 (Cth), Computer Fraud and Abuse Act, Computer Misuse Act 1990
Frameworks
CIS Controls, ISO 27001, NIST CSF, SOC 2
Data categories
credentials, security
Scope
specific
Risk rating
8
Platform compatibility
Purview: Compatible, GCP DLP: Unsupported, Macie: Unsupported, Zscaler: Compatible, Palo Alto: Unsupported, Netskope: Unsupported

Pattern

(?i)(?:cloudflare|cf[_-]?api[_-]?token|cf[_-]?token)(?:[_-]?api[_-]?token)?["'\s:=]{1,5}(?<![A-Za-z0-9_-])[A-Za-z0-9_-]{40}(?![A-Za-z0-9_-])

Corroborative evidence keywords

cloudflare, cf_api_token, CLOUDFLARE_API_TOKEN, api.cloudflare.com, bearer, api token

Proximity: 300 characters

Should match

Should not match

Known false positives

References