fix(dispatch): deny the Claude child reads of its credential mount; document the residual risk (ISS-3) #120
No reviewers
Labels
No labels
severity/s2
severity/s3
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
janpeter/scrum4me-docker!120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/iss3-provider-deny"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Addresses ISS-3 (#108): the Claude dispatch child can read its own OAuth token. Since
17526f0the token lives in/run/providerrather than/sources. This PR adds the deny rule JP chose and records the residual risk in the operator doc.Changes
6e0968b):buildClaudeArgspasses--disallowedTools 'Read(//run/provider/**)'. The//makes the path absolute; a single/would anchor at the cwd. The mount path is one constant,PROVIDER_MOUNT, shared by the broker mount, the child entrypoint and the rule. Bash stays allowed (JP's decision, so reviewers can keep running typecheck and tests).0963819): the operator doc gets a "Residual risk of the Claude credential (ISS-3)" bullet. It covers what the rule refuses and what it doesn't, why the subprocess env scrub isn't used, and points to the gateway in IDEA-244 as the structural fix.Evidence (real
model-claudeimage from this branch)Setup: CLI 2.1.287 with the exact
buildClaudeArgs/buildClaudeEnvoutput, a dummy token, and a scripted fake Messages API viaANTHROPIC_BASE_URL. The container ran with--network none --cap-drop ALL --security-opt no-new-privileges --read-only. No real credential was used.Read,GrepandGlobon/run/provider, and Bashcatnaming the token path./sources, normal Bash, and Write to/output.node -e, a variable, or a glob;/proc/<claude pid>/environ.CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1needs bubblewrap and socat. Even with both installed it fails under--cap-drop ALL, because no user namespace can be created.Verification
npm run typecheck:dispatchis green.npx vitest run: 1304 passed, 8 skipped, 2 failed. The 2 failures are the known macOS-onlytranscript-retentiontests (GNUchmod --reference) and fail identically on master.After merge
The Claude slot needs a new
model-claudeimage. ISS-3 then closes with the residual risk accepted until IDEA-244.🤖 Generated with Claude Code
COMMENT
Geen blokkerende codebevindingen gevonden. De wijziging is klein, volgt de bestaande dispatch-patronen en houdt mountpad en deny-regel via één constante gelijk. De allowlist blijft intact; de bestaande argv-test controleert de exacte absolute deny-regel. De operator-documentatie benoemt de beperkingen expliciet.
Findings:
/tmpweigert uitvoering en het laden van de native rolldown-module. De unit-tests zijn daarom inhoudelijk beoordeeld, niet succesvol opnieuw uitgevoerd. De echte CLI-proef is in de PR-beschrijving gerapporteerd en hier niet onafhankelijk herhaald. Dit is geen aangetoonde regressie; wegens resterende verificatie-onzekerheid kies ik COMMENT.Plan gekoppeld via pr_refs: T-85 en T-86, story ST-024. Geen omitted onderdelen. De diff implementeert de voorgeschreven flag, gedeelde mountconstante, ongewijzigde allowlist en restrisicosectie. De PR rapporteert het praktijkbewijs voor geweigerde credential-reads en werkende gewone tools. Acceptatiecriterium 4 is hier alleen voor de typecheck onafhankelijk bevestigd. De gateway (IDEA-244) en het uitrollen van een nieuw model-claude-image zijn expliciet vervolgwerk; het geaccepteerde restrisico is geen blokkade tegen dit plan.
Productstandaarden: architectuur/overview en de toepasselijke agent-guide geraadpleegd.
git diff --checkis geslaagd. Review betreft commit09638196e8a8a4eef96974a4bcb59c5c0becb05a.