SBOM Attestations: How to Sign and Verify
Reference guide
From signing to verification, step by step.
An attestation is a signed statement that says "this SBOM describes this exact artifact". This guide walks through the four messages involved, explains each field in plain language, and lists what to check before you trust the result.
How it works
Four messages, one chain of trust
The producer signs once. Each consumer checks the signature and compares the artifact they actually have with the one that was signed. Select a step to see it below.
What is inside an attestation
payload), its type label (payloadType) and the signature (signatures). The signature covers the content and its type label together.Explorer
Real requests and responses, explained
These are real messages from POST /api/v2/attestations/sign and POST /api/v2/attestations/verify. Select a numbered field to see what it means and what to check.
Checklists
What to check, message by message
1 · Sign request
Before you sign
- Use a key created with
key_type: "attestation". A normal SBOM signing key is rejected withkey_purpose_mismatch. - The fingerprint in
subject[].digest.sha256is the SHA-256 of the artifact (an image, binary or package), not of the SBOM. subject[].nameis the name people will look the artifact up by, such as an image reference.- Send
sbomas a JSON object, not a string, and make sure it isn't already signed. - Leave out
predicate_signatureunless the SBOM must also be checkable on its own.
2 · Sign response
Before you publish
- Store and share
attestationexactly as returned. Re-formatting thepayloadbreaks the signature. - Decode the
payloadand confirm the artifact name and fingerprint are the ones you meant to sign. predicate_typematches your SBOM format (CycloneDX, SPDX or AI-SBOM).signatures[0].keyidequals yourkey_id.- Keep
statement_sha256with your build records. Verification returns the same value.
3 · Verify request
Before you verify
- Compute
expected_digest.sha256yourself from the artifact you are about to use. Never copy it from the attestation, or the check proves nothing. - Send
attestationas a JSON object, not in quotes and not wrapped in another field. - Use the
key_idof the producer you expect. A different signer fails withkey_mismatch.
4 · Verify response
Before you trust it
- Act only on
verified: true. A failure returns an error code naming the first check that failed. matched_subjectis the artifact your fingerprint matched. Confirm the name is the one you expect.key_typeisattestation, andpredicate_typeis the SBOM format you expect.checks.predicate_signature: "not_present"is normal. It means no extra SBOM signature was requested.statement_sha256equals the value from the sign response.
Try it
Change the attestation and watch verification fail
This runs the same checks as SecureSBOM, entirely in your browser. Nothing is uploaded. Edit the decoded payload or press a "change" button, then run the checks again.
The public key is the example producer's, published at GET /api/v1/public/keys/{key_id}. Checking against the producer's own key proves both that nothing changed and who signed it.
Change something
SecureSBOM stops at the first failure and returns its error code. This page runs every check, so you can see everything that broke.
Troubleshooting
Verification error codes
| Code | What it means | What to do |
|---|---|---|
expected_digest_required | No artifact fingerprint was sent. | Hash the artifact you are about to use and send that SHA-256. |
invalid_envelope | The attestation isn't in the expected format. | Send it as a JSON object, unchanged, with payloadType, payload and signatures. |
key_mismatch | A different key signed it. | Check which producer you expect, and compare with signatures[].keyid. |
signature_invalid | The signature doesn't match the content. | Something changed after signing. Get the original attestation again. |
payload_not_canonical | The signed content was re-formatted. | Something re-saved it, for example by pretty-printing. Use the original. |
invalid_statement | The statement is missing required parts. | Check _type, subject, predicateType and predicate. |
unsupported_predicate_type | The SBOM isn't CycloneDX, SPDX or AI-SBOM. | Confirm the attestation came from a supported SBOM format. |
subject_mismatch | Your artifact's fingerprint isn't in the attestation. | You have a different artifact from the one that was signed. Don't use it. |
predicate_signature_invalid | The optional extra SBOM signature doesn't match. | The SBOM changed, or the wrong separate signature was sent. |
For the curious
The standards behind it
You don't need these to use attestations, but they help if you are building your own verifier or reviewing the design.
- DSSE (Dead Simple Signing Envelope)
- The format of the signed envelope. The signature covers the content together with its type label, so neither can be swapped for another.
- in-toto Statement
- A widely used format for "this data describes that artifact". The artifact is the subject and the SBOM is the predicate.
- Canonical JSON (RFC 8785)
- One fixed way of writing JSON (sorted keys, no extra spaces), so the same data always produces the same bytes and the same signature.
- ES256
- The signature algorithm: ECDSA with the P-256 curve and SHA-256.
- SHA-256 fingerprint (digest)
- A 64-character hash that identifies one exact file or image. Change a single byte and it changes completely.