CI build and Sigstore signing
The build layer uses only published standards and Sigstore. Every artifact (a crate, a WASI component, a container image, a firmware image) gets the same signature and the same three attestations: provenance, SBOM and twin.
| Concern | Standard | Identifier | What it proves |
|---|---|---|---|
| Envelope | in-toto attestation, DSSE envelope | https://in-toto.io/Statement/v1 |
Binds a typed claim to artifact digests |
| Provenance | SLSA Provenance v1 | https://slsa.dev/provenance/v1 |
Which builder, source, parameters and dependencies |
| Contents | CycloneDX SBOM (or SPDX) | https://cyclonedx.org/bom |
Every component and version inside the artifact |
| Identity | Sigstore Fulcio | Short-lived X.509 certificate | The CI job’s OIDC identity signed it; no long-lived key exists |
| Transparency | Sigstore Rekor | Inclusion proof | The signing happened, publicly, at a given time |
| Packaging | Sigstore bundle | *.sigstore.json |
Signature, certificate and log proof in one file |
GitLab CI
Section titled “GitLab CI”The job asks GitLab for an OIDC token with audience sigstore. cosign reads it from SIGSTORE_ID_TOKEN, gets a certificate from Fulcio, signs, records the entry in Rekor and discards the key.
build_and_attest: id_tokens: SIGSTORE_ID_TOKEN: aud: sigstore variables: COSIGN_YES: "true" script: - cargo build --release --locked - cargo cyclonedx --format json - cosign sign-blob app.wasm --bundle app.wasm.sigstore.json - cosign attest-blob app.wasm --type https://cyclonedx.org/bom --predicate app.cdx.json --bundle app.sbom.sigstore.json - cosign attest-blob app.wasm --type https://slsa.dev/provenance/v1 --predicate provenance.json --bundle app.slsa.sigstore.jsonVerification pins both the issuer and the exact pipeline identity: the project URL, //, the CI file path, @ and the ref.
cosign verify-blob app.wasm --bundle app.wasm.sigstore.json \ --certificate-identity "https://gitlab.com/<group>/<project>//.gitlab-ci.yml@refs/tags/v1.4.0" \ --certificate-oidc-issuer "https://gitlab.com"GitHub Actions
Section titled “GitHub Actions”The workflow asks for an OIDC token with id-token: write; cosign picks it up by itself.
permissions: id-token: write contents: readsteps: - run: cosign sign-blob app.wasm --bundle app.wasm.sigstore.json - run: cosign attest-blob app.wasm --type https://cyclonedx.org/bom --predicate app.cdx.json --bundle app.sbom.sigstore.jsoncosign verify-blob app.wasm --bundle app.wasm.sigstore.json \ --certificate-identity "https://github.com/<owner>/<repo>/.github/workflows/release.yml@refs/tags/v1.4.0" \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com"GitHub’s built-in actions/attest writes provenance, and with sbom-path an SBOM attestation; it needs id-token: write, contents: read and attestations: write. Consumers verify with gh attestation verify. The twin attestation, with its own predicate type, still goes through cosign attest-blob.
GitHub’s Sigstore instance for private repositories has no transparency log, so you cannot monitor it for abuse of your CI identity. Sign against the public instance, or your own, when that matters.
Your own CI
Section titled “Your own CI”What decides the setup is how the build job proves who it is. Keyless signing needs an OIDC token that Fulcio trusts. Without one, the job signs with a key held in a KMS, Vault or an HSM (cosign sign-blob --key awskms://…), and verifiers pin the public key. Everything downstream stays the same.
Public or private Sigstore
Section titled “Public or private Sigstore”The public-good instance is the default: nothing to run, and anyone can verify. An organization that must not publish its build identities, or that runs air-gapped, operates its own Fulcio, Rekor, timestamp authority and CT log. Verifiers then trust that instance through cosign verify-blob --trusted-root trusted_root.json, with the trusted root distributed through the organization’s own TUF repository. Devices verify offline in both cases, from a trusted root provisioned with their firmware.