Skip to content

bug(sanitizer): URL-credential redaction swallows JSON across keys — an AAuth resource's identity reply reaches the agent as *** #3769

Closed

Description

@vybe

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 AAuth sub, 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.dev through call_aauth_resource sees its full aauth:<agent>@<issuer-host> identity.

Technical Notes

Activity

  1. added
    priority-p1
    type-bug
    theme-security
    complexity-low
    status-ready
    on Oct 15, 2026
  2. removed
    status-ready
    on Oct 15, 2026
  3. vybe commented on Oct 15, 2026

    @vybe
    ContributorAuthor

    /claim

  4. added
    status-in-progress
    on Oct 15, 2026
  5. github-actions commented on Oct 15, 2026

    @github-actions

    Claimed by @vybe. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/3769-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #3769
  6. added
    status-in-dev
    and removed
    status-in-progress
    on Oct 17, 2026
  7. removed
    status-in-dev
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-lowpriority-p1theme-securitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions