How to Detect Compromised GitHub Actions Through CI Runner Telemetry

· Original article ↗

Summary

The article uses the Trivy GitHub Actions compromise to explain how Tetragon telemetry can reveal CI runner attacks, and provides detection ideas and hardening measures for credential theft, persistence and exfiltration.

Key points

  • The article describes a March 2026 compromise of aquasecurity/trivy-action and aquasecurity/setup-trivy, attributed to TeamPCP, in which affected version tags were repointed to commits containing credential-stealing code.
  • The described payloads targeted secrets in Runner.Worker memory and credentials on self-hosted runner filesystems, then staged and exfiltrated collected data.
  • Tetragon can capture process, file and network activity on hosted, self-hosted and Kubernetes-based runners; the article provides sample tracing policies and configuration.
  • Detection examples include cross-process reads of /proc memory, access to multiple sensitive files, decoded scripts piped to interpreters, and processes operating on temporary staging directories.
  • Another detection identifies changes to RUNNER_TRACKING_ID that can let processes persist beyond a job’s cleanup.
  • Recommended defenses include pinning Actions to full commit SHAs, limiting workflow permissions and secret exposure, using ephemeral runners, and rotating credentials if compromise is suspected.

Article Details

Defense Focus
Detect and contain CI runner compromises, especially process-memory and filesystem credential harvesting, staged data exfiltration, and attempts to persist beyond a job.
Detection Methods
  • Alert on cross-process reads of /proc/<pid>/mem and correlate the target PID with Runner.Worker process ancestry.
  • Detect reads of multiple distinct sensitive credential files within a short time window using distinct file.path counts.
  • Correlate base64 decoding with a shell or script interpreter execution by shared parent process and workflow run ID within one minute.
  • Detect multiple distinct processes referencing a /tmp/tmp. staging directory, optionally including forked processes by removing parent-PID grouping.
  • Detect RUNNER_TRACKING_ID values that lack the expected github_ prefix.
  • Monitor outbound shell connections consistent with reverse shells and curl connections using file-upload or data-post flags.
  • Correlate process access to /proc/<pid>/maps or /proc/<pid>/environ across multiple processes within a short window.
Data Sources
  • Process execution events, command lines, and process ancestry
  • File-access events, including reads of /proc/<pid>/mem, /proc/<pid>/maps, /proc/<pid>/environ, sensitive credential files, and temporary paths
  • Network connection events
  • Process environment variables limited to RUNNER_TRACKING_ID
  • Workflow metadata including run, job, step, repository, and trigger
  • Host name and workflow run or agent ID for event correlation
Rule Types
  • Tetragon YAML tracing policies using kprobes for TCP connections and file access
  • Correlated process-event detections using parent PID, target PID, host, and workflow run ID
  • Time-window aggregations using distinct file paths or distinct processes
  • Process command-line and environment-variable pattern matching
  • Abstract CI/CD runtime detection rules
Platforms
  • Tetragon
  • Abstract
  • GitHub Actions runners, including self-hosted and ephemeral runners
  • Actions Runner Controller (ARC) Kubernetes deployments
Defensive Actions
  • Pin third-party Actions to full commit SHAs and allow only audited, approved Actions.
  • Set explicit minimum permissions for each workflow.
  • Limit secrets to the steps that need them; use a dedicated secret manager and prefer short-lived cloud tokens.
  • Avoid pull_request_target workflows where possible and do not check out untrusted pull-request code in workflows that hold secrets.
  • Keep self-hosted runners off public repositories or require approval for outside collaborators; prefer ephemeral runners and keep credentials off runner hosts.
  • Audit runner access to internal services and sensitive infrastructure.
  • If a workflow may have been compromised, rotate every credential it could reach and review cloud audit logs for signs of misuse.

MITRE ATT&CK

Threat Actors

Products

Tools

Related Articles