Skip to main content

此版本的 GitHub Enterprise Server 将于以下日期停止服务 2026-03-17. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

导出存储库的软件物料清单

可以从依赖项关系图导出存储库的软件物料清单 (SBOM)。 SBOM 可实现开放源代码使用情况透明化,并有助于暴露供应链漏洞,从而降低供应链风险。

谁可以使用此功能?

GitHub 上的任何人

You can export the current state of the dependency graph for your repository as a software bill of materials (SBOM) using the industry standard SPDX format.

SBOMs include an inventory of a project's dependencies and associated information such as versions and package identifiers. SBOMs do not include dependents (other projects that rely on your project).

Exporting a software bill of materials for your repository from the UI

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Insights.

    Screenshot of the main page of a repository. In the horizontal navigation bar, a tab, labeled with a graph icon and "Insights," is outlined in orange.

  3. In the left sidebar, click Dependency graph.

  4. On the top right side of the Dependencies tab, click Export SBOM to generate an SBOM file for download from your browser.

Exporting a software bill of materials for your repository using the REST API

If you want to use the REST API to export an SBOM for your repository, see REST API endpoints for software bill of materials (SBOM).

Generating a software bill of materials from GitHub Actions

The following actions will generate an SBOM for your repository and attach it as a workflow artifact which you can download and use in other applications. For more information about downloading workflow artifacts, see Downloading workflow artifacts.

ActionDetails
SPDX Dependency Submission ActionUses Microsoft's SBOM Tool to create SPDX 2.2 compatible SBOMs with the supported ecosystems
Anchore SBOM ActionUses Syft to create SPDX 2.2 compatible SBOMs with the supported ecosystems
SBOM Dependency Submission ActionUploads a CycloneDX SBOM to the dependency submission API