Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Verify signed artifacts and SLSA build provenance with Sigstore cosign and slsa-verifier, enforce keyless OIDC identity, and apply SLSA Build levels to harden the software supply chain.
.claude/skills/mukul975-verifying-build-provenance-with-slsa-sigstore/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 58% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 182% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 223% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 306% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 144% | 0% |
Build-provenance verification answers a question that defeats many supply-chain attacks: was this artifact actually built from the source I think it was, by the builder I trust, without tampering? Attackers who compromise a build system, swap a compiled release, or inject a malicious step (as in the SolarWinds and 3CX incidents) produce artifacts that look legitimate but lack verifiable provenance. SLSA (Supply-chain Levels for Software Artifacts, https://slsa.dev) defines Build levels (L1–L3) describing increasing provenance integrity, and Sigstore (https://www.sigstore.dev) provides the signing and transparency infrastructure: cosign for signing/verifying artifacts and attestations, Fulcio for short-lived keyless certificates bound to an OIDC identity, and Rekor as a tamper-evident transparency log.
This skill covers verifying signatures and SLSA provenance with cosign (cosign verify, cosign verify-attestation, cosign verify-blob-attestation) and slsa-verifier (slsa-verifier verify-artifact), enforcing the builder identity (the GitHub Actions workflow that produced the artifact) and the expected source repository. Keyless verification ties trust to an OIDC issuer (e.g., https://token.actions.githubusercontent.com) and a certificate identity rather than a long-lived private key.
This maps to MITRE ATT&CK T1195 — Supply Chain Compromise (provenance verification detects/blocks tampered artifacts) and NIST CSF PR.DS-01 (the confidentiality, integrity, and availability of data-at-rest are protected; CSF 2.0 absorbed the retired 1.1 PR.DS-06 integrity-checking outcome here).
bash go install github.com/sigstore/cosign/v2/cmd/cosign@latest # or download a release binary from https://github.com/sigstore/cosign/releases
bash go install github.com/slsa-framework/slsa-verifier/v2/cli/slsa-verifier@latest # or: curl -sSL https://github.com/slsa-framework/slsa-verifier/releases/latest/download/slsa-verifier-linux-amd64 \ -o /usr/local/bin/slsa-verifier && chmod +x /usr/local/bin/slsa-verifier
https://rekor.sigstore.dev) and Fulcio for transparency-log verification..sigstore, .intoto.jsonl, or attached OCI attestation).cosign verify-attestation --type slsaprovenance.slsa-verifier verify-artifact, pinning source repo and tag.cosign verify-blob-attestation.| ID | Tactic | Technique Name | Relevance | |----|--------|----------------|-----------| | T1195 | Initial Access | Supply Chain Compromise | Verifying provenance and signatures detects artifacts that were tampered with or substituted in the build/distribution chain, preventing supply-chain compromise from reaching deployment. |
Pin both the OIDC issuer and the certificate identity (the exact workflow that signed). A bare cosign verify without identity pinning is meaningless — anyone can sign.
bashcosign verify \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ --certificate-identity-regexp "^https://github.com/myorg/myrepo/.github/workflows/.*@refs/tags/v.*" \ ghcr.io/myorg/myrepo:v1.2.3
A non-zero exit or empty result means verification failed — do not deploy.
The signature proves who signed; the provenance attestation proves how it was built. Verify the in-toto SLSA predicate type.
bashcosign verify-attestation \ --type slsaprovenance \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ --certificate-identity "https://github.com/myorg/myrepo/.github/workflows/build-sign.yml@refs/heads/main" \ ghcr.io/myorg/myrepo:v1.2.3
Supported predicate types include slsaprovenance, slsaprovenance02, and slsaprovenance1.
Decode the verified attestation to confirm the source repo, commit, and builder match expectations.
bashcosign verify-attestation --type slsaprovenance \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ --certificate-identity-regexp '.*' \ ghcr.io/myorg/myrepo:v1.2.3 \ | jq -r '.payload' | base64 -d | jq '.predicate.buildDefinition.externalParameters, .predicate.runDetails.builder.id'
For downloadable binaries (e.g., produced by slsa-github-generator), pin the source URI and the tag. slsa-verifier checks the cryptographic signature on the provenance and that the expected builder produced it.
bashslsa-verifier verify-artifact slsa-test-linux-amd64 \ --provenance-path slsa-test-linux-amd64.intoto.jsonl \ --source-uri github.com/myorg/myrepo \ --source-tag v1.2.3 # Optionally pin the builder identity (SLSA L3) slsa-verifier verify-artifact ./mybin \ --provenance-path ./mybin.intoto.jsonl \ --source-uri github.com/myorg/myrepo \ --builder-id https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@refs/tags/v2.0.0
For artifacts signed via actions/attest-build-provenance, the bundle uses the new Sigstore bundle format.
bashcosign verify-blob-attestation \ --bundle ./myartifact.sigstore.json \ --new-bundle-format \ --certificate-oidc-issuer="https://token.actions.githubusercontent.com" \ --certificate-identity-regexp="^https://github.com/myorg/myrepo/" \ ./myartifact # Equivalent native GitHub CLI verification gh attestation verify ./myartifact --repo myorg/myrepo
Wrap verification so the pipeline fails closed on any error.
bash#!/usr/bin/env bash set -euo pipefail IMG="ghcr.io/myorg/myrepo:v1.2.3" cosign verify \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ --certificate-identity-regexp "^https://github.com/myorg/myrepo/" "$IMG" >/dev/null cosign verify-attestation --type slsaprovenance \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ --certificate-identity-regexp "^https://github.com/myorg/myrepo/" "$IMG" >/dev/null echo "[+] $IMG verified: signature + SLSA provenance OK"
Document the level each consumed artifact achieves:
slsa-github-generator reusable workflows). Require L3 for high-trust artifacts.| Tool / Resource | Purpose | Link | |-----------------|---------|------| | cosign | Sign/verify artifacts and attestations (keyless) | https://github.com/sigstore/cosign | | slsa-verifier | Verify SLSA provenance from compliant builders | https://github.com/slsa-framework/slsa-verifier | | slsa-github-generator | Produce SLSA L3 provenance in GitHub Actions | https://github.com/slsa-framework/slsa-github-generator | | actions/attest-build-provenance | GitHub-native provenance attestation | https://github.com/actions/attest-build-provenance | | SLSA specification | Build levels and provenance schema | https://slsa.dev/spec/v1.0/ | | Sigstore docs | Fulcio, Rekor, cosign verification | https://docs.sigstore.dev/cosign/verifying/verify/ |
| Field | Where it comes from | Why it matters | |-------|--------------------|----------------| | --certificate-oidc-issuer | The OIDC issuer (e.g., GitHub Actions) | Restricts who could have requested the signing cert | | --certificate-identity[-regexp] | The exact/patterned workflow identity (SAN) | Restricts which workflow signed; prevents impersonation | | --source-uri (slsa-verifier) | Expected source repo | Confirms the artifact came from your repo | | --source-tag / --source-versioned-tag | Expected git tag | Prevents rollback/substitution | | --builder-id | Trusted builder workflow ref | Enforces SLSA L3 non-forgeable builder |
--type slsaprovenance)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | pass→pass | 3,833 | 3,632 | -5% | 1 | 1 | 0% | 799 | 3,247 | +306% | 0 | 0 | — |
case-01 | fail→pass | 16,082 | 11,764 | -27% | 1 | 1 | 0% | 3,279 | 5,165 | +58% | 0 | 0 | — |
case-02 | pass→pass | 7,851 | 4,218 | -46% | 1 | 1 | 0% | 1,333 | 3,259 | +144% | 0 | 0 | — |
case-03 | pass→pass | 12,223 | 5,356 | -56% | 1 | 1 | 0% | 1,234 | 3,776 | +206% | 0 | 0 | — |
case-05 | pass→pass | 7,712 | 5,073 | -34% | 1 | 1 | 0% | 1,554 | 3,611 | +132% | 0 | 0 | — |
case-06 | pass→pass | 13,267 | 4,999 | -62% | 1 | 1 | 0% | 2,374 | 3,619 | +52% | 0 | 0 | — |
case-07 | fail→pass | 6,543 | 4,421 | -32% | 1 | 1 | 0% | 1,283 | 3,620 | +182% | 0 | 0 | — |
case-08 | pass→pass | 3,717 | 3,726 | +0% | 1 | 1 | 0% | 559 | 3,126 | +459% | 0 | 0 | — |
case-09 | pass→pass | 7,702 | 5,379 | -30% | 1 | 1 | 0% | 1,364 | 3,580 | +162% | 0 | 0 | — |
case-10 | fail→fail | 13,501 | 7,194 | -47% | 1 | 1 | 0% | 2,248 | 3,916 | +74% | 0 | 0 | — |
case-11 | fail→fail | 19,538 | 17,275 | -12% | 1 | 1 | 0% | 3,424 | 5,803 | +69% | 0 | 0 | — |
case-12 | fail→fail | 24,140 | 22,086 | -9% | 1 | 1 | 0% | 2,347 | 3,047 | +30% | 0 | 0 | — |
case-13 | pass→pass | 6,327 | 4,040 | -36% | 1 | 1 | 0% | 1,136 | 3,338 | +194% | 0 | 0 | — |
case-14 | pass→pass | 10,596 | 2,941 | -72% | 1 | 1 | 0% | 2,088 | 3,087 | +48% | 0 | 0 | — |
case-15 | pass→pass | 16,413 | 11,239 | -32% | 1 | 1 | 0% | 2,149 | 4,382 | +104% | 0 | 0 | — |
case-16 | pass→pass | 5,445 | 4,141 | -24% | 1 | 1 | 0% | 1,019 | 3,482 | +242% | 0 | 0 | — |
case-17 | fail→pass | 22,046 | 7,045 | -68% | 1 | 1 | 0% | 1,194 | 3,851 | +223% | 0 | 0 | — |
case-18 | pass→pass | 6,639 | 6,235 | -6% | 1 | 1 | 0% | 1,200 | 3,912 | +226% | 0 | 0 | — |
case-19 | pass→pass | 5,950 | 3,173 | -47% | 1 | 1 | 0% | 1,111 | 3,007 | +171% | 0 | 0 | — |
case-20 | pass→pass | 9,460 | 4,222 | -55% | 1 | 1 | 0% | 1,723 | 3,359 | +95% | 0 | 0 | — |
case-21 | fail→fail | 12,080 | 7,079 | -41% | 1 | 1 | 0% | 1,765 | 3,516 | +99% | 0 | 0 | — |
case-22 | pass→pass | 11,746 | 4,208 | -64% | 1 | 1 | 0% | 1,997 | 3,377 | +69% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +14 percentage points is the difference between those two pass rates over the 20 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/3/2026 | +13% |
Other measured skills in the registry, with their headline benchmark lift.