Skip to content

SBOM API ​

15 endpoints. Request and response schemas are described on the schemas page; the other tags are listed in the API index.

Endpoints ​

GET /.well-known/openartifact/attestation-key.pem ​

Attestation public key

The PEM (PKIX) public key that verifies SBOM and VEX attestations, for cosign verify-blob-attestation --key. Unauthenticated.

Authentication: none (public endpoint).

Responses

StatusDescriptionBody
200PEM public keyapplication/x-pem-file: string
501Attestations are not enabled-

GET /api/v1/admin/attestation ​

Describe the attestation signing key

Admin only. The key signs ?attest= SBOM and VEX downloads; its public half is also served unauthenticated at public_key_url.

Responses

StatusDescriptionBody
200Successapplication/json: AttestationKey
501Attestations are not enabled-
defaultErrorapplication/json: Error

GET /api/v1/repositories/{name}/attestation-attach ​

Get the referrer-attach setting

Admin only. Whether SBOM and VEX attestations are attached to the repository's docker images automatically.

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
200Successapplication/json: AttestationAttachSettings
404Repository not found-
defaultErrorapplication/json: Error

PUT /api/v1/repositories/{name}/attestation-attach ​

Set the referrer-attach setting

Admin only; hosted docker repositories only. When on, a generated SBOM and a finished vulnerability scan attach a signed SBOM and VEX attestation to the image as OCI referrers. Off by default.

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Request body (required)

application/json: AttestationAttachSettings

Responses

StatusDescriptionBody
200Savedapplication/json: AttestationAttachSettings
400Not a hosted docker repository-
404Repository not found-
501Attestations are not enabled-
defaultErrorapplication/json: Error

GET /api/v1/repositories/{name}/sbom ​

List SBOM reports

List SBOM reports for a repository

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
200List of SBOM reportsapplication/json: object
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Repository or addressed resource not foundapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
reportsarray of SBOMReportno-

POST /api/v1/repositories/{name}/sbom/generate ​

Generate SBOM

Generate a Software Bill of Materials for a repository artifact. Components are the dependencies declared by the stored package file (manifest and lockfile) merged with the artifact's dependencies property.

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
artifact_idstring (uuid)yes-
formatstringyescyclonedx (JSON), spdx (2.3 tag-value), spdx-json (2.3 JSON) or spdx3-json (SPDX 3.0.1 JSON-LD). One of: cyclonedx, spdx, spdx-json, spdx3-json.
metadataobjectno-
spec_versionstringnoCycloneDX 1.4, 1.5 (default) or 1.6; SPDX 2.3; SPDX 3 3.0.1. Optional.

Responses

StatusDescriptionBody
201SBOM generation started-
400Invalid requestapplication/json: Error
403Forbiddenapplication/json: Error
404Repository or addressed resource not foundapplication/json: Error
422The artifact's package file is too large or ambiguous to be read safely (unsafe_artifact)-

GET /api/v1/repositories/{name}/sbom/{id} ​

Get SBOM report

Get details of a specific SBOM report

Parameters

NameInTypeRequiredDescription
namepathstringyes-
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
200SBOM report detailsapplication/json: SBOMReport
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404SBOM report not found-

DELETE /api/v1/repositories/{name}/sbom/{id} ​

Delete SBOM report

Delete a specific SBOM report

Parameters

NameInTypeRequiredDescription
namepathstringyes-
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
204SBOM report deleted-
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404SBOM report not found-

POST /api/v1/repositories/{name}/sbom/{id}/attach ​

Attach a signed SBOM to its docker image

Admin only. Signs the stored SBOM (JSON formats only) and attaches the Sigstore bundle to the image manifest as an OCI referrer; an earlier attachment of the same predicate is replaced.

Parameters

NameInTypeRequiredDescription
namepathstringyes-
idpathstringyes-

Responses

StatusDescriptionBody
200An identical attestation was already attachedapplication/json: AttestationAttachResult
201Attachedapplication/json: AttestationAttachResult
400Not a hosted docker repository, or not a JSON SBOM-
403Admin access required-
404Repository, report or image not found-
507Repository storage quota exceeded-
defaultErrorapplication/json: Error

GET /api/v1/repositories/{name}/sbom/{id}/download ​

Download SBOM report

Download an SBOM report file

Parameters

