fix(security): redact tool outputs and patch vulnerable dependencies

Merged
OK
5d ago
+473-85

What and why

  • Resolve the seven dependency alerts with scoped overrides for fast-uri, @hono/node-server, glob, and minimatch.
  • Redact project-tool results, serialized JSON, custom toModelOutput text, and tool/engine errors before model input. Redact strings before truncation, and apply the live secret ledger to AI trace names, scope metadata, input, and output.
  • Redact and bound collection-time and runtime skip reasons before reporters receive them, including skips beside an existing failure.
  • Remove polynomial regex scanning from stack-frame parsing and provider endpoint trimming; retain single-slash file URL support. Preserve ACP forwarding failures in the runner's redacted diagnostics while keeping exception text out of HTTP responses. Normal client disconnects remain harmless.
  • Add regression coverage, documentation, consumer-skill updates, and patch changesets.
flowchart LR
  T[Tool output] --> S[Serialize custom JSON output]
  S --> R[Redact provider input]
  T --> A[Serialize and redact AI trace]

Issue

  • Maintainer-requested security cleanup. Private reports remain tracked in the repository's Security tab.
  • Web redirect-header reports and three test-fixture scanning findings remain outside this PR. No GitHub alerts or advisories were dismissed.

Verified

Ran it locally: yes

  • Built the packages and ran the same new tool-output, skip-reason, and AI-trace regression tests against a source archive of current main and this branch.
mainthis branch
Tool-output regression failsPasses, including null-prototype dictionaries, URL serialization, and custom output callbacks
Skip-reason regression fails report-schema validationPasses; JSON, Markdown, and JUnit contain redacted, bounded reasons
AI-trace redaction regression failsPasses with the live ledger applied during serialization
ACP forwarding exceptions are sent in the HTTP responseThe HTTP response stays generic; the runner stops the session and reports the redacted cause
pnpm audit reports seven advisoriesZero vulnerabilities
  • Ran the built CLI in a scratch project with a custom tool returning a URL, another throwing an error, and --ai-trace. The fake provider rejects raw sentinel values. unbox-ai found the redacted marker in the trace and no raw sentinel matches.
✓ redacts custom tools and trace > agent.act "read both tools" · 2 model calls
Test Files  1 passed (1)
     Tests  1 passed (1)
  • pnpm check; 55 focused core tests cover the final review changes. The preceding full core run passed 4,584 tests with 11 skipped. GitHub, ACP, BrowserStack, and TestMu suites also passed. Public declaration comparison: all 25 files unchanged.
  • All 47 ACP tests passed, including real HTTP streaming/disconnect tests and startup/active-turn error propagation. A built-CLI failure probe confirmed the cause appears in terminal and JSON output with its synthetic secret redacted.
MODEL_PROVIDER_FAILED: The ACP agent session failed: step-tool request forwarding failed: <secret:unsupportedMethod> HTTP method is unsupported.
  • Full testbed through the built CLI: 588 passed, 1 skipped. Deterministic web benchmark: 91 passed.
  • Expo fingerprint generation succeeded with the updated glob dependencies; the patched Hono server passed a request/response smoke test.

Checklist

  • Changeset added for published-package changes.
  • Breaking change: not applicable.
  • Matching docs and consumer skill updated.
  • Public API or wire contract change: not applicable.
  • Engine contract change: not applicable.