Files
sbom-tools-action/README.md
T
janhouse 2b4b140200 scan: report .vex/ files and print VEX re-checks; vex: action for the central VEX repo
dtrack-panel now applies OpenVEX / CycloneDX VEX files as well as
osv-scanner.toml [[IgnoredVulns]], and sends a statement's findings back to
IN_TRIAGE when its review date passes, the package version moves on, or the
CVE turns KEV. scan sends .vex/**/*.json with the report and turns the
panel's answer into job annotations (re-check due, review date within 14
days, skipped statements). vex/ posts a whole repo's VEX files to
/panel-ci/vex for statements about third-party images.
2026-11-19 10:55:07 +02:00

60 lines
3.0 KiB
Markdown

# sbom-tools-action
Composite action that installs Trivy and the CycloneDX CLI with caching, ready for SBOM generation workflows.
## Why
The previous setup pinned `TRIVY_VERSION` and `CYCLONEDX_CLI_VERSION` in every consuming workflow. When the upstream `trivy/contrib/install.sh` started failing for older release-asset layouts, every repo needed a PR to bump. This action centralises the install logic and reads versions as inputs (typically wired to the gitea instance variables `vars.TRIVY_VERSION` / `vars.CYCLONEDX_CLI_VERSION`).
## Usage
```yaml
- uses: https://git.janhouse.lv/janhouse/sbom-tools-action@v1
with:
trivy-version: ${{ vars.TRIVY_VERSION }}
cyclonedx-version: ${{ vars.CYCLONEDX_CLI_VERSION }}
```
After this step, `trivy` and `cyclonedx-cli` are on `PATH`. Cache is keyed on the runner OS + both versions, so a bump invalidates and reinstalls automatically.
## Inputs
| Name | Description | Required |
| --- | --- | --- |
| `trivy-version` | Trivy release tag, e.g. `v0.70.0`. | yes |
| `cyclonedx-version` | CycloneDX CLI release tag, e.g. `v0.27.1`. | yes |
Both inputs are required so the consumer is explicit about source. Wire them to gitea instance vars to avoid hardcoding.
## Versioning
The repo follows lightweight tags: `v1`, `v1.0.0`, etc. Consumers pin to `@v1` for in-major updates, or `@<sha>` for full pinning.
## `scan` — SBOM, osv-scanner and the triage report (v2)
`uses: https://git.janhouse.lv/janhouse/sbom-tools-action/scan@v2` uploads the
repo's source SBOM to Dependency-Track, runs osv-scanner over the repo, and
reports to dtrack-panel which images the repo builds and its
`osv-scanner.toml` `[[IgnoredVulns]]`. The panel's auto-triage then marks
those NOT_AFFECTED in Dependency-Track — for the CI project and for the app's
own dependency tree in the running images — and closes CI-project findings for
dependencies that never reach the image (dev/build-time). VEX files under
`.vex/` (OpenVEX or CycloneDX VEX, `*.json`) are reported too. Inputs and an
example are in `scan/action.yml`. Authenticates with the same
`DEPENDENCY_TRACK_API_KEY` the upload uses; no extra secret.
Every decision holds for the package versions present when it was written,
until its `ignoreUntil` / `review_by` (default 90 days after it was added or
last changed), and while the CVE is not known-exploited (CISA KEV). Then the
panel reopens the findings (IN_TRIAGE) and the job log warns "VEX re-check
due". Re-check; editing the entry (e.g. a new `ignoreUntil`) re-confirms it.
## `vex` — the central VEX repo
`uses: https://git.janhouse.lv/janhouse/sbom-tools-action/[email protected]` posts every
`*.json` under `vex/` (OpenVEX or CycloneDX VEX) to dtrack-panel
(`/panel-ci/vex`): statements about third-party images and packages, applied
to the images they name, or wherever the package appears. The repo's complete
set each run; a removed statement withdraws its decisions. A rejected file
(invalid JSON, `not_affected` without justification or reason) fails the job.