Join our Newsletter — 33% off our NHI Course
Home› Glossary› Foundations & NHI Taxonomy› Publishing from CI
Foundations & NHI Taxonomy

Publishing from CI

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Foundations & NHI Taxonomy

Publishing from CI is the practice of releasing packages or other artefacts to a registry from an automated pipeline rather than a developer machine. The publish token held by the pipeline becomes a high-value target. Defenders restrict which repositories, branches and workflows can publish, and prefer short-lived federated credentials over stored tokens where the registry supports them.

What publishing from CI really changes

Publishing from CI moves release authority from an individual developer workstation to an automated pipeline. That shift matters because the pipeline, not a person, becomes the actor that can publish packages, so its environment, permissions and trust boundaries become part of the release security model.

The main benefit is consistency. A pipeline can enforce the same build, test and release path every time, which reduces ad hoc publishing from unmanaged machines. The trade-off is concentration of risk: if the CI job, runner or publishing secret is abused, an attacker may be able to publish malicious or tampered artefacts under a legitimate project identity.

Why publish tokens and federated credentials matter

The token or federated credential used for publishing is the control point that makes CI publishing work. If that credential is long-lived, broadly scoped or exposed in logs or environment variables, it becomes a direct route to package compromise. Short-lived federated credentials reduce that exposure by avoiding stored secrets where the registry supports them.

This is why registry-side restrictions are so important. Limiting which repositories, branches and workflows can publish narrows the blast radius of a compromised pipeline and helps ensure that only intended release paths can write to the package registry.

For Rust ecosystems, the controls in the crates.io and Cargo Supply Chain Guide are directly relevant because they cover trusted publishing, credential providers and registry-side release restrictions.

How organisations verify that CI publishing is safe

Safe CI publishing starts with knowing exactly which workflows can publish and where their credentials come from. Teams should verify the repository, branch and workflow that are authorised to release, then confirm that the registry trusts the pipeline’s federated identity or scoped token rather than a human-held secret.

It also helps to review the build and release path as a whole, not just the final publish step. A compromised dependency, a modified workflow file or an over-permissive runner can all turn an ordinary release job into a malicious publishing path.

The operational habit of keeping secrets out of code and preferring CI-based publishing is reinforced in Security for Software Engineers, which treats token hygiene and trusted release automation as part of normal engineering practice.

Where publishing from CI breaks down

The failure modes are usually predictable: leaked publish tokens, overly broad publish scopes, compromised runners, tampered workflows, or an attacker who can edit the branch that triggers release. Any of these can let an adversary publish a package that appears to come from a legitimate pipeline.

That is why provenance and least privilege matter more here than in a manual release flow. The pipeline should have only the publish capability it needs, and the registry should reject any release path that does not match the expected trusted automation pattern.

Risk and Threat Considerations

Publishing from CI creates a high-value target because one credential or federated trust relationship can unlock the ability to distribute a malicious package at scale. The risk is not only theft of the token itself, but also abuse of the pipeline as a trusted publishing channel.

Failure mechanism: An attacker compromises the CI environment, steals or reuses the publish credential, or alters the workflow that performs the release, then publishes a malicious artefact through a trusted path.

Impact: The resulting package can reach downstream users through normal update channels, creating supply-chain exposure, reputation damage and possible further compromise of environments that consume the artefact.

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 MITRE ATT&CK 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.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-5 — Account ManagementCI publishing depends on tightly governed release credentials and access paths.
Recommendation — Restrict publish-capable accounts and remove unused access paths from CI release workflows.
NIST SP 800-53 Rev 5IA-9 — Service Identification and AuthenticationCI-to-registry publishing uses machine or service authentication for release access.
Recommendation — Use IA-9 to authenticate the pipeline with short-lived, federated release credentials.
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakagePublishing from CI depends on protecting publish tokens and avoiding exposed secrets.
NHI-04 — Insecure AuthenticationRegistry publishing from automation relies on safe non-human authentication flows.
Recommendation — Prevent publish-token leakage from CI logs, variables and repository configuration. Replace stored long-lived publish tokens with federated authentication where supported.
MITRE ATT&CKT1552 — Unsecured CredentialsPublish tokens in CI are credentials an attacker may steal from pipeline environments.
Recommendation — Hunt for exposed release credentials and rotate any token that appears in CI artefacts or logs.

Practitioner Guidance

Why practitioners should care: Treat the publish path as production access, not just a build convenience. The release job should be designed around minimal privilege, tightly scoped trust and explicit ownership of who can change publishing workflows.

Common misunderstanding: A CI system is not inherently safer than a developer laptop. It is safer only when the publish permission is narrowly constrained and the credential model removes avoidable secret exposure.

Practitioner takeaway: Prefer short-lived federated publishing where possible, and make repository, branch and workflow restrictions part of the release contract rather than an afterthought.

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.

NHIMG Editorial Note
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