Skip to content

chore(web/frontend): remediate non-breaking Dependabot vulns (#7327) - #7337

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

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

Conversation

@mdmohsin7

Copy link
Copy Markdown
Member

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

Result

npm audit: 18 → 5 (1C/10H/7M → 0C/5H/0M). Critical + all moderates cleared.

Changes (web/frontend/package.json + package-lock.json only)

  • Non-breaking npm audit fix (2 passes): in-range transitive bumps
  • postcss: devDep ^8 → ^8.5.10 + overrides: {"postcss":"$postcss"} dedupes next@14's pinned [email protected] → 8.5.14 (GHSA-qx2v-qp2m-jg93)
  • qs: overrides ^6.15.1 (in-major 6.x, non-breaking) clears qs ReDoS

Residual (5 high — documented per #7327; all require BREAKING majors, flagged not applied)

  • next 14.2.18 → 16.2.6 (major) — also gates glob via eslint-config-next@16
  • nuqs 1.x → 2.8.9 (major, v2 API change) — no patched 1.x exists

Pending manager go/no-go on the majors.

Validation

  • next build → success (prod gate)
  • Pre-existing tsc errors in src/components/trends/* (missing Trend export) are unrelated to deps and present on main — out of scope.

🤖 Generated with Claude Code

npm audit 18 → 5 (1C/10H/7M → 0C/5H/0M). Critical + all moderates cleared.
- non-breaking `npm audit fix` (2 passes): transitive bumps
- postcss: devDep ^8 → ^8.5.10 + overrides {"postcss":"$postcss"}
  dedupes next@14's pinned [email protected] → 8.5.14 (GHSA-qx2v-qp2m-jg93)
- qs: override ^6.15.1 (in-major 6.x, non-breaking) clears GHSA qs ReDoS

RESIDUAL (5 high, documented per #7327; all require BREAKING majors,
flagged not force-applied per remediation policy):
- next 14.2.18 → 16.2.6 (major) — also gates `glob` via eslint-config-next@16
- nuqs 1.x → 2.8.9 (major, v2 API change) — no patched 1.x exists

Validated: `next build` succeeds (prod gate). Pre-existing tsc errors
in src/components/trends/* (missing `Trend` export) are unrelated to
deps and present on main — out of scope.
@mdmohsin7
mdmohsin7 force-pushed the rex/web-frontend-deps branch from 11d2abb to 4480252 Compare May 17, 2026 17:12
@mdmohsin7
mdmohsin7 marked this pull request as ready for review May 17, 2026 17:16
@greptile-apps

greptile-apps Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR applies non-breaking npm audit fix passes to web/frontend, reducing the vulnerability count from 18 (1C/10H/7M) to 5 (all high, all requiring breaking major bumps that are deferred). Only package.json and package-lock.json are touched.

  • postcss devDep is narrowed from ^8 → ^8.5.10 and an overrides entry using the $postcss alias deduplicates all transitive copies to the resolved 8.5.14, clearing GHSA-qx2v-qp2m-jg93.
  • qs is pinned via overrides to ^6.15.1 (in-major), resolving to 6.15.1 in the lockfile and clearing the qs ReDoS advisory; Algolia client packages were also bumped from 5.25.0 → 5.52.1 as part of the transitive resolution, staying within the declared ^5.2.5 range.

Confidence Score: 5/5

Safe to merge — only dependency version bumps with no application code changes and a successful next build reported.

All changes are in-range transitive bumps within their declared semver ranges. postcss moves from 8.5.3 to 8.5.14 (patch-level, backward-compatible), qs moves from 6.9.7 to 6.15.1 (minor-level, backward-compatible), and the Algolia client packages jump from 5.25 to 5.52 while remaining within the declared ^5.2.5 range. The $postcss override alias is valid npm syntax and correctly references the devDependency declaration. The PR description documents residual high vulns that require breaking major bumps and explicitly defers them — that is the appropriate call.

No files require special attention. Both changed files are dependency manifests, and the lock file correctly reflects the overrides declared in package.json.

Important Files Changed

Filename Overview
web/frontend/package.json postcss devDep tightened from ^8 to ^8.5.10; new overrides block added to force postcss 8.5.14 and qs 6.15.1 across the full dep tree — both changes are well-scoped and correct
web/frontend/package-lock.json Lock file regenerated: postcss 8.5.3 → 8.5.14, qs 6.9.7 → 6.15.1, Algolia client packages 5.25.0 → 5.52.1 (within declared ^5.2.5 range); all resolutions consistent with the overrides declared in package.json

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[package.json overrides] --> B[postcss uses dollar-postcss alias resolves to 8.5.10+]
    A --> C[qs pinned to 6.15.1]
    B --> D[postcss 8.5.3 bumped to 8.5.14 clears GHSA-qx2v-qp2m-jg93]
    C --> E[qs 6.9.7 bumped to 6.15.1 clears ReDoS advisory]
    D --> F[next14 postcss 8.4.31 deduped to 8.5.14]
    D --> G[tailwindcss and postcss consumers also upgraded]
    E --> H[All transitive qs consumers forced to 6.15.1]
    style D fill:#d4edda,stroke:#28a745
    style E fill:#d4edda,stroke:#28a745
Loading

Reviews (1): Last reviewed commit: "chore(web/frontend): remediate non-break..." | Re-trigger Greptile

@mdmohsin7
mdmohsin7 merged commit 089537f into main May 17, 2026
2 of 3 checks passed
@mdmohsin7
mdmohsin7 deleted the rex/web-frontend-deps branch May 17, 2026 17:34
mdmohsin7 added a commit that referenced this pull request May 17, 2026
Resolves the breaking-change residuals documented in #7337. npm audit
on this branch: 18 → 0 (built on the non-breaking remediation).

- next 14.2.18 → 16.2.6 (major). Ran `@next/codemod next-async-request-api`:
  7 app files migrated to async `params`/`searchParams`/`headers()`
  (Next 15+ async request APIs). 0 codemod errors.
- Removed `swcMinify` from next.config.mjs (removed in Next 15; default).
- Dropped `nuqs` dependency entirely — it had ZERO imports anywhere in
  the codebase (dead dep). Clears the nuqs advisory with no API migration
  (preferred minimal fix over the 1.x→2.x breaking upgrade).
- `glob` override `^10.5.0`: in-major patched (10.5.0 > vulnerable
  10.2.0–10.4.5), clears the glob CLI-injection advisory pulled via
  @next/eslint-plugin-next WITHOUT the eslint-config-next@16 bump (which
  would force a breaking eslint 8→9 + plugin-ecosystem migration, out of
  scope). Note: glob advisory is CLI-only; used here only as a library.
- eslint-config-next kept at ^14.2.6 (eslint stays 8.x; build has
  eslint.ignoreDuringBuilds and Next 16 removed `next lint`).

Validated: npm audit 0; `next build` (Next 16, prod) succeeds from the
committed tree; zero tsc regressions vs pre-upgrade baseline (pre-existing
trends/* + memories/* errors are on #7337 already and TS is ignored at
build per next.config). Next auto-manages tsconfig.json at build time.

next.config.mjs: removed the now-unrecognized `eslint` key (Next 16
ignores it) and added `outputFileTracingRoot = this app dir`. Without
it, Next 16's monorepo workspace-root inference nests the standalone
build out of reach of the Dockerfile (`COPY .../web/frontend/.next/
standalone ./` + `CMD ["node","server.js"]`), which would crash the
container on boot. With the fix, server.js is back at
`.next/standalone/server.js`.

Runtime-tested: built + ran the standalone artifact (`node server.js`,
as the Dockerfile) and walked public + codemod'd dynamic routes
(apps/[id], apps/category/[category], chat/[token], memories/[id],
tasks/[token], unlimited, wrapped). 0 page errors, 0 5xx, correct
404s/redirects. Verified zero regression vs an unmodified next@14
`main` baseline with identical env (identical route + error profiles).
mdmohsin7 added a commit that referenced this pull request May 18, 2026
)

Completes the breaking-change residuals documented in #7337 (part of
#7327). Branched from fresh `main` (post-#7337 merge); single commit.

## Result
`npm audit`: **0 vulnerabilities** (the 5 highs left after #7337's
non-breaking pass are cleared here).

## Changes
- **next 14.2.18 → 16.2.6** (major). Ran `@next/codemod
next-async-request-api` → 7 app files migrated to async
`params`/`searchParams`/`headers()` (Next 15+ async request APIs), 0
codemod errors.
- **Removed `nuqs`** entirely — zero imports anywhere in the codebase
(dead dependency). Minimal-risk fix vs the 1.x→2.x API migration; clears
the nuqs advisory.
- **`glob` override `^10.5.0`** — in-major patched (10.5.0 > vulnerable
10.2.0–10.4.5), pulled transitively via `@next/eslint-plugin-next`.
Avoids the `eslint-config-next@16` bump, which would force a breaking
`eslint` 8→9 + plugin-ecosystem migration (out of scope). The glob
advisory is CLI-only; consumed here as a library.
- Removed `swcMinify` from `next.config.mjs` (removed in Next 15;
default behavior).
- `eslint-config-next` deliberately kept at `^14` (build has
`eslint.ignoreDuringBuilds`; Next 16 removed `next lint`).

## Validation
- `npm audit` → **0**
- `next build` (Next 16, prod) → **success** from the committed tree
- **Zero `tsc` regressions** vs pre-upgrade baseline (pre-existing
`trends/*` + `memories/*` errors are already on `main` via #7337; TS is
ignored at build per `next.config`)
- Next auto-manages `tsconfig.json` at build time (CI re-applies)

🤖 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