Skip to content

chore(deps): clear 3 critical and 65 high advisories via in-range minor/patch bumps - #83

Merged
sydevs-bot merged 2 commits into
mainfrom
claude/chore-deps-wemeditate
Sep 7, 2026
Merged

sydevs-bot merged 2 commits into
mainfrom
claude/chore-deps-wemeditate

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • pnpm update only. Every range keeps its current major, and no pin was widened.
  • Clears 3 critical and 65 high advisories. 7 high remain, all unreachable — see below.
  • Also pins pnpm through packageManager, so the lockfile's pnpm-10 constraint is enforced rather than described.
  • This is Monday's dependency survey. It is also the first Monday of the month, so it doubles as the routine minor/patch batch.

Changes

  • package.json — 32 range floors raised, all within the existing major, plus "packageManager": "[email protected]".
  • pnpm-lock.yaml — regenerated with pnpm 10, the version ci.yml pins.
  • .github/workflows/ci.yml — the two version: 10 inputs removed. pnpm/action-setup@v4 now reads packageManager, and fails outright if a version is named in both places.

The three criticals were all reachable by tooling rather than by our runtime:

Advisory Package From → to Why it was here
GHSA-hp5w-3hxx-vmwf payload 3.73.0 → 3.88.0 Pre-auth account takeover in password recovery. Reached only through @payloadcms/sdk, a REST client — this repo runs no Payload server.
GHSA-5xrq-8626-4rwp vitest 4.0.18 → 4.1.11 Arbitrary file read and execute while the Vitest UI server listens. Dev-only.
GHSA-23hp-3jrh-7fpw tar 7.5.6 → 7.5.22 Decompression DoS, plus five path-traversal advisories. Build-time, under @vercel/nft.

Also patched: hono 4.11.7 → 4.13.7 (serveStatic file access, CORS wildcard-with-credentials), undici 7.18.2 → 7.29.0, vite 7.3.1 → 7.3.6 (server.fs.deny bypasses), rollup, ws, koa, lodash, immutable, flatted, picomatch, minimatch, brace-expansion, js-yaml, fast-uri, nanoid, browserslist.

Preview

Test results

  • Lean gate: ✓ pr-prep/check.sh --full — lint, typecheck, 511 unit tests, production build
  • Targeted specs: 49 files / 511 tests passed
  • Build: ✓
  • CI: ✓ all 6 checks green on e447161 — Lint/Typecheck/Unit, Smoke (web), Smoke (ladle), both Cloudflare builds, state

Manual verification

  1. Open the map preview above and confirm it renders — vite, tailwindcss and wrangler all moved.
  2. Play a lecture and a meditation video, since hls.js moved 1.6.16 → 1.7.2.

Notes for reviewer

Seven high advisories are deliberately left. Four in next, two in postcss beneath it, one in sharp. This app is Vike on Cloudflare Workers: our source imports next nowhere, and the built Worker bundle carries no Next.js runtime. All four next advisories need a running Next.js server. Forcing them would mean a resolution override on packages we do not execute.

next is in the tree through a peer, not through how pnpm dedupes. @payloadcms/[email protected] declares a non-optional peer on @payloadcms/[email protected] (pnpm-lock.yaml:1731), and this lockfile sets autoInstallPeers: true. That peer carries [email protected], which carries postcss and sharp — all seven remaining highs. We import one subpath, @payloadcms/richtext-lexical/react. Whether that subpath needs its peer at all is worth answering, but the answer changes what installs, so it belongs to its own PR rather than this in-range batch.

One peer is now unmet: @cloudflare/workers-types. [email protected] peers on ^5.20260903.1 (pnpm-lock.yaml:5820); the floor here stays on major 4, so pnpm resolves 4.20260702.1 and only warns, because the peer is optional. On main the old wrangler wanted ^4.20260124.0 and the old floor satisfied it, so this PR does silently break something that held before. The types are imported for the KV binding (server/kv-cache.ts:16, server/cms-context.ts:14). Crossing to major 5 breaks this batch's own rule, so it is filed as #84.

The @payloadcms/sdk bump makes a workaround redundant. server/payload-client.ts exists partly to handle payload#14495, the SDK resolving undefined instead of throwing. At 3.88.0 it throws: dist/index.js:120 checks !response.ok and throws PayloadSDKError with the status, and every collection helper routes through that one method. Deleting validateSDKResponse touches every query function and docs/rules/rest-api.md, so it is filed as #85 rather than folded in here.

