The GitHub Actions Attack Pattern Your CI Security Scanners Miss

The Hidden Dangers Lurking in Your GitHub CI Pipelines

A recent revelation has exposed a worrying trend in software development: even when your Continuous Integration (CI) security scanners give you a clean bill of health, your pipeline might still be vulnerable to attack. Researchers at Novee Security have identified a class of weaknesses they call “Cordyceps,” which can allow an attacker to exploit seemingly secure pipelines and gain unauthorized access to sensitive systems.

The Cordyceps weakness is not about a single line of malicious code, but rather how different components of your CI pipeline interact with each other. Specifically, it involves the use of GitHub Actions workflows, which are triggered by pull requests and can run in both trusted and untrusted contexts. An attacker can induce these workflows to act on their own controlled content from within a pull request, bypassing security checks and gaining access to sensitive data.

The researchers demonstrated this vulnerability in several high-profile projects, including those maintained by Microsoft, Google, Apache, Cloudflare, and the Python Software Foundation. What’s alarming is that an attacker only needs a free GitHub account to exploit this weakness, without requiring any special privileges or membership to the organization.

One of the key factors contributing to this vulnerability is the use of command injection, code injection, and cross-workflow privilege escalation. These techniques allow an attacker to inject malicious data into seemingly safe workflows, which can then be executed by the CI system. The problem is that traditional security scanners are not designed to detect these types of attacks, as they focus on individual files rather than the composition of the workflow.

The researchers found that even when a pipeline appears to be secure, with all checks passing and no obvious errors, it’s still possible for an attacker to exploit this weakness. This highlights the need for more robust security measures in CI pipelines, beyond just relying on automated scanners.

One striking example of the potential damage caused by Cordyceps is the case of Microsoft’s Azure Sentinel repository. Researchers showed that a single comment on a pull request could execute malicious code and steal a non-expiring GitHub App key, giving an attacker persistent write access to sensitive security content shipped downstream to customer workspaces.

This vulnerability has serious implications for organizations that rely on CI pipelines to ensure the security of their software supply chain. It’s essential to recognize that simply relying on automated scanners is not enough; instead, developers and engineers must take a more proactive approach to governance, ensuring that only trusted data enters the build process from the outset.

To mitigate this risk, organizations should consider implementing more robust security measures in their CI pipelines, such as:

* Implementing stricter access controls and authentication mechanisms

* Regularly reviewing and updating workflow configurations

* Using more advanced security scanning tools that can detect complex attacks like Cordyceps

Ultimately, the key takeaway is that simply relying on automated scanners is not enough to ensure the security of your CI pipeline. By being aware of these hidden dangers and taking proactive steps to govern your build process, you can help prevent attacks like Cordyceps from compromising your organization’s sensitive data.


Source: Bleeping Computer — 2026-07-07