sbom

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Generate SBOM

生成SBOM

Produce a Software Bill of Materials listing all dependencies and their metadata.
生成一份列出所有依赖项及其元数据的软件物料清单。

Commands

命令

Generate SBOM in CycloneDX format (default):
bash
git-pkgs sbom
Generate SBOM in SPDX format:
bash
git-pkgs sbom --format=spdx
Options:
  • --format=FORMAT
    - output format:
    cyclonedx
    (default),
    spdx
  • --output=FILE
    - write to file instead of stdout
  • --json
    - JSON output (default for both formats)
生成CycloneDX格式的SBOM(默认):
bash
git-pkgs sbom
生成SPDX格式的SBOM:
bash
git-pkgs sbom --format=spdx
选项:
  • --format=FORMAT
    - 输出格式:
    cyclonedx
    (默认)、
    spdx
  • --output=FILE
    - 写入文件而非标准输出
  • --json
    - JSON格式输出(两种格式的默认选项)

When to use

使用场景

  • When compliance requires an SBOM (EO 14028, EU CRA)
  • When sharing a software inventory with customers or auditors
  • When feeding into vulnerability scanning or composition analysis tools
  • When documenting what ships in a release
  • 当合规要求提供SBOM时(如EO 14028、EU CRA)
  • 与客户或审计人员共享软件清单时
  • 为漏洞扫描或成分分析工具提供输入时
  • 记录版本发布内容时