Upload build provenance for a release (member; member API keys may upload)
const url = 'https://example.com/v1/orgs/example/releases/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/attestations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/orgs/example/releases/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/attestations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'Build provenance: the body is a Sigstore bundle, as application/json, at most
64 KiB, holding SLSA v1 provenance (https://slsa.dev/provenance/v1) made by a GitHub
Actions run, e.g. by actions/attest-build-provenance. It is verified like an SBOM signature and its run matched against the organization’s trusted publishers (status). The
predicate must agree with the certificate; Affectra keeps the certificate’s values. The
artifacts it names are recorded (attestation.subjects).
The same bundle for the same release again changes nothing and answers 200 with the existing
attestation. An SBOM attestation is refused (400 provenance.sbomAttestation): send it with
its SBOM to sbom-uploads. The organization’s signature policy applies: without a verified
signature the upload is 403 provenance.signatureRequired.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization (tenant) slug, e.g. alpenrobotik
Request Bodyrequired
Section titled “Request Bodyrequired”Sigstore bundle
object
Example generated
{}Responses
Section titled “Responses”Already uploaded; nothing changed
object
Build provenance of a release, as recorded at upload (append-only evidence). The signer fields come from the verified certificate, never from the predicate.
object
Also names the bundle: /v1/orgs/{org}/release-attestations/{id}/bundle
OIDC issuer in the certificate
Certificate identity (the signing workflow’s URI)
Owner/name at signing
The calling workflow: owner/name/.github/workflows/x.yml@ref
Earliest verified timestamp (transparency log or timestamp authority)
Rekor log index
The publisher that allowed the run; absent once deleted
The workflow that ran the build (the certificate’s build signer URI), owner/name/path@ref
Builder_id is not workflow_ref: the build ran in a reusable workflow
The artifacts the run built, as the provenance names them. Left out under ReleaseArtifact.built_by.
object
E.g. firmware.bin
Digests by algorithm, lowercase hex, e.g. {“sha256”:“…”}
object
Signed from a tag that doesn’t name the release’s version, e.g. refs/tags/v1.0.1 for release 1.0.2. The tag names it when its last segment is the version, with or without a leading v, or ends with it after -, _ or @ (climate-sensor-1.0.2, fw@v1.0.2, climate-sensor/v1.0.2); case is ignored. False when the ref is not a tag (a branch, a pull request). Checked when read, never a reason to refuse an upload.
The trusted publisher that allowed a verified signature, as the organization has it now. Absent when the signature is not verified or the publisher was deleted.
object
Owner/name when the publisher was added
E.g. .github/workflows/release.yml; absent: any workflow
Glob on the ref, e.g. refs/tags/v*; absent: any ref
GitHub environment; absent: any
False when the release already had this bundle
Problems that did not stop the upload (a signer that is not a trusted publisher, provenance for another version’s tag: “signed for tag v1.0.1, not version 1.0.2”)
Example
{ "attestation": { "status": "verified" }}New attestation
object
Build provenance of a release, as recorded at upload (append-only evidence). The signer fields come from the verified certificate, never from the predicate.
object
Also names the bundle: /v1/orgs/{org}/release-attestations/{id}/bundle
OIDC issuer in the certificate
Certificate identity (the signing workflow’s URI)
Owner/name at signing
The calling workflow: owner/name/.github/workflows/x.yml@ref
Earliest verified timestamp (transparency log or timestamp authority)
Rekor log index
The publisher that allowed the run; absent once deleted
The workflow that ran the build (the certificate’s build signer URI), owner/name/path@ref
Builder_id is not workflow_ref: the build ran in a reusable workflow
The artifacts the run built, as the provenance names them. Left out under ReleaseArtifact.built_by.
object
E.g. firmware.bin
Digests by algorithm, lowercase hex, e.g. {“sha256”:“…”}
object
Signed from a tag that doesn’t name the release’s version, e.g. refs/tags/v1.0.1 for release 1.0.2. The tag names it when its last segment is the version, with or without a leading v, or ends with it after -, _ or @ (climate-sensor-1.0.2, fw@v1.0.2, climate-sensor/v1.0.2); case is ignored. False when the ref is not a tag (a branch, a pull request). Checked when read, never a reason to refuse an upload.
The trusted publisher that allowed a verified signature, as the organization has it now. Absent when the signature is not verified or the publisher was deleted.
object
Owner/name when the publisher was added
E.g. .github/workflows/release.yml; absent: any workflow
Glob on the ref, e.g. refs/tags/v*; absent: any ref
GitHub environment; absent: any
False when the release already had this bundle
Problems that did not stop the upload (a signer that is not a trusted publisher, provenance for another version’s tag: “signed for tag v1.0.1, not version 1.0.2”)
Example
{ "attestation": { "status": "verified" }}A bundle that does not verify, is not SLSA v1 provenance (provenance.invalid), disagrees with its certificate (provenance.invalid), or is an SBOM attestation (provenance.sbomAttestation)
Role below member, or the organization requires a signature by a trusted publisher and the run is not one (provenance.signatureRequired)
No such object in this organization, no such organization, or the caller does not belong to it
Larger than 64 KiB (upload.tooLarge)
Over the operation’s rate-limit budget (x-affectra-budget): code request.rateLimited with params.budget. Wait Retry-After seconds before trying again.
Every error answer, Content-Type
application/problem+json. The web app and integrations translate code; detail is English,
for people reading curl output or CI logs, and may change wording at
any time. Match on code, never on detail.
object
The HTTP status
Stable error codes. A code is never renamed; new ones may be added, so
a client falls back to detail for a code it doesn’t know. Another
organization’s object answers notFound, the same as a missing one.
What went wrong
Values the code’s message needs, e.g. {“field”: “version”}. Only values the caller sent or may see. Empty when the message needs none.
object
Example
{ "code": "notFound"}Headers
Section titled “Headers”Seconds until a request would be allowed again, at least 1
This server cannot verify build provenance (provenance.unavailable)