The lockfile is pnpm 10, and now enforced. Corepack resolves pnpm 12 in a fresh environment, and pnpm 12 additionally writes a scaffold pnpm-workspace.yaml full of set this to true or false placeholders and rewrites the manifest differently. packageManager is the field corepack and pnpm/action-setup@v4 both read, so the constraint no longer depends on a CI input and a PR description. Verified here: corepack resolved 12.3.4 before the field and 10.34.5 after it, and pnpm install --frozen-lockfile then succeeded.

SahajCloud has the same survey finding but no free WIP slot — filed as sydevs/SahajCloud#721 rather than a PR.

Detail

Why a plain refresh cleared so much. The tree was months stale, so nearly every advisory was already fixed inside the declared range. Only the lockfile was holding the old resolutions. No override, no resolutions block, and no baseline entry was needed.

SahajCloud is unaffected by the Payload criticals. It is the repo that actually runs a Payload server, and it is already on payload 3.86.0, past the 3.79.1 fix line. Checked against its lockfile, not assumed.

Build warnings are pre-existing. The production build emits 8 Error when using sourcemap for reporting an error warnings from rollup. main emits the same 8, measured by building both. Not a regression, and not introduced here.

Worker-bundle rule held. AGENTS.md requires client-only heavy deps to stay out of dist/server. grep -rl for hls.js internals in dist/server finds nothing after the bump. The one next-shaped match in dist/server/index.mjs is a terminal-colour helper reading process.env.NEXT_RUNTIME alongside PM2_HOME and isTTY — environment sniffing, not Next.js.

Remaining non-high advisories: 23 moderate and 4 low, down from 82 and 10. None have an in-range fix.

pnpm 12 comparison. Run under pnpm 12 the same update also clears the 7 next-related highs. An earlier version of this body credited that to pnpm 12 deduping the subtree differently. The peer note above is the accurate account. Either way it is not adopted: CI runs pnpm 10, and the tree must be what pnpm 10 produces.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VqyqLUhtAcbm4N9rRER1ao

…or/patch bumps

Monday dependency survey, first Monday of the month, so this is both the
security sweep and the routine minor/patch batch. `pnpm update` only — every
range stays on its current major, and no pin was widened.

The tree was months stale, so a plain refresh cleared almost everything.
The three criticals were all reachable-by-tooling rather than by our runtime:

- payload 3.73.0 -> 3.88.0 clears GHSA-hp5w-3hxx-vmwf (pre-auth account
  takeover in password recovery), plus SQL injection and authenticated SSRF.
  Reached here only through @payloadcms/sdk, which is a REST client -- this
  repo runs no Payload server, so the server-side advisories never applied.
  SahajCloud, which does run one, is already on 3.86.0 and unaffected.
- vitest 4.0.18 -> 4.1.11 clears GHSA-5xrq-8626-4rwp, arbitrary file read and
  execute while the Vitest UI server listens. Dev-only, but trivially patched.
- tar 7.5.6 -> 7.5.22 clears GHSA-23hp-3jrh-7fpw and five more path-traversal
  advisories. Build-time only, under @vercel/nft.

Seven high advisories remain, all unreachable: four in next, two in postcss
under it, one in sharp. This app is Vike on Cloudflare Workers and imports
next nowhere; the built Worker bundle contains no Next.js runtime. All four
next advisories need a running Next.js server.

Generated with pnpm 10 to match the version CI pins in ci.yml. pnpm 12, which
corepack resolves by default here, additionally emits a scaffold
pnpm-workspace.yaml and rewrites the manifest differently -- neither belongs
in a lockfile the CI runner must accept with --frozen-lockfile.

Verified: lint, typecheck, 511 unit tests and the production build all pass.
The 8 rollup sourcemap warnings in the build predate this change; main emits
the same 8. hls.js stays out of dist/server, per the Worker-bundle rule.

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

cloudflare-workers-and-pages Bot commented Sep 7, 2026 •

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 7bd428e Commit Preview URL

Branch Preview URL
Sep 07 2026, 03:11 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Deploying wemeditate-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7bd428e
Status: ✅  Deploy successful!
Preview URL: https://17348a7a.wm-design.pages.dev
Branch Preview URL: https://claude-chore-deps-wemeditate.wm-design.pages.dev

View logs

@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

The shape is right and hard to argue with: two files, no source changes, every range inside its current major, and the reasoning is unusually well evidenced for a dependency batch. Nothing here should not exist — this is the smallest diff that clears 3 criticals and 65 highs.

The findings are all about what the refresh revealed rather than what it changed. One peer expectation that was satisfied on main is silently unmet now, and only because it is optional did CI stay green. And the 7 highs left behind have a cause sitting in this lockfile — an auto-installed non-optional peer — that is more actionable than the pnpm-12 dedupe the body credits.

No blockers. Nothing here needs to become a bigger PR; two of the four want a sentence in the body or a follow-up ticket.

Findings

  • should-fix — package.json:52 — [email protected] now peers on @cloudflare/workers-types@^5; the floor stays on major 4, so a peer that main satisfied is unmet, unenforced (optional), and typing KVNamespace for the KV binding.
  • should-fix — package.json:72 — no packageManager field, so the pnpm-10 constraint the body explains at length is documented rather than enforced.
  • consider — package.json:28 — the 7 remaining highs come from richtext-lexical's non-optional @payloadcms/next peer plus autoInstallPeers: true, not from how pnpm 12 dedupes.
  • consider — package.json:29 — the SDK moved 15 minors past the version server/payload-client.ts's payload#14495 workaround was written against; worth confirming the workaround is still needed.

