Back

CICD-SEC-9: Improper Artifact Integrity Validation - Overview

What is Improper Artifact Integrity Validation?

Improper Artifact Integrity Validation occurs when a delivery pipeline consumes and ships an artifact—source, a dependency, a container image, a build output, an IaC plan—without verifying that it is exactly the artifact that was supposed to be produced, by the process that was supposed to produce it. Every step in a CI/CD pipeline is a hand-off: source moves from SCM to the CI runner, dependencies are pulled from registries, build outputs are pushed to an artifact store, and a deployer pulls those outputs into production. Wherever a hand-off happens with no integrity check, an attacker who can influence the resource in transit or at rest can substitute a malicious version, and the pipeline will faithfully build, sign off on, and deploy it.

The risk is not a bug in any single tool. It is the absence of a verifiable chain of custody across the whole software supply chain. A pipeline can be perfectly configured, fully patched, and still ship a backdoor—because at no point did anything ask "is this artifact the one we trust, and can I prove how it was built?"

Core Concept

Integrity-Validated Pipeline:
  Dependencies -> pulled by content digest, checksum/signature verified
  Build inputs -> source commit verified, hermetic/isolated build
  Build output -> signed (cosign) + provenance attestation generated (SLSA)
  Registry     -> image referenced by immutable digest, not a moving tag
  Deploy gate  -> admission controller verifies signature + provenance
  Result       -> only artifacts with a proven origin ever run

No Integrity Validation:
  Dependencies -> pulled by floating version/tag, no checksum enforced
  Build inputs -> whatever is on the runner disk, trusted implicitly
  Build output -> unsigned, no record of how it was built
  Registry     -> image referenced by mutable tag (":latest", ":prod")
  Deploy gate  -> runs whatever the tag currently points at
  Result       -> a swapped artifact deploys with no alarm

Where the Hand-offs Are

Artifacts change hands many times, and each arrow below is a place integrity can be lost:

Developer -> SCM -> CI runner -> dependency registries
                        |
                        v
                  build outputs -> artifact registry / cache
                        |
                        v
                     CD / deployer -> production cluster

If a signature is generated at build time but never verified at deploy time, integrity validation is still "improper"—producing evidence is worthless unless something enforces it.

Why It's Critical in CI/CD

Why Does This Matter?

Business Impact

Technical Impact

Technical Context

Common Failure Scenarios

1. No Signing or Verification of Build Outputs and Images

# Build and push, with nothing proving what was built
docker build -t registry.example.com/api:prod .
docker push registry.example.com/api:prod
# Deployer later pulls "api:prod" and runs it. No signature is
# produced and none is checked -- any push to that tag ships.

Risk: Anyone who can write to the registry (or intercept the push/pull) can substitute a malicious image and it deploys unchallenged.

2. Trusting Artifacts by Mutable Tag Instead of Content Digest

# Mutable -- ":latest" can point at different bytes tomorrow
FROM node:18

# Immutable -- pinned to exact content, cannot be swapped
FROM node:18@sha256:0d1f3c9e...<full-digest>

Risk: A tag is a pointer, not the content. Re-tagging, a compromised upstream, or a registry MITM changes what the "same" reference resolves to.

3. No Provenance / Attestation of How an Artifact Was Built

# The artifact exists, but there is no signed record of:
#   - which source commit it was built from
#   - which builder / workflow produced it
#   - which build parameters and dependencies were used
# Without provenance you cannot distinguish a legitimate build
# from one an attacker produced on their own machine.

Risk: You can verify a signature yet still have no idea whether the signed thing came from your trusted pipeline or an attacker's laptop.

4. Unverified Artifacts Pulled from Caches, Mirrors, and Build Stages

# Dependency pulled by floating range, no lockfile hash enforced
pip install requests            # resolves to whatever the index serves now
npm install                     # ignores integrity if lockfile absent/stale

# Multi-stage build trusts an intermediate image implicitly
COPY --from=builder /out/app /app/app   # 'builder' assumed clean

Risk: Package mirrors, internal proxies, and build caches are hand-offs too; if their contents aren't checksum/signature-verified, a poisoned entry flows straight into the build.

5. Deployment Accepting Unsigned Images / Unvalidated IaC

# Cluster admits any image, signed or not
kubectl apply -f deploy.yaml    # no admission policy on image provenance

# Infrastructure applied with no plan review / no state integrity check
terraform apply -auto-approve   # applies whatever the plan resolved to

Risk: The final gate—where you could still refuse an untrusted artifact—waves everything through.

Where Integrity Is Lost in the Pipeline

Hand-offTypical FailureConsequence
SCM → CIUnverified commit/tag, no signed sourceBuild runs attacker-modified source
Registry → CIDependencies by floating version, no hashPoisoned dependency compiled in
CI → artifact storeOutput unsigned, no provenance emittedOrigin unprovable, swap undetectable
Store → CDReferenced by mutable tag, not digest"Same" reference resolves to new bytes
CD → productionNo admission/deploy-time verificationUnsigned/untrusted artifact runs
Any cache/mirrorIntermediate trusted implicitlyOne poisoned entry serves everyone