NameInTypeRequiredDescription
namepathstringyes-
idpathstring (uuid)yes-
attestquerystringnotrue returns the document as a signed in-toto attestation in a DSSE envelope; bundle returns a Sigstore bundle, the input of cosign verify-blob-attestation. Verify with the key from /.well-known/openartifact/attestation-key.pem. One of: true, bundle.

Responses

StatusDescriptionBody
200SBOM file, or its attestation with attestapplication/octet-stream: string (binary); application/vnd.dev.sigstore.bundle.v0.3+json: object; application/vnd.dsse.envelope.v1+json: object
400Invalid attest value, or the SBOM is not a JSON document (SPDX tag-value cannot be attested)-
403Forbiddenapplication/json: Error
404SBOM report not found-
501Attestations are not enabled-

GET /api/v1/repositories/{name}/vex ​

Download a VEX document

Build an OpenVEX 0.2.0 (default) or CycloneDX VEX document from the latest vulnerability scans and the recorded VEX decisions. With artifact_id it covers one artifact, otherwise every scanned artifact of the repository. Status per vulnerability: the recorded decision; else fixed when the scan's fixed_in is at or below the artifact version; else affected when the scan quarantined the artifact; else under_investigation. not_affected only comes from a recorded decision. Admin only.

Parameters

NameInTypeRequiredDescription
namepathstringyes-
formatquerystringnoOne of: openvex, cyclonedx. Default: openvex.
spec_versionquerystringnoCycloneDX spec version (1.4, 1.5 or 1.6; default 1.5). CycloneDX only.
artifact_idquerystringnoRestrict the document to one artifact (name@version).
attestquerystringnotrue returns the document as a signed in-toto attestation in a DSSE envelope; bundle returns a Sigstore bundle, the input of cosign verify-blob-attestation. Verify with the key from /.well-known/openartifact/attestation-key.pem. One of: true, bundle.

Responses

StatusDescriptionBody
200VEX document, or its attestation with attestapplication/json: object; application/vnd.dev.sigstore.bundle.v0.3+json: object; application/vnd.dsse.envelope.v1+json: object
400Invalid format, spec_version or artifact_id-
403Forbiddenapplication/json: Error
404Repository not found-
501Attestations are not enabled-

POST /api/v1/repositories/{name}/vex/attach ​

Attach a signed VEX document to its docker image

Admin only. Builds the artifact's VEX document, signs it and attaches the Sigstore bundle to the image manifest as an OCI referrer; an earlier attachment of the same predicate is replaced.

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
artifact_idstringyes-
formatstringnoOne of: openvex, cyclonedx.

Responses

StatusDescriptionBody
200An identical attestation was already attachedapplication/json: AttestationAttachResult
201Attachedapplication/json: AttestationAttachResult
400Not a hosted docker repository, or not a JSON SBOM-
403Admin access required-
404Repository, report or image not found-
507Repository storage quota exceeded-
defaultErrorapplication/json: Error

GET /api/v1/repositories/{name}/vex/statements ​

List VEX decisions

List the VEX decisions recorded for a repository, optionally for one artifact. Admin only.

Parameters

NameInTypeRequiredDescription
namepathstringyes-
artifact_idquerystringno-

Responses

StatusDescriptionBody
200VEX decisionsapplication/json: object
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Repository not found-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
statementsarray of VEXStatementno-

PUT /api/v1/repositories/{name}/vex/statements ​

Record a VEX decision

Record (or replace) the decision for one vulnerability of one artifact. not_affected requires a justification; other statuses must not carry one. Admin only.

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
action_statementstringno-
artifact_idstringyes-
impact_statementstringno-
justificationstringnoOne of: component_not_present, vulnerable_code_not_present, vulnerable_code_not_in_execute_path, vulnerable_code_cannot_be_controlled_by_adversary, inline_mitigations_already_exist.
statusstringyesOne of: affected, not_affected, fixed, under_investigation.
vuln_idstringyese.g. CVE-2024-1234 or GHSA-xxxx

Responses

StatusDescriptionBody
200Recorded decisionapplication/json: VEXStatement
400Validation failed-
403Forbiddenapplication/json: Error
404Repository not found-

DELETE /api/v1/repositories/{name}/vex/statements/{id} ​

Delete a VEX decision

Delete a recorded VEX decision; the vulnerability falls back to its derived status. Admin only.

Parameters

NameInTypeRequiredDescription
namepathstringyes-
idpathstring (uuid)yes-

Responses

StatusDescriptionBody
204Decision deleted-
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Forbiddenapplication/json: Error
404Repository or decision not found-

Free software under the AGPL-3.0-or-later.