Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/securityScan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name: Security Scan
#
# - workflow_dispatch: behaves like the cron run (full reporting).
#
# Scanner: OSV-Scanner v2.3.8 (purl-based via OSV.dev; federates GHSA,
# Scanner: OSV-Scanner v2.7.0 (purl-based via OSV.dev; federates GHSA,
# NVD, npm advisory DB, RustSec, Go vuln DB, PyPA). Reads
# `package-lock.json` natively -- no separate SBOM tool needed.
#
Expand All @@ -27,7 +27,7 @@ name: Security Scan
# justification ("dev-only, not shipped in dist/").
#
# Suppressions live in `osv-scanner.toml` as [[IgnoredVulns]] entries
# (CVE-id global; OSV-Scanner v2.3.8 doesn't support per-package CVE
# (CVE-id global; OSV-Scanner v2.7.0 doesn't support per-package CVE
# scoping). Each entry has a justification comment and an `ignoreUntil`
# expiry so suppressions re-surface for re-review rather than lingering.

Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
run: |
set -euo pipefail
curl -fsSL -o /tmp/osv-scanner \
https://github.com/google/osv-scanner/releases/download/v2.3.8/osv-scanner_linux_amd64
https://github.com/google/osv-scanner/releases/download/v2.7.0/osv-scanner_linux_amd64
Comment thread
vuanhphung marked this conversation as resolved.
Resolved

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low — The new v2.7.0 binary is fetched with curl and run straight away, with no integrity check. This gap existed before the PR, but this line is the one being changed, so it is a cheap time to close it. Someone who can tamper with the release asset or the download path could run any code they like on the protected runner group. That job also holds id-token: write, so it could mint JFrog OIDC tokens, and it could make the scan report clean. The repo already pins every action to a commit SHA, so pinning the binary's digest fits that convention. Get the SHA-256 for osv-scanner_linux_amd64 from the release's checksums file, hardcode it, and check it before the chmod. For example:

echo "<sha256>  /tmp/osv-scanner" | sha256sum -c -

That also gives you one place to update on the next version bump.

chmod +x /tmp/osv-scanner
/tmp/osv-scanner --version

Expand Down
4 changes: 2 additions & 2 deletions osv-scanner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
# just the artifact we have in mind. The alternative
# ([[PackageOverrides]] with `vulnerability.ignore = true`) is
# per-package but blanket-ignores ALL vulnerabilities on that package,
# which is much worse. OSV-Scanner v2.3.8 does NOT support an
# which is much worse. OSV-Scanner v2.7.0 does NOT support an

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low — This behavioral claim (and the ignoreUntil "honors it natively" claim at line 21) was mechanically re-labelled from v2.3.8 to v2.7.0 along with the version string, but a 4-minor-version jump is exactly where tool config semantics can change. Unlike the pure doc-comment edits in securityScan.yml, this one asserts a capability gap that justifies the project's suppression strategy (global [[IgnoredVulns]] over per-package scoping). If v2.7.0 has since added per-package CVE scoping, the comment now steers maintainers toward a strictly broader (less safe) suppression than necessary.

The ignoreUntil claim is implicitly corroborated by the PR's "old/new scans returned the same findings" (the braces suppression still applied), but the intersection/per-package claim is not exercised by any existing entry, so nothing in the validation actually confirms it. Worth a quick check against the v2.7.0 configuration schema before merge; if it still holds, no change needed. (I could not verify externally — web tools are disabled in this review environment.)

# intersection ("this CVE on this package only").
#
# See google.github.io/osv-scanner/configuration/ for the schema.
#
# CONVENTION: use suppressions sparingly, only with a strong reason
# (unreachable code path + no fix available, or dev-only + not shipped).
# EVERY [[IgnoredVulns]] entry MUST set `ignoreUntil = YYYY-MM-DD`
# (~6 months out). OSV-Scanner v2.3.8 honors it natively; when it lapses
# (~6 months out). OSV-Scanner v2.7.0 honors it natively; when it lapses
# the finding re-surfaces, forcing a re-review instead of a permanent
# silent ignore.
#
Expand Down
Loading