skip to content

Artifact Signing & Sigstore

Signing binds a trusted identity to exact bytes, and keyless flows have replaced long-lived release keys. Interviewers probe the chain: OIDC identity, short-lived certificate, transparency log.

on this pageshow

explore

questions

page 1 of 2

What does an npm provenance attestation assert about a package, and what does it not?

level: juniorimportance: must knowfreq 55%

answer

  1. answers how, not whether
  2. subject digest, plus source and builder
  3. signed by the CI identity, keyless
  4. a backdoored repo attests cleanly

basics

~20 s

It binds a published tarball's digest to the source repository, commit and CI workflow that built it, signed by that build's identity. It says nothing about whether the code is reviewed, safe, or free of vulnerabilities.

solid answer

~50 s

npm provenance is a SLSA provenance statement produced when you publish with the npm CLI's `--provenance` flag from a supported CI provider. Its `subject` is the published tarball's digest; its predicate names the source repository, the commit, the workflow that ran, and the builder identity. Signing is keyless through Sigstore: the CI job's OIDC identity gets a short-lived certificate, and the signed bundle is recorded in a public transparency log. So the attestation answers *how this artifact came to be*, and lets a consumer confirm that version 1.4.2 really was built by that workflow from that commit. It is not a code review, not an SBOM, and not a vulnerability verdict. A repository containing a deliberate backdoor produces a perfectly valid provenance attestation. Reading a provenance badge as "this release is safe" is the single most common mistake here.

code

json · 18 lines
json
{
  "_type": "https://in-toto.io/Statement/v1",
  "subject": [
    { "name": "pkg:npm/[email protected]",
      "digest": { "sha512": "9f2c..." } }
  ],
  "predicateType": "https://slsa.dev/provenance/v1",
  "predicate": {
    "buildDefinition": {
      "externalParameters": {
        "workflow": { "repository": "https://example.com/acme/example",
                      "ref": "refs/heads/main",
                      "path": ".ci/release.yml" }
      }
    },
    "runDetails": { "builder": { "id": "https://example.com/hosted-runner" } }
  }
}

go deeper

for a junior

Be ready to state the three facts a provenance attestation binds together: this exact tarball, that builder, that source commit. Then say plainly what it does not cover — code quality, review, vulnerabilities.

for a middle

You are expected to describe the document itself: an in-toto statement whose subject is a digest and whose predicate is the build, signed in a separate envelope. Explain why the digest is what makes the claim non-transferable.

for a senior

Show that verification is meaningless without an expected identity. Talk about asserting the source repository and workflow you require, and about the attacks provenance closes versus the ones scanners close.

for a principal

Own the framing: provenance is an origin control, not a quality control, and an organisation that markets it internally as "safe" has bought a false assurance. Be able to say what you would pair it with.

## The shape of the document An npm provenance attestation is an **in-toto statement** — a small JSON payload with four parts: - `_type` — a URI saying "this is an in-toto statement". - `subject` — *the thing being described*. Here it is the published package tarball, named and identified by a cryptographic **digest** (a hash of the exact bytes). The digest is what welds the claim to one specific artifact: change a byte of the tarball and the statement no longer describes it. - `predicateType` — a URI naming the vocabulary of the claim. For npm provenance that is SLSA provenance. - `predicate` — the claim itself: which source repository and commit the build started from, which workflow file and ref defined it, and which builder ran it. The statement is only a payload. It is signed **separately**, wrapped in an envelope, and the signature is what makes it worth anything — an unsigned statement is a JSON file that anybody could have written by hand. ## How it comes into existence You publish from a supported CI provider (GitHub Actions and GitLab CI are the supported ones) with the npm CLI's `--provenance` flag. The CLI reads the CI environment to fill in the repository, commit and workflow, requests an OIDC identity token for that job, and uses Sigstore's keyless flow to sign: a short-lived certificate is issued that binds an ephemeral key to that workload identity, the statement is signed, and the bundle is submitted to the Rekor transparency log. The registry stores the attestation next to the package and shows a provenance badge linking to the commit and the build run. The crucial consequence: **you cannot mint one of these from a laptop.** The identity in the certificate is the CI workload's, not a human's. That is the whole point. ## What it therefore asserts — three linked facts 1. *This exact tarball* (by digest), 2. was produced by *that builder*, 3. from *that source repository at that commit*. Together they give you a chain of custody from source to registry. If someone steals a maintainer's publish token and pushes a tarball from their own machine, that publish cannot produce a valid statement naming your CI identity, and a consumer who requires provenance from an expected repository and workflow rejects it. ## What it does not assert - **Not that the code is good.** Provenance is indifferent to what the source contains. A backdoor committed to `main` and built by the real workflow attests cleanly. - **Not that the code was reviewed.** SLSA v1.0 split its requirements into tracks and left source review outside the build track; provenance is build-track material. - **Not that the package is free of known vulnerabilities.** That is a scanner's answer against an advisory database, a completely separate question. - **Not what is inside the package.** That is an SBOM's job — an SBOM enumerates components, provenance describes production. Neither substitutes for the other. - **Not that the named repository is the one you meant.** Verification checks that the signature is valid and the subject digest matches. Matching the source repository and workflow against what you *expect* is a policy decision the consumer has to make and state. Tooling that reports "provenance verified" without you asserting an expected identity has told you almost nothing — some builder somewhere signed something. - **Not that anyone checked it.** Publishing trust material and acting on it are separate projects, and most consumers do neither. ## Getting the direction of the claim right Three artifacts are constantly confused, and interviewers probe the confusion directly: | Artifact | Question it answers | | --- | --- | | SBOM | What is inside this artifact? | | Provenance | How did this artifact come to be? | | Signature | Who vouches for this artifact? | Provenance is the middle row. It is also *signed*, which is why people collapse it into the third row, but the signature is the delivery mechanism and the build description is the content. ## Why it is still worth having The attacks it closes are the ones where the artifact on the registry did not come from the stated source at all: a stolen publish token, a hijacked maintainer account, a tampered tarball substituted between build and upload, or a release built from an unpublished branch. Those are real and they are common, and no scanner catches them, because the malicious tarball may be perfectly "clean" against every advisory database. Provenance is the control that makes the *origin* checkable — and only that.

  • If provenance passes no judgement on the code, which attacks does it actually stop?
    The ones where the published artifact never came from the stated source: a stolen publish token, a hijacked maintainer account, a tarball substituted after the build, or a release cut from an unpublished branch. A consumer who requires provenance naming a known repository and workflow rejects those, because a publish from someone's laptop cannot mint a statement carrying your CI identity.
  • A package has provenance, but the repository it names is not the one you assumed. How would you notice?
    Only by reading the statement, or by telling your verification step which repository and workflow you expect. Verification on its own checks that the signature is valid and that the subject digest matches the tarball — both would pass. Asserting the expected identity is a consumer-side policy decision, and skipping it turns "provenance verified" into a badge with almost no content.
  • Does provenance tell you what is inside the package?
    No — that is an SBOM. Provenance describes how the artifact was produced: source, builder, build parameters. An SBOM enumerates the components the artifact contains, which is what you match against vulnerability advisories. They answer different questions and neither one is a substitute for the other.

It is the shipping label on a crate saying which plant and which production run made this exact crate. That is genuinely useful when you suspect the crate was swapped in transit, and it tells you nothing whatsoever about whether the contents are any good.

saying these in an interview costs you the question

  • Says provenance means the release was reviewed
  • Claims provenance proves the package has no vulnerabilities
  • Confuses provenance with an SBOM's component list
  • Thinks a valid signature implies a trustworthy source repository
  • Assumes npm install checks provenance automatically

context

open as a page

In Sigstore's keyless flow, what does a Fulcio certificate bind, and how long is it valid?

level: juniorimportance: must knowfreq 55%

basics

~20 s

A Fulcio certificate binds a one-time public key, generated locally at signing time, to the OIDC identity and issuer in the token you presented. It stays valid for roughly ten minutes, so no signing key is ever stored.

open as a page

What does verifying a detached GPG .asc signature on a release tarball actually prove?

level: juniorimportance: must knowfreq 62%

basics

~20 s

It proves the file is byte-for-byte what the holder of that private key signed. It does not prove the key belongs to the project, that the build was clean, or that the code is safe.

open as a page

In keyless artifact signing, what happens to the private key that produced the signature?

level: juniorimportance: must knowfreq 62%

basics

~10 s

Keyless signing still uses a private key, but it is generated for that one signing operation and destroyed immediately afterwards. Nothing long-lived is left behind to store, guard, rotate, or lose.

open as a page

A vendor's Helm chart carries a valid signature from the vendor's release identity. What does that prove about the chart's behaviour?

