Skip to content

security(deps): bump dompurify, js-yaml, brace-expansion, undici - #257

Merged
parthrohit22 merged 3 commits into
Second-Origin:devfrom
parthrohit22:security/256-dependency-audit-overrides
Aug 7, 2026
Merged

security(deps): bump dompurify, js-yaml, brace-expansion, undici#257
parthrohit22 merged 3 commits into
Second-Origin:devfrom
parthrohit22:security/256-dependency-audit-overrides

Conversation

@parthrohit22

Copy link
Copy Markdown
Collaborator

Summary

Four npm advisories were published after dev@04d8e2b's last green CI run and started failing the Frontend job's dependency-audit gate (scripts/dependency-audit.mjs) on every open PR, including unrelated ones (confirmed on PR #255). This bumps the four affected packages via apps/frontend/package.json's overrides to their patched versions — all within the major version already in use, no breaking migration.

Linked issue

Closes #256

Roadmap alignment

  • Roadmap §23 workstream this advances: none directly — this is a CI/security maintenance fix, not a product capability.
  • §28 market-fit criterion this moves toward: not directly applicable.
  • Accepted evidence it is real: node scripts/dependency-audit.mjs exits 0 locally (was exit 1); full frontend suite, lint, and build all still pass after the bump.

This doesn't cleanly map to a §23/§28 citation because it's infrastructure hygiene (an unblocking fix for a repo-wide CI gate), not a product change. Flagging honestly rather than forcing a citation, consistent with how #239's PR handled the same gap.

What changed

  • apps/frontend/package.json: overrides bumped — dompurify 3.4.12 → 3.4.13, brace-expansion ^5.0.8^5.0.9, js-yaml 4.3.0 → 4.3.1, and undici newly added at 7.29.0 (was unpinned, transitively resolving to 7.28.0 via jsdom).
  • apps/frontend/package-lock.json: regenerated to match (npm install --prefix apps/frontend, which is the correct invocation for this workspace layout — plain npm install from inside apps/frontend incorrectly resolves against the monorepo root and would create a stray root-level lockfile; this repo intentionally has none, per scripts/dependency-audit.mjs's own comment).

Patched-version confirmation (via GitHub Advisory API first_patched_version, not just npm audit's summary text, since one advisory's title text ("fix not backported") is easy to misread as applying to the 4.x line when it's actually about 3.x):

Acceptance criteria completed

  • node scripts/dependency-audit.mjs exits 0 locally
  • npm --prefix apps/frontend run test, npm run lint:frontend, npm run build:frontend all pass
  • No unrelated dependency changes

Testing performed

node scripts/dependency-audit.mjs
  -> No blocking findings (1 accepted: the existing, unrelated, unexpired react-router acceptance)

npm --prefix apps/frontend run test -- --run
  Test Files  38 passed (38)
  Tests       215 passed (215)

npm run lint:frontend
  eslint . -> clean

npm run build:frontend
  tsc -b && vite build -> succeeded

Screenshots

Not applicable — dependency/lockfile-only change, no UI impact.

Security and data considerations

This PR itself is the security fix: it closes four advisories (one runtime-reachable — dompurify, used by the Monaco editor preview; three development/build-time-only). No new dependency was added (undici was already a transitive dependency, just previously unpinned in overrides), no scope widened, no new attack surface.

Dependencies and blocked work

None. PR #255 (feature/239-architecture-graph-non-visual) is currently blocked on the same CI gate this fixes; once this merges, #255 will need a rebase to go green (its own diff is unrelated and unaffected by this change).

Scope changes or remaining work

None for this PR's scope. The pre-existing react-router acceptance in scripts/dependency-audit-policy.json (expires 2026-10-01) is untouched and still valid — not this PR's concern.

Contributor checklist

  • This PR targets dev
  • I claimed the issue and had it assigned before starting substantial work (self-assigned security: bump dependency-audit-policy overrides for newly disclosed npm advisories #256; not commented per maintainer instruction)
  • The branch was created from an up-to-date upstream/dev
  • The branch is rebased on the latest upstream/dev
  • This PR addresses one clearly scoped issue
  • This PR advances a §23 workstream toward a §28 market-fit criterion — see honest Roadmap alignment note above; this is CI/infra hygiene, not a product change
  • Every acceptance criterion I claim as complete is actually complete
  • Relevant tests pass
  • Documentation is updated for any user-visible change — none needed, no user-visible change
  • No secrets, credentials, local env files, or generated artifacts are included
  • No unrelated files were changed
  • Closing syntax (Closes) is used only because the issue is fully resolved
  • Dependencies and follow-up work are linked

…ond-Origin#256)

Four advisories published since dev's last CI run made the live
npm-audit gate (scripts/dependency-audit.mjs) start blocking every
open PR: brace-expansion (GHSA-rgw5-rvv9-x895), dompurify
(GHSA-55q2-fjhq-7xh7, GHSA-c2j3-45gr-mqc4), js-yaml
(GHSA-52cp-r559-cp3m, GHSA-5p4m-2wfm-xmqj), and undici
(GHSA-4cwx-7wf7-3272 and others via jsdom). All four patches land
within the already-used major version, so no override needed a major
bump; undici is newly added to overrides since it was previously
unpinned.
@parthrohit22 parthrohit22 self-assigned this Aug 7, 2026
parthrohit22 added a commit to parthrohit22/PARTHA that referenced this pull request Aug 7, 2026
Same fix as Second-Origin#257, plus nanoid (GHSA-2v37-7h3g-55p8, published after
Second-Origin#257 was opened) -- this branch was cut from dev before Second-Origin#257 merged,
so it inherited all five now-blocking advisories. Bumped via
overrides to the patched versions; all within the major version
already in use.
Published after this PR was opened -- caught it re-blocking PR Second-Origin#259,
which branched from dev before this merged. Same pattern as the
other four: patched version (3.3.17) is within the major already in
use, no breaking change.
parthrohit22 added a commit to parthrohit22/PARTHA that referenced this pull request Aug 7, 2026
Same fix as Second-Origin#257, plus nanoid (GHSA-2v37-7h3g-55p8, published after
so it inherited all five now-blocking advisories. Bumped via
overrides to the patched versions; all within the major version
already in use.
parthrohit22 added a commit to parthrohit22/PARTHA that referenced this pull request Aug 7, 2026
Branched from dev before Second-Origin#257 merged, so this inherited the same
still-open nanoid advisory blocking Second-Origin#259/Second-Origin#264's Frontend check. Same
fix: patched version 3.3.17 is within the major already in use.
@parthrohit22
parthrohit22 merged commit 4872df1 into Second-Origin:dev Aug 7, 2026
9 checks passed
parthrohit22 added a commit that referenced this pull request Aug 7, 2026
…dockerignore (#259)

* fix(infra): fix backend Docker build cache invalidation (#258)

apps/backend/Dockerfile copied app/ before running pip install, so
Docker's content-addressed layer cache busted the dependency-install
layer on nearly every build -- not just when requirements.txt
changed. Reorder dependency install before source copy and add a
BuildKit pip cache mount so a genuine dependency change doesn't
re-fetch unchanged wheels either.

Add the missing apps/backend/.dockerignore (frontend already has
one) so the build context stops shipping .venv, caches, and
egg-info -- none of it referenced by any COPY instruction, but all
of it walked/transferred on every build without this.

* security(deps): bump dompurify, js-yaml, brace-expansion, undici, nanoid

Same fix as #257, plus nanoid (GHSA-2v37-7h3g-55p8, published after
so it inherited all five now-blocking advisories. Bumped via
overrides to the patched versions; all within the major version
already in use.
parthrohit22 added a commit that referenced this pull request Aug 7, 2026
* chore(ci): add scheduled dependency-audit scan against dev (#263)

The Frontend job's live npm-audit gate blocks PRs on external
advisory timing, not code changes -- three unrelated PRs went red
today from newly published CVEs (#256, #258). This adds a daily
scheduled workflow that re-runs the same audit against dev
independent of any open PR, filing (or closing) a labelled issue so
dev stays caught up and a PR rarely gets blindsided. Does not change
ci.yml's existing per-PR gate at all -- same strictness, just an
earlier warning.

* security(deps): also bump nanoid (GHSA-2v37-7h3g-55p8)

Branched from dev before #257 merged, so this inherited the same
still-open nanoid advisory blocking #259/#264's Frontend check. Same
fix: patched version 3.3.17 is within the major already in use.
@parthrohit22
parthrohit22 deleted the security/256-dependency-audit-overrides branch August 7, 2026 23:40
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.

security: bump dependency-audit-policy overrides for newly disclosed npm advisories

1 participant