Skip to content

fix(website): pass npm audit at high again - #63

Merged
b10x-bot[bot] merged 3 commits into
mainfrom
fix/website-npm-audit
Oct 7, 2026
Merged

b10x-bot[bot] merged 3 commits into
mainfrom
fix/website-npm-audit

Conversation

@b10x-bot

@b10x-bot b10x-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Weekly Audit run of 2026-10-05 failed at npm audit (website). This makes npm audit --audit-level=high in website/ exit 0.

package severity change
braces ≤ 3.0.3 (GHSA-vfj7-8cjw-p6xm) high no patched release; vendored as website/vendor/braces-3.0.4-b10x.1.tgz with the depth guards of micromatch/braces#78, same pattern as image-size
tinypool ≤ 2.1.1 (GHSA-5gmw-xhrv-c9v3, GHSA-85c8-ppgw-ccpr) critical override → 2.1.2
serialize-javascript 7.1.1 (GHSA-gfhx-hw2g-v5hg) low override → 7.1.2
postcss-selector-parser (GHSA-rj75-hqrm-r3gf) moderate override → 7.1.6
others — non-forcing npm audit fix
katex (GHSA-238p-pmpm-9mq7) low left: fix 0.18.2 is outside mermaid's ^0.16.47

Local, website/ at 9c254cf:

command result
npm audit --audit-level=high 4 low severity vulnerabilities, exit 0 (was 47: 3 low, 13 moderate, 14 high, 17 critical, exit 1)
npm run vendor-check exit 0; braces: 11 hostile + 7 ordinary patterns, source and installed copy
braces hostile set on published 3.0.3 8 stack overflows + 3 accepted, exit 1
npm ci, npm run typecheck, npm run build exit 0 each
build with 2 SSG worker threads (tinypool 2.1.2) exit 0; 157 files identical to the single-thread build

The Audit workflow runs only on schedule and workflow_dispatch, so this PR's checks do not run it.

b10x-bot Bot added 3 commits October 7, 2026 01:24
- story:website-dependencies-pass-npm-audit records the scheduled Audit
  failure of 2026-10-05, the advisories left after a non-forcing
  npm audit fix, and the acceptance: npm audit at high exits 0, braces
  vendored with depth guards in the image-size pattern, tinypool and
  serialize-javascript moved to patched versions, the site still builds.
…endencies

The scheduled Audit run of 2026-10-05 failed at `npm audit --audit-level=high` in website/.
After a non-forcing `npm audit fix`, two high-or-critical roots were left that npm could not
fix on its own:

- braces <= 3.0.3 (GHSA-vfj7-8cjw-p6xm, high): the recursive AST walkers have no depth guard,
  so a deeply nested pattern under the length limit overflows the stack. No patched release
  exists. website/vendor/braces/ carries 3.0.3 with the six lib/ hunks of upstream pull request
  micromatch/braces#78 (at 97308a01), which throw the same SyntaxError the length limit already
  throws and guard each walker, so a caller-supplied AST is bounded too. It installs as the
  tarball vendor/braces-3.0.4-b10x.1.tgz through dependencies + overrides, in the pattern
  image-size already uses; B10X-PATCH.md says how to drop it.
- tinypool <= 2.1.1 (GHSA-5gmw-xhrv-c9v3, GHSA-85c8-ppgw-ccpr, critical): overridden to 2.1.2.
  A build with DOCUSAURUS_SSG_WORKER_THREAD_COUNT=2 created the pool and produced the same 157
  files as a single-thread build.

Also moved by override: serialize-javascript 7.1.1 -> 7.1.2 (GHSA-gfhx-hw2g-v5hg) and
postcss-selector-parser -> 7.1.6 (GHSA-rj75-hqrm-r3gf); the built site is byte-identical with
and without the latter. katex stays: its fix (0.18.2) is outside mermaid's ^0.16.47 range, and
it is low severity.

`npm run vendor-check` now also feeds 11 hostile patterns (8 overflow the stack on published
3.0.3, 3 are accepted there) and 7 ordinary ones through the source and the installed copy,
each hostile case in a fresh process. Both B10X-PATCH.md notes now name the tarball in the
repack command: `npm install --package-lock-only` alone keeps the old integrity.

npm audit --audit-level=high: 47 vulnerabilities (3 low, 13 moderate, 14 high, 17 critical),
exit 1 -> 4 low severity vulnerabilities, exit 0.
- story:website-dependencies-pass-npm-audit records the verification
  (npm audit at high: 47 findings, exit 1 -> 4 low, exit 0) and the
  per-command results on 9c254cf, and moves active -> implemented.
@b10x-bot
b10x-bot Bot merged commit a98e0d2 into main Oct 7, 2026
7 checks passed
@b10x-bot
b10x-bot Bot deleted the fix/website-npm-audit branch October 7, 2026 01:04
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.

0 participants