Skip to content

Upload an SBOM document (member; member API keys may upload)

POST
/v1/orgs/{org}/releases/{release}/sboms
curl --request POST \
--url https://example.com/v1/orgs/example/releases/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/sboms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.cyclonedx+json' \
--data '"binary"'

The body is the raw document; the format is detected: CycloneDX 1.2-1.7 (JSON or XML), SPDX 2.x (JSON or tag-value), SPDX 3.0 (JSON-LD). At most 16 MiB, 30,000 components (nested ones included) and 150,000 dependency edges; a document over a limit is refused with 413 (upload.tooLarge for the size, sbom.limitExceeded for the counts). Text in the document (refs, names, versions, PURLs, CPEs) must be valid UTF-8 without control characters, at most 255 characters (PURLs and CPEs 1,024); the whole document is refused with 400 (sbom.invalid, the field named) otherwise. A server handles a few uploads at once; one that has to wait too long answers 429 with Retry-After (request.rateLimited). Uploading a document this release already has changes nothing and answers 200 with the existing SBOM.

Signed SBOMs: send multipart/form-data with the document in part sbom and the Sigstore bundle from cosign sign-blob --bundle in part sigstore_bundle. The bundle is verified before anything is created, its GitHub Actions run is matched against the organization’s trusted publishers, and the result is recorded (signature). Re-uploading a document with another bundle adds that signature to the existing SBOM.

The bundle may instead be an SBOM attestation (actions/attest-sbom): its predicate must be the uploaded document (as JSON values), and the artifacts it names are recorded (signature.subjects).

org
required
string

Organization (tenant) slug, e.g. alpenrobotik

release
required
string format: uuid
string format: binary

Example generated

binary

Already uploaded; nothing changed

Media typeapplication/json
object
sbom
required
object
id
required
string format: uuid
release_id
required
string format: uuid
format
required
string
Allowed values: cyclonedx spdx
spec_version
required

E.g. “1.6”, “SPDX-2.3”, “3.0.1”

string
generator
required

Tools that wrote the document

string
media_type
required
string
size_bytes
required
integer format: int64
sha256
required

Of the raw document

string
components
required
integer format: int64
dependencies
required

Number of dependency edges

integer format: int64
signature_status
required

Verified: signed by a run one of the organization’s trusted publishers allows; untrusted: signed, by none of them; unsigned: no signature

string
Allowed values: verified untrusted unsigned
created_at
required
string format: date-time
created
required

False when the release already had this document

boolean
warnings
required

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

Array<string>
signature

A verified Sigstore signature or SBOM attestation, as recorded at upload (append-only evidence)

object
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

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
bundle_sha256
required
string
created_at
required
string format: date-time
kind
required

Signature: over the document’s bytes (cosign sign-blob); attestation: an in-toto statement whose predicate is the document (actions/attest-sbom)

string
Allowed values: signature attestation
predicate_type

Attestations only, e.g. https://cyclonedx.org/bom

string
subjects

Attestations only. The artifacts the SBOM describes, as the attestation names them.

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

Example

{
"sbom": {
"format": "cyclonedx",
"signature_status": "verified"
},
"signature": {
"status": "verified",
"kind": "signature"
}
}

New SBOM

Media typeapplication/json
object
sbom
required
object
id
required
string format: uuid
release_id
required
string format: uuid
format
required
string
Allowed values: cyclonedx spdx
spec_version
required

E.g. “1.6”, “SPDX-2.3”, “3.0.1”

string
generator
required

Tools that wrote the document

string
media_type
required
string
size_bytes
required
integer format: int64
sha256
required

Of the raw document

string
components
required
integer format: int64
dependencies
required

Number of dependency edges

integer format: int64
signature_status
required

Verified: signed by a run one of the organization’s trusted publishers allows; untrusted: signed, by none of them; unsigned: no signature

string
Allowed values: verified untrusted unsigned
created_at
required
string format: date-time
created
required

False when the release already had this document

boolean
warnings
required

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

Array<string>
signature

A verified Sigstore signature or SBOM attestation, as recorded at upload (append-only evidence)

object
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

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
bundle_sha256
required
string
created_at
required
string format: date-time
kind
required

Signature: over the document’s bytes (cosign sign-blob); attestation: an in-toto statement whose predicate is the document (actions/attest-sbom)

string
Allowed values: signature attestation
predicate_type

Attestations only, e.g. https://cyclonedx.org/bom

string
subjects

Attestations only. The artifacts the SBOM describes, as the attestation names them.

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

Example

{
"sbom": {
"format": "cyclonedx",
"signature_status": "verified"
},
"signature": {
"status": "verified",
"kind": "signature"
}
}

Not a supported SBOM document (sbom.invalid; a refused text value is named in the reason)

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.

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

A bundle was sent and this server cannot verify signatures