Make detail sanitization categorical: collapse every foreign absolute path - #5
Merged
Conversation
… path The old sanitizer enumerated two known-bad roots (repository root, $HOME) — incomplete by construction. Temp paths, toolchain roots, other users' homes survived untouched, and the $HOME rule actively rendered sibling checkouts as "~/src/<sibling>/…", still naming the sibling. The rule is now categorical at the Assemble chokepoint, where every runner's Evidence.Detail already flows: the repository root becomes "." (in-repo paths stay fully readable), every OTHER absolute path of two or more components collapses to "…/<basename>", and the machine's hostname is scrubbed to "<host>". File:line actionability survives the collapse because the colon terminates the path token; URLs never match the token shape. An absolute path outside the repo is never the receipt reader's business. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GeUG1gboWiZSnFyzQghyp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the external review's sanitization finding: root+$HOME replacement was a first layer, not a disclosure boundary — arbitrary absolute paths, temp paths, hostnames, and sibling project names in tool output survived it (and the
$HOME → ~rule actively rendered sibling checkouts as~/src/<sibling>/…).The sanitizer is now a categorical rule at the one chokepoint every runner's
Evidence.Detailalready passes through (Assemble):.— in-repo paths stay fully readable and relative;…/<basename>— temp paths, toolchain roots, other users' homes, and sibling names close in one rule instead of an enumerated blocklist;<host>(whole-word, ≥3 bytes so a host named "go" cannot redact prose);…/testing.go:1576) because the colon terminates the path token; URLs never match the token shape.Eight-case table test pins each class the reviewer enumerated. Live self-receipt inspected: constructed details (
ok ./internal/receipt) untouched.The reviewer's stronger suggestion — runner-constructed safe details — is partially in place already (pass details, pair summaries, and infrastructure messages are built from repo-relative parts); passthrough of a failing test's own message is kept deliberately for actionability, now behind the categorical scrub.
🤖 Generated with Claude Code
https://claude.ai/code/session_015GeUG1gboWiZSnFyzQghyp