dsh-sbom: Validate SBOM existence, completeness, and format.

Foreword

In the context of supply chain security, SBOM (Software Bill of Materials) delivery with artifacts is frequently required. Documents such as US Executive Order 14028 and the NTIA’s SBOM Minimum Elements emphasize minimum elements like components, identifiers, and timestamps. A common practice among teams is to run cyclonedx-npm, syft, or spdx-sbom-generator to export a bom.json, or to hook manifest generation into CI temporarily. The problem lies in the fact that having “a file named SBOM in the repository” and having “a manifest that downstream processes can consume and cross-reference with dependencies” are often not the same thing. Empty shell JSONs, files renamed from npm ls, XMLs missing bomFormat, or CycloneDX files not updated for a year will all face scrutiny during audits or delivery.

DeepSeek Harness (DSH) splits capabilities into plugins. @deepwhale-cn/dsh-sbom (GitHub: feely0208/dsh-sbom, Maintainer: feely0208, Category: Workflow) does only one thing: inspect existing SBOM files in the project. It does not generate manifests, scan for CVEs, or draw compliance conclusions. Below, we introduce what it checks, how to install it, how to use it, and its division of labor with dsh-dep-audit.

What is this

In one sentence: Other tools are responsible for writing the manifest, while this tool is responsible for checking the manifest.

  • Is: Checks if SBOMs exist, if they are complete, if they are up-to-date, and if the format is correct. Each finding provides the file path, evidence, criteria, and remediation suggestions.
  • Is not: An SBOM generator, a vulnerability scanner, or a license compliance determinator. It does not output a final verdict of “compliant / non-compliant”; it only describes facts.

Compared to dsh-dep-audit, which belongs to the DeepWhale Security Guard series and focuses on dependency tree vulnerabilities and licenses:

dsh-dep-audit  = Checks for vulnerabilities and licenses in the [dependency tree]
dsh-sbom       = Checks if the [material list] itself exists, is complete, and is up-to-date

The npm package name is @deepwhale-cn/dsh-sbom, current version 0.1.0, license MIT. The environment requirements are Node.js >= 18 and DSH >=0.1.0-rc.6 <0.3.0.

What it checks

There are five built-in rules, with levels divided into high (🔴 corresponding to critical items in CLI output), medium (🟡), and low (🔵):

Rule ID What it checks Level
SBOM-NO-LIST Lockfile exists, but no SBOM file can be found high
SBOM-EMPTY-SHELL SBOM exists, but contains no component entries (empty shell) high
SBOM-NOT-STANDARD Missing bomFormat / spdxVersion, non-standard format high
SBOM-STALE SBOM has not been updated for over 180 days (based on file modification time) medium
SBOM-NO-IDENTIFIER Components only have name and version, missing purl / CPE low

The sources for the criteria include: Section 4(e) of Executive Order 14028, NTIA’s SBOM Minimum Elements, and official CycloneDX / SPDX specifications. You can use dsh-sbom --list-rules to view built-in descriptions and references.

Filenames recognized (can be in any subdirectory): sbom.json, bom.json, *.cdx.json, *.spdx.json, *.sbom.json, cyclonedx.json, bom.xml, sbom.xml, *.cdx.xml, *.spdx.

Formats recognized: CycloneDX (JSON / XML), SPDX (JSON / tag-value).

By default, directories such as dist/, build/, and node_modules/ are skipped. If the manifest is placed only in these paths or uses filenames not listed, it may be reported as “not found.”

Installation and Activation

In an environment where DSH is installed, install to the web profile following the official README:

dsh plugin --profile web add @deepwhale-cn/dsh-sbom

The plugin scans files in the specified directory with the permissions of the current dsh process. Before installation, it is recommended to review the GitHub repository source code and MIT license to ensure it aligns with your team’s policies.

Typical Usage

Check the project in the current working directory:

dsh-sbom

Check a specific root directory:

dsh-sbom --root /path/to/project

View built-in samples (simulating a demo project with “lockfiles present but manifests are variously defective”):

dsh-sbom --demo

Generate an HTML report for archiving or screenshots:

dsh-sbom --root /path/to/project --html sbom.html

Integrate with CI: In --quiet mode, the process exit code is 1 if high-level findings exist:

dsh-sbom --root . --quiet

The demo sample in the README also exists in tests/fixtures/fail/demo-project/: The repository contains four “manifest” files. The tool will report them respectively for being empty shells, non-standard formats, over 180 days without updates, and components without unique identifiers. Meanwhile, tests/fixtures/absent/minimal/ demonstrates SBOM-NO-LIST for scenarios with “lockfiles present but no SBOM files.”

Compliant samples can be found in tests/fixtures/pass/clean-project/ (CycloneDX JSON+XML, SPDX JSON—three formats). Maintainers can use bash tests/run.sh to perform bidirectional verification where positive cases report fully and negative cases have zero hits.

Applicable Scenarios and Boundaries

Suitable for: Teams that need to quickly confirm “whether the manifest is in the repository, whether it can be consumed by standard tools, and whether it is obviously outdated or missing identifiers” before delivery or internal audit. Used in conjunction with generation tools (cyclonedx-npm / syft / spdx-sbom-generator) and dsh-dep-audit, it covers the different stages of “Write Manifest → Check Manifest → Check Dependency Risks.”

Important Notes:

  1. Does not generate manifests — It only reads existing files; generation still relies on dedicated SBOM tools.
  2. Only looks at the manifest file itself — It does not read artifact binaries, recursively parse the full dependency tree, or scan for CVEs.
  3. Does not determine compliance — For example, it is a normal practice in many teams to generate manifests temporarily in the release pipeline rather than committing them to the repository. The tool will still flag this according to rules; whether this is acceptable requires your explanation.
  4. SBOM-STALE relies on file mtime — Re-checking out or copying directories may reset modification times, leading to false negatives or false positives regarding staleness. The README provides a touch example for demo files when reproducing tests locally.

Links

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye