Repository navigation
Signing and Provenance
Last reviewed: 2026-11-28 (key-based Cosign signing and attestation observed in supply-chain lab CI run 46226817429 with no transparency log; keyless and SLSA verifier statements are from upstream documentation only)
Prerequisites: SBOM & dependency analysis ยท Software supply-chain assessment ยท Cryptographic hashes & signed artifacts.
Explain what signatures, attestations and SLSA provenance prove, how to produce and verify them with Sigstore Cosign, and how to write a verification policy that checks more than "a signature exists".
Covers keyed and keyless signing, the transparency log, in-toto attestations, the SLSA v1.2 Build and Source tracks, GitHub artifact attestations and slsa-verifier, with each command marked as observed in the lab or taken from upstream documentation.
Let a reader decide which signing model fits, verify an artifact against an explicit identity and predicate type, and avoid treating a valid signature as proof that a build was trustworthy.
- Adding signing or provenance to a release pipeline
- Writing admission or deployment policy that checks signatures
- Assessing a supplier's claim that releases are "signed" or "SLSA compliant"
- What Each Layer Proves
- Cosign v3 Basics
- Keyed Signing
- Keyless Signing & The Transparency Log
- Attestations
- SLSA v1.2
- Verification Policy
- See also
| Layer | Answers | Does not answer |
|---|---|---|
| Digest (SHA-256) | Is this the same bytes I recorded? | Who produced it, or whether it is safe |
| Signature | Did the holder of this key or identity sign these bytes? | How the bytes were built |
| Attestation (in-toto Statement) | Did this signer make this typed claim about this digest? | Whether the claim is true |
| SLSA provenance | Which builder, build type and parameters produced the digest | Whether the source code is benign, or whether the builder was honest |
| Policy | Do the identity, subject and predicate meet my requirements? | Anything you did not write a rule for |
A verifier must check each layer. The attestation-layers section of the assessment guide shows the same split as a figure.
The lab pinned Cosign v3.1.6 (asset cosign-linux-amd64, SHA-256 318a99ade4156a0c4113aa983b46c0a0830fa7896a096c63121ee47b610a94c6, checked against cosign_checksums.txt). Changes in v3 that affect scripts written for v2, from the Cosign CHANGELOG (v3.0.0 to v3.0.3):
- The protobuf bundle format (
application/vnd.dev.sigstore.bundle.v0.3+jsonin the lab) is the default, and--bundleis required. Without it,sign-blobandattest-blobreturnmust specify --bundle with --new-bundle-format(fromsignblob.goandattest_blob.goat v3.1.6; not a lab case). - Service URLs come from the TUF-distributed signing config by default. With no network, plain
cosign sign-blob --key ...failed while fetching the signing config fromtuf-repo-cdn.sigstore.dev(lab casedocumented-sign-default-needs-sigstore). Online, that config includes the public Rekor log, so a key-based signature is uploaded to the public transparency log unless you say otherwise. -
--tlog-upload=falseis deprecated (v3.0.3 CHANGELOG). When a signing config is in use, which is the v3 default, the source returns--tlog-upload=false is not supported with --signing-config or --use-signing-config(signcommon/common.goat v3.1.6; not a lab case). The supported way to sign without a log is a signing config with no log services (below).
Use keys when there is no OIDC identity to bind to (air-gapped builds, offline release ceremonies) or when policy requires an organisation-held key. The key then becomes the thing to protect, rotate and revoke.
# Generate an encrypted key pair (writes cosign.key and cosign.pub)
COSIGN_PASSWORD='<from a secret store>' cosign generate-key-pair
# Signing config with no transparency log or timestamp authority (runs offline)
cosign signing-config create --out no-tlog-signing-config.json
# Sign (lab case signing-sign-blob-no-tlog, rc 0)
cosign sign-blob --yes --key cosign.key \
--signing-config no-tlog-signing-config.json \
--bundle artifact.bundle.json artifact.txt
# Verify (lab case signing-verify-blob, rc 0, "Verified OK")
cosign verify-blob --key cosign.pub --bundle artifact.bundle.json \
--insecure-ignore-tlog=true artifact.txtObserved in CI:
- The signing config had empty
rekorTlogConfigandtsaConfig, and the bundle'sverificationMaterialheld onlypublicKey. - A tampered blob and an unrelated public key both failed with
invalid signature when validating ASN.1 encoded signature(rc 1). - A wrong
COSIGN_PASSWORDfailed withreading key: decrypt: encrypted: decryption failed(rc 1). - Without
--insecure-ignore-tlog=true,verify-blobtried to fetch the public trusted root (getting trusted root from TUF for new bundle verification) and failed offline.
Warning
--insecure-ignore-tlog=true prints "Skipping tlog verification is an insecure practice that lacks transparency and auditability verification". It is acceptable only when you deliberately signed without a log, as above. For anything signed against the public log, verify the log entry.
In keyless signing, per the Sigstore overview, the client creates a one-time key pair, proves its identity with an OpenID Connect (OIDC) token, and the Fulcio certificate authority "issues a short-lived certificate bound to the provided identity and public key". The signature and certificate are recorded in Rekor, "an immutable, append-only ledger". There is no long-lived private key to steal, but the trust question moves to "which identity is allowed to sign".
A keyless verification must pin both the identity and the issuer. From cosign verify-blob --help (v3.1.6):
cosign verify-blob --bundle artifact.sigstore.json \
--certificate-identity '<expected signer identity>' \
--certificate-oidc-issuer '<expected OIDC issuer>' artifact.binEither --certificate-identity or --certificate-identity-regexp "must be set for keyless flows". For artifacts signed in GitHub Actions the issuer is https://token.actions.githubusercontent.com (GitHub OIDC reference), and cosign verify also accepts --certificate-github-workflow-repository, --certificate-github-workflow-ref, --certificate-github-workflow-trigger and related flags to pin certificate extensions. A loose --certificate-identity-regexp (unanchored, or matching any repository or branch) is a common mistake: it can let another repository or a feature branch sign as you.
Note
Keyless signing and Rekor verification were not exercised in this repository. Both need the public Sigstore services, and the lab runs with no network.
An attestation is a signed in-toto Statement: a list of subjects (names and digests), a predicateType and a predicate. Cosign's --type accepts slsaprovenance, slsaprovenance02, slsaprovenance1, link, spdx, spdxjson, cyclonedx, vuln, openvex, custom or a URI.
# Lab case attest-blob-slsa-provenance, rc 0
cosign attest-blob --yes --key cosign.key \
--signing-config no-tlog-signing-config.json \
--type slsaprovenance1 --predicate slsa-provenance-predicate.json \
--bundle attestation.bundle.json artifact.txt
# Lab case attest-verify, rc 0, "Verified OK"
cosign verify-blob-attestation --key cosign.pub \
--bundle attestation.bundle.json --insecure-ignore-tlog=true \
--type slsaprovenance1 artifact.txtObserved in CI:
- The bundle held a DSSE envelope with payload type
application/vnd.in-toto+json. The Statement_typewashttps://in-toto.io/Statement/v0.1(not v1), the predicate typehttps://slsa.dev/provenance/v1, and the subject the artifact's basename and SHA-256. - Verifying with
--type spdxjsonfailed:invalid predicate type, expected spdxjson got https://slsa.dev/provenance/v1. Always pass the type you expect. - A changed artifact failed with
provided artifact digests do not match digests in statement.
Whether --statement with an in-toto v1 Statement changes the _type was not tested.
SLSA v1.2 is the current release (tag v1.2 in slsa-framework/slsa; no later tag existed on 2026-11-28). It adds a Source Track alongside the Build Track.
From build-track-basics:
| Level | Requirement | Focus |
|---|---|---|
| Build L0 | None | n/a |
| Build L1 | Provenance showing how the package was built | Mistakes, documentation |
| Build L2 | Signed provenance, generated by a hosted build platform | Tampering after the build |
| Build L3 | Hardened build platform | Tampering during the build |
From source-requirements:
| Level | Requirement |
|---|---|
| Source L1 | Use a version control system |
| Source L2 | Preserve change history and generate source provenance |
| Source L3 | Enforce organizational technical controls |
| Source L4 | Require code review (two-party review) |
Per build-provenance, the predicate type is https://slsa.dev/provenance/v1: it carries only the major version and does not change with minor spec versions. Build L1 requires buildDefinition (with buildType and externalParameters) and runDetails (with builder.id). The lab's synthetic predicate has these required fields on example.test values, plus an empty internalParameters, an empty resolvedDependencies and a runDetails.metadata.invocationId.
Important
A level is a property of the build platform and process, not of a JSON file. Anyone can write a provenance predicate by hand, as the lab did, and sign it. That shows the signer made the claim, not that Build L2 or L3 was met.
SLSA's verifying-artifacts page lists what to check: the builder identity (from a trusted root for that builder), the canonical source repository, the buildType, and the externalParameters, so an attacker cannot build the right code on the wrong platform, from a fork, or with injected parameters.
Tools that do this for specific builders (documented upstream, not run here):
-
slsa-verifier v2.7.1:
slsa-verifier verify-artifact <artifact> --provenance-path <file>.intoto.jsonl --source-uri github.com/ORG/REPO [--source-tag <tag>]. Only GitHub source URIs are supported. Release assets have no checksums file; checksums are in the repository'sSHA256SUM.md. During research an offline run failed attuf refresh failed, because it needs Sigstore TUF and Rekor. -
GitHub artifact attestations:
gh attestation verify(gh 2.106.0 help) enforces predicate typehttps://slsa.dev/provenance/v1by default, requires--owneror--repo, and recommends pinning the signer workflow with--signer-workflowor--cert-identity. If a reusable workflow produced the attestation, that reusable workflow is the signer and you must use--signer-workflowor--signer-repo.--bundleverifies a bundle on disk instead of fetching from the GitHub API.
Write the policy down before you write the verifier command. For each artifact class, record:
- Subject: the digest being deployed, not a tag.
- Signer: the public key, or the exact certificate identity and OIDC issuer.
- Transparency: whether a log entry is required (it should be for keyless signatures).
-
Predicate type: the exact URI, such as
https://slsa.dev/provenance/v1. -
Predicate contents: builder ID, source repository, ref and
buildTypeyou accept. - Failure mode: what happens when verification fails or a verifier service is unreachable. A policy that fails open during an outage provides no protection during that outage.
To enforce this at deploy time in Kubernetes, see image-signature admission.
- Supply-chain tooling lab: observed Cosign signing, attestation and negative cases
- SBOM & dependency analysis: the SBOM you may want to attest
-
CI/CD threat model & GitHub Actions:
id-token: writeand protecting the signing job - Conditional access & workload identities: the GitHub OIDC claims that keyless identities are built from
- README.md - Container & Kubernetes Security section index
- software-supply-chain-assessment.md - Assessment engagement workflow
- containers.md - Image digest pinning
โฌ ๏ธ Back to Master Index | ๐ฏ Role Navigation | Legal Notice
๐ Source: ContainerSecurity/signing-and-provenance.md | โ๏ธ Suggest an edit | โฌ
๏ธ Back to Container Security
- ๐บ๏ธ Browse by Topic
- ๐ All Repository Files
- ๐งญ Learning Paths
- ๐ Master Guide
- ๐ค Glossary
- โ๏ธ Legal & Disclaimer
๐ Foundations & Learning
๐ก๏ธ Defense & Investigations
- Incident Response
- Open Source Intelligence (OSINT)
- Reverse Engineering
- Operations Security (OPSEC)
- Compliance
โ๏ธ Platforms & Infrastructure
๐ก Hardware, Wireless & Field Projects
- PNWC Cyberdeck
- Hardware Testing
- Hardware Hacking
- Software-Defined Radio
- Wardriving
- uConsole
- Space Security
๐งฐ Assessment & Field Reference
๐ฆ Downloads & Project Resources
๐๏ธ Additional Topics