provenance sign
Let DevGuard sign SLSA build provenance with the verified identity of the CI job
Synopsis
Send an in-toto statement with a SLSA v1 provenance predicate to DevGuard for signing.
DevGuard verifies the OIDC workload identity token of the CI job with its issuer and writes the verified identity into the provenance before signing it:
predicate.runDetails.builder.id the ci config which ran the build predicate.buildDefinition.externalParameters.workflow the ci config which started the run predicate.buildDefinition.internalParameters.devguard.workloadIdentity the non personal claims of the verified token predicate.buildDefinition.resolvedDependencies the source commit of the run
Every field describing the build platform is overwritten. Only the subjects, predicate.buildDefinition.externalParameters.inputs and the startedOn and finishedOn timestamps are kept as sent.
The token must be issued for the audience of the DevGuard API. In GitLab request it with:
id_tokens: DEVGUARD_ID_TOKEN: aud: https://api.devguard.org
Without a workload identity token the provenance is signed locally with the key of the devguard token (--token) instead, and predicate.runDetails.builder.id is set to https://devguard.org/slsa/builders/self-signed/v1. Such provenance is only self asserted (SLSA Build L1): nothing verified who built the artifact.
The result is a DSSE envelope - or a sigstore bundle, if DevGuard uploads to a transparency log. Pass it to 'devguard-scanner attest' to attach it to an image: already signed input is attached as-is. The first argument is a path to the provenance JSON file. Pass "-" to read from stdin.