Skip to content

GitHub: Dependency graph schemas

6 GitHub schemas with complete fields and constraints.

← Dependency graph operations · All schemas

Create a snapshot of dependencies for a repository — request body — body

FieldTypePresenceDescription and constraints
$objectRootCreate a new snapshot of a repository's dependencies.
Additional keys: not allowed
detectorobjectRequired within parentA description of the detector used.
Additional keys: not allowed
detector.namestringRequired within parentThe name of the detector used.
detector.urlstringRequired within parentThe url of the detector used.
detector.versionstringRequired within parentThe version of the detector used.
jobobjectRequired within parentAdditional keys: not allowed
job.correlatorstringRequired within parentCorrelator provides a key that is used to group snapshots submitted over time. Only the "latest" submitted snapshot for a given combination of `job.correlator` and `detector.name` will be considered when calculating a repository's current dependencies. Correlator should be as unique as it takes to distinguish all detection runs for a given "wave" of CI workflow you run. If you're using GitHub Actions, a good default value for this could be the environment variables GITHUB_WORKFLOW and GITHUB_JOB concatenated together. If you're using a build matrix, then you'll also need to add additional key(s) to distinguish between each submission inside a matrix variation.
job.html_urlstringOptionalThe url for the job.
job.idstringRequired within parentThe external ID of the job.
manifestsobjectOptionalA collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies.
Additional keys: see wildcard field
manifests.*ModelAdditional keysExpand Create a snapshot of dependencies for a repository — request body — body manifests value
metadataModelOptionalExpand Create a snapshot of dependencies for a repository — request body — body metadata
refstringRequired within parentThe repository branch that triggered this snapshot.
Pattern: ^refs/
scannedstringRequired within parentThe time at which the snapshot was scanned.
Format: date-time
shastringRequired within parentThe commit SHA associated with this dependency snapshot. Maximum length: 64 characters.
Maximum length: 64
Minimum length: 40
versionintegerRequired within parentThe version of the repository snapshot submission.

Referenced models: Create a snapshot of dependencies for a repository — request body — body manifests value, Create a snapshot of dependencies for a repository — request body — body metadata

Create a snapshot of dependencies for a repository — request body — body manifests value

FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
fileobjectOptionalAdditional keys: not allowed
file.source_locationstringOptionalThe path of the manifest file relative to the root of the Git repository.
metadataModelOptionalExpand Create a snapshot of dependencies for a repository — request body — body metadata
namestringRequired within parentThe name of the manifest.
resolvedobjectOptionalA collection of resolved package dependencies.
Additional keys: see wildcard field
resolved.*ModelAdditional keysExpand Create a snapshot of dependencies for a repository — request body — body manifests value resolved value

Referenced models: Create a snapshot of dependencies for a repository — request body — body manifests value resolved value, Create a snapshot of dependencies for a repository — request body — body metadata

Create a snapshot of dependencies for a repository — request body — body manifests value resolved value

FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
dependenciesarrayOptionalArray of package-url (PURLs) of direct child dependencies.
dependencies[]stringEach item
metadataModelOptionalExpand Create a snapshot of dependencies for a repository — request body — body metadata
package_urlstringOptionalPackage-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details.
Pattern: ^pkg
relationshipstringOptionalA notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency.
One of: direct, indirect
scopestringOptionalA notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes.
One of: runtime, development

Referenced models: Create a snapshot of dependencies for a repository — request body — body metadata

Create a snapshot of dependencies for a repository — request body — body metadata

FieldTypePresenceDescription and constraints
$objectRootUser-defined metadata to store domain-specific information limited to 8 keys with scalar values.
Maximum fields: 8
Additional keys: see wildcard field
$.*JSONAdditional keys
$.* (anyOf 1)JSONAlternative
$.* (anyOf 1) (anyOf 1)stringAlternative
$.* (anyOf 1) (anyOf 2)numberAlternative
$.* (anyOf 1) (anyOf 3)booleanAlternative
$.* (anyOf 2)nullAlternative

Export a software bill of materials (SBOM) for a repository — response body

FieldTypePresenceDescription and constraints
$objectRootA schema for the SPDX JSON format returned by the Dependency Graph.
sbomobjectRequired within parent
sbom.SPDXIDstringRequired within parentThe SPDX identifier for the SPDX document.
sbom.commentstringOptionalAn optional comment about the SPDX document.
sbom.creationInfoobjectRequired within parent
sbom.creationInfo.createdstringRequired within parentThe date and time the SPDX document was created.
sbom.creationInfo.creatorsarrayRequired within parentThe tools that were used to generate the SPDX document.
sbom.creationInfo.creators[]stringEach item
sbom.dataLicensestringRequired within parentThe license under which the SPDX document is licensed.
sbom.documentNamespacestringRequired within parentThe namespace for the SPDX document.
sbom.namestringRequired within parentThe name of the SPDX document.
sbom.packagesarrayRequired within parent
sbom.packages[]objectEach item
sbom.packages[].SPDXIDstringOptionalA unique SPDX identifier for the package.
sbom.packages[].copyrightTextstringOptionalThe copyright holders of the package, and any dates present with those notices, if available.
sbom.packages[].downloadLocationstringOptionalThe location where the package can be downloaded,
or NOASSERTION if this has not been determined.
sbom.packages[].externalRefsarrayOptional
sbom.packages[].externalRefs[]objectEach item
sbom.packages[].externalRefs[].referenceCategorystringRequired within parentThe category of reference to an external resource this reference refers to.
sbom.packages[].externalRefs[].referenceLocatorstringRequired within parentA locator for the particular external resource this reference refers to.
sbom.packages[].externalRefs[].referenceTypestringRequired within parentThe category of reference to an external resource this reference refers to.
sbom.packages[].filesAnalyzedbooleanOptionalWhether the package's file content has been subjected to
analysis during the creation of the SPDX document.
sbom.packages[].licenseConcludedstringOptionalThe license of the package as determined while creating the SPDX document.
sbom.packages[].licenseDeclaredstringOptionalThe license of the package as declared by its author, or NOASSERTION if this information
was not available when the SPDX document was created.
sbom.packages[].namestringOptionalThe name of the package.
sbom.packages[].supplierstringOptionalThe distribution source of this package, or NOASSERTION if this was not determined.
sbom.packages[].versionInfostringOptionalThe version of the package. If the package does not have an exact version specified,
a version range is given.
sbom.relationshipsarrayOptional
sbom.relationships[]objectEach item
sbom.relationships[].relatedSpdxElementstringOptionalThe SPDX identifier of the package that is the target of the relationship.
sbom.relationships[].relationshipTypestringOptionalThe type of relationship between the two SPDX elements.
sbom.relationships[].spdxElementIdstringOptionalThe SPDX identifier of the package that is the source of the relationship.
sbom.spdxVersionstringRequired within parentThe version of the SPDX specification that this document conforms to.

Get a diff of the dependencies between commits — response body

FieldTypePresenceDescription and constraints
$arrayRootA diff of the dependencies between two commits.
$[]objectEach item
$[].change_typestringRequired within parentKnown values: added, removed
$[].ecosystemstringRequired within parent
$[].licenseJSONRequired within parent
$[].license (anyOf 1)stringAlternative
$[].license (anyOf 2)nullAlternative
$[].manifeststringRequired within parent
$[].namestringRequired within parent
$[].package_urlJSONRequired within parent
$[].package_url (anyOf 1)stringAlternative
$[].package_url (anyOf 2)nullAlternative
$[].scopestringRequired within parentWhere the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment.
Known values: unknown, runtime, development
$[].source_repository_urlJSONRequired within parent
$[].source_repository_url (anyOf 1)stringAlternative
$[].source_repository_url (anyOf 2)nullAlternative
$[].versionstringRequired within parent
$[].vulnerabilitiesarrayRequired within parent
$[].vulnerabilities[]objectEach item
$[].vulnerabilities[].advisory_ghsa_idstringRequired within parent
$[].vulnerabilities[].advisory_summarystringRequired within parent
$[].vulnerabilities[].advisory_urlstringRequired within parent
$[].vulnerabilities[].severitystringRequired within parent

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.