Skip to content

feat(scanner): support SBOM applications and non-CVE vulnerability IDs - #176

Merged
tembleking merged 3 commits into
mainfrom
feat/sbom-components-and-ghsa
Oct 14, 2026
Merged

tembleking merged 3 commits into
mainfrom
feat/sbom-components-and-ghsa

Conversation

@tembleking

Copy link
Copy Markdown
Member

Summary

Recent sysdig-cli-scanner versions report every SBOM component in the JSON v1 output, not only software packages. That includes standalone applications such as an embedded web server or a monitoring tool. Vulnerabilities can also be identified by advisory IDs other than CVEs, such as GHSA-…. The plugin now handles both, and its dependencies and default scanner version are updated.

What changes

Applications and other SBOM components

  • Applications are recognized as such instead of being reported as packages of type Unknown. The vulnerability report and the image diff show their type (e.g. "Web Server") and their path.
  • The domain model gains a Component abstraction with three implementations:
    • Package: a software package, with a PackageType.
    • Application: has a free-text type.
    • ImageComponent: the operating system or the container image, with no layer.
  • Vulnerabilities, accepted risks, layers and policy failures relate to components, so findings and policy failures on an application are reported like package ones.
  • Output from older scanners, which have no category field, and categories without a dedicated kind are still parsed as packages.

Non-CVE vulnerability IDs

  • disclosureDate is optional in the JSON v1 contract, but it was parsed unconditionally, so a vulnerability without it made the whole report fail to parse. It is now optional, and the report shows an empty publish date.
  • GHSA advisories link to GitHub Advisories, and CVEs keep linking to NVD.
  • In the image diff tables, vulnerability IDs no longer wrap at each hyphen.

Dependencies

  • Parent POM 6.2236.v12dd4c483242, Jenkins BOM 7169.vb_32a_cfd93fa_6, and updated Nix flake inputs.
  • The default sysdig-cli-scanner is now 1.30.2. The oldest supported stays 1.23.0.
  • The recorded scanner fixtures now use grafana/grafana:9.5.21, which contains an application, Go modules and OS packages.

Testing

  • just verify passes.
  • Real scanner fixtures from the newest (1.30.2) and oldest (1.23.0) supported versions, with and without component categories.
  • New ComponentTest for the relationships of applications and image components, including policy failures on an application.
  • Hand-crafted fixture with a GHSA advisory that has no disclosure date and is referenced by a policy failure.
  • Manual UI check with mvn hpi:run and real scans of grafana/grafana:9.5.21, grafana/grafana:10.0.0 (using imageToCompare) and httpd:2.4.49-alpine:
    • The Policy, Security and Diff tabs render application findings with their type and path.
    • Policy failures on an application are listed like package ones.
    • A GHSA ID links to GitHub Advisories, and a missing publish date renders as an empty cell.

Notes for reviewers

  • The scan result is not persisted (SysdigAction only stores strings), so moving from Package-based APIs to Component has no impact on existing builds.
  • Vulnerability.cve(), findVulnerabilityByCVE() and the "CVE ID" column keep their names even though they can now hold other advisory IDs. Renaming them would also touch the UI, which looks the column up by its title, so it is left for a follow-up.
  • Pre-existing and out of scope: the report page logs Cannot read properties of null (reading 'rows'). index.jelly never sets data-gates-summary-table, and index-script.js only compares it with '', so it calls JSON.parse(null). The rendered tables are not affected.

- parent POM 6.2221.va_045130417c9 -> 6.2236.v12dd4c483242
- Jenkins BOM 6931.vea_a_b_c6fd017d -> 7169.vb_32a_cfd93fa_6
- flake inputs (nixpkgs, flake-utils)
- default sysdig-cli-scanner 1.29.0 -> 1.30.2 (oldest supported stays 1.23.0)
- regenerate scanner fixtures with 1.30.2 and 1.23.0
Newer sysdig-cli-scanner versions report every SBOM component in
`result.packages`, told apart by a `category` field (package, application,
image, operating-system, file). Applications (e.g. an embedded web server or
monitoring tool) carry a free-text type such as "Web Server" instead of a
package ecosystem, so they were parsed as packages of type Unknown.

Model them explicitly instead of folding everything into packages:

- Introduce the `Component` abstraction with `Package`, `Application` and
  `ImageComponent` (operating system / container image) implementations.
- Vulnerabilities, accepted risks, layers and policy failures now relate to
  components instead of packages only.
- Map `category` when parsing the JSON v1 report. Missing category (scanners
  before the field existed) or categories without a dedicated kind (file)
  fall back to packages so their findings are still reported.
- Reports show the application type for applications.
- Switch the scanner fixtures to grafana/grafana:9.5.21, which contains an
  application, Go modules and OS packages.
… dates

Vulnerability advisories without a CVE alias are now exported under their own
ID (e.g. GHSA-5j5w-g665-5m35). Those entries may also come without
`disclosureDate`, which is optional in the JSON v1 contract but was parsed
unconditionally, making the whole report fail.

- Make `Vulnerability.disclosureDate()` optional; reports show "None".
- Link GHSA advisories to github.com/advisories in the UI (CVEs keep linking
  to NVD) through a single `vulnerabilityAdvisoryUrl` helper.
- Add a fixture with a GHSA-only advisory without disclosure date referenced
  by a policy failure.
- Keep vulnerability IDs on a single line in the image diff tables.
@tembleking
tembleking marked this pull request as ready for review October 14, 2026 10:19
@tembleking
tembleking enabled auto-merge (squash) October 14, 2026 10:25
@tembleking
tembleking disabled auto-merge October 14, 2026 11:47
@tembleking
tembleking merged commit c12c2a2 into main Oct 14, 2026
20 checks passed
@tembleking
tembleking deleted the feat/sbom-components-and-ghsa branch October 14, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants