Skip to content

Remove unused vulnerable SDK validator from Codex bundle (T47) - #209

Merged
erickb336 merged 2 commits into
mainfrom
codex/t47-sdk-validator
Oct 14, 2026
Merged

erickb336 merged 2 commits into
mainfrom
codex/t47-sdk-validator

Conversation

@erickb336

@erickb336 erickb336 commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Closes #94
Sage task T47

Sage no longer ships the SDK's unused AJV provider and embedded vulnerable fast-uri copy. The pinned SDK build replaces its Node shim, retains Node stdio, and explicitly refuses default JSON Schema validation. Sage's current tools use Zod and do not request elicitation; valid and invalid Zod tool calls keep their behavior.

This removes the affected code rather than upgrading an embedded package. Changing the root pin alone was insufficient. The build now checks the actual dependency graph and embedded source markers. A negative control bundles the original SDK without the override and confirms that the check rejects it even after the root fast-uri pin is removed. Unused dependency pins and license notices are removed together.

The restriction does not prevent every elicitation request: a form request can precede response validation, and URL elicitation does not use this validator. The boundary is documented in packages/sage-codex/runtime/sdk-shims.md. Automatic Sage remains disabled for its separate activation gates. Claude PR #140's test-command change is untouched; this PR changes dependency lines in package.json.

Validation on 6bab7aed0e89817c9f42f7919e61456f00ba3c57:

  • npm run build: passed; generated bundle, documents, shim, and license removals committed.
  • npm run check: all checks pass.
  • Focused SDK tests: tests 4, pass 4, fail 0. Real stdio transport preserves native identity and metadata, valid Zod input works, invalid input is refused, and an accepted form response returns the fixed unsupported-validation error.
  • npm audit --json: 0 reported vulnerabilities. npm audit alone cannot inspect prebundled dependencies; the separate graph check covers the known embedded provider.
  • Copied both new tests unchanged into a detached worktree at main 0f9df78: tests 2, pass 0, fail 2. One fails behaviorally because main accepts the form response; the other fails because the build guard is absent. Both SDK test processes now close and await exit in finally, including failing assertions.
  • Two clean code/security/QA cycles on the unchanged final head. The initial cleanup and documentation findings were repaired before both clean cycles.
  • npm test -- --test-concurrency=1: tests 1179, pass 1179, fail 0, cancelled 0, skipped 0.
  • Exact-head CI run 38499383286: tests 1179, pass 1179, fail 0.

Fake process tools are first on PATH for every repository test. No real-model pilot, installed automatic runtime, or native hook outage behavior was verified here. The dependency check is offline for the pinned SDK, not a universal advisory database.

@erickb336
erickb336 marked this pull request as ready for review October 14, 2026 02:17
@erickb336
erickb336 merged commit 5b2385a into main Oct 14, 2026
1 check passed
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.

Bundled MCP SDK embeds fast-uri 3.1.0 with known advisories: update before the Codex runtime turns on (#88)

1 participant