Skip to content

chore(web/admin): remediate non-breaking Dependabot vulns (#7327) - #7336

Merged
mdmohsin7 merged 1 commit into
mainfrom
rex/web-admin-deps
May 17, 2026
Merged

mdmohsin7 merged 1 commit into
mainfrom
rex/web-admin-deps

Conversation

@mdmohsin7

Copy link
Copy Markdown
Member

Part of #7327 (web Tier 1, service-by-service).

Result

npm audit: 23 → 12 (1C/6H/9M/7L → 0C/2H/4M/6L). Critical + several highs/moderates cleared via non-breaking npm audit fix (lockfile-only; no manifest change needed).

Residual (12 — documented per #7327 acceptance criteria)

All gated behind a next 14.2.35 → 16.2.6 MAJOR (breaking) which also unblocks the transitive chain minimatch / brace-expansion / fast-xml-parser / @tootallnate/once (nested under next@14 + firebase-admin/@Google-Cloud). Per remediation policy, breaking majors are flagged for a separate decision, not force-applied. Pending manager go/no-go.

Validation

  • tsc --noEmit → clean
  • next build → success

🤖 Generated with Claude Code

npm audit 23 → 12 (1C/6H/9M/7L → 0C/2H/4M/6L) via non-breaking
`npm audit fix` (lockfile-only; no manifest range changes needed).
Critical cleared; several highs/moderates cleared.

RESIDUAL (12, documented per #7327 acceptance criteria): all gated
behind a next 14.2.35 → 16.2.6 MAJOR upgrade (breaking) which also
unblocks the transitive chain minimatch / brace-expansion /
fast-xml-parser / @tootallnate/once nested under next@14 +
firebase-admin/@Google-Cloud. Per remediation policy breaking majors
are flagged to the manager, not force-applied. Pending decision.

Validated: tsc --noEmit clean, `next build` succeeds.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@mdmohsin7
mdmohsin7 marked this pull request as ready for review May 17, 2026 17:01
@mdmohsin7
mdmohsin7 merged commit 820ed0f into main May 17, 2026
2 checks passed
@mdmohsin7
mdmohsin7 deleted the rex/web-admin-deps branch May 17, 2026 17:05
mdmohsin7 added a commit that referenced this pull request May 17, 2026
Resolves the breaking-change residual from #7336 (part of #7327).
npm audit: 12 → 0 (originally 23; the #7336 non-breaking pass cleared
the criticals/highs, this clears the rest).

- next 14.2.35 → 16.2.6 (major). Cleared the next HIGH plus the
  minimatch/brace-expansion chain that was pinned under next@14.
  Ran `@next/codemod next-async-request-api`: 6 API route handlers
  migrated to async `params` (Next 15+), 0 codemod errors, typechecked.
- Removed the now-obsolete `fast-xml-parser: ^4.5.5` override (it was
  force-DOWNGRADING @google-cloud/storage's intended ^5.3.4 to a
  vulnerable v4); fast-xml-parser now resolves to patched 5.8.0.
- Added override `@tootallnate/once ^3.0.1` — cascade-clears the 8-deep
  low-severity firebase-admin/@Google-Cloud transport chain (firebase-admin
  already at latest 13.10.0; npm's only "fix" was a bogus downgrade to
  [email protected]).
- Scoped overrides `brace-expansion@<=1.1.12 → ^2.0.2`,
  `minimatch@<=3.1.3 → 9.0.7`: clear the dev-only ReDoS advisories nested
  under @next/eslint-plugin-next@14 (eslint ignored at build; Next 16
  removed `next lint`). Version-scoped so newer instances are untouched.
- eslint-config-next kept at 14.2.35 (avoids forced eslint 8→9 + plugin
  migration, out of scope).

Targeted lockfile update (preserved main's lockfile, updated only the
affected subtrees) so unrelated deps don't drift — notably stripe stays
pinned at 18.4.0 (a full regen bumped it to 18.5.0, whose types broke
lib/stripe.ts apiVersion; avoided).

Validated: npm audit 0; `next build` (Next 16) succeeds — note web/admin
has no typescript.ignoreBuildErrors, so the build is a strict TS gate
and passes (codemod changes typecheck).

next.config.js: removed the now-unrecognized `eslint` key (Next 16 no
longer reads it; build doesn't run eslint) and added
`outputFileTracingRoot: __dirname`. Without the latter, Next 16's
monorepo workspace-root inference nested the standalone output under
`.next/standalone/<repo-path>/web/admin/server.js`, breaking the
Dockerfile's `COPY .next/standalone ./` + `CMD ["node","server.js"]`.
With the fix, server.js is back at `.next/standalone/server.js`.

Runtime-tested: built + ran the standalone artifact (`node server.js`,
exactly as the Dockerfile) with real GCP secrets, logged in via the
test account, walked all 9 dashboard routes — 200, 0 page errors.
Verified no regression against an unmodified next@14 `main` baseline
(identical error profile; the lone 5xx is the sandbox not resolving
prod Upstash Redis, present on next@14 too).
mdmohsin7 added a commit that referenced this pull request May 17, 2026
…7350)

Resolves the breaking-change residual from #7336 (part of #7327).
Branched from fresh `main`; single commit.

## Result
`npm audit`: **0** (was 12 residual after #7336's non-breaking pass; 23
originally).

## Changes
- **next 14.2.35 → 16.2.6** (major). Cleared the `next` HIGH + the
minimatch/brace-expansion chain pinned under next@14. Ran `@next/codemod
next-async-request-api` → 6 API route handlers migrated to async
`params` (Next 15+), 0 errors, typechecked.
- **Removed obsolete `fast-xml-parser: ^4.5.5` override** — it was
force-*downgrading* `@google-cloud/storage`'s intended `^5.3.4` to a
vulnerable v4; now resolves to patched **5.8.0**.
- **`@tootallnate/once ^3.0.1` override** — cascade-clears the 8-deep
low-sev firebase-admin/@Google-Cloud transport chain (firebase-admin
already latest 13.10.0; npm's only "fix" was a bogus *downgrade* to
[email protected]).
- **Scoped** `brace-expansion@<=1.1.12 → ^2.0.2`, `minimatch@<=3.1.3 →
9.0.7` — clears dev-only ReDoS under `@next/eslint-plugin-next@14`
(eslint ignored at build; Next 16 removed `next lint`). Version-scoped;
newer instances untouched.
- `eslint-config-next` kept at 14.2.35 (avoids forced eslint 8→9 +
plugin migration — out of scope).

## No collateral
Preserved main's lockfile and updated only the affected subtrees, so
unrelated deps don't drift — notably **stripe stays pinned at 18.4.0**
(a full lockfile regen bumped it to 18.5.0, whose types broke
`lib/stripe.ts` `apiVersion`; avoided).

## Validation
- `npm audit` → **0**
- `next build` (Next 16) → **success**. web/admin has **no**
`typescript.ignoreBuildErrors`, so the build is a **strict TS gate** —
codemod changes typecheck.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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