CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

trysac/sbom-diff

Compare two CycloneDX 1.4-1.6 JSON SBOMs and report added, removed, upgraded, downgraded components and license changes by purl. Use when the user has two SBOMs, asks what a release changed, or wants a CI gate on dependency changes.

Quality

97%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

SKILL.md

name:
sbom-diff
description:
Compare two CycloneDX 1.4-1.6 JSON SBOMs and report added, removed, upgraded, downgraded components and license changes by purl. Use when the user has two SBOMs, asks what a release changed, or wants a CI gate on dependency changes.

sbom-diff

Compare a base SBOM with a head SBOM (CycloneDX JSON) and explain what changed in the dependency tree. It runs locally with Python 3.10+ (standard library only); no package install and no network access are needed.

When to use

  • The user has two CycloneDX SBOMs (before and after a release or a dependency update).
  • The user asks which dependencies were added, removed, upgraded, downgraded, or changed license.
  • A CI step must fail when certain kinds of change appear (for example a downgrade).

Workflow

  1. Identify the base and head files. Confirm each is JSON with "bomFormat": "CycloneDX" and specVersion 1.4, 1.5 or 1.6.
  2. Run: python3 scripts/sbom_diff.py base.json head.json
  3. For machine-readable output add --format json. For a gate add --fail-on added,downgrade (any of: added, removed, upgrade, downgrade, changed, license).
  4. Summarise the report for the user: counts per category first, then the entries that deserve review (downgrades, license changes, new components).
  5. Never modify the SBOM files.

Exit codes: 0 no failing category, 1 at least one --fail-on category is not empty, 2 invalid input or flags (the reason is printed to stderr).

How components are matched

Components, including nested ones, are keyed by normalised package URL (qualifiers and subpath dropped, PEP 503 normalisation for pypi). Without a purl the key is group/name or name. metadata.component is never compared. A key with several versions on one side is a version set, reported as changed. Version order follows SemVer 2.0.0; versions that cannot be compared are reported as changed. See references/matching-rules.md.

Limits

  • Only CycloneDX JSON 1.4 to 1.6; SPDX and XML are not supported.
  • Up to 50 MiB per file, 100,000 components, 32 nesting levels.
  • Text output escapes control characters so SBOM content cannot forge report lines.

Project source: https://github.com/Trysac/u069-sbom-diff

SKILL.md

tile.json