Skip to content

v1.84.2.0 Fix OSV Scanner failures: bump sharp and adm-zip, expire override pins - #2867

Open
smsmatt wants to merge 4 commits into
garrytan:mainfrom
Sanmarcsoft:hotfix/osv-override-freshness
Open

smsmatt wants to merge 4 commits into
garrytan:mainfrom
Sanmarcsoft:hotfix/osv-override-freshness

Conversation

@smsmatt

@smsmatt smsmatt commented Sep 14, 2026

Copy link
Copy Markdown

Closes #2866.

The weekly OSV Scanner run on main has been failing since 2026-09-14. Two advisories, both in packages that reach the tree only through package.json overrides, both already fixed upstream.

What changed

sharp 0.35.0 to 0.35.4 clears GHSA-rgj7-g3m4-5g8c (bundled libheif RCE, CVSS 8.9). adm-zip 0.6.0 to 0.6.1 clears GHSA-vwc7-r8mq-g2x9 / CVE-2026-76845 (symlink-follow on extract). POST https://api.osv.dev/v1/query returns zero vulns for both new versions.

The adm-zip advisory records last_affected rather than a fixed event, so the scanner table prints FIXED VERSION = -- and reads as though the finding is unfixable. It is not; 0.6.1 is published and outside the affected range.

.override-pins.json + test/override-freshness.test.ts give the overrides block the discipline .osv-scanner.toml already applies to suppressions. An exact pin is the one dependency shape that cannot drift forward on its own: Dependabot will not move sharp: "0.35.0", and dependency-review.yml only inspects newly added dependencies at PR time. So each override now carries a reason and a reviewBy date, and the free suite fails when a pin has no rationale, when a rationale outlives its override, when a reviewBy has passed, or when an exact pin no longer matches what the lockfile resolved. That moves the signal from an unwatched weekly cron to a gate a reviewer is already reading.

osv-scanner.yml opens an issue on a failed scheduled run, or comments on the open one, guarded on repository.has_issues so forks with issues disabled skip the job rather than erroring.

Exposure

Low, and deliberately not the deciding factor. The only sharp consumer is browse/src/screenshot-size-guard.ts, which downscales full-page PNG screenshots and never decodes the AVIF or HEIF paths the libheif advisory covers. Nothing imports adm-zip directly; it arrives via onnxruntime-node under @huggingface/transformers. Both fixes are a one-line version change, so there was no reason to weigh exposure against cost.

Verification

bun install relocks cleanly, and the lockfile diff is scoped to sharp, adm-zip, and the @img/sharp-* platform packages. test/deps-smoke.test.ts (sharp import, metadata(), resize round-trip), test/override-freshness.test.ts, and test/osv-config-wiring.test.ts pass: 11 tests, 32 assertions.

On the full free suite, honest reporting: it is not green in my container, and it is not green on the base commit either. Base 71f6048e fails 52 tests, this branch fails 46, and diffing the two failure sets leaves exactly one branch-only entry, a PTY WebSocket test in browse/test/terminal-agent-integration.test.ts that passes 3 of 3 in isolation on the branch and 2 of 2 on base. It is flake under shard load, not a regression. The shared baseline failures are environmental (no file binary for the compiled-binary check, ~/.gstack home state, TMPDIR-sensitive path-traversal tests), so CI should be the authority on suite health here rather than my numbers.

VERSION is bumped to 1.84.2.0 with a CHANGELOG entry. Commits are bisected: the dependency bump, the freshness gate, the workflow change, and the release notes are each independently revertable.

Both were reached only through package.json overrides, and both had fallen
behind a fixed release, so the weekly OSV scan went red on 2026-09-14:

  sharp 0.35.0   GHSA-rgj7-g3m4-5g8c  bundled libheif RCE, CVSS 8.9
  adm-zip 0.6.0  GHSA-vwc7-r8mq-g2x9  symlink-follow on extract, CVSS 6.8

The adm-zip advisory records last_affected rather than a fixed event, so the
scanner table prints a blank fixed version. 0.6.1 is published and outside the
affected range. OSV reports zero advisories against both new versions.
.osv-scanner.toml forces every suppressed advisory to carry an ignoreUntil.
Nothing applied the same discipline to package.json overrides, and an exact
pin is the one dependency shape that cannot drift forward on its own:
Dependabot will not move it, and dependency-review.yml only inspects newly
added dependencies at PR time. The result was a pin that aged invisibly until
a weekly cron turned red days later.

.override-pins.json records why each override exists and when it must be
re-justified. test/override-freshness.test.ts runs in the free suite and
fails once a reviewBy has passed, which moves the signal from an unwatched
cron to a gate a human is already reading.
A weekly cron that only goes red is a signal nobody is subscribed to. On
failure the workflow now opens (or comments on) an issue naming the run and
the usual cause. Guarded on repository.has_issues so forks with issues
disabled skip the job instead of erroring.
@trunk-io

trunk-io Bot commented Sep 14, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions github-actions Bot changed the title Fix OSV Scanner failures: bump sharp and adm-zip, expire override pins v1.84.2.0 Fix OSV Scanner failures: bump sharp and adm-zip, expire override pins Sep 14, 2026

@smsmatt smsmatt left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

/trunk merge

@trunk-io

trunk-io Bot commented Sep 15, 2026

Copy link
Copy Markdown

An error occurred while submitting your PR to the queue: Only users that are a part of this repo's Trunk organization or have write permissions to the repo can submit a PR to the queue

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.

OSV Scanner failing on main: sharp and adm-zip overrides have fallen behind published fixes

1 participant