LoFP LoFP / authorized secret-scanning jobs that identify as trufflehog in ci. restrict exceptions to known automation identities and repositories.

Techniques

Sample rules

GitHub Activity from Credential Scanner User Agent

Description

Identifies GitHub audit activity from a user agent associated with credential-scanning and secret-harvesting tooling such as TruffleHog or Nord Stream. These tools walk repository contents and API routes to locate hardcoded secrets, tokens, deploy keys, and other credentials. Legitimate users rarely drive GitHub API traffic with these user agents, so a match is a strong signal that an adversary or an unsanctioned scan is mining the organization for exposed credentials, frequently as a precursor to credential access and data collection from code repositories.

Detection logic

from logs-github.audit-* metadata _id, _index, _version
| where
  event.module == "github" and data_stream.dataset == "github.audit" and
    (
      TO_LOWER(github.user_agent) LIKE "*trufflehog*" or
      TO_LOWER(github.user_agent) LIKE "*nord-stream*" or
      TO_LOWER(github.user_agent) LIKE "*nordstream*"
    )
| keep
    _id,
    _index,
    _version,
    @timestamp,
    event.action,
    user.name,
    github.org,
    github.repo,
    github.route,
    github.actor_ip,
    github.hashed_token,
    github.programmatic_access_type,
    github.user_agent