KAS-BUILD-ATTESTATION(1)
β¨ NAME β¨
kas-build-attestation β okay so this is all about working with SLSA / in-toto attestations π (and yes, this page lives in the kas manual, section 1, iykyk)
π οΈ BUILD ATTESTATION π οΈ
Bestie, kas can literally generate SLSA / in-toto build attestation data for you. Obsessed. Right now the following attestation formats are implemented:
provenance v1βhttps://slsa.dev/spec/v1.0/provenance
π Provenance
The provenance data spills all the tea about the build π That means data about the build environment, plus all primary (first-level) dependencies. The attestation gets stored in attestation/kas-build.provenance.json.
These modes are supported: mode=min, mode=max β and the mode is what controls how much info actually makes it into the attestation. The CLI options loosely follow the docker buildx provenance options, which are described in detail over at Provenance attestations: https://docs.docker.com/build/attestations/slsa-provenance/. And for compatibility with the docker buildx CLI options, we also support --provenance true, which is equivalent to --provenance mode=min. Slay.
In min mode, the provenance attestation will contain information about:
- Build timestamps
- Build materials (project-config files)
- Source repositories and revisions
- Build platform
In max mode, it will also contain the build environment, i.e. all environment variables of the env section along with their values. π
Warning: Inmaxmode, the provenance attestation captures all environment variables specified in theenvsection. Make sure to not expose any secrets. Like, fr fr, do not.
For example, to build the configuration described in the file kas-project.yml and emit provenance attestations, you could run:
kas build --provenance mode=max kas-project.yml
π Working with sigstore cosign
The cosign tool β https://github.com/sigstore/cosign β from the sigstore project ( https://www.sigstore.dev/, documentation at https://docs.sigstore.dev/ ) has native support for in-toto build predicates. However, it currently can only operate directly on the predicate but not on the enclosing attestation (cosign 2.2.4). Which means the predicate first needs to be extracted (provenance in this example):
cat build/attestation/kas-build.provenance.json | jq '.predicate' > provenance.json
ποΈ Attestation Signing
Warning: The following command operates on the public append-only transparency log. Make sure to understand the implications before executing. Not me being dramatic, this is just real.
The following example shows how to create a signed build attestation from a provenance predicate and a local artifact, using the OIDC keyless signing workflow:
cosign attest-blob \
--type=slsaprovenance1 \
--predicate=provenance.json \
--output-signature=kas-build.dsse.json \
--output-certificate=cert.pem \
<image>.wic
Note: Currently the attestation can only be created for a single artifact file.
For later verification, both the signed attestation (kas-build.dsse.json), as well as the certificate (cert.pem) are needed. Make sure to ship them along with the artifact. π’
β Attestation Verification
The previously signed blob can be verified again:
cosign verify-blob-attestation \
--certificate=cert.pem \
--signature=kas-build.dsse.json \
--certificate-identity="<redacted>" \
--certificate-oidc-issuer="<oidc issuer>" \
--type=slsaprovenance1 \
<image>.wic
π¦ Attestation Restoration
The dsse record (kas-build.dsse.json) contains the original attestation data as base64 encoded string. To restore the attestation, run:
cat kas-build.dsse.json | jq -r '.payload' | base64 -d | jq
π KAS π
Part of the kas(1) suite. Main character energy, obviously. π
βοΈ Author
Daniel Wagner, Jan Kiszka, Claudius Heine
Β©οΈ Copyright
Siemens and contributors, 2017-2025
aaaand that's the whole page, bestie π«Ά this was version 5.4, dated Jun 25, 2026, filed under KAS-BUILD-ATTESTATION(1) β go build something iconic β¨π
π¦ where this page comes from
- ubuntu stonking: kas 5.4-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms