CI permissions and artifact promotion
Separate build and release authority
Continuous integration (CI) runs checks and builds when changes arrive. A build job needs only the repository and resources required to produce a candidate; a release job may need narrowly scoped publishing authority. Keep untrusted change validation separate from privileged release jobs. Prefer short-lived credentials, isolated workers, reviewed workflow changes and pinned trusted build inputs. Never provide publishing credentials to untrusted code.
Promote the verified artifact
A promotion pipeline moves an already verified artifact through approved environments. Bind test reports, SBOM, provenance and approval to its immutable digest. If staging tests D42 but deployment rebuilds D43, D42 evidence does not establish D43 safety. Reverify a different artifact before release. Restrict changes to policy and deployment settings, and record who approved what and when.
A small release gate
The fictional policy permits promotion only when verification passed, tested and target digests match, all required checks passed, no unresolved blocking finding exists, an authorized reviewer approved, and release job permissions are scoped. Missing evidence fails closed. For an urgent fix, use a separately governed emergency process with named approval, expiry, compensating controls and retrospective review; do not silently disable the gate.
Operate and recover
Monitor releases and new advisories after promotion. Maintain an artifact-to-environment mapping, an owner, rollback criteria and a known-good artifact verified under current policy. If a dependency is reported compromised, suspend affected promotion and assess deployed versions before deciding whether rollback or a fixed release is safer. Rollback is not automatically safe: previous versions may also be affected or incompatible with migrated data.
Practice: justify promotion decisions
Use the supplied release records. For each blocked release, name the failed condition, the responsible owner and evidence required to retry. Draw separate build and promotion jobs with a digest-bound handoff. No actual CI system, registry, secrets or package publication is needed.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
CI permissions and artifact promotion — knowledge check
Apply software supply-chain security principles to fictional scenarios.
Which job should receive scoped publishing authority?
Staging tested D42 but target is D43. What now?
Required approval is missing. Toy decision?
Why retain a deployment-to-digest mapping?
Is rollback always safe after compromise?