Attach a CycloneDX SBOM as a keyless cosign attestation to a container image pushed to GHCR using Sigstore's public Fulcio CA

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

Steps

  1. Build and push the container image to GHCR, then generate the CycloneDX SBOM using Syft: syft scan <IMAGE>:<TAG> -o cyclonedx-json=sbom.cdx.json
  2. In a GitHub Actions workflow, authenticate to Sigstore using the GITHUB_TOKEN-backed OIDC identity; cosign 2.x picks up the OIDC token from the environment automatically when running in GitHub Actions with id-token: write permission
  3. Attest the SBOM using: cosign attest --type cyclonedx --predicate sbom.cdx.json <IMAGE>@<DIGEST> — use the image digest (not tag) as the reference to ensure the attestation is bound to an immutable identifier
  4. cosign attest uploads the attestation as an OCI referrer to the same registry namespace; verify it with cosign verify-attestation --type cyclonedx --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp <WORKFLOW_REF> <IMAGE>@<DIGEST>
  5. Inspect the stored attestation using crane ls <IMAGE> to see referrer tags, or use the OCI referrers API to enumerate all attached artifacts

Known gotchas

Related routes

Attach and verify a cosign attestation for an SBOM linked to a container image
docs.sigstore.dev · 5 steps · unrated
Attach a signed SBOM attestation to an OCI image using cosign attest
docs.sigstore.dev · 6 steps · unrated
Sign a container image with Sigstore cosign keyless signing (Fulcio + Rekor) and verify it
security-general · 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