Improper Artifact Integrity Validation
The artifact that deployed was not the artifact that was built.
What Is Improper Artifact Integrity Validation?
The artifact that deploys is not necessarily the artifact that was built, if nothing binds the two together. You'll watch an attacker replace a build's output in a staging location between the build and the deploy, so the pipeline ships an object that was never scanned or reviewed while every gate stays green, then fix it by signing at build, verifying at deploy, and deploying by digest instead of by name.
What You'll Learn in Improper Artifact Integrity Validation
- If nothing binds the deployed artifact to the built one, a different object can ship while every gate that ran on the build stays green.
- A deploy that fetches an artifact by name ships whatever object carries that name, so a swap in a writable staging path deploys unexamined.
- Sign the artifact at build and verify it at deploy, and deploy by the exact built digest rather than by name.
- Produce a build attestation that names the source commit and runner, so a green run proves the reviewed object shipped.
Improper Artifact Integrity Validation — Training Steps
-
Built here, deployed from there
Skelbourne's pipeline builds the gateway binary, publishes it to a staging bucket, and the deploy job later fetches it from that bucket by name. The scan and the review both run on the built binary. Nothing binds what deploys to what was built. Bob has write access to the staging bucket, and the gap between publish and deploy is all he needs.
-
Everything green, so far
The build produced a binary with a known digest, and every gate after it passed against that binary. The scan and the review both looked at exactly what was built.
-
Swap the staged object
After the scan and review, before the deploy fetches it, Bob replaces the object in the staging bucket. He checks its digest to confirm it is no longer the one that was built.
-
Green run, wrong binary
Bob reopens the run. The deploy fetched the staged object by name and shipped it. The run is green end to end, and the digest it deployed is not the digest it built.
-
Why the gates did not catch it
-
Production digest does not match
Skelbourne compares what is live against what the pipeline built. This morning the gateway running in production has a digest the build never produced, from a run that passed every gate.
-
Built one thing, shipped another
Alice opens the run. Every gate is green, and the deployed digest is not the built digest. The pipeline validated one object and deployed a different one.
-
The deploy fetches by name
The gap is in the deploy step: it fetches the artifact from staging by name, and takes whatever object carries that name at deploy time. Nothing ties what it fetches to the digest the build produced.
-
How the deploy chooses the artifact
Alice opens the deploy configuration, where the artifact is chosen by name with no verification.
-
Bind deploy to the built object
Alice makes the deploy fetch the exact digest the build produced, and verify the build's attestation (naming the source commit and the runner) before it ships anything.
Security Framework Coverage
OWASP CI/CD Top 10
- CICD-SEC-9 Improper Artifact Integrity Validation
CWE
- CWE-494 Download of Code Without Integrity Check
- CWE-345 Insufficient Verification of Data Authenticity
MITRE ATT&CK
- T1195.002 Supply Chain Compromise: Compromise Software Supply Chain
CIS Controls
- CIS 16 Application Software Security
NIST CSF
- PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
- PR.PS Platform Security
NICE Framework
- DD-WRL-004 Secure Systems Development
- IO-WRL-005 Systems Administration
- OG-WRL-017 Cybersecurity Supply Chain Risk Management