How GitHub Actions Workflow Weaknesses Can Enable Supply Chain Attacks

Summary
An explainer on how dangerous triggers, untrusted input, and compromised credentials can put GitHub Actions workflows at risk, with safeguards including restricted permissions, safer input handling, and commit-SHA pinning.
Key points
- The article says 38% of organizations have a GitHub Actions workflow vulnerable to script injection or dangerous trigger issues; two-thirds have at least one vulnerability in a workflow or action.
- The s1ngularity attack exploited pull_request_target to execute code in an Nx workflow; the article advises avoiding this trigger where possible and not executing pull-request code in privileged workflows.
- Untrusted values from pull requests, comments, or branch names can enable command injection when passed directly into shell scripts. Safer patterns include JavaScript actions and intermediate environment variables.
- The article reports that hackerbot-claw achieved remote code execution in more than half of the repositories it targeted; Datadog says its controls stopped the campaign from succeeding against one of its repositories.
- TeamPCP used compromised credentials to publish malicious Trivy and KICS releases and retag versions; pinning actions to commit SHAs can help prevent workflows from pulling compromised tagged versions.
- GitHub’s roadmap includes deterministic dependency locking, central workflow policies, scoped secrets, and runner monitoring and egress controls, with availability targeted across late 2026.
Article Details
- Topic
- Security risks and mitigations for GitHub Actions workflows
Threat Actors
Vendors
Products
Datadog IaC SecurityDatadog IaC Security (click to enlarge)GitHub ActionsGitHub Actions has been a major topic of discussion recently, playing a large role in multiple attacks.KICSTeamPCP used compromised credentials to publish malicious versions of Trivy and KICS on GitHub, along with two compromised versions of LiteLLM on PyPI (Python Package Index), as part of a broader supply chain campaign.NxThe s1ngularity attack targeted Nx by exploiting the pull_request_target trigger to execute arbitrary code using a technique known as a “pwn request”.TrivyTeamPCP used compromised credentials to publish malicious versions of Trivy and KICS on GitHub, along with two compromised versions of LiteLLM on PyPI (Python Package Index), as part of a broader supply chain campaign.