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.
97%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Reference for scripts/sbom_diff.py. Behaviour is the same as the sbom_diff Python package.
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.sbom-diff: error (<code>): ...)| Code | Cause |
|---|---|
format | not an object, wrong bomFormat, bad field types, unreadable file |
unsupported_version | specVersion outside 1.4 to 1.6 |
too_large | file over 50 MiB, more than 100,000 components, version over 256 characters |
too_deep | components nested over 32 levels or more than 128 JSON bracket levels |
invalid_json | not valid JSON or not valid UTF-8 |
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 -.group/name when a group exists, else name.version field, or the one in the purl when the field is empty.| Category | Meaning |
|---|---|
added | key only in head |
removed | key only in base |
upgrade | one version on each side and head is higher |
downgrade | one version on each side and head is lower |
changed | version sets differ and no direction applies (several versions, equal precedence, not comparable) |
license | the 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.
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.