When actions are not pinned, the code that runs in a trusted workflow can change after review, which destroys the assumption that approval equals execution safety. A later malicious or compromised update can inherit the same trust, credentials, and network reach as the original action. That creates a hidden execution path into build and release systems.
Why This Matters for Security Teams
Unpinned GitHub Actions turn a reviewed workflow into a moving target. The immediate problem is integrity: a maintainer may approve a workflow file, but the referenced action can change later without another review. That breaks the security assumption that the same code will run every time. In build and release pipelines, that can expose secrets, alter artifacts, or quietly weaken controls around signing and deployment.
This is not just a supply chain issue in the abstract. It is a privilege and trust issue because actions often run with repository tokens, cloud credentials, or access to internal services. Current guidance from NIST SP 800-53 Rev 5 Security and Privacy Controls maps well to this problem through supply chain risk, least privilege, and configuration management expectations. The practical takeaway is that a workflow reference should be treated like executable dependency code, not a stable label.
In practice, many security teams discover this only after a trusted action has already been updated upstream and reused inside a release pipeline.
How It Works in Practice
Immutable pinning means referencing a specific commit SHA rather than a moving tag such as
or . That ensures the workflow executes the exact reviewed content, even if the publisher later changes the repository. Tags such as checkout or version labels like v3 are convenient, but they are not guarantees of immutability. For security-sensitive workflows, the SHA is the control point.
Operationally, teams should treat every third-party action as a dependency that needs inventory, approval, and monitoring. The most defensible pattern is:
- Pin actions to full commit SHAs, not tags or branches.
- Review the action source before adoption and again when updating the pin.
- Limit workflow permissions so a compromised action cannot reach unnecessary secrets or deployment targets.
- Use repository and organisation policy to block unpinned actions where possible.
- Monitor for upstream changes, especially if the action is widely reused in CI/CD.
Pinning is stronger when combined with broader supply chain controls. GitHub’s hardening guidance for Actions supports the same direction: reduce implicit trust, narrow permissions, and constrain what workflows can access. In mature environments, this sits alongside review gates, signed releases, and protected branches so that workflow code and workflow dependencies are governed together. These controls tend to break down when teams rely on shared reusable workflows across many repositories because updating a single action reference can propagate risk everywhere before anyone notices.
Common Variations and Edge Cases
Tighter pinning often increases maintenance overhead, requiring organisations to balance security assurance against update effort. That tradeoff is real: immutable references protect against silent upstream change, but they also mean deliberate updates must be tracked and tested. Best practice is evolving for reusable workflows, composite actions, and marketplace dependencies, and there is no universal standard for how frequently pins should be refreshed.
Some teams choose a compromise by pinning to SHAs while automating dependency review, so updates still happen quickly but only through a controlled change process. Others use internal mirrors or approved action registries to reduce exposure to upstream repository compromise. That is especially important for high-trust pipelines that handle signing keys, release automation, or production deployment.
The main edge case is operational churn. Very large organisations with many repositories can struggle to keep pins current, which creates pressure to fall back to tags for convenience. That should be treated as a temporary exception, not a stable operating model. Where the workflow also touches secrets, build provenance, or release signing, pinning should be considered a baseline control rather than an optional hardening step. OWASP guidance on software supply chain and dependency risk is useful here as a reminder that trusted execution paths can fail when upstream components change outside the review boundary.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST AI RMF set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.DS | Pinned actions help preserve integrity of build inputs and outputs. |
| NIST AI RMF | Workflow trust depends on governance of automated system behaviour. | |
| OWASP Non-Human Identity Top 10 | Workflow tokens and identities are exposed when actions change unexpectedly. | |
| OWASP Agentic AI Top 10 | Autonomous tool use can execute unreviewed code through trusted actions. |
Inventory non-human identities used in CI/CD and restrict their access to only required resources.