Files
gnoma/internal
vikingowl beaa09a154 test(permission): lock in elf safety-pattern inheritance
Audit finding H2 hypothesised that spawn_elfs/agent's safetyCheck
exemption could be reached as a bypass route if the spawned elf failed
to enforce the same patterns. Verified by inspection that:

1. WithDenyPrompt copies safetyDenyPatterns into the elf checker.
2. Check() runs safetyCheck (Step 2) before ModeBypass (Step 3),
   so bypass cannot skip safety.
3. main.go always passes the parent permChecker to the elf Manager.

H2 is not exploitable in current code. This test pins the contract so
future refactors of WithDenyPrompt cannot silently drop pattern
inheritance.
2026-05-19 16:21:53 +02:00
..