heroui logo

GitHub Activity from Credential Scanner User Agent

Elastic Detection Rules

View Source
Summary
This rule detects GitHub audit events where the client identifies itself with a credential-scanning tool user agent (e.g., TruffleHog, Nord Stream). It matches on lower-cased github.user_agent values containing trufflehog, nord-stream, or nordstream within the logs-github.audit data stream. A match indicates that a client advertising a known secret-harvesting tool interacted with the organization, typically involving bursts of API requests across secrets, contents, and repository routes as the tool enumerates repositories to locate hardcoded credentials. The alert surfaces key context fields to help triage: user.name (actor), github.actor_ip (source IP), github.hashed_token and github.programmatic_access_type (token identity and type used), and the touched scope (github.org, github.repo, github.route). This pattern is commonly a precursor to credential access and data collection from code repositories, though legitimate automation may occasionally trigger similar activity (e.g., authorized secret-scanning in CI). The rule maps to MITRE ATT&CK: T1526 (Cloud Service Discovery) under Discovery, T1552.001 (Credentials in Files) under Credential Access, and T1213.003 (Code Repositories) under Collection/Data from Information Repositories, reinforcing the idea that the activity is reconnaissance or collection related to credentials in code sources. Investigations should verify the authenticating identity and source, inspect the token details to determine ownership and authorization, and review which repositories and routes were enumerated. If patterns indicate adversity or unauthorized access, respond by revoking the token, rotating secrets, and reviewing audit events for credential access or data exfiltration. Suppress duplicate alerts by grouping on actor IP, hashed token, and user agent for a given time window. False positives include authorized secret-scanning jobs that correctly advertise their TruffleHog-like agent in CI, in which case exceptions should be scoped to known automation identities and repositories. Finally, correlate with related events such as secret_scanning_alert.create, git.clone, or repo.download_zip to identify progression from discovery to potential data collection.
Categories
  • Cloud
  • Web
Data Sources
  • Application Log
ATT&CK Techniques
  • T1526
  • T1552
  • T1552.001
  • T1213
  • T1213.003
Created: 2026-09-22