Repository navigation
Description
Summary
The outbound text sanitizer's URL-credential redaction (://user:pass@host → ://***@host) over-matches inside JSON. When a response body has a URL followed later by any value containing @ — with no whitespace in between, which is normal for compact JSON — everything from the :// to that @ is replaced by ***, swallowing the closing quote, the next key and the start of its value.
Effect: an agent calling an external AAuth resource never sees the identity that resource reports. The reference verifier whoami.aauth.dev answers an agent-token call with
{"iss":"https://agent.example","sub":"aauth:[email protected]"}and the agent's call_aauth_resource result reaches it as
{"iss":"https://***@agent.example"}The sub key disappears and the agent's own identity is replaced by ***. The agent confirmed it received the *** from the platform, it did not produce it. Nothing secret was in the original body.
Context
Found 2026-10-15 rehearsing the AAuth resource-call demo: the step whose entire point is "an external verifier echoes back who our agent is" shows a blank. The same rule runs on every path that sanitizes foreign text (outbound A2A response text, AAuth resource bodies, git and docker error text), so any compact JSON pairing a URL with a later @-bearing value is corrupted, for example {"site":"https://example.com","email":"[email protected]"}. The result is invalid JSON, so an agent parsing the body also breaks.
Acceptance Criteria
- A JSON body containing a URL followed later by any
@-bearing value (an AAuthsub, an email) passes through the sanitizer unchanged when no URL carries userinfo; the output is still valid JSON with all keys present. - Real embedded userinfo is still redacted, inside JSON strings too:
{"remote":"https://user:[email protected]/o/r.git"}→{"remote":"https://***@github.com/o/r.git"}. - Existing redaction tests for git remotes, error strings and A2A outbound text stay green.
- Regression tests cover both cases above plus the AAuth whoami body shape.
- Live check: an agent calling
whoami.aauth.devthroughcall_aauth_resourcesees its fullaauth:<agent>@<issuer-host>identity.
Technical Notes
- The rule lives in
src/backend/utils/credential_sanitizer.py(redact_url_userinfo), reached viascrub_secret_and_urlsand fromsanitize_outbound_textinsrc/backend/services/a2a_client.py, which the AAuth resource client uses for response bodies. - Related sanitizer issues: bug: log sanitizer leaves a sensitive KEY=value unredacted when it follows a harmless pair #3311, credential_sanitizer.sanitize_text is not idempotent on a quoted KEY= value with a glued suffix #3328, bug: sanitize_dict / sanitize_list return the raw subtree past max_depth, so nested secrets escape redaction #3312.
Activity
vybe commentedon Oct 15, 2026
/claim
github-actions commentedon Oct 15, 2026
Claimed by @vybe. Label
status-in-progressadded.Next steps:
feature/3769-<short-slug>Fixes #3769fix(sanitizer): stop URL-userinfo redaction at JSON/HTML delimiters (#…