level: juniorimportance: must knowfreq 80%

basics

~10 s

Nothing about behaviour. A signature binds a signer identity to one exact set of bytes: it says who vouched for them, not that the chart's contents, defaults or dependencies are safe to install.

open as a page

What does an artifact signature prove if your verification policy never checks who signed it?

level: juniorimportance: must knowfreq 64%

basics

~10 s

Only that some identity signed those exact bytes and they were not altered afterwards. It says nothing about whether that identity is yours. Without an expected-signer check, any signature the trust root accepts passes.

open as a page

Why is a cosign verify step with no expected certificate identity or OIDC issuer worthless?

level: middleimportance: must knowfreq 62%

basics

~20 s

A bare cosign verify proves only that somebody obtained a Sigstore certificate and signed the artifact, which anyone with an email or a CI account can do. Pin the expected identity and the issuer that asserted it.

open as a page

How can a Sigstore keyless signature still verify years after its short-lived certificate expired?

level: middleimportance: must knowfreq 60%

basics

~20 s

Verification asks whether the certificate was valid when the signature was logged, not whether it is valid now. The Rekor entry supplies that moment as a log-signed timestamp, plus an inclusion proof binding it to the log.

open as a page

Your team replaced a long-lived signing key with keyless signing — what did that move custody to?

level: seniorimportance: must knowfreq 57%

basics

~20 s

Custody moved rather than disappeared. The new crown jewels are whoever can cause an identity to be minted for your workload, the certificate authority your verifiers trust, and the transparency log — which only helps if somebody actually watches it.

open as a page

Your deploy policy accepts any signature from an identity inside your GitHub organisation — what is wrong?

level: seniorimportance: must knowfreq 50%

basics

~20 s

Organisation membership is not the build you meant. Every repository, workflow and branch in the org can mint an identity that passes, so anyone able to push a workflow anywhere in the org can sign an artifact production will run.

open as a page

What is the difference between cosign sign and cosign sign-blob, and who stores the result?

level: juniorimportance: should knowfreq 55%

basics

~20 s

cosign sign signs an artifact already in an OCI registry, addressed by its digest, and pushes the signature back there. cosign sign-blob signs any local file and hands the signature material back to you to store and ship yourself.

open as a page

What does Sigstore's Rekor transparency log actually record when an artifact is signed?

level: juniorimportance: should knowfreq 52%

basics

~20 s

Rekor appends an entry holding the artifact's digest, the signature over it, and the signing certificate or public key. It never stores the artifact itself — only a timestamped, publicly readable record that this signature existed.

open as a page

Who actually verifies npm provenance or PyPI attestations, and at what point in the flow?

level: middleimportance: should knowfreq 44%

basics

~20 s

Mostly the registry, at upload time. A normal npm install or pip install verifies nothing. Consumers have to opt in: npm audit signatures checks an installed tree, and PyPI attestations must be fetched and checked deliberately.

open as a page

How does Sigstore's keyless flow make an npm provenance attestation verifiable years later?

level: middleimportance: should knowfreq 38%

basics

~20 s

The CI job's identity buys a certificate that lives only minutes, so it is long expired when anyone checks. Sigstore's append-only transparency log timestamps the entry, proving the signature was made while that certificate was still valid.

open as a page

How does a Fulcio certificate for a CI job differ from one issued to a human maintainer?

level: middleimportance: should knowfreq 44%

basics

~20 s

A human signer's Fulcio certificate names an email address asserted by a consumer or corporate identity provider. A CI job's certificate names a pipeline URI asserted by the CI platform, plus extensions recording the repository, ref and build configuration.

open as a page

In GPG release verification, how do you establish that the signing key really belongs to the project?

level: middleimportance: should knowfreq 45%

basics

~20 s

Cryptography cannot answer it; you need a channel independent of the download. Practical options are a key shipped in your OS vendor's keyring, a fingerprint published out of band, or a key certified by one you already trust.

open as a page

Why does revoking a compromised artifact signing key rarely stop consumers from accepting old artifacts?

level: middleimportance: should knowfreq 48%

basics

~20 s

Revocation only works if the verifier checks a revocation source at verify time. Artifact verification is usually offline against a trusted key the consumer already holds, so the key keeps verifying until every consumer updates that trusted set.

open as a page

A device verifies a firmware update's vendor signature but never compares the signed subject digest to the bytes it flashes. What has it verified?

