From 871696f5fb7bde70b798c4bf19b9b0e75f26947b Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 2 Nov 2026 14:06:43 +0000 Subject: [PATCH 1/3] fix(deps): pin qs 6.16.2 and @hono/node-server 2.1.6 past GHSA-6pq8-jhm2-2vcw and GHSA-rmxm-3fg6-px4f (#3843) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- bun.lock | 8 ++++---- package.json | 2 ++ test/dependency-security.test.ts | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bun.lock b/bun.lock index 30f33b2fb..a32b356bc 100644 --- a/bun.lock +++ b/bun.lock @@ -31,6 +31,7 @@ "playwright-core@1.62.1": "patches/playwright-core@1.62.1.patch", }, "overrides": { + "@hono/node-server": "2.1.6", "@modelcontextprotocol/sdk": "1.32.0", "adm-zip": "^0.6.1", "fast-uri": "3.1.9", @@ -38,6 +39,7 @@ "image-size": "2.0.4", "ip-address": "10.7.4", "proxy-addr": "2.0.8", + "qs": "6.16.2", "sharp": "0.35.5", }, "packages": { @@ -65,7 +67,7 @@ "@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], - "@hono/node-server": ["@hono/node-server@2.1.1", "", { "peerDependencies": { "hono": "^4" } }, "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg=="], + "@hono/node-server": ["@hono/node-server@2.1.6", "", { "peerDependencies": { "hono": "^4 || ^5.0.0-0" } }, "sha512-p/KH9MnfNcsm3sR6x4lNgm5j+QN4Et8srKredl9DZfXiyZ1UQ3aQ2YVpFLbqktYN5JI+DB+VZFKM2PqE5hLKjQ=="], "@huggingface/jinja": ["@huggingface/jinja@0.5.10", "", {}, "sha512-SgS1D1bglQ94ceD4ZCL6eayUDy9uV1xuyk61OjgSxU5GJh7upqZCKII0JoTYMc6wWsg3JUgaPRX0ElQzXPk3Cw=="], @@ -483,7 +485,7 @@ "punycode": ["punycode@1.4.1", "", {}, "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ=="], - "qs": ["qs@6.16.0", "", { "dependencies": { "es-define-property": "^1.0.1", "side-channel": "^1.1.1" } }, "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA=="], + "qs": ["qs@6.16.2", "", { "dependencies": { "es-define-property": "^1.0.1", "side-channel": "^1.1.1" } }, "sha512-VYdnB5S7/0IeXzBacUtwNAaM6d7Y/PgYnNC7bJCI6meqA/OgnsQbZMtVW8Dt2D1PHgbHGtYmhSoEIgvt7xZ2ZA=="], "range-parser": ["range-parser@1.3.0", "", {}, "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw=="], @@ -597,8 +599,6 @@ "body-parser/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], - "body-parser/qs": ["qs@6.16.1", "", { "dependencies": { "es-define-property": "^1.0.1", "side-channel": "^1.1.1" } }, "sha512-5Px6J7rfHBAGUhNQ3es4YzcOdBBw0SDcVtThJml4RdnKw4tKs2epA0kPZ+K8X+WiHktT93RHVcQ/3ym5aTCgtg=="], - "dom-serializer/domelementtype": ["domelementtype@2.3.0", "", {}, "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw=="], "dom-serializer/entities": ["entities@2.2.0", "", {}, "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A=="], diff --git a/package.json b/package.json index 2aaa352ae..61f578e05 100644 --- a/package.json +++ b/package.json @@ -103,6 +103,7 @@ "typescript": "7.0.2" }, "overrides": { + "@hono/node-server": "2.1.6", "@modelcontextprotocol/sdk": "1.32.0", "adm-zip": "^0.6.1", "fast-uri": "3.1.9", @@ -110,6 +111,7 @@ "image-size": "2.0.4", "ip-address": "10.7.4", "proxy-addr": "2.0.8", + "qs": "6.16.2", "sharp": "0.35.5" }, "patchedDependencies": { diff --git a/test/dependency-security.test.ts b/test/dependency-security.test.ts index 25ecb982a..d6a5e16dd 100644 --- a/test/dependency-security.test.ts +++ b/test/dependency-security.test.ts @@ -6,7 +6,7 @@ import AdmZip from "adm-zip"; import sharp from "sharp"; describe("security dependency overrides", () => { - for (const [name, minimum] of [["sharp", "0.35.4"], ["adm-zip", "0.6.1"]]) { + for (const [name, minimum] of [["sharp", "0.35.4"], ["adm-zip", "0.6.1"], ["qs", "6.16.1"], ["@hono/node-server", "2.1.3"]]) { test(`${name} resolves only versions at or above ${minimum}`, async () => { const lock = await Bun.file(join(import.meta.dir, "../bun.lock")).text(); const versions = [...lock.matchAll(new RegExp(`"${name}@([^"]+)"`, "g"))]; From 04e5be02d81528307d9176d5e7110e70842be189 Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 2 Nov 2026 14:16:12 +0000 Subject: [PATCH 2/3] docs: changelog fragment and CONTRIBUTING note for the qs and @hono/node-server pins (#3843) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- changelog.d/gsta252-osv-qs-hono-overrides.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changelog.d/gsta252-osv-qs-hono-overrides.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 634968ea6..3204bc4fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -431,7 +431,7 @@ eval files, and misses the strict classifier. No API keys needed. - **Catalog budget** (`test/catalog-budget.test.ts`) — Caps the aggregate discovery surface: the sum of every skill's frontmatter `name` + `description` (what every host loads at discovery, every session) must stay under 1,423 token-equivalents, with a 260-byte per-skill cap. Counting goes through the shared census in `test/helpers/skill-census.ts` (physical files vs authored skills vs registry entries — three deliberately different counts). Adding a skill? The failure message carries the re-measure + ratchet protocol. - **Context-budget ratchet** (`test/context-budget-ratchet.test.ts`) — CI ceilings on the two token ledgers the catalog budget doesn't cover: the always-on full-frontmatter aggregate and each skill's per-invocation eager tokens (SKILL.md + forced-read references), graded against `test/fixtures/context-budget.json` via `lib/context-bill.ts`. New skills fail until they have a ceiling; ceilings for removed skills must be pruned. Legitimate growth or a landed reduction: re-run `bun test/helpers/capture-context-budget.ts` and commit the refreshed fixture in the same commit, so the change is a visible decision in the diff. - **Skill-to-bin drift ratchet** (`test/skill-bin-drift.test.ts`) — `scripts/skill-bin-drift.ts` statically reads every gstack bin call in skill templates, carved sections, references and the Claude-host renders (it never executes a bin) and fails with `DRIFT_UNKNOWN_BIN` or `DRIFT_UNKNOWN_FLAG` at file:line when a skill names a bin missing from `bin/` or a flag that bin's parser does not accept. Known misses live in `test/fixtures/skill-bin-drift-allowlist.json`, which only shrinks: a new finding fails, and so does an entry that no longer reproduces. Check one skill with `bun run scripts/skill-bin-drift.ts --skill `; bins with permissive parsers or no usage text are reported, never failed. -- **Dependency security regressions** (`test/dependency-security.test.ts`) — Run `bun test test/dependency-security.test.ts` to check the resolved `sharp` and `adm-zip` version floors, load Sharp, verify ordinary ZIP extraction, and reject extraction through destination-file and destination-directory symlinks. The symlink cases skip Windows. These checks complement the OSV scan; they do not change its existing exceptions. +- **Dependency security regressions** (`test/dependency-security.test.ts`) — Run `bun test test/dependency-security.test.ts` to check the resolved `sharp`, `adm-zip`, `qs` and `@hono/node-server` version floors, load Sharp, verify ordinary ZIP extraction, and reject extraction through destination-file and destination-directory symlinks. The symlink cases skip Windows. These checks complement the OSV scan; they do not change its existing exceptions. ### Tier 2: E2E via `claude -p` diff --git a/changelog.d/gsta252-osv-qs-hono-overrides.md b/changelog.d/gsta252-osv-qs-hono-overrides.md new file mode 100644 index 000000000..9696f6121 --- /dev/null +++ b/changelog.d/gsta252-osv-qs-hono-overrides.md @@ -0,0 +1,7 @@ +**The weekly OSV scan is clean again: qs and @hono/node-server are pinned past two Medium advisories (#3843).** The 2026-11-02 scan (run 41406416003) flagged qs 6.16.0 (GHSA-6pq8-jhm2-2vcw, CVSS 6.3, a `qs.stringify` comma-format crash) and @hono/node-server 2.1.1 (GHSA-rmxm-3fg6-px4f, CVSS 5.3, a `serveStatic` double decode that skips middleware). Both reach gstack only through the dev and test toolchain (`@anthropic-ai/claude-agent-sdk` pulls in `@modelcontextprotocol/sdk`), and `./setup` installs production dependencies only, so installed users never had either package. + +### Fixed +- **`package.json` overrides**: `qs` is pinned to 6.16.2 and `@hono/node-server` to 2.1.6, the newest patch releases inside the ranges express, body-parser and the MCP SDK ask for. `bun.lock` now holds one copy of each, and the separate `body-parser/qs` entry is gone. + +### Tests +- `test/dependency-security.test.ts`: the lockfile floor check now covers `qs >= 6.16.1` and `@hono/node-server >= 2.1.3`. Both cases failed on main. From c0eef886fba001dc352bc2a26c31d09b8ff7d625 Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 2 Nov 2026 14:44:48 +0000 Subject: [PATCH 3/3] docs(changelog): installs older than v1.91.231.0 may still carry the dev toolchain (#3843) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- changelog.d/gsta252-osv-qs-hono-overrides.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/gsta252-osv-qs-hono-overrides.md b/changelog.d/gsta252-osv-qs-hono-overrides.md index 9696f6121..35b982169 100644 --- a/changelog.d/gsta252-osv-qs-hono-overrides.md +++ b/changelog.d/gsta252-osv-qs-hono-overrides.md @@ -1,4 +1,4 @@ -**The weekly OSV scan is clean again: qs and @hono/node-server are pinned past two Medium advisories (#3843).** The 2026-11-02 scan (run 41406416003) flagged qs 6.16.0 (GHSA-6pq8-jhm2-2vcw, CVSS 6.3, a `qs.stringify` comma-format crash) and @hono/node-server 2.1.1 (GHSA-rmxm-3fg6-px4f, CVSS 5.3, a `serveStatic` double decode that skips middleware). Both reach gstack only through the dev and test toolchain (`@anthropic-ai/claude-agent-sdk` pulls in `@modelcontextprotocol/sdk`), and `./setup` installs production dependencies only, so installed users never had either package. +**The weekly OSV scan is clean again: qs and @hono/node-server are pinned past two Medium advisories (#3843).** The 2026-11-02 scan (run 41406416003) flagged qs 6.16.0 (GHSA-6pq8-jhm2-2vcw, CVSS 6.3, a `qs.stringify` comma-format crash) and @hono/node-server 2.1.1 (GHSA-rmxm-3fg6-px4f, CVSS 5.3, a `serveStatic` double decode that skips middleware). Both reach gstack only through the dev and test toolchain (`@anthropic-ai/claude-agent-sdk` pulls in `@modelcontextprotocol/sdk`), and nothing setup, the build or an installed skill runs loads either one. Installs set up since v1.91.231.0 don't contain them at all. Older installs and contributor checkouts that still carry the dev toolchain get the patched versions on their next `./setup`. ### Fixed - **`package.json` overrides**: `qs` is pinned to 6.16.2 and `@hono/node-server` to 2.1.6, the newest patch releases inside the ranges express, body-parser and the MCP SDK ask for. `bun.lock` now holds one copy of each, and the separate `body-parser/qs` entry is gone.