Repository navigation
Commit 35379c6
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
- .changeset
- apps
- pythinker-code/dist-web
- assets
- pythinker-web
- vscode
- packages
- agent-core-v2
- pi-tui/test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments