You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(harness-ops): add a live behavior probe for the subprocess env scrub #12702
Lanes rely on CLAUDE_CODE_SUBPROCESS_ENV_SCRUB to keep the Claude OAuth token and other credentials away from Bash, hook and MCP subprocesses (ADR 0049; docs/conventions/pr-pipeline/pr-run-activity.md:1876). Our tests assert that the variable is set (.github/scripts/post-merge-test-mutation/report.test.mjs:236). plugins/harness-ops/skills/behavior-probes has no case for what a subprocess can actually read, so a Claude Code release could change the behavior and no check would fail. A lane token that leaks is a security risk in a public repository.
The idea comes from the envLeaks.ts row in docs/upstream/mattpocock-sandcastle.md (#12676).
Outcome
Add a behavior-probes case, with a paired control, that runs a real Claude Code turn with the scrub on and a planted fake credential in the variable the scrub covers.
Acceptance criteria
With the scrub on, a Bash child cannot read the planted value from its own environment or an ancestor's /proc/<pid>/environ; the case fails if it can.
A paired control with the scrub off shows the Bash child can read the value, so the case proves the scrub made the difference.
The planted value is random and fake. No real credential is used, and the value never reaches a log or a record.
The case records pass, fail or inconclusive with the Claude Code version, as the other cases do.
The expected list of what the scrub keeps (GH_TOKEN, GITHUB_TOKEN per pr-run-activity.md:1878) comes from the linked docs section, read live, and is not restated in the case.
Out of scope
Egress controls and any sandbox provider; those are hardening work for later.
Proposed work class: work-class: scoped
Basis: automated intake triage; a maintainer confirms or changes it.
Size: Medium
Complexity: Medium
Uncertainty: Knowable
Flags: none
Blocked by: none
Understood: add a behavior-probes case in harness-ops that runs a real Claude Code turn with CLAUDE_CODE_SUBPROCESS_ENV_SCRUB on and a random fake credential planted. It checks that a Bash child can't read the value from its own environment or an ancestor's /proc//environ. A paired control with the scrub off shows the value is readable. The case records pass, fail or inconclusive with the Claude Code version, and it reads the kept-variable list live from the docs. The outcome and acceptance criteria are exact, and I found no duplicate among the open issues.
Activity
github-actions commentedon Nov 3, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; a maintainer confirms or changes it.
Size: Medium
Complexity: Medium
Uncertainty: Knowable
Flags: none
Blocked by: none
Understood: add a behavior-probes case in harness-ops that runs a real Claude Code turn with CLAUDE_CODE_SUBPROCESS_ENV_SCRUB on and a random fake credential planted. It checks that a Bash child can't read the value from its own environment or an ancestor's /proc//environ. A paired control with the scrub off shows the value is readable. The case records pass, fail or inconclusive with the Claude Code version, and it reads the kept-variable list live from the docs. The outcome and acceptance criteria are exact, and I found no duplicate among the open issues.
Automated triage. A maintainer reviews it.
kyle-sexton commentedon Nov 3, 2026