Skip to content

chore(knowledge-ui): resolve open Dependabot alerts (vue, katex, source-map-js, sharp) - #138

Merged
visterion merged 6 commits into
mainfrom
chore/knowledge-ui-security-2026-10-10
Oct 10, 2026
Merged

visterion merged 6 commits into
mainfrom
chore/knowledge-ui-security-2026-10-10

Conversation

@visterion

Copy link
Copy Markdown
Owner

Resolves all open Dependabot alerts in knowledge-ui/package-lock.json and supersedes #135, #136, #137.

Alerts fixed

Package Severity Before After How
@vue/server-renderer (attribute-name XSS, missing CR in blacklist) high 3.5.32 3.5.43 vue bumped to ^3.5.42; all @vue/* runtime packages aligned at 3.5.43
source-map-js high 1.2.1 1.2.2 merged #136
sharp (dev) high 0.35.4 0.35.5 merged #137
katex (prototype pollution bypassing trust) low 0.16.47 0.18.2 merged #135 + override (see below)

npm audit: 0 vulnerabilities.

KaTeX 0.16 -> 0.18 breaking-change analysis

  • 0.17.0: only the internal __defineFunction API changed (no more props wrapper). We don't use it.
  • 0.18.0: KaTeX's internal CSS classes are now prefixed (base -> katex-base, strut -> katex-strut, sizing -> katex-sizing, ...). Our code only references .katex / .katex-display, which didn't change, and we have no custom styles that target internal classes.
  • The actual problem in build(deps): bump katex from 0.16.47 to 0.18.2 in /knowledge-ui #135 by itself: math is rendered by @vscode/markdown-it-katex, which declares katex: ^0.16.4. With only build(deps): bump katex from 0.16.47 to 0.18.2 in /knowledge-ui #135 merged, the plugin kept a nested katex@0.16.47, which (a) still had the vulnerable version in the lockfile, so npm audit kept flagging it, and (b) produced 0.16 markup with unprefixed classes while MarkdownTab.vue loads the 0.18 katex.min.css, so formulas would have rendered without styling.
  • Fix: an overrides entry "@vscode/markdown-it-katex": { "katex": "$katex" } dedupes the plugin onto the top-level katex 0.18.2. The plugin only calls katex.renderToString(latex, { ...options, displayMode }), and that API is unchanged.
  • Test: a new case in tests/unit/markdownTabKatex.spec.ts checks that the rendered markup contains .katex-base / .katex-strut and no .base. It failed before the override and passes after it. The existing inline, display, code-span and dollar-amount cases still pass.

Verification (local, knowledge-ui)

  • npm ci: OK
  • npm run build (vue-tsc + vite): OK
  • npm run test:unit: 105 files, 501 tests passed
  • npm audit: 0 vulnerabilities
  • Lockfile was regenerated with npm 10.9.8. The "dev": true count matches main (546), so there's no flag churn.

https://claude.ai/code/session_017PagRVvcXuoEPBJArfTGgf

dependabot Bot and others added 6 commits October 10, 2026 07:25
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.16.47 to 0.18.2.
- [Release notes](https://github.com/KaTeX/KaTeX/releases)
- [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md)
- [Commits](KaTeX/KaTeX@v0.16.47...v0.18.2)

---
updated-dependencies:
- dependency-name: katex
  dependency-version: 0.18.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [source-map-js](https://github.com/7rulnik/source-map-js) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/7rulnik/source-map-js/releases)
- [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md)
- [Commits](7rulnik/source-map-js@v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: source-map-js
  dependency-version: 1.2.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [sharp](https://github.com/lovell/sharp) from 0.35.4 to 0.35.5.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Commits](lovell/sharp@v0.35.4...v0.35.5)

---
updated-dependencies:
- dependency-name: sharp
  dependency-version: 0.35.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…e-ui/source-map-js-1.2.2' into chore/knowledge-ui-security-2026-10-10
…e-ui/sharp-0.35.5' into chore/knowledge-ui-security-2026-10-10
…down-it-katex

- vue ^3.5.42 (resolves 3.5.43) fixes the @vue/server-renderer attribute-name
  XSS advisory; all @vue/* runtime packages move to 3.5.43 together.
- @vscode/markdown-it-katex pins katex ^0.16.4, so it kept a nested 0.16.47
  that still carried the katex advisory and rendered pre-0.18 markup while
  MarkdownTab imports the 0.18 stylesheet (0.18 prefixed internal classes).
  An override points it at the top-level katex.
- Unit test asserts rendered markup carries the 0.18 class names.

Claude-Session: https://claude.ai/code/session_017PagRVvcXuoEPBJArfTGgf
@visterion
visterion merged commit 13d2f37 into main Oct 10, 2026
3 checks passed
@visterion
visterion deleted the chore/knowledge-ui-security-2026-10-10 branch October 10, 2026 08:19
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