Vulnerability cleanliness is not provenance
A container image can pass a vulnerability scanner and still be unsuitable for production. The scanner may find no recognised vulnerable packages while an attacker-controlled builder has inserted a credential harvester, changed a startup script or substituted a dependency. Consider a fictional product team rebuilding its application on a new third-party base image. The decision to deploy should depend on the image’s origin, build instructions, verified contents and release authority—not only on the absence of currently catalogued CVEs.
Image provenance is the evidence linking source material, build environment, dependency inputs, produced digest and release approval. A registry tag such as latest does not provide that chain, because tags can be overwritten. Even a genuine signature must be evaluated against the expected signer and policy: proof that somebody signed an image is not proof that an authorised release process produced it.
Determine the trust boundaries in the build path
Start by mapping source repository, review branch, CI runner, build secrets, base-image registry, artifact repository, signing mechanism and deployment admission controller. Identify which actor can change Dockerfiles, workflow definitions and registry policy. A project with protected application code but an unreviewed deployment pipeline still has an unauthorised build path. Also document where dependencies are resolved and whether the build pins versions or digests.
A base image obtained from a vendor registry should be assessed for ownership, maintenance support, update cadence and image digest. Pinning a digest gives reproducibility for that reference but does not keep the pinned software secure indefinitely; maintenance must deliberately adopt newer, reviewed releases. Decide whether your policy allows externally built bases, requires an internal mirror or mandates approved build recipes. Each option has different evidence and operational costs.
Construct a provenance acceptance matrix
Create a release candidate in an isolated CI environment and preserve its immutable digest, source commit, build workflow identity and generated software bill of materials where supported. Store attestations and signatures in a location that can be queried by deployment policy. Record what the attestation actually claims, such as which builder completed a build from which source revision. Do not overstate a tool’s assurance: an attestation created by an untrusted runner is not independent proof that the runner was uncompromised.
The first test is the permitted release: reviewed commit, approved base digest, authorised builder, verified attestation and acceptable vulnerability disposition. The admission policy should allow exactly that digest and log the reason. Next build a candidate from an unapproved branch; it should be denied even if it contains the same application version number. Substitute a different digest under a familiar tag and confirm the policy does not rely on the tag string. Remove the expected attestation, change the signer identity and try a release lacking the required review approval. Each case must have an observable decision at the point that actually deploys the image.
Test the security-relevant failure mode separately from production. Use synthetic packages and harmless changes rather than inserting malicious logic into a genuine customer workload. The objective is to observe the policy response and record an explanation, not to produce a dangerous image. Preserve evidence of the attempted deployment and confirm that no unapproved workload was scheduled.
Pair provenance with vulnerability and runtime decisions
An image may have excellent provenance yet include a known vulnerability requiring urgent action. Conversely, a low-scoring scanner report does not excuse an absent build chain. Maintain distinct gates: origin and integrity, dependency and vulnerability review, secrets scanning, configuration hardening and production approval. Owners should document whether an exception is temporary, who accepted the risk and what compensating protection will be checked until replacement.
Review runtime deployment for unexpected privileges, writable host paths, broad service-account rights and registry pull permissions. If deployment fetches image layers at a later time, ensure the digest remains the one approved. Where a cluster caches a previously approved image, verify that a revoked release cannot be redeployed simply because the artifact remains locally available. The operational consequences of revocation and rollback should be rehearsed.
Make negative results traceable
Capture the candidate digest, attestation identifier, expected signer, build run, source revision, policy version, admission outcome and reviewer decision. Keep redacted evidence without exposing CI secrets or signing material. When a denial occurs, determine whether the failure was correct enforcement or an availability problem in the verification service. A policy engine that silently fails open during registry outage may undermine the entire provenance requirement.
Measure build and deployment impact. Excessively brittle controls can encourage teams to bypass the protected release path during hotfixes. Define an emergency release procedure with independent approval, limited duration and retrospective verification. Record which technical gates may never be bypassed and which can be temporarily substituted with manual evidence. Operators need a feasible secure route when a production fault requires urgent repair.
A sample release-decision record
For a hypothetical image billing-api:release-42, the deployment reviewer should be able to trace a production digest to a protected source revision, an approved build workflow and a recognised signing identity. The decision record might contain: source commit hash, Dockerfile revision, upstream base digest, build runner identity, workflow run number, resulting image digest, SBOM reference, signature verification result, vulnerability disposition and approval ticket. None of these fields alone proves safety; together they make the release’s origin and change history interrogable.
Consider four controlled variations. First, rebuild identical source on the authorised runner and observe whether the expected provenance claims match policy. Second, use a developer’s unapproved laptop to create a functionally identical image. The container may behave the same but should not qualify as the trusted production release. Third, publish a new image digest behind an existing familiar tag and check whether admission evaluates the digest and attestation. Fourth, revoke a builder identity after suspected compromise and determine whether previously issued attestations remain acceptable under the organisation’s incident policy. Each case surfaces a different dependency in the trust chain.
Assess failure of the verification service
An admission controller may rely on retrieving attestations from a registry or transparency service. During an outage, it should not quietly bypass provenance checks. Define the accepted availability trade-off and a bounded emergency procedure in advance. A time-critical fix can sometimes be staged from a previously verified artifact or an independently approved build channel; the organisation must document what evidence is still trusted. The correct design depends on workload criticality and platform support, but a default fail-open switch is not a neutral operational convenience.
Signing key compromise is different from a routine certificate expiry. Have the security team document how it would block new untrusted releases, identify potentially affected digests, rotate the signing identity and decide which existing deployments require replacement. A compromised build service might have produced artifacts that are correctly signed under the old policy; signature verification alone cannot settle the forensic question. Preserve build logs, isolated runner evidence and source change history for investigation.
Runtime and supplier assumptions
Review the image’s dependency on the base-maintainer’s update cadence. A pinned digest keeps the selected base stable, which is useful for review, but maintenance must still identify a secure upgrade path when a vulnerability is disclosed. Where the organisation maintains an internal mirror, verify that the mirror does not silently replace tags or strip provenance. If a supplier provides an attestation, state what aspect of its build process is within the supplier’s assurance and what still requires customer testing.
Carry the same identity principle into deployment automation. A CI service account should not be able to modify every namespace or bypass policy simply because its images are signed. Inspect cluster role bindings, runtime secret exposure and whether an image digest can be substituted between approval and deployment. Security reviewers can accept a release only when both artifact origin and deployment authority are controlled.
Release-gate evidence and exceptions
The acceptance pack should include one successful permitted release, at least three denied cases, evidence of the actual running digest and an exception log with closure dates. Store only non-sensitive test payloads. A well-designed policy reports enough reason for engineers to fix a blocked release without revealing signing keys or encouraging broad bypasses. Review the results with application owners, build-platform operators and security; those teams each control a different part of the trust chain.
Review deployment traceability after a hotfix
A hotfix produced during a serious outage is an especially revealing provenance test. The team may need to shorten review cycles, but it should still identify the committed source, controlled build environment, image digest and person who authorised deployment. If the ordinary signing service is unavailable, require an independently approved alternative whose scope is narrow and whose artifacts can be reconciled later. Reconstruct the hotfix chain after service stabilises. If the team cannot say which exact image is running, revoke or replace it under a documented risk decision rather than relying on the image’s familiar release label.
Where emergency artifacts are permitted, provide an explicit sunset date and monitor their continued use. A short-term exception should not become a permanent parallel deployment route lacking the origin checks expected of normal releases. The owner should document what assurance was weaker and which follow-up evidence closes the gap.
Provenance maintenance after a toolchain change
When the organisation replaces its CI runner or signs artifacts through a new cloud identity, rerun the negative tests before accepting production builds. The old policy may trust a runner label, while the new platform uses an identity claim with different semantics. Record which source repositories can invoke the signer and who can change the workflow definition. Validate that a developer with permission to edit documentation cannot modify signing authority through a hidden configuration file. Keep a sample of the old accepted evidence and show why the new artifacts remain traceable under the approved model rather than relying on visually similar attestation outputs.
A release is accepted only when the chain is intact
Require confirmation that the deployed digest matches the approved candidate; the build identity and source revision satisfy policy; dependencies and known vulnerabilities have been dispositioned; and any exception has a named owner and deadline. Run regression cases after changes to CI identity federation, registry mirrors, build runners and deployment controllers. A clean scanner output is a useful piece of evidence, but it is one component of release assurance rather than the definition of a trustworthy container image.
Sources and further reading
- https://csrc.nist.gov/pubs/sp/800/218/final
- https://cheatsheetseries.owasp.org/cheatsheets/CI_CD_Security_Cheat_Sheet.html
How Next Defence can help
Agree a safe validation covering matching the production container digest to an approved, traceable build, with source revision, runner identity, signed provenance and deployment admission events available for review. Where a finding remains open, assign the decision to the business and technical owners. Next Defence’s Application Security & DevSecOps practice can support a scoped assessment.