level: middleimportance: should knowfreq 58%

basics

~20 s

Only that the vendor signed some statement. Until the device hashes the bytes it is about to flash and matches that digest against the signed subject, the signature is not bound to the payload at all.

open as a page

Why must a signature acceptance rule pin the expected issuer and not only the signer identity string?

level: middleimportance: should knowfreq 46%

basics

~20 s

A subject string is only a claim, and it means something solely because a particular issuer asserted it. Accept any issuer and a different one can mint an identical-looking identity, turning your identity check into a name check.

open as a page

Why does it matter which job and which identity runs cosign attest in your build pipeline?

level: seniorimportance: should knowfreq 42%

basics

~20 s

cosign attest signs a claim about an artifact, not the artifact itself, so the signature records only who asserted the claim. Run it later, or by hand, and you get a valid signature over an unverified statement.

open as a page

Fulcio certificates expire in about ten minutes — what does that window protect, and what does it not?

level: seniorimportance: should knowfreq 36%

basics

~10 s

The short window removes key custody: no durable private key to store, rotate or revoke. It does nothing against an attacker who controls the identity, who can simply request a fresh certificate.

open as a page

Your project signs releases with Sigstore keyless signing — how do you detect a Rekor entry made under your identity that you never created?

level: seniorimportance: should knowfreq 42%

basics

~20 s

You monitor the log. Because Rekor is public and append-only, you can watch new entries for your signing identities and reconcile each one against your own record of intended releases. Anything unmatched is an alert — detection, not prevention.

open as a page

An internal crates mirror ingests any crate carrying a valid publisher signature. What can still be served for a requested name?

level: seniorimportance: should knowfreq 44%

basics

~10 s

Any other genuinely signed crate. A signature answers who vouched for some bytes, never whether those bytes are the package and version that was requested, so substitution and downgrade both pass a presence check.

open as a page

Your project signs releases with a long-lived PGP key and a team proposes keyless signing. How do you decide?

level: principalimportance: should knowfreq 34%

basics

~20 s

Decide on who verifies. A long-lived key buys offline verification and universal tooling at the cost of decade-long key custody; keyless buys no durable secret and a public record, but depends on services you do not run.

open as a page

How do you verify cosign signatures inside an air-gapped enclave that cannot reach Fulcio or Rekor?

level: seniorimportance: nice to knowfreq 30%

basics

~20 s

Sign outside the enclave and carry the proof in. A bundle ships the signature, the signing certificate and the transparency-log entry beside the artifact, and a trust root cached in advance lets cosign check them with no network call.

open as a page

Six of your forty direct npm dependencies publish provenance. What policy do you set?

level: seniorimportance: nice to knowfreq 29%

basics

~20 s

Enforce provenance where it exists, record its absence elsewhere. Gate the six against an expected source repository, fall back to lockfile integrity hashes for the other thirty-four, and never report a missing attestation as a failed one.

open as a page

A project's PGP release key was revoked years ago. Why do verifiers still accept its signatures?

level: seniorimportance: nice to knowfreq 30%

basics

~10 s

OpenPGP revocation is metadata attached to the key, and signature verification is offline against the copy already in the local keyring. Nothing in the verification path fetches revocation status, so nobody sees it.

open as a page

When would you run a private Fulcio bound to your corporate IdP instead of the public instance?

level: principalimportance: nice to knowfreq 20%

basics

~20 s

Run a private Fulcio when signer identities must not be public, when releases happen in isolated environments, or when only your own directory can assert those identities. The cost is owning a certificate authority and an offboarding process that now gates signing.

open as a page

Your internal signing root's key ceremony has never been performed and the machine that generated it is gone — what now?

level: principalimportance: nice to knowfreq 22%

basics

~20 s

Treat the root as unverifiable, not merely overdue, and say so in writing. Then choose deliberately: re-key under a witnessed ceremony, retire the private root for short-lived issued identities, or accept the risk with a named owner and review date.

open as a page

A defence customer objects that Sigstore's public Rekor log exposes internal repository and staff names — how do you answer?

level: principalimportance: nice to knowfreq 28%

basics

~20 s

Concede the leak: identities, artifact digests and timing are published permanently, enough to map repositories and release cadence. Then price the alternative — a private log keeps that internal but loses the outside scrutiny that gives transparency its value.

open as a page

showing 1–30 of 31