Skip to content

Make detail sanitization categorical: collapse every foreign absolute path - #5

Merged
joshft merged 1 commit into
masterfrom
runner-safe-details
Aug 17, 2026
Merged

Make detail sanitization categorical: collapse every foreign absolute path#5
joshft merged 1 commit into
masterfrom
runner-safe-details

Conversation

@joshft

@joshft joshft commented Aug 17, 2026

Copy link
Copy Markdown
Owner

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.Detail already passes through (Assemble):

  • repository root → . — in-repo paths stay fully readable and relative;
  • every other absolute path (≥2 components) → …/<basename> — temp paths, toolchain roots, other users' homes, and sibling names close in one rule instead of an enumerated blocklist;
  • hostname → <host> (whole-word, ≥3 bytes so a host named "go" cannot redact prose);
  • file:line survives (…/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

… 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
@joshft
joshft merged commit 28e0123 into master Aug 17, 2026
1 check passed
@joshft
joshft deleted the runner-safe-details branch August 17, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant