Artifact Signing: Proving Your Code is Your Code

Artifact signing is a notary's seal for software, proving who built it and that it hasn't been tampered with. It's used in CI/CD to sign container images and binaries before publishing.
Why it exists
Unsigned software is vulnerable to supply chain attacks. An attacker can create a malicious package with a similar name (typosquatting), compromise the server where it's hosted, or tamper with it after it's published. Artifact signing exists to provide a verifiable chain of custody from the developer to the consumer, ensuring authenticity and integrity.
The mental model
Think of artifact signing as a digital wax seal on a letter. The seal proves two things: first, who sent the letter (authenticity), and second, that the letter hasn't been opened and changed in transit (integrity). A broken seal immediately signals that the contents cannot be trusted. In software, the "seal" is a cryptographic signature attached to a container image, binary, or release file.
How it works
The process uses public-key cryptography. A developer generates a key pair: a private key they keep secret and a public key they share. To sign an artifact, they create a cryptographic hash of the file and then encrypt that hash with their private key. This encrypted hash is the signature. A consumer verifies it by decrypting the signature with the developer's public key to reveal the original hash. The consumer then independently hashes the artifact and compares their hash to the decrypted one. If they match, the signature is valid.
When to use it
Use artifact signing in any automated software delivery pipeline (CI/CD), especially for public-facing software. Key use cases include: signing container images before pushing them to a registry, signing release binaries and packages (like JARs or executables), and signing metadata files like Software Bills of Materials (SBOMs).
When not to use it
Signing is less critical for internal-only, ephemeral artifacts that never leave a trusted environment, like a build artifact used in an intermediate CI job that is immediately discarded. The overhead might not be justified if the artifact has an extremely short lifespan and a limited blast radius. However, with modern tooling, the overhead is minimal, making it a good default practice.
One canonical example
Traditionally, developers used tools like GPG, which created a huge burden of managing and distributing keys. A modern example is Sigstore's cosign tool. A developer can run cosign sign <image> and authenticate using their existing OIDC identity (like a GitHub or Google account). Cosign generates a temporary key pair, signs the container image, and records the event in a public, tamper-resistant transparency log. This eliminates the need for developers to manage long-lived private keys.
Interview question
In artifact signing, what is the primary function of the private key?
- a.To hash the artifact's content before it is signed.
- b.To encrypt the entire software artifact for secure transmission.
- c.To decrypt the signature provided by the developer for verification.
- d.To generate the cryptographic signature that attests to the artifact's origin and integrity.Correct
Why? this is the answer
The private key is used to encrypt the cryptographic hash of the artifact, creating the digital signature that proves authenticity and integrity. It does not encrypt the entire artifact, nor is it used for decryption or hashing the content itself.
Just read this? Test yourself on what you have been reading.
Read the original → docs.sigstore.dev
- #supply chain security
- #ci/cd
- #cryptography
- #devsecops
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles