The control breaks when provenance is treated as proof of legitimacy rather than proof of workflow origin. A compromised workflow can still mint a valid publishing event, so the package looks authentic while the release path has already been abused. Teams need to verify who can trigger publishing, not just whether the artifact was published through automation.
What actually fails when the workflow is compromised?
trusted publishing assumes the publishing workflow is the trusted boundary. Once that workflow is compromised, the trust decision shifts from “was this artifact produced by an approved path?” to “did an attacker control the approved path at release time?” That breaks the security model behind provenance, because the event can be valid even when the actor, action, or job state is malicious.
In practice, this means the release pipeline can still emit a legitimate-looking publish event while serving attacker-controlled output. The failure is not the automation itself, it is the assumption that automation equals trust.
Why provenance stops being enough
Provenance answers where the package came from, not whether the workflow that emitted it was already abused. If an attacker can trigger the publish job, tamper with build inputs, or alter the CI environment, the resulting artifact may still satisfy the platform’s trusted publishing checks. The package can therefore look authentic to consumers while the release process has been subverted upstream.
That is why trusted publishing must be paired with strong workflow integrity controls. The release path, the approval conditions, and the identities allowed to invoke publishing all matter. For CI/CD identity hardening, CI/CD Pipeline Identity Security Guide is a useful companion when you need to separate legitimate automation from compromised automation.
In supply chain terms, the weak point is not only the signing or publication step. It is the trust boundary around the workflow itself, including reusable actions, branch protections, secrets exposure, and any mechanism that can hand release authority to an attacker.
What practitioners should verify before trusting trusted publishing
Trusted publishing is strongest when the publish step is narrowly reachable, strongly attributable, and hard to influence from earlier pipeline stages. If the workflow can be triggered by untrusted input, mutable references, or overprivileged tokens, the integrity signal from publication becomes much less meaningful.
- Confirm that only the intended branch, event, or release job can trigger publishing.
- Check that workflow files, reusable actions, and build dependencies are pinned or otherwise controlled.
- Verify that the publish path cannot be reached by a compromised pull request, fork, or injected step.
- Review whether the workflow has access to any secret or token that could be reused outside the release job.
When teams miss those checks, they often mistake “published through automation” for “published through a trustworthy automation path.” A compromised workflow can still satisfy the platform contract while violating the organisation’s trust assumptions. Real-world package compromises show how quickly attackers exploit that gap, including Shai-Hulud npm worm first wave 2025, axios npm compromise 2026, and Ultralytics PyPI compromise 2024.
Risk and Threat Considerations
Trusted publishing can create a false sense of safety when teams treat a valid publish event as proof that the release path was trustworthy. If the workflow has been hijacked, the attacker inherits the publishing trust, which turns a control meant to reduce credential risk into a potential release-abuse path.
Failure mechanism: The attacker compromises the CI or release workflow, then uses the legitimate publishing path to emit a valid artifact or package release that appears authenticated even though the workflow origin has been subverted.
Impact: Consumers may install a malicious or modified release with no obvious publishing anomaly, and teams may lose the ability to distinguish legitimate provenance from abused workflow authority until after downstream exposure occurs.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP API Security Top 10 addresses the attack and risk surface, while SLSA, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| SLSA | Provenance and Build Integrity | Trusted publishing depends on release provenance and tamper-resistant build paths. |
| Recommendation — Strengthen provenance controls so published artifacts are traceable to a controlled build path. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | Compromised workflows often abuse publishing tokens and secrets that must be controlled. |
| AC-6 — Least Privilege | Publishing jobs should have only the access needed to release, not broad pipeline authority. | |
| Recommendation — Rotate and tightly manage any authenticator or secret used by the publishing workflow. Constrain workflow permissions to the minimum required for publishing. | ||
| OWASP API Security Top 10 | API2 — Broken Authentication | A compromised release path can still authenticate successfully while being attacker-controlled. |
| Recommendation — Validate release-job authentication and reject weak or reusable publishing trust paths. | ||
| CIS Controls v8 | CIS-5 — Account Management | Workflow-trigger and publishing identities must be governed to prevent misuse after compromise. |
| Recommendation — Inventory and control all identities that can initiate publishing or release actions. | ||
Practitioner Guidance
What to prioritise: Treat workflow integrity as the control objective, not just artifact provenance. If publishing is trusted, every path that can launch the publish job must be treated as part of the release security boundary.
What to verify: Review who can modify the workflow, who can trigger the release job, and whether the job depends on mutable inputs, inherited secrets, or reusable components that can be changed without review. If any of those are weak, the trusted publishing signal is only partially reliable.
Practitioner takeaway: Trusted publishing only works as a trust signal when the workflow itself is hard to compromise, hard to trigger incorrectly, and easy to attribute after the fact.
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 October 12, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org