Skip to content

chore(deps): clear the high sharp advisory from the Workers toolchain - #170

Merged
sydevs-bot merged 1 commit into
mainfrom
claude/chore-deps-sharp
Oct 10, 2026
Merged

sydevs-bot merged 1 commit into
mainfrom
claude/chore-deps-sharp

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • sharp 0.35.4 → 0.35.5 clears GHSA-wq5f-xc86-pv6w (high, CVE-2026-96889 in librsvg).
  • The lockfile carries the fix, and package.json moves one line with it:
    @cloudflare/vite-plugin 1.63.1 raised its peer floor from wrangler: ^4.147.0 to ^4.149.0,
    so the declared range had to follow.

Change outline

miniflare pins sharp exactly, so the patched 0.35.5 arrives only by lifting miniflare. Two
parents pin miniflare, and both had to move together or pnpm keeps two copies.

 package.json
 ├── dependencies
 │   └── @photonjs/cloudflare 0.1.13          # wants @cloudflare/vite-plugin ^1.19.0
-│       └── @cloudflare/vite-plugin 1.62.5   # peer: wrangler ^4.147.0
+│       └── @cloudflare/vite-plugin 1.63.1   # peer: wrangler ^4.149.0
 └── devDependencies
-    └── wrangler ^4.147.0
+    └── wrangler ^4.149.0

The wrangler edit is the plugin's new peer floor, not a cosmetic bump. ^4.147.0 would still
resolve 4.149.0 today, but it would no longer state the constraint the plugin enforces, and an
install that resolved any 4.147.x or 4.148.x under it would hit an unmet peer.

Both now resolve one miniflare, where the fix lives:

-  miniflare 5.20261001.0-alpha
-    ├── sharp   0.35.4                       # GHSA-wq5f-xc86-pv6w
-    └── workerd 1.20261001.1
+  miniflare 5.20261006.1-alpha
+    ├── sharp   0.35.5
+    └── workerd 1.20261006.1

esbuild 0.28.1 drops out of the lockfile: wrangler 4.149.0 moved to the 0.28.2 the rest of the
toolchain already used. That dedupe — 3 esbuild resolutions before, 2 after — is the whole
reason the lockfile loses more lines than it gains. @cloudflare/vite-plugin resolves once on
both sides, so nothing collapses there.

Preview

Every dist/server chunk keeps its name and byte size across the bump, so the preview should be
indistinguishable from main.

Test results

  • Lean gate: ✓ lint + tsc --noEmit + test:run
  • Targeted specs: none — no source file changed
  • Build: ✓ pnpm build

Manual verification

  1. pnpm prod — wrangler 4.149.0 and workerd 1.20261006.1 serve the built Worker locally.
  2. pnpm audit --prod --audit-level=high — sharp is gone; two undici advisories remain, see below.

Notes for reviewer

sharp reaches us at runtime scope, through @photonjs/cloudflare in dependencies, which is
why Dependabot raised it. It is a native addon the deployed Worker can never load:
grep -rl sharp dist/server finds only a sourcemap, before and after. So this is toolchain
hygiene, not a live production exposure — worth taking because the fix was already in range.
That runtime scope is itself wrong, and will keep misclassifying toolchain CVEs: #171.