What was checked

  • Diff — git diff bf139e3...e447161: 2 files. Counted 38 changed range floors (21 dependencies, 17 devDependencies) and confirmed every one stays inside its current major, and no ^/exact pin was widened — vidstack and @vidstack/react stay pinned at 1.15.6.
  • Peer contracts, both sides — compared the wrangler entry in each lockfile: 4.61.0 peers @cloudflare/workers-types: ^4.20260124.0 (satisfied by the old floor), 4.129.0 peers ^5.20260903.1 (not satisfied by the new one). Also checked the new engines: {node: '>=22.0.0'} against .node-version (22.17.0) — fine. hls.js is our own direct dependency, not a vidstack peer, so 1.6.16 → 1.7.2 creates no peer conflict.
  • The remaining advisories — traced [email protected] to @payloadcms/richtext-lexical's peer list rather than to anything we import, then traced [email protected] and [email protected] to next's own dependency block. Confirmed [email protected] arrives separately, under miniflare via wrangler.
  • Consumer side of the Payload bumps — read server/payload-client.ts whole, plus the four import sites of the three @payloadcms/* packages (RichText.tsx, blockConverters.tsx, LecturePreview.tsx, PagePreview.tsx, payload-client.ts). Verified @payloadcms/sdk does depend on payload directly, so the body's account of how the critical reached us holds.
  • CI claims — read .github/workflows/ci.yml: both jobs pin pnpm/action-setup@v4 version: 10 and run --frozen-lockfile, so the lockfile-generation reasoning in the body is accurate. Both Cloudflare previews deployed on e447161, which is real evidence for the wrangler 4.61 → 4.129 and vite bumps that no unit test covers.
  • Not re-litigated — formatting, naming, and test-coverage volume; the author-side pass owns those. Reviewer profile read and applied.

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


Generated by Claude Code

Comment thread package.json Resolved
Comment thread package.json Resolved
Comment thread package.json Resolved
Comment thread package.json Resolved
The lockfile must be what pnpm 10 produces, and until now only the PR
description and two `version: 10` inputs in ci.yml said so. A fresh
environment gets whatever corepack resolves — pnpm 12.3.4 here — which
rewrites the manifest, scaffolds a placeholder pnpm-workspace.yaml, and
fails `--frozen-lockfile`.

`packageManager` is the field corepack and pnpm/action-setup@v4 both
read, so the constraint becomes enforced instead of documented.

The `version: 10` inputs come out in the same commit on purpose. Naming
a version in both places makes action-setup@v4 fail with a version
mismatch, so adding the field alone would turn CI red.

Verified locally: corepack resolved pnpm 12.3.4 before the field and
10.34.5 after it, and `pnpm install --frozen-lockfile` then succeeded
against this lockfile.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VqyqLUhtAcbm4N9rRER1ao
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Revision done — 4 review threads answered and resolved.

Changed (7bd428e): added "packageManager": "[email protected]", and removed version: 10 from both action-setup steps. Naming a version in both places makes pnpm/action-setup@v4 fail, so the two edits belong in one commit. Corepack resolved pnpm 12.3.4 here before the field and 10.34.5 after it. pnpm install --frozen-lockfile then passed, as did the lean gate (lint, typecheck, 511 tests).

Body corrected: next reaches the tree through richtext-lexical's non-optional @payloadcms/next peer plus autoInstallPeers, not through how pnpm 12 dedupes. The body now also names the @cloudflare/workers-types peer this bump leaves unmet.

Filed, not folded in. Both change what installs or touch every query function, which this in-range batch excludes: #84 (workers-types to major 5) and #85 (delete the payload#14495 scaffolding — the SDK throws since 3.88.0).

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


Generated by Claude Code

@github-project-automation github-project-automation Bot moved this from In progress to Approved in SYDevelopers Technical Roadmap Sep 7, 2026
@Ardnived Ardnived removed the awaiting label Sep 7, 2026
@sydevs-bot
sydevs-bot merged commit 17db339 into main Sep 7, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in SYDevelopers Technical Roadmap Sep 7, 2026
Ardnived pushed a commit that referenced this pull request Sep 7, 2026
…/sdk` throws since 3.88.0 (#87)

* refactor(server): delete the payload#14495 scaffolding

`server/payload-client.ts` was built around one upstream bug: `@payloadcms/sdk`
resolved `undefined` on an error response instead of throwing. #83 moved this
repo to `@payloadcms/[email protected]`, where `PayloadSDK.request`
(`dist/index.js:120-137`) checks `!response.ok`, reads the error payload, and
throws a `PayloadSDKError` carrying `status` and `errors`. Every collection and
global helper routes through that one method, so no read path can resolve
`undefined` on a failure any more.

Removed: `validateSDKResponse`, its one remaining call site (`getWebConfig`),
its unit tests, the `cms-client.test.ts` mock entry, the file-header note, and
the step `docs/rules/rest-api.md` wrote into the recipe for every future query
function.

The guard also rejected `null`. Nothing can reach it: `findGlobal`
(`dist/globals/findOne.js`) returns `response.json()` on a 2xx only, and the
globals endpoint answers with the document, never a bare `null`. The one SDK
path that returns `null` deliberately is `findByID({ disableErrors: true })`,
which this repo never calls.

Deleting the guard improves error classification rather than weakening it. It
threw a bare `Error`, which `detectErrorType` could only read as UNKNOWN;
`PayloadSDKError` carries `status`, which `readStatus` reads first, so a 4xx
now surfaces the CLIENT copy and a 5xx the SERVER copy.

`fetchWithErrorDetails` stays. Its `[PayloadCMS] <method> <url> -> <status>`
line is the debugging workflow AGENTS.md documents, and it logs the full error
body, where the thrown error carries only `errors[0].message`. Its docblock no
longer claims the SDK swallows the status.

Tests: two specs pin the upstream contract, stubbing a non-OK response and
asserting the throw, the `status` it carries, and the `ErrorType` that follows.
Both were confirmed failing first, against a stub returning a 200 with a `null`
body — the exact shape of the bug this scaffolding existed for.

Closes #85

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QiKyVWeb6VXFQom2DDUfHC

* refactor: simplify per /simplify pass

The `cms-client.ts` header claimed error-utils classifies an SDK error by
matching its message. `detectErrorType` reads `readStatus()` first, and
`PayloadSDKError` carries `status`, so the status branch is the rule and
message matching the fallback. The claim was already imprecise; deleting the
guard made it misleading.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QiKyVWeb6VXFQom2DDUfHC

* docs(server): the preview secret travels as a header, not a URL parameter

`PayloadClientConfig.previewSecret`'s JSDoc said "passed via URL parameter".
`createPayloadClient` sets it as the `x-sahajcloud-preview-secret` header
(`payload-client.ts:32`, `:145`). The security pass flagged the mismatch while
reviewing this file's other comment fixes.

Docs swept for the deleted guard: `docs/rules/rest-api.md` was the only stale
surface, corrected in the first commit. `docs/rules/zod-validation.md` still
describes `payloadConfigSchema` and `PayloadConfigError` accurately, and
`AGENTS.md`'s `[PayloadCMS] GET <url> -> <status>` debugging line still holds.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QiKyVWeb6VXFQom2DDUfHC

---------

Co-authored-by: Claude <[email protected]>
@Ardnived
Ardnived deleted the claude/chore-deps-wemeditate branch November 13, 2026 03:49
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.

3 participants