Skip to content

Commit 35379c6

Browse files
authored
fix: raise audit floors and escape Han test fixtures (#373)
## Requirement or Bug The scheduled Security workflow fails `pnpm audit` on `main`, and three `pi-tui` test files fail the English-only gate. ## Bug Reproduction Steps On `main` (`6a2fe6753`): `pnpm audit` exits 1. `node .claude/hooks/check-brand.mjs --strict` reports Han ideographs in `packages/pi-tui/test/autocomplete.test.ts`, `editor.test.ts`, and `visible-width.test.ts`. ## Root Cause New advisories landed against the lockfile after the last floor update. Eight have a patched release. `sprintf-js` does not (`patched_versions <0.0.0`). The Han literals arrived with the pi-tui v1.0.1 test sync and are fixtures, not product text. This is a state fix for the patched packages. The `sprintf-js` mute is a deliberate workaround until a patched release exists. Drop `GHSA-hp3w-g68c-fv3c` when that release ships. ## Code Changes - Root `pnpm.overrides` raises floors: `shell-quote >=1.11.0`, `smol-toml >=1.9.0`, `proxy-addr >=2.0.8`, `source-map-js >=1.2.2`, `@vue/server-renderer >=3.5.42 <3.6`, `postcss-selector-parser >=7.1.6`, `katex >=0.18.2 <0.19.0`, `@modelcontextprotocol/sdk >=1.31.0 <2`. - Direct ranges move with the floors that their old ranges could not express: web and VS Code `katex` to `^0.18.2`, web `vue` to `^3.5.43`, agent-core-v2 MCP SDK to `^1.31.0`. - `pnpm.auditConfig.ignoreGhsas` adds `GHSA-hp3w-g68c-fv3c`. The two existing no-patch mutes stay. - `pnpm-lock.yaml` re-resolves. `flake.nix` `pnpmDeps.hash` matches the new lockfile. - `apps/pythinker-code/dist-web` is restaged. The lockfile is a web-bundle fingerprint input, and KaTeX plus Vue changed the built assets. - The three pi-tui tests keep the same characters as unicode escapes, including U+3005, which the leak-check ranges miss and `check-brand` still flags. Nightly dev publish `E404` is not in this PR. Provenance signs, then npm rejects the PUT. That is trusted-publisher permission for `.github/workflows/nightly.yml`, not a version or workflow bug. Do not add `NPM_TOKEN`. ## Behavior Changes and Affected Users | Behavior | Before | After | Who relies on the old behavior | Escape hatch | |---|---|---|---|---| | MCP OAuth token presentation | SDK 1.29.0 could send saved tokens to an authorization server the MCP server named | SDK 1.32.1 refuses tokens bound to a different issuer. Tokens with no `issuer` still load, then get stamped on refresh | CLI, desktop, web, and VS Code users of MCP OAuth over HTTP | none. The old send is the vulnerability | | Web and VS Code math renderer | KaTeX 0.16.47 / 0.17.0 | KaTeX 0.18.10, capped below 0.19. The package stylesheet still ships with the renderer. `.katex-display` still exists | Web chat and the VS Code webview | none | | Web Vue runtime | 3.5.35 | 3.5.43, aligned with the patched server-renderer | Web users, and desktop users of the embedded web bundle | none | | `pnpm audit` on this repo | exits 1 | exits 0. Three no-patch advisories stay muted | CI Security job | remove the mute entries | | pi-tui test source text | raw Han literals | the same characters as escapes | nobody at runtime | none | Affected modules: `packages/agent-core-v2` MCP OAuth client, `apps/pythinker-web` math and Vue runtime, `apps/vscode` KaTeX dependency, root lockfile and Nix hash, `packages/pi-tui` tests. Coverage: `pnpm audit` exit 0. `@pymodel/agent-core-v2` `tsc --noEmit` passed. An old token object without `issuer` still parses. pi-tui `node --test` 1101 pass, then the three files 279/279. `nix build .#pythinker-code` realized the package with the new hash. `check-web-assets` passed. No changeset for the test escapes or the other floors. One patch changeset names the MCP token behavior users lose. ## Checklist - [x] I have read the [CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md) document. - [ ] I have linked a related issue (external PRs: issue must have a maintainer's `/approve`). - [ ] I have added tests that prove my feature works. - [x] The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR. - [x] Ran `gen-changesets` skill, or this PR needs no changeset. - [x] Ran `gen-docs` skill, or this PR needs no doc update.
1 parent 6a2fe67 commit 35379c6

164 files changed

Lines changed: 1250 additions & 1192 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-code": patch
3+
---
4+
5+
Stop sending saved MCP OAuth tokens to an authorization server other than the one that issued them.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"sourceHash": "a0808165b57db9b41c1257ccf11d9b81b0a2a74b3d002466d22cc5a5147b132b",
2+
"sourceHash": "b03226b74b69912ccace38e0a803ee98077478208348852dc4857429e06abc33",
33
"sourceFileCount": 497
44
}

apps/pythinker-code/dist-web/assets/CodeBlockNode-StilW10A.js renamed to apps/pythinker-code/dist-web/assets/CodeBlockNode-6ZxKhPTf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/DesignSystemView-DC7RcT-V.js renamed to apps/pythinker-code/dist-web/assets/DesignSystemView-D0R5_LlY.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/Tooltip-Bk9JGJZf.js renamed to apps/pythinker-code/dist-web/assets/Tooltip-NSKS7sZX.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-C5a22uRi.js renamed to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DTTIuWrP.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-H7tndj7h.js renamed to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-khvOUbfh.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-DvETkgeM.js renamed to apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-BB7eKVtO.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-C4vRCjzD.js renamed to apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-CoFmUzu_.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)