fix(deps): clear the three advisories failing the Security workflow - #166
Merged
Conversation
`npm audit --audit-level=high` has been failing on main and on every PR again, so every check run this week showed a red job while gating nothing. Same shape as #144. Three advisories, all resolved by `npm audit fix` within the existing semver ranges — no package.json change, no --force: dompurify 3.4.12 -> 3.4.13 (moderate) IN_PLACE hook removal leaves a detached subtree executable, causing XSS js-yaml 4.3.0 -> 4.3.1 (high) quadratic CPU in !!omap resolution nanoid 3.3.16 -> 3.3.18 (high) custom generators can loop indefinitely when size is zero dompurify is the one that matters beyond CI: it is a direct dependency that gets vendored to /vendor/purify.min.js and shipped to browsers, where it backs the Trusted Types default policy. `npm run assets` re-vendors it, so that file is in this commit too — a lockfile-only fix would have left 3.4.12 serving to visitors. The SRI hash is computed at build time from the file, so it tracks automatically; verified the built tag's sha384 matches the shipped bytes. Verified: lint, format:check, check:skill (168 pages), astro check (0 errors), test:websub, build (168 indexed). Loaded the built site and confirmed DOMPurify reports 3.4.13, the script passes SRI, the Trusted Types default policy registers and strips <script>, and the search overlay still renders sanitised results. No console errors. `npm audit` now reports 0 vulnerabilities. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Deploying specification-website with
|
| Latest commit: |
3cc0665
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6a6efc08.specification-website.pages.dev |
| Branch Preview URL: | https://fix-audit-advisories-2026-08.specification-website.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm audit --audit-level=highhas been failing onmainand on every PR again — every check run this week carried a red npm Audit job while gating nothing. Same shape as #144.What changed
npm audit fixresolved all three within existing semver ranges. Nopackage.jsonchange, no--force.dompurifyjs-yaml!!omapresolutionnanoidWhy this is not lockfile-only
js-yamlandnanoidare transitive build-toolchain deps, so for those a lockfile bump is the whole fix.dompurifyis not. It is a direct dependency thatscripts/generate-assets.mjsvendors topublic/vendor/purify.min.jsand ships to browsers, where it backs the Trusted Types default policy inpublic/trusted-types-policy.js.The vendored file is tracked in git and does not rebuild on deploy. After
npm audit fixit still carried/*! @license DOMPurify 3.4.12, so a lockfile-only commit would have cleared CI while continuing to serve the vulnerable build to visitors — the advisory that actually reaches a user, rather than a runner.npm run assetsre-vendors it, sopublic/vendor/purify.min.jsis in this PR.The SRI hash is computed at build time by
sri()inBaseLayout.astrorather than hand-pinned, so it tracks the new bytes automatically. Verified rather than assumed: the built tag'ssha384matches a fresh hash of the shipped file.Verified
npm auditnow reports 0 vulnerabilities.lint,format:check,check:skill(168 pages, digest ✓),astro check(0 errors),test:websub,build(168 indexed) — all pass.DOMPurify.version→3.4.13,isSupportedtrue; the script executes at all, which means the browser validated the SRI.DOMPurify.sanitize('<img src=x onerror=alert(1)>ok')→<img src="x">ok.trustedTypes.defaultPolicyregisters;createHTML('<b>hi</b><script>bad()</script>')→<b>hi</b>.🤖 Generated with Claude Code