Detection rules › Sublime MQL

DLP: GCP API Key

Severity
high
Type
dlp
Source
github.com/sublime-security/sublime-rules

Detects messages containing Google Cloud Platform API keys.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // GCP API Key: AIza followed by 35 characters
        regex.contains(., '\bAIza[0-9A-Za-z_-]{35}\b')
)

Detection logic

Scope: outbound message.

Detects messages containing Google Cloud Platform API keys.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where:
    • . matches '\\bAIza[0-9A-Za-z_-]{35}\\b'

Inspects: body.current_thread.text, subject.subject, type.outbound. Sensors: regex.contains.

Indicators matched (1)

FieldMatchValue
regex.containsregex\bAIza[0-9A-Za-z_-]{35}\b