Skip to content

build(deps): patch postcss and uuid moderate vulnerabilities#1271

Draft
JannikStreek wants to merge 1 commit intomainfrom
claude/adoring-fermi-L6DlC
Draft

build(deps): patch postcss and uuid moderate vulnerabilities#1271
JannikStreek wants to merge 1 commit intomainfrom
claude/adoring-fermi-L6DlC

Conversation

@JannikStreek
Copy link
Copy Markdown
Member

Summary

pnpm audit reported 4 moderate advisories across 2 distinct CVEs. This PR resolves the safe ones and documents the residuals.

Advisory Package Action
GHSA-qx2v-qp2m-jg93 (CVE-2026-41305) — postcss XSS via unescaped </style> postcss (transitive of @angular-devkit/build-angular) pnpm override postcss@<8.5.10>=8.5.10; bumps 8.5.6 → 8.5.12
GHSA-w5hq-g745-h8pq — uuid missing buffer bounds check in v3/v5/v6 teammapper-frontend>uuid 13.0.0 direct bump to 14.0.0
same @compodoc/compodoc>uuid 11.1.0 pnpm override → >=14.0.0
same teammapper-backend>uuid 11.1.0 left as-is — see "Residuals"
same @compodoc/compodoc>@compodoc/live-server>http-auth>uuid 8.3.2 left as-is — see "Residuals"

After this PR, pnpm audit reports 2 moderate (down from 4).

Major-version note (uuid 13 → 14)

uuid 14 is a major release. The frontend codebase only uses v4() and validate() (teammapper-frontend/src/app/core/services/mmp/mmp.service.ts, .../import/import.service.ts), and both APIs are unchanged across 11→14. Tests and lint pass. The only side effect is a peer-dep warning from vis-data/vis-network (compodoc devDep doc-tool) which lags the supported uuid range — not part of the runtime/build path.

Residuals (intentionally not fixed)

  1. teammapper-backend>uuid@11.1.0. uuid 14 is pure ESM, while uuid 11 still shipped dual CJS/ESM. Bumping the backend breaks ts-jest's CJS loader (SyntaxError: Unexpected token 'export' from dist-node/index.js). Making Jest transform uuid through ts-jest under pnpm's symlink layout is non-trivial and out of scope for a security patch. Functional impact of the advisory on this codebase is nil: the only callsites are validate() (no buffer arg) and v4() (already throws RangeError on bad bounds); the bug only affects v3/v5/v6 with caller-supplied buf/offset.
  2. @compodoc/compodoc>@compodoc/live-server>http-auth>uuid@8.3.2. http-auth is CJS and require()s uuid; forcing v14 (ESM-only) into that chain breaks compodoc. compodoc is a doc-only devDep run via pnpm doc; it's not part of the runtime, build, or test pipeline.

Test plan

  • pnpm install — clean
  • pnpm audit — 4 moderate → 2 moderate
  • pnpm --filter teammapper-frontend run tsc — pass
  • pnpm --filter teammapper-frontend run lint — pass
  • pnpm --filter teammapper-frontend run test — 17/17 suites, 163/163 tests pass
  • pnpm --filter teammapper-backend run lint — pass
  • pnpm --filter teammapper-backend run test — 16/28 suites pass, 12 fail with config error - missing env.POSTGRES_DATABASE (pre-existing baseline; identical fail count on main). All 259 tests that ran passed.
  • Smoke-test the frontend dev server / browser flow (recommended in CI, not run here)

Generated by Claude Code

- Add pnpm override `postcss@<8.5.10` -> `>=8.5.10` to resolve
  GHSA-qx2v-qp2m-jg93 (XSS via unescaped </style> in stringify
  output). Affects @angular-devkit/build-angular's transitive
  postcss; bumps 8.5.6 -> 8.5.12.
- Bump frontend `uuid` 13.0.0 -> 14.0.0 to resolve
  GHSA-w5hq-g745-h8pq (missing buffer bounds check in v3/v5/v6
  when buf is provided). Major bump; codebase only uses v4() and
  validate(), whose APIs are unchanged.
- Add pnpm override `@compodoc/compodoc>uuid` -> `>=14.0.0` to
  patch compodoc's direct uuid usage as well.

Backend `uuid` is intentionally left at 11.1.0: uuid 14 is pure
ESM, and bumping it breaks ts-jest's CJS loader. Backend code only
calls `validate()` (no buffer arg) and `v4()` (already throws
RangeError on bad bounds), so the residual advisory is not
functionally exploitable.

The remaining `compodoc>...>http-auth>uuid@8.3.2` advisory path is
a CJS-only dev-doc tool dependency; forcing uuid 14 (ESM-only)
into that chain breaks compodoc, and it is not part of the
runtime, build, or test pipeline.
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.

2 participants