Upload an SBOM to a release named by product, variant and version (member; member API keys and trusted GitHub Actions runs may upload)
const url = 'https://example.com/v1/orgs/example/sbom-uploads?product=example&version=example';const options = { method: 'POST', headers: { Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.cyclonedx+json' }, body: '"binary"'};
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/sbom-uploads?product=example&version=example' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/vnd.cyclonedx+json' \ --data '"binary"'For build pipelines, which know names rather than IDs. Whatever of the product,
variant and release does not exist yet is created; new in the response says which,
so a pipeline can warn about a mistyped name. Without variant, the release goes into the
product’s default variant. hardware_revision, the parameter’s old name, is
refused with 400, so an old pipeline fails instead of uploading into default.
The document is checked first: an invalid one creates nothing. Same formats, size limit
and idempotency as
POST /v1/orgs/{org}/releases/{release}/sboms.
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).
A token whose repository the organization does not trust gets 404, as for a foreign key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization (tenant) slug, e.g. alpenrobotik
Query Parameters
Section titled “Query Parameters”Optional: the product’s default variant if left out
Used only when the release is created
Request Bodyrequired
Section titled “Request Bodyrequired”Example generated
binaryExample generated
binaryExample generated
binaryobject
The document
Sigstore bundle: a signature over the document (cosign sign-blob –bundle), or an SBOM attestation of it (actions/attest-sbom). At most 64 KiB plus twice the document, and 24 MiB.
Responses
Section titled “Responses”The release already had this document; nothing changed
object
object
E.g. “1.6”, “SPDX-2.3”, “3.0.1”
Tools that wrote the document
Of the raw document
Number of dependency edges
Verified: signed by a run one of the organization’s trusted publishers allows; untrusted: signed, by none of them; unsigned: no signature
False when the release already had this document
Problems that did not stop the upload (invalid PURLs, dependencies on unknown refs, a signer that is not a trusted publisher, a signature for another version’s tag: “signed for tag v1.0.1, not version 1.0.2”, …)
A verified Sigstore signature or SBOM attestation, as recorded at upload (append-only evidence)
object
OIDC issuer in the certificate
Certificate identity (the signing workflow’s URI)
Owner/name at signing
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
Signature: over the document’s bytes (cosign sign-blob); attestation: an in-toto statement whose predicate is the document (actions/attest-sbom)
Attestations only, e.g. https://cyclonedx.org/bom
Attestations only. The artifacts the SBOM describes, as the attestation names them.
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
object
Short slug firmware names in /etc/affectra-release as PRODUCT=
Last day the product gets security updates (CRA); null when not set.
object
object
Which of the three this upload created
object
Example
{ "sbom": { "format": "cyclonedx", "signature_status": "verified" }, "signature": { "status": "verified", "kind": "signature" }}New SBOM
object
object
E.g. “1.6”, “SPDX-2.3”, “3.0.1”
Tools that wrote the document
Of the raw document
Number of dependency edges
Verified: signed by a run one of the organization’s trusted publishers allows; untrusted: signed, by none of them; unsigned: no signature
False when the release already had this document
Problems that did not stop the upload (invalid PURLs, dependencies on unknown refs, a signer that is not a trusted publisher, a signature for another version’s tag: “signed for tag v1.0.1, not version 1.0.2”, …)
A verified Sigstore signature or SBOM attestation, as recorded at upload (append-only evidence)
object
OIDC issuer in the certificate
Certificate identity (the signing workflow’s URI)
Owner/name at signing
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
Signature: over the document’s bytes (cosign sign-blob); attestation: an in-toto statement whose predicate is the document (actions/attest-sbom)
Attestations only, e.g. https://cyclonedx.org/bom
Attestations only. The artifacts the SBOM describes, as the attestation names them.
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
object
Short slug firmware names in /etc/affectra-release as PRODUCT=
Last day the product gets security updates (CRA); null when not set.
object
object
Which of the three this upload created
object
Example
{ "sbom": { "format": "cyclonedx", "signature_status": "verified" }, "signature": { "status": "verified", "kind": "signature" }}Product or version is missing, hardware_revision was sent, released_at is not, not a supported SBOM document, or a signature bundle that does not verify or does not sign or attest it
Role below member, or the organization requires a signature by a trusted publisher and the upload has none
No such object in this organization, no such organization, or the caller does not belong to it
Larger than 16 MiB (document, upload.tooLarge) or 24 MiB (bundle), or more than 30,000 components or 150,000 dependencies (sbom.limitExceeded)
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
A bundle was sent and this server cannot verify signatures