Skip to content

Upload build provenance to a release named by product, variant and version (member; member API keys and trusted GitHub Actions runs may upload)

POST
/v1/orgs/{org}/attestation-uploads
curl --request POST \
--url 'https://example.com/v1/orgs/example/attestation-uploads?product=example&version=example' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'

For build pipelines, like sbom-uploads: the release is found or created by name, with the same parameters and checks. The bundle and the signature policy are checked first, so an upload that fails creates nothing. Same body, limit, verification and idempotency as POST /v1/orgs/{org}/releases/{release}/attestations.

A GitHub Actions job may authenticate with its OIDC token (bearer) instead of an API key, if the organization trusts its repository (/v1/orgs/{org}/trusted-publishers). This and sbom-uploads are the only routes such a token may call. A token whose repository the organization does not trust gets 404, as for a foreign key.

org
required
string

Organization (tenant) slug, e.g. alpenrobotik

product
required
string
variant
string

Optional: the product’s default variant if left out

version
required
string
released_at
string format: date-time

Used only when the release is created

Media typeapplication/json

Sigstore bundle

object

Example generated

{}

The release already had this bundle; nothing changed

Media typeapplication/json
object
attestation
required

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
id
required

Also names the bundle: /v1/orgs/{org}/release-attestations/{id}/bundle

string format: uuid
release_id
required
string format: uuid
status
required
string
Allowed values: verified untrusted
issuer
required

OIDC issuer in the certificate

string
subject
required

Certificate identity (the signing workflow’s URI)

string
repository_owner_id
required
integer format: int64
repository_id
required
integer format: int64
repository
required

Owner/name at signing

string
workflow_ref

The calling workflow: owner/name/.github/workflows/x.yml@ref

string
ref
string
commit_sha
string
run_url
string
signed_at
required

Earliest verified timestamp (transparency log or timestamp authority)

string format: date-time
tlog_index

Rekor log index

integer format: int64
trusted_publisher_id

The publisher that allowed the run; absent once deleted

string format: uuid
predicate_type
required
builder_id

The workflow that ran the build (the certificate’s build signer URI), owner/name/path@ref

string
reusable
required

Builder_id is not workflow_ref: the build ran in a reusable workflow

boolean
bundle_sha256
required
string
created_at
required
string format: date-time
subjects

The artifacts the run built, as the provenance names them. Left out under ReleaseArtifact.built_by.

Array<object>
object
name
required

E.g. firmware.bin

string
digest
required

Digests by algorithm, lowercase hex, e.g. {“sha256”:“…”}

object
key
additional properties
string
version_mismatch
required

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.

boolean
trusted_publisher

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
repository
required

Owner/name when the publisher was added

string
workflow

E.g. .github/workflows/release.yml; absent: any workflow

string
ref_pattern

Glob on the ref, e.g. refs/tags/v*; absent: any ref

string
environment

GitHub environment; absent: any

string
created
required

False when the release already had this bundle

boolean
warnings
required

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”)

Array<string>
product
required
object
id
required
string format: uuid
name
required
string
description
required
string
key
required

Short slug firmware names in /etc/affectra-release as PRODUCT=, unique in the organization; null until an admin sets it.

string | null
support_ends
required

Last day the product gets security updates (CRA); null when not set.

string | null format: date
created_at
required
string format: date-time
variant
required
object
id
required
string format: uuid
product_id
required
string format: uuid
name
required
string
created_at
required
string format: date-time
release
required
object
id
required
string format: uuid
variant_id
required
string format: uuid
version
required
string
released_at
string format: date-time
created_at
required
string format: date-time
new
required

Which of the three this upload created

object
product
required
boolean
variant
required
boolean
release
required
boolean

Example

{
"attestation": {
"status": "verified"
}
}

New attestation

Media typeapplication/json
object
attestation
required

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
id
required

Also names the bundle: /v1/orgs/{org}/release-attestations/{id}/bundle

string format: uuid
release_id
required
string format: uuid
status
required
string
Allowed values: verified untrusted
issuer
required

OIDC issuer in the certificate

string
subject
required

Certificate identity (the signing workflow’s URI)

string
repository_owner_id
required
integer format: int64
repository_id
required
integer format: int64
repository
required

Owner/name at signing

string
workflow_ref

The calling workflow: owner/name/.github/workflows/x.yml@ref

string
ref
string
commit_sha
string
run_url
string
signed_at
required

Earliest verified timestamp (transparency log or timestamp authority)

string format: date-time
tlog_index

Rekor log index

integer format: int64
trusted_publisher_id

The publisher that allowed the run; absent once deleted

string format: uuid
predicate_type
required
builder_id

The workflow that ran the build (the certificate’s build signer URI), owner/name/path@ref

string
reusable
required

Builder_id is not workflow_ref: the build ran in a reusable workflow

