Mailgun API Key

Detects Mailgun private API keys (key- prefix followed by 32 hex characters). A leaked key allows sending email and accessing logs and account data via the Mailgun API.

Type
regex
Engine
universal
Confidence
high
Confidence justification
High confidence when corroborated: the key- prefix plus 32 hex chars is structured, though the generic prefix means Mailgun context keywords meaningfully reduce false positives.
Jurisdictions
global
Regulations
Criminal Code Act 1995 (Cth)
Frameworks
CIS Controls, ISO 27001, NIST CSF, SOC 2
Data categories
credentials, security
Scope
wide
Risk rating
8
Platform compatibility
Purview: Compatible, GCP DLP: Unsupported, Macie: Unsupported, Zscaler: Compatible, Palo Alto: Unsupported, Netskope: Unsupported

Pattern

(?<![A-Za-z0-9])key-[a-f0-9]{32}(?![A-Za-z0-9])

Corroborative evidence keywords

mailgun, mailgun.net, api key, MAILGUN_API_KEY, private api key, smtp, bearer token

Proximity: 300 characters

Should match

Should not match

Known false positives

References