Two high undici advisories stay open on main and are deliberately not in this PR:
GHSA-rfgv-xxqx-mfg5 and GHSA-w293-vg96-wgc3, patched in 7.29.1. payload pins undici to exactly
7.29.0 and 3.90.2 is its latest release, so no in-range fix exists. undici is also unreachable
here: its only importer is payload/dist/uploads/safeFetch.js, a path this repo never runs, and it
appears nowhere in dist/server or dist/client. Forcing it with a pnpm.overrides entry would
override an upstream exact pin for no change in our risk, and would become a downgrade the moment
payload bumps it itself. Left for the next @payloadcms/* release.

Detail

Changelogs read. wrangler 4.148.0 and 4.149.0, @cloudflare/vite-plugin 1.63.0 and 1.63.1.

The one entry that touches build output is #16003: using and await using ship to the runtime as
written instead of being lowered into helper code. On Vite 7 the Worker environments tell esbuild
the syntax is supported. This tree declares neither form, and the build confirms it — identical
chunk names and byte sizes.

The other behaviour changes land on surfaces this repo does not use: Workers Assets upload retries
(no [assets] in wrangler.toml), wrangler preview secret carry-over, R2 lifecycle flag
handling, wrangler types module rules, local R2 key encoding, the update-version notice, and
temporary-account notices moving to stderr. CI never invokes wrangler — Cloudflare's own build
integration deploys the previews — so nothing here parses its stdout.

Steps skipped, and why. /simplify and /code-review were not run: the diff is a generated
lockfile plus one semver range, with no source code to review. What was reviewable instead is the
resolution itself, verified directly — pnpm why sharp reports a single 0.35.5 after the change,
pnpm audit --prod --audit-level=high drops from three highs to two, and @photonjs/cloudflare's
declared ^1.19.0 already admitted @cloudflare/vite-plugin 1.63.1. wrangler is the one
declared range that had to move, because 1.63.1 raised its peer floor to ^4.149.0.
security-review skipped: no changed path matches securityReview.triggerPattern.
comment-lint.mjs: 0 changed files.

braces GHSA-vfj7-8cjw-p6xm (high) also remains, via @ladle/react > globby > fast-glob > micromatch. It is dev-only and has no patched version at all, so there is nothing to ship.

🤖 Generated with Claude Code

https://claude.ai/code/session_015MuSksiFHv2Fk1NpoHmPTN


Generated by Claude Code

sharp 0.35.4 -> 0.35.5 (GHSA-wq5f-xc86-pv6w, high, CVE-2026-96889 in the
bundled librsvg). miniflare pins sharp exactly, so the fix arrives only by
lifting miniflare, and both of its parents already allow the newer one:

- wrangler 4.147.0 -> 4.149.0 (devDependency, in range `^4.147.0`)
- @cloudflare/vite-plugin 1.62.5 -> 1.63.1 (transitive of
  @photonjs/cloudflare, in range `^1.19.0`)
- miniflare 5.20261001.0-alpha -> 5.20261006.1-alpha, workerd
  1.20261001.1 -> 1.20261006.1, sharp 0.35.4 -> 0.35.5
- esbuild 0.28.1 drops out, deduped into the 0.28.2 both now share

sharp reaches us at `runtime` scope through @photonjs/cloudflare, which is
a production dependency, but it is a native addon the deployed Worker can
never load. `grep -rl sharp dist/server` finds nothing but a sourcemap
before and after, so this bump is hygiene on the local and build
toolchain, not a live production exposure.

Checked for breakage: read the wrangler 4.148.0/4.149.0 and vite-plugin
1.63.0/1.63.1 changelogs. The one entry that touches build output ships
`using` and `await using` to the runtime instead of lowering them (#16003);
this tree declares neither, and every dist/server chunk keeps its name and
byte size across the bump. The remaining behaviour changes land on Workers
Assets retries, `wrangler preview` secrets, R2 lifecycle flags, generated
types and the update notice — none of which this repo configures or calls.
CI never invokes wrangler, so moving a notice to stderr changes nothing here.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015MuSksiFHv2Fk1NpoHmPTN
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying wemeditate-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: ab88288
Status: ✅  Deploy successful!
Preview URL: https://692fa902.wm-design.pages.dev
Branch Preview URL: https://claude-chore-deps-sharp.wm-design.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wemeditate-web ab88288 Commit Preview URL

Branch Preview URL
Oct 10 2026, 02:18 AM

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 10, 2026
@sydevs-bot

sydevs-bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 02:27Z address-review · attempt 1 · session · done
  • 02:27Z address-review · attempt 1 · session
  • 02:19Z review-pr · attempt 1 · session · done
  • 02:19Z review-pr · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🧐 Adversarial review

Right size for the problem: two files, one advisory, nothing bespoke added. GHSA-wq5f-xc86-pv6w is fixed in sharp 0.35.5, and the lockfile lands exactly that. All 99 changed lockfile keys sit in the sharp/workerd/miniflare/wrangler/vite-plugin/esbuild cluster. No unrelated package moved.

The body is the weak part. It says "only the lockfile moves" while editing package.json. The real reason for that edit is missing: @cloudflare/vite-plugin 1.63.1 raised its peer floor to wrangler: ^4.149.0.

One system question, not this PR's to fix. @photonjs/cloudflare sits in dependencies, yet no source file imports it — wrangler.toml reaches it through the build-time virtual module virtual:photon:cloudflare:server-entry. @vitejs/plugin-react is in dependencies too, used only by vite.config.ts. That runtime scope is why Dependabot raised a toolchain CVE at all, and the next one will arrive the same way. Worth a ticket to move both to devDependencies.

Findings

  • should-fix — Summary contradicts the diff; keep the bump and name the peer floor. package.json:77
  • consider — "collapsing two @cloudflare/vite-plugin resolutions into one" is wrong. pnpm-lock.yaml:293

What was checked

Read package.json, wrangler.toml, vite.config.ts, pages/+config.ts, server/entry.ts. Diffed both lockfiles key by key: 99 keys change, none outside that cluster. sharp, miniflare and @cloudflare/vite-plugin each resolve once, before and after. esbuild goes 3 → 2 as 0.28.1 drops, which is the whole −268 line delta. The GitHub advisory confirms 0.35.5 as the first patched sharp. compatibility_date stays 2025-09-06, so the workerd bump cannot move production semantics. No workflow invokes wrangler. Not re-run: the two builds behind the byte-identical-chunks claim.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread package.json Resolved
Comment thread pnpm-lock.yaml Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 10, 2026
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Both review findings were about the body, not the diff. Both verified, both adopted, and the body is rewritten. No commit, so ab88288 still stands and the gate recorded against it is unchanged.

  • Adopted — Summary contradicts the diff. @cloudflare/vite-plugin 1.62.5 peers wrangler: ^4.147.0, 1.63.1 peers ^4.149.0. The Summary names that floor now, and the Detail no longer calls the bump redundant.
  • Adopted — the vite-plugin dedupe claim. main and this branch each resolve it once. Clause dropped; esbuild 3 → 2 is the only dedupe.
  • Filed — the review body's dependency-scope question is chore(deps): move build-only packages to devDependencies #171. @photonjs/cloudflare and @vitejs/plugin-react are build-only but sit in dependencies, which is why a toolchain CVE arrived as a runtime one.

Also refreshed the Preview section: both Cloudflare previews have published since the body was written.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 10, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 10, 2026 02:34
@sydevs-bot
sydevs-bot requested a review from Ardnived October 10, 2026 02:34
@sydevs-bot
sydevs-bot enabled auto-merge October 10, 2026 02:34
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit 19b743d Oct 10, 2026
76 of 79 checks passed
@sydevs-bot
sydevs-bot deleted the claude/chore-deps-sharp branch October 10, 2026 17:55
@sydevs-bot sydevs-bot moved this from Approved to Done in SYDevelopers Technical Roadmap Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants