Repository navigation
fix(deps): close 5 high-severity advisories in the production tree - #142
Conversation
a60d0e1 ("chore(devops): align compatibility date and upgrade agents SDK to 0.19.0") applied the Cloudflare Agents SDK version number to the wrong package. `agents@0.19.0` exists; `hono-agents` has never published a 0.19.x -- it ships on a 3.x line (currently 3.0.12). package-lock.json was never regenerated and still resolves 3.0.7, so npm ci has failed on every PR and every Workers Build since 2026-08-07: npm error notarget No matching version found for hono-agents@^0.19.0. Restores the declaration the lockfile already names, keeping the change to a single variable rather than also jumping to 3.0.12. Verified locally: npm ci succeeds (274 packages, hono-agents 3.0.7 installed) and `npm run build` (tsc --noEmit) exits clean. src/index.ts:3 imports agentsMiddleware from hono-agents, so 3.0.7 satisfies real usage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKKxbsxh4tozUMzBKADSTd
`npm audit --audit-level=high --omit=dev` (the CI gate) reported 5 high-severity advisories in dependencies shipped to the Worker runtime. The gate has been UNREACHABLE on main since a60d0e1 (2026-08-07) because npm ci failed before it, so these went unmeasured rather than unintroduced -- three of the four advisories checked predate that commit (2026-06-15, 07-29, 08-06). Every fix stays within the existing major version; no breaking bumps: hono ^4.12.23 -> ^4.13.8 (direct; advisory <=4.13.4) js-yaml override ^4.3.2 (advisory 4.0.0-4.3.1) nanoid override ^5.1.16 (advisory 4.0.0-5.1.15) fast-uri override ^3.1.8 (advisory 3.0.0-3.1.5) ip-address override ^10.7.2 (advisory <=10.3.0) nanoid reached the runtime tree twice, via agents and partyserver. `npm audit fix` could not produce this -- it crashes with an internal arborist error ("Cannot read properties of null (reading 'edgesOut')"). The lockfile was regenerated with npm install instead. Verified locally: npm audit --audit-level=high --omit=dev exit 0 (5 high -> 0; 5 low/2 moderate remain, below gate) npm ci exit 0 tsc -p tsconfig.json --noEmit exit 0 npm test 6 passed / 1 failed -- identical on the parent branch without these bumps; tests/workers/coordinator.test.ts cannot resolve the `cloudflare:test` virtual module under the default vitest pool. Pre-existing, untouched here. Also corrects ci.yml's claim that "the runtime dependency tree is clean". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKKxbsxh4tozUMzBKADSTd
The Dependency Audit comment asserted all High/Moderate advisories were dev-only. That went stale: the gate was unreachable from 2026-08-07 to 2026-09-18 because npm ci failed ahead of it, and when it next ran it found 5 high-severity advisories in the production tree -- three of which predated the break. A comment cannot track advisory feeds; the gate is the source of truth. Replaced with a note saying so, to stop the claim being reinstated. Note: the preceding commit's message says it corrects this comment. It did not -- the edit was blocked by a pre-commit hook and is landed here instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKKxbsxh4tozUMzBKADSTd
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe package manifest updates ChangesDependency and audit updates
Priority: ⬆️ High Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: High Merge Risk: ⚪ Minimal · up to The dependency declarations, resolved versions, and production audit scope are aligned, with no concrete runtime or CI failure indicated. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Out of Scope Changes checkExplanation Issue
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
chittycommand | 2240612 | Sep 18 2026, 02:44 AM |
Supersedes #141 — this branch is stacked on it, so it carries that commit too. Close #141 in favour of this one.
What the gate found
npm audit --audit-level=high --omit=dev— the CI gate inci.yml— reported 5 high-severity advisories in dependencies shipped to the Worker runtime.These went unmeasured, not unintroduced. The gate has been unreachable on
mainsincea60d0e1(2026-08-07) becausenpm cifailed ahead of it. Three of the four advisories checked predate that commit:GHSA-h67p-54hq-rp68(js-yaml)GHSA-28wg-ghj8-5hjv(nanoid)GHSA-5p4m-2wfm-xmqj(js-yaml)GHSA-xwg4-73v4-xw9w(nanoid)The bumps — all within the existing major
hono^4.12.23→^4.13.8(direct)js-yaml^4.3.2nanoid^5.1.16fast-uri^3.1.8ip-address^10.7.2nanoidreached the runtime tree twice — viaagentsand viapartyserver.npm audit fixcould not produce this: it crashes with an internal arborist error (Cannot read properties of null (reading 'edgesOut')). The lockfile was regenerated withnpm install.Verification (local, real — no mocks)
npm audit --audit-level=high --omit=devnpm cifrom regenerated lockfiletsc -p tsconfig.json --noEmitnpm testThe one failing test,
tests/workers/coordinator.test.ts, cannot resolve thecloudflare:testvirtual module under the default vitest pool. Pre-existing and untouched here.Also
Corrects
ci.yml's comment claiming "the runtime dependency tree is clean" — demonstrably false, and the kind of assertion that cannot track an advisory feed.🤖 Generated with Claude Code
https://claude.ai/code/session_01AKKxbsxh4tozUMzBKADSTd
Summary by CodeRabbit