Real-World Impact

The incidents below are described as classes of build-and-artifact tampering. Specific figures are omitted deliberately; the durable lesson is the mechanism, not a statistic.

Case Class 1: Build-System Compromise and Signed Backdoor Distribution

Failure:

Impact:

Root Cause: Signing proved the artifact came from the vendor's pipeline but nothing proved the pipeline itself had not been tampered with. This is the SolarWinds-class pattern: integrity validation stopped at "is it signed?" and never asked "was it built hermetically from the reviewed source, and can we independently attest that?" It is the reason build-time provenance (SLSA) exists alongside signing.

Case Class 2: Mutable-Tag / Registry Substitution

Failure:

Impact:

Root Cause: Trust placed in a mutable pointer instead of immutable content, with no signature verification at admission time to reject an unexpected image.

Case Class 3: Poisoned Dependency / Cache Entry Consumed Without Verification

Failure:

Impact:

Root Cause: Dependency and cache hand-offs were consumed on trust; no checksum/lockfile-hash or signature verification gated what entered the build.

Prevalence and Detectability

Improper Artifact Integrity Validation appears in the OWASP Top 10 CI/CD Security Risks as CICD-SEC-9. It is common because signing and, especially, verification and provenance are still frequently treated as optional maturity add-ons rather than default gates.

Rather than cite precise counts, the defensible picture is:

Note: exact breach counts and percentages vary by source and year. Treat any single figure as illustrative; the durable takeaway is that unverified hand-offs are common and that the fix is an enforceable chain of custody, not a one-off scan.

Common Misunderstandings

Myth 1: "Our artifact is signed, so its integrity is validated"

Reality: Signing only helps if something verifies the signature before use, against a trusted identity, at every hand-off. A signature that is generated and never checked—or checked against no expected signer—adds nothing. Signing also attests the bytes, not the build; that is why provenance matters too.

Myth 2: "We pull :latest, which is always the newest good build"

Reality: A tag is a mutable pointer. "Newest" can mean "whatever was pushed last, by anyone with access, including an attacker." Only a content digest is a stable identity for specific bytes.

Myth 3: "Provenance is the same as a signature"

Reality: A signature says "these bytes came from this key." Provenance/attestation (SLSA, in-toto) says "these bytes were produced by this builder, from this source, with these inputs." You need both: authenticity of the artifact and integrity of how it was built.

Myth 4: "It's built inside our CI, so the output is trustworthy"

Reality: The build environment itself is an attack surface (see Poisoned Pipeline Execution). Trust must be proven with an attestation tied to a hardened, isolated build—not assumed because the runner is "ours."

Myth 5: "Scanning the image for vulnerabilities covers this"

Reality: A vulnerability scan asks "does this contain known-bad packages?" Integrity validation asks "is this the exact artifact my trusted pipeline produced?" A cleanly scanning image can still be a substituted, backdoored one.

Myth 6: "Verifying at the registry is enough"

Reality: Integrity must hold at every hand-off, and the final, non-negotiable gate is deploy/admission time. If the cluster will run an unsigned or unattested image, earlier checks can be bypassed by going straight to the last step.

How This Differs from Related CI/CD Risks

AspectImproper Artifact Integrity Validation (CICD-SEC-9)Poisoned Pipeline Execution (CICD-SEC-4)Insufficient Credential Hygiene (CICD-SEC-6)
Root causeHand-offs consumed without proving integrity/provenanceAttacker-controlled input executes in the pipelineSecrets exposed, over-scoped, or unrotated
Where it livesEvery artifact hand-off (SCM→CI→registry→CD)Build/job definition and executionCredential storage and access
Typical fixSign + attest, pin by digest, verify at admissionIsolate/sandbox builds, control pipeline inputsScope, vault, rotate, use short-lived OIDC
DetectionCheck for digest pinning, signature + provenance enforcementReview triggers and untrusted-input pathsSecret scanning, access audits

Key Takeaways

  1. Integrity is a chain, not a checkpoint—every hand-off from SCM to production must verify the artifact it receives.
  2. Sign and verify—evidence that is produced but never enforced protects nothing.
  3. Pin content, not names—reference artifacts by immutable digest, never by a mutable tag.
  4. Prove the build, not just the bytes—generate and check provenance/attestations (SLSA, in-toto), because SolarWinds-class attacks produce genuinely signed backdoors.
  5. Enforce at admission—the deploy gate must refuse anything that is not signed and attested by a trusted identity.

How to Identify if You're Vulnerable

Ask these questions about your pipeline:

If you answered "no" or "not sure" to several of these, an attacker who reaches any one hand-off can likely ship a malicious artifact to production today.

Next Steps