Client Secret / Api Key

Detects documents containing client secret and API key patterns. This pattern is based on a Microsoft Purview built-in sensitive information type. In Purview, this is a broad bundled detector. This keyword-based version flags documents that may contain client secrets or API keys for further review.

Type
regex
Engine
universal
Confidence
low
Confidence justification
Low confidence: broad pattern matching that will match client secret and API key assignments in documentation, code comments, and non-sensitive contexts. Added context gating and exclusion rules improve precision and reduce incidental matches.
Detection quality
Partial
Jurisdictions
global
Regulations
Criminal Code Act 1995 (Cth)
Frameworks
CIS Controls, ISO 27001, NIST CSF, PCI-DSS, SOC 2
Data categories
credentials, security
Scope
wide
Risk rating
10
Platform compatibility
Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Degraded, Netskope: Unsupported

Pattern

(?i)\b(?:client[_-]?secret|client[_-]?id|api[_-]?key|api[_-]?secret|app[_-]?secret|application[_-]?secret)\s*[:=]\s*"?[A-Za-z0-9_.\-]{10,}"?

Corroborative evidence keywords

client secret, client_secret, api key, api_key, app secret, application secret, OAuth, authentication, apikey, access key, access token, auth token, authorization, bearer, conn str, connection string, connectionstring, cookie, credential, database (+43 more)

Proximity: 300 characters

Should match

Should not match

Known false positives

References