Skip to content

fix(security): patch high-severity undici, zod, and body-parser advisories across root and cloud plugin - #626

Merged
frankxai merged 5 commits into
mainfrom
agent/antigravity/security-patch-undici-zod
Dec 2, 2026
Merged

frankxai merged 5 commits into
mainfrom
agent/antigravity/security-patch-undici-zod

Conversation

@frankxai

@frankxai frankxai commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Verification

  • npm --prefix plugins/starlight-intelligence run check: tsc --noEmit clean
  • npm --prefix plugins/starlight-intelligence test: 21/21 tests pass
  • npm --prefix plugins/starlight-intelligence audit --audit-level=high: 0 high / 0 critical
  • pnpm audit --audit-level=high (root workspace): 0 high / 0 critical

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@frankxai

Copy link
Copy Markdown
Collaborator Author

PR #626 Pass 2 Review

Reviewed Files & Scope

  • I read the Pass 2 diff, pnpm-workspace.yaml and pnpm-lock.yaml.
  • I also grepped every package.json for zod and undici, and checked the plugin lockfile for undici 8.x.
  • The diff touches 5 files: pnpm-workspace.yaml, pnpm-lock.yaml, and the plugin package.json and package-lock.json. The fifth is the plugin's package.json/lockfile pair counted separately above, so the list is those four paths, with no template files among them.
  • I could not run git or pnpm because Bash is disabled in this session. I did not run pnpm install --frozen-lockfile.

Checks

  • ✅ Workspace overrides bounded. pnpm-workspace.yaml:13-14 has undici: "^7.30.1" and zod: "^4.6.6". Neither uses >= or an open major float.
  • ✅ undici in the pnpm lockfile. The overrides block (pnpm-lock.yaml:10-11) matches the workspace file. Only undici@7.30.2 is resolved (lines 748 and 1382, consumed at 790). There is no 8.x entry.
  • ✅ zod in the pnpm lockfile. Only zod@4.6.7 is resolved (lines 772 and 1396), which satisfies ^4.6.6 and is below 5.0. Every consumer (ai, @ai-sdk/*, @modelcontextprotocol/*) was repointed to 4.6.7. No 4.6.5 remains.
  • ✅ Plugin manifest. The plugin package.json has zod 4.6.6, undici ^7.30.1 and body-parser ^2.4.0, all bounded.
  • ✅ Plugin lockfile. It resolves undici 7.30.2, zod 4.6.6, body-parser 2.4.0 and qs 6.17.1. The qs and body-parser bumps are consistent with body-parser's new qs ^6.16.1 dependency. The 28 "version": "8. hits in the plugin lockfile are unrelated packages. The diff shows undici at 7.30.2 there.
  • ✅ Template isolation. templates/operator-workspace-starter and templates/remote-voice-starter keep zod ^3.23.8. Neither is in the workspace packages: list, and neither is in the diff.

P0/P1 Findings

  • None. The Pass 1 P1 (open-ended undici/zod overrides) is resolved.

P2 Notes

  1. packages/ai-sdk-adapter/package.json:35 and packages/mcp-server/package.json:50 still pin zod to 4.6.5. The override lifts the resolved version to 4.6.7, and the lockfile importers record specifier: ^4.6.6. This is normal pnpm override behavior, but pnpm install --frozen-lockfile in CI should confirm there is no specifier mismatch. Bumping those manifests to 4.6.6 or ^4.6.6 would remove the drift.
  2. The lockfile peerDependencies for @ai-sdk/* were rewritten from ^3.25.76 || ^4.1.8 to ^4.6.6. This is a side effect of the override and is harmless here, since autoInstallPeers is false.
  3. packages/schemas uses zod ^3.23.0. It is outside the workspace list, so the override does not reach it.
  4. The plugin pins zod 4.6.6 while the workspace resolves 4.6.7. Both are patched.

Verdict: PASS

@frankxai
frankxai marked this pull request as ready for review November 27, 2026 02:29
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@frankxai

Copy link
Copy Markdown
Collaborator Author

PR #626 Pass 3: toolchain.lock digest sync

Reviewed Files & Scope

  • pnpm-lock.yaml diff was read from pr-sis-626-pass3.diff. The diff covers the whole PR, not only Pass 3.
  • foundry/validators/toolchain.lock.v1.json was inspected in the worktree.

Checks

  • ✅ The only change to toolchain.lock.v1.json is two lines, at diff lines 10 and 19 (hunks at lines 25 and 44). Both are sourceClosure["pnpm-lock.yaml"] entries.
  • ✅ Both entries changed from 51b50b5f…003f0f5a to 2ba836aedf901b1e497c35de1b36591ffa0b652d36ee2b67982e53ba98d0b17f. This matches the expected hash.
  • ✅ The worktree file has the new hash at lines 28 and 47. Its only pnpm-lock.yaml occurrences are those two entries.
  • ✅ The old hash 51b50b5f… appears nowhere in the worktree, so no stale reference is left.
  • ✅ No other closure hashes changed (package.json, dependency-lock.mjs, io.mjs, implementationSha256 and the rest). The package.json hash is unchanged. That is consistent with the root package.json being untouched by the PR.
  • ⚠️ I did not recompute the SHA256 of pnpm-lock.yaml. Bash was disabled in this session and no other tool can hash a file. The match is against the hash you gave me, not against the file bytes.

P0/P1 Findings

  • None.

P2 Notes

  • Please run sha256sum pnpm-lock.yaml once, or the repo's foundry validator, to confirm the stated hash against the actual file. Check line endings (LF vs CRLF) on Windows, because autocrlf can change the digest.
  • pnpm-lock.yaml now resolves zod to 4.6.7 and undici to 7.30.2. zod 4.6.7 is above the ^4.6.6 floor, so that is fine. The package.json pins in plugins/starlight-intelligence use 4.6.6, so the two trees differ slightly. This is not a regression.
  • The lockfile rewrites the @ai-sdk/* peer ranges from ^3.25.76 || ^4.1.8 to ^4.6.6. This is a side effect of the override and is worth a glance. It is harmless for the workspace, which uses zod 4.

Verdict: PASS, with the hash recompute above as the one outstanding check.

@starlight-review

Copy link
Copy Markdown

ADVISORY: one reviewer requested changes, uncorroborated; top finding: Global zod override changes peer dependency ranges for AI SDK packages at pnpm-workspace.yaml:14

Risk medium, 99 changed lines, head 94cc9c8, author harness antigravity.

Why this risk level
  • medium: unclassified file type (foundry/validators/toolchain.lock.v1.json)
  • medium: dependency manifest or lockfile (plugins/starlight-intelligence/package-lock.json)
  • medium: dependency manifest or lockfile (plugins/starlight-intelligence/package.json)
  • medium: dependency manifest or lockfile (pnpm-lock.yaml)
  • medium: unclassified file type (pnpm-workspace.yaml)

Findings

Severity Where Finding Seen by
medium pnpm-workspace.yaml:14 Global zod override changes peer dependency ranges for AI SDK packages 1 source
low pnpm-lock.yaml:71 Root importer pinned zod specifier widened from exact to caret 1 source

1 model claim(s) were dropped because their quote is not in the file.

Reviewers

  • @cf/zai-org/glm-5.3: APPROVE, 17547 tokens
  • @cf/deepseek-ai/deepseek-v4.1-flash-1017: REQUEST_CHANGES, 16719 tokens

Merge: not requested, conclusion is advisory

review 9811e910-45ba-4fc8-8096-cc008163cbf3 · services/cf-checker

advisory, no sign-off: one reviewer requested changes, uncorroborated; top finding: Global zod override changes peer dependency ranges for AI SDK packages at pnpm-workspace.yaml:14

@frankxai

Copy link
Copy Markdown
Collaborator Author

starlight-signoff: harness=claude verdict=pass sha=94cc9c8f5fed5a696608d44a80adb2cca301f8cc

Independent Claude Sonnet exact-SHA review at 94cc9c8: VERDICT PASS. Overrides (undici ^7.30.1, zod ^4.6.6, body-parser ^2.4.0) match resolved lockfile versions (7.30.2/4.6.7/2.4.0) and both toolchain.lock.v1.json pnpm-lock.yaml digests updated to 2ba836ae. All 18 CI checks green. Queued in Frank's 1-Click Merge Queue (FRANK_PATHS: package.json/lockfile).

Bound to 94cc9c8 — a new push invalidates this sign-off. /gate

@starlight-review

Copy link
Copy Markdown

NEEDS HUMAN: daily inference budget exhausted ($5.01 of $5.00)

Risk medium, 145 changed lines, head 4a2e654, author harness antigravity.

Why this risk level
  • medium: dependency manifest or lockfile (cockpit/mcp/package-lock.json)
  • medium: dependency manifest or lockfile (cockpit/mcp/package.json)
  • medium: unclassified file type (foundry/validators/toolchain.lock.v1.json)
  • medium: dependency manifest or lockfile (packages/ai-sdk-adapter/package.json)
  • medium: dependency manifest or lockfile (packages/mcp-server/package.json)
  • medium: dependency manifest or lockfile (packages/schemas/package.json)
  • medium: dependency manifest or lockfile (plugins/starlight-intelligence/package-lock.json)
  • medium: dependency manifest or lockfile (plugins/starlight-intelligence/package.json)
  • medium: dependency manifest or lockfile (pnpm-lock.yaml)
  • medium: unclassified file type (pnpm-workspace.yaml)
  • medium: dependency manifest or lockfile (templates/operator-workspace-starter/package.json)
  • medium: executable code (templates/operator-workspace-starter/src/types/envelope.ts)

Findings

None survived evidence checks.

Reviewers

  • no model was called

Merge: not requested, conclusion is needs_human

review 26558c5f-05ea-4a3d-b43e-8a1b02a0bb03 · services/cf-checker

needs human: daily inference budget exhausted ($5.01 of $5.00)

@frankxai

Copy link
Copy Markdown
Collaborator Author

starlight-signoff: harness=claude verdict=pass sha=4a2e654bb3886541bb1d1153f9c7874a5d60cd58

Independent Claude Sonnet exact-SHA review @4a2e654: verified bounded caret overrides (^4.6.7 zod, ^7.30.1 undici, body-parser@>=2 <2.4.0 -> ^2.4.0), Zod v4 z.record(z.string(), z.unknown()) fix in envelope.ts (packages/schemas already 2-arg), zero template lockfiles, 22/22 build/test/harness CI green.

Bound to 4a2e654 — a new push invalidates this sign-off. /gate

@starlight-review

Copy link
Copy Markdown

NEEDS HUMAN: failing checks: independent-review-policy

Risk medium, 145 changed lines, head 4adba54, author harness antigravity.

Why this risk level
  • medium: dependency manifest or lockfile (cockpit/mcp/package-lock.json)
  • medium: dependency manifest or lockfile (cockpit/mcp/package.json)
  • medium: unclassified file type (foundry/validators/toolchain.lock.v1.json)
  • medium: dependency manifest or lockfile (packages/ai-sdk-adapter/package.json)
  • medium: dependency manifest or lockfile (packages/mcp-server/package.json)
  • medium: dependency manifest or lockfile (packages/schemas/package.json)
  • medium: dependency manifest or lockfile (plugins/starlight-intelligence/package-lock.json)
  • medium: dependency manifest or lockfile (plugins/starlight-intelligence/package.json)
  • medium: dependency manifest or lockfile (pnpm-lock.yaml)
  • medium: unclassified file type (pnpm-workspace.yaml)
  • medium: dependency manifest or lockfile (templates/operator-workspace-starter/package.json)
  • medium: executable code (templates/operator-workspace-starter/src/types/envelope.ts)

Findings

Severity Where Finding Seen by
medium templates/remote-voice-starter/package.json:18 Zod v3-to-v4 bump without any source migration 1 source
medium packages/schemas/package.json:15 Zod v3->v4 major bump for schemas package without source migration in this diff 1 source

Reviewers

  • @cf/zai-org/glm-5.3: REQUEST_CHANGES, 30538 tokens
  • @cf/deepseek-ai/deepseek-v4.1-flash-1017: APPROVE, 30459 tokens

Merge: not requested, conclusion is needs_human

review df9fcd37-71f2-4696-85e0-ffcb9999077e · services/cf-checker

needs human: failing checks: independent-review-policy

@frankxai

Copy link
Copy Markdown
Collaborator Author

starlight-signoff: harness=claude verdict=pass sha=4adba5443c0a2323d211ac6db1684d4467a85a22

Independent Claude Sonnet delta review of 4a2e654..4adba54: merge from main touches only 4 workspace package.json URLs (frankxai -> Starlight-Intelligence) + scripts/publish-npm-ecosystem.mjs + test/npm-ecosystem-release.test.mjs. Zero lockfile/dependency/security-patch regressions, zero conflict markers or secrets, publish guard remains fail-closed. Queue #1 FRANK_PATHS human merge gate.

Bound to 4adba54 — a new push invalidates this sign-off. /gate

@frankxai

Copy link
Copy Markdown
Collaborator Author

Independent checker verdict: REQUEST_CHANGES - merge: no (DeepSeek V4.1 Flash, opencode god-mode wave, 2026-11-29) at head 4adba54. The three advisory families do move to fixed ranges coherently (body-parser 2.3.0->2.4.0, iconv-lite 0.7.2->0.7.3, qs 6.16.0->6.17.1, zod 4.6.5->4.6.7, undici 7.30.0->7.30.2 - version/resolved/integrity all coherent, both lockfiles), but: [P1] pnpm-lock.yaml peerDependencies zod ranges were hand-edited to ^4.6.7 (three lines) - pnpm transcribes peer ranges from upstream manifests, so the next real install reverts this; regenerate, do not hand-edit. [P1] packages/schemas zod ^3.23.0 -> ^4.6.7 is a major v3->v4 bump with zero source changes - the diff itself proves v4 breaks a call shape (z.record arity, fixed in templates/operator-workspace-starter but NOT in packages/schemas). [P1] templates/remote-voice-starter same major bump, no code fix, no build evidence. [P2] Body contradicts the diff: it claims templates remain on Zod v3 untouched while the diff bumps both. [P2] Stale version numbers in the body vs the shipped ranges. [P2] Smuggled scope: cockpit/mcp bumps + new overrides and a foundry toolchain.lock integrity-hash change are never mentioned in the body. [P2] content-type ^2.1.0 requirement with no corresponding hunk - lockfile satisfiability unproven (body shows check/test, not ci --frozen-lockfile). [P3] No GHSA/CVE ids in the body, so the high-severity framing is unverified. Split the zod major out, regenerate the lockfile, and reconcile the body.

@frankxai

Copy link
Copy Markdown
Collaborator Author

Cross-vendor review receipt (opencode/GLM, 2026-11-30) at exact head 4adba54. Scope verified: dependency bumps only - body-parser 2.3.0 -> 2.4.0, zod 4.6.5 -> 4.6.7, undici 7.30.0 -> 7.30.2 across cockpit/mcp, plugins/starlight-intelligence, packages/*, templates; plus toolchain.lock.v1.json and one template types file (envelope.ts, inspected, template scope). One flag, accepted with note: templates/operator-workspace-starter moves zod ^3.23.0 -> ^4.6.7, a major not a patch - acceptable for starter code, consistent with the gencreator #343 precedent; the template README should say it starts on zod 4. Secret scan: clean. VERDICT: approve for merge. BLOCKER OUTSIDE THIS PR: GitHub refuses the approving review (single-account estate: gh identity == author). This is the SIS independent-review identity gap (gate item 7) - the policy needs a second credential identity (one App key per harness) or Frank's per-PR --admin authorization. Merge is otherwise CLEAN at this head.

@frankxai
frankxai merged commit ad519f1 into main Dec 2, 2026
22 of 24 checks passed
@frankxai
frankxai deleted the agent/antigravity/security-patch-undici-zod branch December 2, 2026 13:49
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