Because a workflow that can create another workflow can turn routine build permissions into secret exposure. In GitHub Actions, workflows may access encrypted repository and organisation secrets, including cloud and artefact credentials. If an attacker can inject a malicious workflow, they can use that trusted execution path to exfiltrate tokens and extend compromise into downstream systems.
How workflow creation becomes a supply chain path
The risk is not simply that automation can run code. It is that repository automation often inherits trusted context, so a newly created workflow may execute with access that was intended only for routine builds. In GitHub-style pipeline environments, that can turn a convenience feature into an execution path that a malicious actor can shape, especially when repository rules allow workflows to be authored or modified by less-trusted contributors.
Once a workflow can create another workflow, it can also create a place to hide malicious logic inside normal development activity. That matters because the pipeline is often treated as part of the trusted software delivery chain, which means the malicious step may be reviewed less aggressively than an external dependency or an obvious binary artifact.
Repository automation is therefore a supply chain control point, not just an internal productivity feature. When its output can define future execution, it affects code provenance, review boundaries, and the integrity of what gets built, tested, and released.
Why secrets and tokens make the exposure worse
The main security problem is secret exposure. Build and release workflows may be able to read encrypted repository or organisation secrets, including cloud credentials, signing material, and other sensitive tokens. If the attacker can inject or alter the workflow definition, they can use that trusted execution path to extract those secrets and pivot into adjacent systems.
GitHub Action supply chain attack is a useful example of how workflow compromise can surface CI/CD secrets at scale. The same pattern can also show up when dependency compromise, action compromise, or compromised automation tokens allow an attacker to ride the pipeline rather than attack a target directly.
This is why the danger is broader than one repository. A stolen secret from one workflow can become access to other repositories, cloud environments, package registries, artifact stores, or deployment systems. At that point, the original automation problem has become a downstream identity and trust problem across the delivery chain.
What controls reduce the risk without breaking automation
The practical control objective is to separate workflow authoring from workflow execution authority. If a process can create or modify workflows, it should not automatically inherit the same ability to access high-value secrets or production deployment paths. Strong branch protection, code review, environment segregation, and tightly scoped workflow permissions reduce the blast radius of a compromised automation path.
NIST Cybersecurity Framework 2.0 fits here because the issue spans governance, protection, detection, response, and recovery across the software delivery lifecycle. For supply chain integrity specifically, SLSA helps practitioners think about build provenance and tamper resistance, while NIST SSDF (SP 800-218) reinforces secure development practices that limit how untrusted changes reach the build system.
For workflow platforms, least privilege and secret minimisation matter more than process volume. If a job does not need a secret, it should not receive one. If a job only needs to test code, it should not also be able to publish artefacts, rotate tokens, or create follow-on workflows.
Risk and Threat Considerations
Allowing automation to create workflows expands the attack surface from code execution into trusted pipeline control. The failure is often silent at first, because the malicious logic is introduced through a mechanism that looks like ordinary development activity, then uses inherited permissions to reach sensitive secrets or release actions.
Failure mechanism: A less-trusted automation path creates or alters a workflow that runs with higher privilege than the actor should have, then uses that execution context to read secrets, modify artefacts, or persist inside the delivery chain.
Impact: Attackers can move from one repository event to broader compromise of build, deployment, cloud, or signing systems, which can lead to poisoned releases, credential theft, and downstream supply chain abuse.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
CIS Controls v8, NIST SP 800-53 Rev 5, SLSA and OWASP ASVS set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | CIS-16 — Application Software Security | Workflow creation is part of software delivery integrity and secure change control. |
| Recommendation — Restrict workflow authoring rights and review privileged pipeline changes before release. | ||
| NIST SP 800-53 Rev 5 | AC-6 — Least Privilege | The issue is excessive execution authority in repository automation. |
| IA-5 — Authenticator Management | Secrets and tokens in workflows must be tightly managed, rotated, and scoped. | |
| Recommendation — Limit workflow permissions to the minimum access needed for each job. Rotate and scope pipeline credentials so workflow compromise cannot persist. | ||
| SLSA | Supply-chain provenance | Workflow compromise can poison build provenance and release integrity. |
| Recommendation — Require provenance checks before trusting artifacts produced by automation. | ||
| OWASP ASVS | V8 — Authorization | The question centers on whether automation can gain unauthorized capability through workflow creation. |
| Recommendation — Enforce authorization boundaries between code contribution and workflow execution. | ||
Practitioner Guidance
What to verify: Check whether workflow creation, workflow editing, and workflow execution are governed by different permission tiers. The dangerous condition is not “automation exists”, it is “automation can mint new trusted execution paths.”
Decision rule: If a workflow can access production secrets, artefact signing material, or deployment credentials, treat any capability to create or mutate workflows as a privileged change path that needs stricter review than ordinary code contributions.
What good looks like: New workflows are treated like release-critical infrastructure, secrets are scoped to the smallest viable job, and untrusted contributors can trigger tests without being able to shape privileged automation or read sensitive environment data.
Practitioner takeaway: The key control question is whether pipeline automation can create future trust, because once it can, the repository becomes a mechanism for privilege expansion rather than just a place to store code.
Related resources from NHI Mgmt Group
- Why do AI-assisted repository workflows increase supply chain risk when they have write access and secret exposure?
- Why do developer credentials create supply-chain risk beyond repository access?
- Why do AI-generated package choices create more supply chain risk than normal developer workflows?
- Why do package publishing workflows create supply chain risk even when code reviews exist?