feat(ci): add osv-scanner to the dependency audit, merge into one dashboard #248

Merged
ullrich merged 1 commit from osv-scanner into main 2026-10-11 11:47:05 +00:00
Owner

Implements recommendations 1, 4 and 5 from the scanner review.

1. OSV-Scanner next to pnpm audit

  • dependency-audit.yml installs OSV-Scanner v2.6.0 from the GitHub release, pinned by version and SHA-256. It does not use the alxndr42/osv-scanner reusable workflow: that is a single-maintainer repo, and it fails the run on any finding.
  • The scanner reads pnpm-lock.yaml, so it also finds transitive packages. Its database is OSV.dev, the same one Renovate uses.
  • Exit code 1 (findings) is the normal state. Any higher exit code fails the run, the same rule as for pnpm audit.

4. One merged dashboard

  • Findings merge by advisory ID and aliases, so an advisory that both scanners find gives one checkbox, not two. The issue count stays correct.
  • Each advisory shows found by: …. The headline shows Findings per scanner: pnpm audit: N · osv-scanner: M.
  • New fields: installed version(s) and "fixed in".
  • The issue title changes from "Vulnerability Dashboard (pnpm audit)" to "Vulnerability Dashboard". The script still matches the old title, so it renames issue #168 and does not open a second issue.

5. SARIF artifact

  • osv.sarif is uploaded with the dependency-audit artifact. Nothing reads it yet. It is there for a Forgejo security tab (forgejo/forgejo#3669), if one is built.

Tested locally with real output from both scanners on the current lockfile. Both find the same 6 advisories, the merged list has 6 checkboxes, and a ticked box stays ticked.

Not tested in CI: CI does not run this workflow (it runs only on schedule or by hand). After the merge, start dependency-audit.yml by hand to check it.

Follow-up: compare the two scanners for 2 to 4 weeks, then remove the one that finds less.

🤖 Generated with Claude Code

Implements recommendations 1, 4 and 5 from the scanner review. **1. OSV-Scanner next to `pnpm audit`** - `dependency-audit.yml` installs OSV-Scanner v2.6.0 from the GitHub release, pinned by version and SHA-256. It does not use the `alxndr42/osv-scanner` reusable workflow: that is a single-maintainer repo, and it fails the run on any finding. - The scanner reads `pnpm-lock.yaml`, so it also finds transitive packages. Its database is OSV.dev, the same one Renovate uses. - Exit code 1 (findings) is the normal state. Any higher exit code fails the run, the same rule as for `pnpm audit`. **4. One merged dashboard** - Findings merge by advisory ID and aliases, so an advisory that both scanners find gives one checkbox, not two. The issue count stays correct. - Each advisory shows `found by: …`. The headline shows `Findings per scanner: pnpm audit: N · osv-scanner: M`. - New fields: installed version(s) and "fixed in". - The issue title changes from "Vulnerability Dashboard (pnpm audit)" to "Vulnerability Dashboard". The script still matches the old title, so it renames issue #168 and does not open a second issue. **5. SARIF artifact** - `osv.sarif` is uploaded with the `dependency-audit` artifact. Nothing reads it yet. It is there for a Forgejo security tab (forgejo/forgejo#3669), if one is built. **Tested locally** with real output from both scanners on the current lockfile. Both find the same 6 advisories, the merged list has 6 checkboxes, and a ticked box stays ticked. **Not tested in CI:** CI does not run this workflow (it runs only on schedule or by hand). After the merge, start `dependency-audit.yml` by hand to check it. **Follow-up:** compare the two scanners for 2 to 4 weeks, then remove the one that finds less. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(ci): add osv-scanner to the dependency audit, merge into one dashboard
All checks were successful
CI / Security Scan (pull_request) Successful in 8s
CI / Dockerfile Package Check (pull_request) Successful in 4s
CI / Checks (pull_request) Successful in 42s
CI / Visual Tests (pull_request) Successful in 34s
CI / Journal Image Smoke Test (pull_request) Successful in 1m2s
CI / E2E Tests (pull_request) Successful in 3m50s
Cancel superseded CI / Cancel in-flight CI (pull_request) Successful in 4s
d3d29a55f2
dependency-audit.yml now runs OSV-Scanner on pnpm-lock.yaml next to
pnpm audit. The two use different advisory databases (npm vs OSV.dev,
which Renovate also uses), so the dashboard merges findings by advisory
ID and aliases and shows which scanner found each one. The headline
gives a count per scanner for the comparison period.

- osv-scanner v2.6.0 from the GitHub release, pinned by checksum.
- Exit code 1 (findings) is normal; any higher exit code fails the run.
- SARIF output is uploaded with the artifact, for a possible Forgejo
  security tab (forgejo/forgejo#3669).
- The issue is renamed to "Vulnerability Dashboard"; the old title is
  still matched, so the existing issue (#168) is reused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ullrich scheduled this pull request to auto merge when all checks succeed 2026-10-11 11:41:44 +00:00
ullrich deleted branch osv-scanner 2026-10-11 11:47:06 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trails-cool/trails!248
No description provided.