[AAASM-4766] 🐛 (examples): fix compose uid mismatch that fails-closed all calls#326
Conversation
|
|
🤖 Claude Code — PR review CI: Green. All required checks SUCCESS (Verify Scenarios policy-enforcement/approval-gates/smoke/validate across py/node/go, CodeQL, SonarCloud, metadata-drift, structure). The single non-success is Scope: Matches AAASM-4766 exactly. Single-line change Side-effects: None. Build-safe — FE: Playwright N/A — no frontend surface. Verdict: ✅ Approve-quality. Minimal, correct, CI-green fix that restores out-of-the-box enforcement while preserving the peer-uid security control. Ready to merge once a Pioneer reviewer approves. (Not merging per review-only scope.) |



What changed
The
live-core-enforcementscenario's agent container ran as uid 10001 while the publishedaa-runtimeimage runs as uid 65532 (distrolessnonroot). The runtime creates its SDK IPC socket/tmp/aa-runtime-<agent_id>.sockas mode0600owned by 65532 and rejects any connecting peer whose uid != 65532 (peer-uid gating — a deliberate security control). With the uid mismatch the agent could never complete the handshake, so every governed call fell back todeny "runtime unreachable; failing closed under enforce"— includingread_file, which the policy allows. No allow path was reachable out of the box; it only worked with an undocumented--user 65532.This aligns the agent's uid to the runtime's by changing
python-agent/Dockerfileuseradd --uid 10001→--uid 65532, with a WHY comment explaining the peer-uid constraint. The socket is intentionally not loosened to0666— peer-uid gating is preserved.Related ticket
Closes AAASM-4766 — https://lightning-dust-mite.atlassian.net/browse/AAASM-4766
How to verify
Brought the stack up out-of-the-box (no
--useroverride) with the published rc.6 images and SDK, exactly as the ticket's repro:Observed (previously all-deny fail-closed):
Agent exited
0; the gateway wroteToolCallIntercepted+PolicyViolationaudit records. Enforcement semantics (allow / deny / audit / fail-closed) are unchanged — only the uid alignment differs, which is exactly what J52 verified once uids match.Note: the two secondary findings on the ticket (stale gateway-image docs, documenting the fail-closed behavior) are documentation and are owned by the docs lane, not this PR.
Checklist
[AAASM-XXXX] <GitEmoji> (<scope>): <summary>.envfiles committedREADME.mdwith prerequisites and run instructions