Skip to content

chore(deps): bump @fastify/static to ^9.1.3 (closes W7 prod CVE)#68

Merged
naorsabag merged 1 commit into
masterfrom
chore/audit-fix-fastify-static-vitest
May 4, 2026
Merged

chore(deps): bump @fastify/static to ^9.1.3 (closes W7 prod CVE)#68
naorsabag merged 1 commit into
masterfrom
chore/audit-fix-fastify-static-vitest

Conversation

@naorsabag
Copy link
Copy Markdown
Owner

@naorsabag naorsabag commented May 4, 2026

Summary

Bumps @fastify/static from ^8.0.0 to ^9.1.3 in packages/cli/package.json to close two moderate CVEs that #66 pulled into the production dependency tree:

  • GHSA-pr96-94w5-mx2h — path traversal in directory listing
  • GHSA-x428-ghpx-8j92 — route-guard bypass via encoded path separators

This is largely the same change as the Dependabot-generated #70; either can land. The @fastify/static portion is the only one that closes a blocker. The dev-only vitest/esbuild moderates from the original W7 finding are deliberately not addressed here — see "Why no vitest bump" below.

Why no vitest bump

The original W7 finding called out 5 dev-only esbuild advisories via vitest@1. The fix path requires vitest@4, but @vitest/coverage-v8@4 instruments arrow functions and inline callbacks more aggressively than v1. The same code that scored 100% functions / 90% branches under v1 scores 87% functions / 63% branches under v4 — across all three coverage-gated packages. Lowering thresholds to "match what v4 reports today" defeats the purpose of having thresholds, and 01:38 explicitly says only high/critical advisories are launch blockers. The new audit gate in #69 is also tuned to match: dev tree at --audit-level=high, prod tree at --audit-level=moderate. So the dev moderates stay surfaced as Dependabot alerts but don't block CI.

Test plan

  • npm audit --omit=dev --audit-level=moderate → 0 vulnerabilities
  • npm test per workspace: shared 93/93, server 19/19, cli 83/83, web 22/22 = 217/217
  • npm run test:coverage per workspace: all 3 coverage-gated workspaces (shared, server, web) exit 0 — thresholds intact
  • npm run lint --workspaces, npm run typecheck --workspaces, npm run format:check, npm run build --workspaces — clean
  • Live openhop serve: /health returns ok, web UI + 1.8MB asset bundle serve, /flow/<id> SPA fallback works, path-traversal probes return the safe index.html shell — CVE patch confirmed at runtime.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated CLI package dependencies to newer compatible versions.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 00275149-5394-4abb-9005-ee6885ae27c3

📥 Commits

Reviewing files that changed from the base of the PR and between c7dd613 and cfe8660.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !package-lock.json
📒 Files selected for processing (1)
  • packages/cli/package.json
✅ Files skipped from review due to trivial changes (1)
  • packages/cli/package.json

Walkthrough

The PR updates the @fastify/static dependency version in the CLI package from ^8.0.0 to ^9.1.3 in the package manifest.

Changes

Dependency Version Update

Layer / File(s) Summary
Manifest Update
packages/cli/package.json
@fastify/static version constraint upgraded from ^8.0.0 to ^9.1.3.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

dependencies, javascript

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary change in the provided raw summary, which updates @fastify/static to ^9.1.3 to address production CVEs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/audit-fix-fastify-static-vitest

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

…od CVE)

@fastify/static v8 has two moderate CVEs that #66 dragged into the
production tree when it added the package as a direct dep on the CLI:
  - GHSA-pr96-94w5-mx2h (path traversal in directory listing)
  - GHSA-x428-ghpx-8j92 (route-guard bypass via encoded separators)

Verified:
  - npm audit --omit=dev --audit-level=moderate → 0 vulnerabilities
  - All workspaces' tests pass (shared 93/93, server 19/19, cli 83/83,
    web 22/22 = 217 total)
  - All workspaces' coverage thresholds pass
  - Live serve smoke: /health ok, web UI + assets serve, SPA fallback
    intact, path-traversal probes return safe index.html (CVE patch
    confirmed in the running app).

The dev-only `esbuild`-via-`vitest@1` advisories that the original W7
finding called out are intentionally NOT addressed here. Per `01:38`
they're not a launch blocker, and the new audit gate in the follow-up
PR (#69) only fails dev-tree at high+. A vitest 4 bump would force
lowering coverage thresholds because @vitest/coverage-v8@4 instruments
arrow functions / inline callbacks more aggressively; not worth the
trade for non-blocking dev moderates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@naorsabag naorsabag force-pushed the chore/audit-fix-fastify-static-vitest branch from c7dd613 to cfe8660 Compare May 4, 2026 17:16
@naorsabag naorsabag changed the title chore(deps): bump @fastify/static + vitest to close W7 audit findings chore(deps): bump @fastify/static to ^9.1.3 (closes W7 prod CVE) May 4, 2026
@naorsabag naorsabag merged commit 941c1cf into master May 4, 2026
7 checks passed
naorsabag added a commit that referenced this pull request May 4, 2026
The previous single `npm audit --audit-level=high` gate let W7's
moderate `@fastify/static` CVE land on master via #66 without flagging
it. Splitting the audit step:

  - prod tree (`--omit=dev --audit-level=moderate`) — anything moderate+
    that ships to end users blocks the merge.
  - full tree (`--audit-level=high`) — dev-only advisories don't reach
    users, so block on high+critical only to avoid noise.

Verified locally on master @ c8392c7 (pre-W7-fix tree): the new
prod-tree gate exits 1 (catches the @fastify/static GHSA), while the
full-tree gate stays at exit 0. Once #68 merges, both gates pass.

Also enabled Dependabot vulnerability alerts + automated security
fixes via the GitHub API on naorsabag/OpenHop. With those on, security
updates produce PRs that bypass dependabot.yml's major-version ignore
filter — closing the gap that let GHSA-pr96-94w5-mx2h linger silently
between #66 and #68.

Annotated dependabot.yml's ignore block to call out the security-update
bypass so future tightening doesn't accidentally close the gap again.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
naorsabag added a commit that referenced this pull request May 4, 2026
The previous single `npm audit --audit-level=high` gate let W7's
moderate `@fastify/static` CVE land on master via #66 without flagging
it. Splitting the audit step:

  - prod tree (`--omit=dev --audit-level=moderate`) — anything moderate+
    that ships to end users blocks the merge.
  - full tree (`--audit-level=high`) — dev-only advisories don't reach
    users, so block on high+critical only to avoid noise.

Verified locally on master @ c8392c7 (pre-W7-fix tree): the new
prod-tree gate exits 1 (catches the @fastify/static GHSA), while the
full-tree gate stays at exit 0. Once #68 merges, both gates pass.

Also enabled Dependabot vulnerability alerts + automated security
fixes via the GitHub API on naorsabag/OpenHop. With those on, security
updates produce PRs that bypass dependabot.yml's major-version ignore
filter — closing the gap that let GHSA-pr96-94w5-mx2h linger silently
between #66 and #68.

Annotated dependabot.yml's ignore block to call out the security-update
bypass so future tightening doesn't accidentally close the gap again.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@naorsabag naorsabag deleted the chore/audit-fix-fastify-static-vitest branch May 8, 2026 06:30
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.

1 participant