fix: CWE-117 sanitized stderr #534

Merged
claude-ceo-assistant merged 2 commits from fix/test-sanitize-agent-error-stderr-exc into main 2026-05-11 18:34:40 +00:00

2 Commits

Author SHA1 Message Date
389613bb95 fix(tests): correct assert in test_sanitize_agent_error_stderr_and_exc
Some checks failed
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 17s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 21s
publish-runtime-autobump / pr-validate (pull_request) Successful in 50s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m3s
sop-tier-check / tier-check (pull_request) Successful in 17s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m3s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m4s
CI / Detect changes (pull_request) Successful in 1m9s
gate-check-v3 / gate-check (pull_request) Failing after 24s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 55s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 11s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 10s
CI / Platform (Go) (pull_request) Successful in 9s
CI / Canvas (Next.js) (pull_request) Successful in 9s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 5s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
audit-force-merge / audit (pull_request) Successful in 22s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 2m41s
CI / Python Lint & Test (pull_request) Successful in 7m25s
The exc class IS the tag when stderr is provided:
  "Agent error (ValueError): rate limit exceeded"

Fixes the incorrect assertion added in PR #517.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 18:21:19 +00:00
6a2a5a6018 fix(workspace): include ~1KB sanitized stderr in A2A error responses
Adds an optional `stderr` parameter to sanitize_agent_error(). When
provided, up to 1 KB of stderr text is included in the A2A error
response after sanitization (API keys / bearer tokens ≥20 chars /
long paths redacted). The existing generic form is preserved when
stderr is absent. Updates both the main a2a_executor and the google-adk
adapter.

Closes: roadmap item — SDK executor stderr swallowing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 18:21:19 +00:00