Pin Third-Party Actions means referencing a GitHub Actions action by a full commit SHA instead of a mutable tag or branch. Tags can be moved, so a compromised maintainer account can push malicious code into every workflow that uses them. Pinning fixes the code you run; teams still review updates and restrict workflow token permissions.
What pinning third-party actions actually changes
Pinning a third-party GitHub Actions action to a full commit SHA removes the mutability of tags and branches from your build trust model. You are no longer trusting a moving label to keep pointing at the same code, which matters because GitHub Actions runs with repository access, secrets exposure, and workflow permissions that can amplify a small upstream change into a supply-chain incident.
That does not make the workflow “set and forget”. Pinning gives you a fixed artifact to review, but the security decision still includes who can approve updates, how often pins are refreshed, and whether the workflow’s token permissions are already constrained to the minimum needed for the job.
Why mutable references are dangerous in CI/CD
Mutable tags are risky because the code behind them can change without any change to your repository. If an action maintainer account, publishing channel, or release process is compromised, a previously safe reference can start delivering malicious code to every workflow that consumes it. That is a classic software supply chain problem, not just a GitHub preference issue.
This risk is especially important in CI/CD because workflows often run automatically on pull requests, pushes, scheduled jobs, or release events. A compromised action can inherit permissions, access build secrets, alter artifacts, or tamper with provenance. For a broader treatment of this attack path, see MITRE ATT&CK T1677 Poisoned Pipeline Execution and the related Top 10 CI/CD Security Risks guidance.
Pinning is also part of a wider pipeline hardening approach, alongside runner isolation, restricted workflow permissions, and careful handling of secrets and deployment credentials. That is why teams often pair SHA pinning with the workflow controls described in the GitHub and GitHub Actions Security Guide.
How teams verify exposure and keep pins current
The practical exposure check is straightforward: inventory which workflows consume third-party actions, identify whether they are pinned by commit SHA or still rely on tags, and confirm whether those workflows are internet-facing, privileged, or able to publish artifacts. A single unpinned action in a high-trust pipeline can become the weakest link in the build chain.
Keeping pins current matters because pinning can freeze old code as well as safe code. Teams need a review process for action updates, plus a way to detect when upstream changes are available and should be assessed. The best practice is to treat the pin as a controlled dependency, not as a permanent exception.
For an implementation-focused view of bulk pinning, Dependabot support, and enforcement patterns, use How to Pin GitHub Actions to Commit SHAs. For teams thinking more broadly about dependency and supply-chain controls, the Open Source Software Policy Template includes dependency pinning and intake controls that fit the same governance pattern.
What to monitor after pinning
Pinning reduces one failure mode, but it does not eliminate compromise of the repository, runner, secrets, or workflow logic. If a workflow already trusts broad permissions, checks out untrusted code, or allows uncontrolled script execution, a pinned action can still be part of a larger attack path.
After an update or incident, review whether the workflow used secrets, tokens, or deployment credentials that should be rotated, whether logs show unexpected action downloads or workflow changes, and whether artifacts or releases produced during the affected period need revalidation. If you need an incident-oriented reference for response steps around build and package compromise, the Open Source Package Compromise guide is a useful adjacent playbook.
For teams building stronger supply-chain assurance, SLSA and NIST SSDF (SP 800-218) both reinforce the same principle: build trust should be explicit, reviewable, and resistant to silent upstream change.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK and OWASP Non-Human Identity Top 10 address the attack and risk surface, while CIS Controls v8 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1195 — Supply Chain Compromise | Pinning third-party actions directly addresses software supply-chain tampering. |
| Recommendation — Track third-party action compromise paths and enforce trusted-update review before workflow promotion. | ||
| OWASP Non-Human Identity Top 10 | NHI-03 — Vulnerable Third-Party NHI | Third-party actions introduce external trust and maintainer compromise risk. |
| Recommendation — Assess third-party action trust and restrict unreviewed dependencies in workflows. | ||
| CIS Controls v8 | CIS-16 — Application Software Security | Workflow actions are software dependencies that need controlled sourcing and integrity checks. |
| Recommendation — Require integrity-checked, approved dependencies for CI/CD workflows and review changes before use. | ||
| NIST SP 800-53 Rev 5 | SA-12 — Supply Chain Protection | Pinned actions are a supply-chain integrity control for externally sourced workflow code. |
| CM-6 — Configuration Settings | Workflow pinning is a configuration control that stabilizes executable dependencies. | |
| Recommendation — Apply supply-chain protection requirements to third-party actions and verify approved sources. Lock workflow references to approved commits and review configuration changes under change control. | ||
Practitioner Guidance
Why practitioners should care: Pinning is only effective when it is part of a broader workflow control set. If teams pin actions but leave broad token scopes, permissive triggers, or unmanaged self-hosted runners in place, they may reduce one supply-chain risk while leaving the main blast radius intact.
What to watch for: The common mistake is treating tag pinning as equivalent to security hardening. In practice, teams should combine SHA pinning with workflow permission minimization, update review, and periodic checks for stale pins or unreviewed third-party actions.
Practitioner takeaway: Use pinning to make third-party code deterministic, then govern updates like any other high-trust dependency.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org