Join our Newsletter — 33% off our NHI Course

Why do GitHub Actions workflows keep turning trust into risk?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20217
Topic starter  

TL;DR: Workflow design choices in GitHub Actions keep creating supply chain risk, with Aikido noting that triggers, input handling, and privilege mismatches are the usual failure points. GitHub Actions jobs need tighter trigger scope and shorter-lived credentials to cut exposure.

Editorial analysis by NHI Mgmt Group, based on content published by Aikido: “The complete GitHub Actions security checklist”.

Key questions

Q: Why do workflow triggers like pull_request_target and workflow_run increase supply chain risk?

A: They can execute with secrets or write access even when the triggering content came from a fork or other untrusted source.

Q: What are the signs that a GitHub Actions workflow is misconfigured for public repository security?

A: Common warning signs include workflows that run automatically on forked pull requests, use pull_request_target while checking out untrusted code, echo untrusted input inside inline scripts, or rely on elevated GITHUB_TOKEN permissions.

Q: What breaks when GitHub Actions workflows interpolate untrusted input into shell commands?

A: When untrusted input is expanded inside a run block, the runner may execute attacker-controlled shell content before the workflow authors expect it.

Practitioner guidance

  • Restrict privileged workflow triggers Remove or tightly gate pull_request_target, workflow_run, and other event types that can reach secrets or write permissions from untrusted inputs.
  • Eliminate direct interpolation of github context Treat branch names, PR titles, issue bodies, and commit messages as untrusted data and pass them through environment variables before shell use.
  • Pin third-party actions and package references Use full commit SHAs for actions and exact version pins for dependencies so later tag changes cannot silently alter workflow behaviour.

Bottom line: GitHub Actions security failures usually emerge from trust mismatches between triggers, input handling, and privilege, not from the platform existing as a CI/CD tool.

Glossary terms: Workflow Privilege Boundary, Untrusted Input, Mutable Reference Risk, Federated Short-Lived Credentials

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →


This topic was modified 2 days ago by NHI Mgmt Group

   
Quote
(@mr-nhi)
Member Moderator
Joined: 6 months ago
Posts: 20707
 

GitHub Actions security is fundamentally a machine-identity governance problem. Workflows increasingly act on behalf of repositories, cloud accounts, and package registries, which makes their credentials and event boundaries part of the identity plane. When those non-human identities inherit broad permissions, the result is not just a CI issue but a governance failure across release and deployment paths.

A few things that frame the scale:

  • 59% of compromised machines in a major 2025 supply chain attack were CI/CD runners rather than personal workstations, according to the State of Secrets Sprawl 2026.
  • 96% of organisations store secrets outside of secrets managers in vulnerable locations including code, config files, and CI/CD tools, according to the Ultimate Guide to NHIs.

A question worth separating out:

Q: How should security teams reduce the blast radius of malicious GitHub Actions when workflows process untrusted pull request inputs?

A: Security teams should assume workflow inputs can be attacker controlled and restrict both network egress and runtime behavior in CI/CD jobs. The safest pattern is least privilege, explicit allowlists for outbound destinations, and monitoring for unexpected execution. That combination limits credential theft, command injection impact, and tampering with build outputs when an action is compromised.

👉 Read our full editorial: GitHub Actions security gaps that keep enabling supply chain attacks



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.