Skip to main content

sboms

Creates, updates, deletes, gets or lists a sboms resource.

Overview

Namesboms
TypeResource
Idgithub.dependency_graph.sboms

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
namestringThe name of the SPDX document. (example: github/github)
SPDXIDstringThe SPDX identifier for the SPDX document. (example: SPDXRef-DOCUMENT)
commentstringAn optional comment about the SPDX document. (example: Exact versions could not be resolved for some packages. For more information: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/)
creationInfoobject
dataLicensestringThe license under which the SPDX document is licensed. (example: CC0-1.0)
documentNamespacestringThe namespace for the SPDX document. (example: https://spdx.org/spdxdocs/protobom/15e41dd2-f961-4f4d-b8dc-f8f57ad70d57)
packagesarray
relationshipsarray
spdxVersionstringThe version of the SPDX specification that this document conforms to. (example: SPDX-2.3)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
export_sbomselectowner, repoExports the software bill of materials (SBOM) for a repository in SPDX JSON format.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

SELECT examples

Exports the software bill of materials (SBOM) for a repository in SPDX JSON format.

SELECT
name,
SPDXID,
comment,
creationInfo,
dataLicense,
documentNamespace,
packages,
relationships,
spdxVersion
FROM github.dependency_graph.sboms
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;