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

matching-rules.mdreferences/

SBOM diff matching rules

Reference for scripts/sbom_diff.py. Behaviour is the same as the sbom_diff Python package.

Accepted input

  • JSON object with bomFormat equal to CycloneDX and specVersion equal to 1.4, 1.5 or 1.6.
  • components is optional; when present it must be an array of objects. Each component needs a non-empty string name. group, version and purl must be strings when present.
  • UTF-8 text, with or without a byte order mark.

Error codes (printed as sbom-diff: error (<code>): ...)

CodeCause
formatnot an object, wrong bomFormat, bad field types, unreadable file
unsupported_versionspecVersion outside 1.4 to 1.6
too_largefile over 50 MiB, more than 100,000 components, version over 256 characters
too_deepcomponents nested over 32 levels or more than 128 JSON bracket levels
invalid_jsonnot valid JSON or not valid UTF-8

Component key

  1. If the purl starts with pkg:, the key is pkg:<type>/<namespace>/<name> with the type lowercased, percent-decoding applied, and the version, qualifiers and subpath removed. For type pypi the name is lowercased and runs of -, _, . become -.
  2. Otherwise the key is group/name when a group exists, else name.
  3. The version is the version field, or the one in the purl when the field is empty.

Categories

CategoryMeaning
addedkey only in head
removedkey only in base
upgradeone version on each side and head is higher
downgradeone version on each side and head is lower
changedversion sets differ and no direction applies (several versions, equal precedence, not comparable)
licensethe set of license ids, names or expressions differs for the key

Every list is sorted by key. Versions are compared with SemVer 2.0.0 precedence: a leading v and +build are ignored, 1.2 equals 1.2.0, a pre-release is lower than its release. Versions that are not dot-separated digits (for example 2024a) cannot be compared.

Report formats

  • text: sections Added, Removed, Upgraded, Downgraded, Changed, License changes (only non-empty ones), or No differences.
  • json: object with added, removed, changed, license_changes; keys sorted, indent 2.

SKILL.md

tile.json