fix(workspace): restore _sanitize_for_external and stderr parameter (CWE-117, closes #471) #573

Merged
infra-runtime-be merged 2 commits from fix/471-cwe117-stderr-scrubbing into main 2026-05-11 23:07:01 +00:00

View File

@ -763,6 +763,7 @@ def test_sanitize_agent_error_stderr_and_exc():
out = sanitize_agent_error(exc=err, stderr="rate limit exceeded")
assert "ValueError" in out # exc class IS the tag when stderr is provided
assert "rate limit exceeded" in out
assert "workspace logs" not in out # stderr form, not the generic form
def test_sanitize_agent_error_stderr_empty_string():