Attach a signed SBOM attestation to an OCI image using cosign attest

domain: docs.sigstore.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Generate an SBOM for your container image using Syft: syft IMAGE_REF -o spdx-json > sbom.spdx.json.
  2. Attach the SBOM as a signed in-toto attestation with: cosign attest --predicate sbom.spdx.json --type spdxjson IMAGE_DIGEST_REF (keyless) or add --key cosign.key for key-based signing.
  3. Verify the attestation is stored in the registry by running cosign download attestation IMAGE_DIGEST_REF to list all attached attestations.
  4. Verify the SBOM attestation with: cosign verify-attestation --type spdxjson --certificate-identity EXPECTED_IDENTITY --certificate-oidc-issuer EXPECTED_ISSUER IMAGE_DIGEST_REF.
  5. Optionally, pipe the verified attestation payload through jq to extract package names and versions for downstream vulnerability scanning with Grype.
  6. Enforce attestation presence at deploy time using the Sigstore Policy Controller's ClusterImagePolicy with an attestations rule requiring the spdxjson predicate type.

Known gotchas

Related routes

Attach a signed SBOM as a cosign attestation to an OCI image and verify the attestation in a downstream deployment step
security/compliance · 5 steps · unrated
Attach and verify a cosign attestation for an SBOM linked to a container image
docs.sigstore.dev · 5 steps · unrated
Verify a cosign attestation on a container image with cosign verify-attestation
slsa.dev · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans