Repository navigation
chore(deps): clear 3 critical and 65 high advisories via in-range minor/patch bumps - #83
Conversation
…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
Deploying with
|
| 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 |
Deploying wemeditate-design with
|
| 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 |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 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 thatmainsatisfied is unmet, unenforced (optional), and typingKVNamespacefor the KV binding. - should-fix —
package.json:72— nopackageManagerfield, so the pnpm-10 constraint the body explains at length is documented rather than enforced. - consider —
package.json:28— the 7 remaining highs come fromrichtext-lexical's non-optional@payloadcms/nextpeer plusautoInstallPeers: true, not from how pnpm 12 dedupes. - consider —
package.json:29— the SDK moved 15 minors past the versionserver/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 (21dependencies, 17devDependencies) and confirmed every one stays inside its current major, and no^/exact pin was widened —vidstackand@vidstack/reactstay pinned at1.15.6. - Peer contracts, both sides — compared the
wranglerentry in each lockfile:4.61.0peers@cloudflare/workers-types: ^4.20260124.0(satisfied by the old floor),4.129.0peers^5.20260903.1(not satisfied by the new one). Also checked the newengines: {node: '>=22.0.0'}against.node-version(22.17.0) — fine.hls.jsis our own direct dependency, not avidstackpeer, so1.6.16 → 1.7.2creates 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]tonext's own dependency block. Confirmed[email protected]arrives separately, underminiflareviawrangler. - Consumer side of the Payload bumps — read
server/payload-client.tswhole, plus the four import sites of the three@payloadcms/*packages (RichText.tsx,blockConverters.tsx,LecturePreview.tsx,PagePreview.tsx,payload-client.ts). Verified@payloadcms/sdkdoes depend onpayloaddirectly, so the body's account of how the critical reached us holds. - CI claims — read
.github/workflows/ci.yml: both jobs pinpnpm/action-setup@v4version: 10and run--frozen-lockfile, so the lockfile-generation reasoning in the body is accurate. Both Cloudflare previews deployed one447161, which is real evidence for thewrangler4.61 → 4.129 andvitebumps 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
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
|
Revision done — 4 review threads answered and resolved. Changed ( Body corrected: Filed, not folded in. Both change what installs or touch every query function, which this in-range batch excludes: #84 ( 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
…/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]>
Summary
pnpm updateonly. Every range keeps its current major, and no pin was widened.packageManager, so the lockfile's pnpm-10 constraint is enforced rather than described.Changes
package.json— 32 range floors raised, all within the existing major, plus"packageManager": "[email protected]".pnpm-lock.yaml— regenerated with pnpm 10, the versionci.ymlpins..github/workflows/ci.yml— the twoversion: 10inputs removed.pnpm/action-setup@v4now readspackageManager, and fails outright if a version is named in both places.The three criticals were all reachable by tooling rather than by our runtime:
@payloadcms/sdk, a REST client — this repo runs no Payload server.@vercel/nft.Also patched:
hono4.11.7 → 4.13.7 (serveStatic file access, CORS wildcard-with-credentials),undici7.18.2 → 7.29.0,vite7.3.1 → 7.3.6 (server.fs.denybypasses),rollup,ws,koa,lodash,immutable,flatted,picomatch,minimatch,brace-expansion,js-yaml,fast-uri,nanoid,browserslist.Preview
Test results
pr-prep/check.sh --full— lint, typecheck, 511 unit tests, production builde447161— Lint/Typecheck/Unit, Smoke (web), Smoke (ladle), both Cloudflare builds, stateManual verification
vite,tailwindcssandwranglerall moved.hls.jsmoved 1.6.16 → 1.7.2.Notes for reviewer
Seven high advisories are deliberately left. Four in
next, two inpostcssbeneath it, one insharp. This app is Vike on Cloudflare Workers: our source importsnextnowhere, and the built Worker bundle carries no Next.js runtime. All fournextadvisories need a running Next.js server. Forcing them would mean a resolution override on packages we do not execute.nextis 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 setsautoInstallPeers: true. That peer carries[email protected], which carriespostcssandsharp— 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 resolves4.20260702.1and only warns, because the peer is optional. Onmainthe old wrangler wanted^4.20260124.0and 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/sdkbump makes a workaround redundant.server/payload-client.tsexists partly to handle payload#14495, the SDK resolvingundefinedinstead of throwing. At 3.88.0 it throws:dist/index.js:120checks!response.okand throwsPayloadSDKErrorwith the status, and every collection helper routes through that one method. DeletingvalidateSDKResponsetouches every query function anddocs/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.yamlfull ofset this to true or falseplaceholders and rewrites the manifest differently.packageManageris the field corepack andpnpm/action-setup@v4both 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, andpnpm install --frozen-lockfilethen 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
resolutionsblock, 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 errorwarnings from rollup.mainemits the same 8, measured by building both. Not a regression, and not introduced here.Worker-bundle rule held.
AGENTS.mdrequires client-only heavy deps to stay out ofdist/server.grep -rlfor hls.js internals indist/serverfinds nothing after the bump. The onenext-shaped match indist/server/index.mjsis a terminal-colour helper readingprocess.env.NEXT_RUNTIMEalongsidePM2_HOMEandisTTY— 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