boolean
bundle_sha256
required
string
created_at
required
string format: date-time
subjects

The artifacts the run built, as the provenance names them. Left out under ReleaseArtifact.built_by.

Array<object>
object
name
required

E.g. firmware.bin

string
digest
required

Digests by algorithm, lowercase hex, e.g. {“sha256”:“…”}

object
key
additional properties
string
version_mismatch
required

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.

boolean
trusted_publisher

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
repository
required

Owner/name when the publisher was added

string
workflow

E.g. .github/workflows/release.yml; absent: any workflow

string
ref_pattern

Glob on the ref, e.g. refs/tags/v*; absent: any ref

string
environment

GitHub environment; absent: any

string
created
required

False when the release already had this bundle

boolean
warnings
required

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”)

Array<string>
product
required
object
id
required
string format: uuid
name
required
string
description
required
string
key
required

Short slug firmware names in /etc/affectra-release as PRODUCT=, unique in the organization; null until an admin sets it.

string | null
support_ends
required

Last day the product gets security updates (CRA); null when not set.

string | null format: date
created_at
required
string format: date-time
variant
required
object
id
required
string format: uuid
product_id
required
string format: uuid
name
required
string
created_at
required
string format: date-time
release
required
object
id
required
string format: uuid
variant_id
required
string format: uuid
version
required
string
released_at
string format: date-time
created_at
required
string format: date-time
new
required

Which of the three this upload created

object
product
required
boolean
variant
required
boolean
release
required
boolean

Example

{
"attestation": {
"status": "verified"
}
}

Product or version is missing, hardware_revision was sent, released_at is not, or the bundle is refused as for the upload by release ID

Role below member, a GitHub token on another route, 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.

Media typeapplication/problem+json

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
status
required

The HTTP status

integer
code
required

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.

string
Allowed values: notFound internal request.invalidJson request.invalid request.alreadyExists request.timeInvalid auth.required auth.csrfMissing email.invalid accounts.passwordUnavailable locale.invalid request.rateLimited auth.sessionRequired auth.roleTooLow auth.githubTokenUploadOnly org.suspended org.required request.fieldRequired request.textInvalid request.timeout server.notReady catalog.unavailable report.invalid report.wrongTenant settings.csafNamespaceInvalid settings.digestHourInvalid settings.timeZoneInvalid sbom.invalid sbom.limitExceeded sbom.signatureInvalid sbom.signatureRequired sbom.signatureUnavailable upload.hardwareRevisionRenamed upload.malformed upload.unexpectedPart upload.sbomMissing upload.tooLarge upload.unreadable provenance.invalid provenance.sbomAttestation provenance.signatureRequired provenance.unavailable vex.vulnerabilityInvalid vex.statusInvalid vex.justificationUnknown vex.justificationNotAllowed vex.justificationRequired vex.actionRequired vex.statementTooLong vex.csafNamespaceRequired vex.csafNoStatements release.hasVexStatements finding.refInvalid mapping.purlInvalid mapping.purlVersioned mapping.purlCoveredByOsv mapping.cpeFieldInvalid mapping.builtIn mapping.csafProviderUnknown mapping.csafKindInvalid mapping.csafValueInvalid feeds.notSubscribable accounts.setupEmailLimit member.exists member.joined member.roleInvalid member.ownerGrantDenied member.ownerChangeDenied member.ownerRemoveDenied member.lastOwner github.orgInvalid github.teamInvalid github.roleInvalid github.adminRequired key.nameInvalid key.roleInvalid key.purposeInvalid product.keyInvalid product.keyExists product.keyLocked product.supportEndsInvalid alias.reportedInvalid alias.exists publisher.repositoryInvalid publisher.fieldTooLong publisher.idsIncomplete publisher.repositoryNotFound publisher.githubUnreachable publisher.workflowInvalid publisher.refPatternPrefix publisher.refPatternInvalid publisher.exists graph.vulnerabilityUnknown graph.timeout proposal.evidenceUnknown proposal.evidenceTooLarge proposal.kindInvalid proposal.basisInvalid proposal.notCarryOver proposal.basisMismatch proposal.notPending proposal.sourceSuperseded proposal.ownProposal proposal.fourEyes proposal.personRequired proposal.batchTooLarge proposal.vulnerabilityChanged proposal.reportedChanged proposal.releaseUnknown proposal.evidenceMissing notifications.unavailable notifications.findingsInvalid notifications.tokenInvalid webhook.urlRejected webhook.limitReached webhook.formatUnavailable webhook.headerInvalid webhook.eventTypesInvalid webhook.disabled events.cursorInvalid
detail
required

What went wrong

string
params
required

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
key
additional properties
any

Example

{
"code": "notFound"
}
Retry-After
integer
>= 1

Seconds until a request would be allowed again, at least 1

This server cannot verify build provenance (provenance.unavailable)