CTL-080 · human
Publish Only From CI
Allow package and image publishing only from release pipelines, with build provenance attached.
TechnicalEffort MediumEffectiveness High
Registry poisoning is much harder when only the pipeline can publish. Trusted publishing on npm and PyPI, registry permissions that deny humans, and provenance attestations let consumers reject anything that did not come from the release workflow.
Pair this with alerts on any publish that skips provenance, so legacy paths are found and closed. Keep a short break-glass procedure for emergency releases with a second approver and a post-release review.
Put it in place
- 01Configure trusted publishing (OIDC) for npm, PyPI and other registries, and revoke personal publish tokens.
- 02Make tags immutable in container registries.
- 03Publish with provenance (`npm publish --provenance`, SLSA attestations) and verify it at install or deploy.
- 04Restrict internal registry write permissions to CI service identities.