The guard
A guard built for bypass mode
Foreman is meant to run without permission prompts, so the brake has to be real: it reads every Bash command and file edit before it runs, including the scripts a command calls.
What it refuses
- Deletes outside the project, the home folder, the root.
- Downloads piped into a shell, force pushes to the default branch, credential reads.
- Edits to Foreman itself and its state, unless you say yes for that task.
- Hidden ways to run code:
tar -I,find -exec,git -c core.*,BASH_ENV, and scripts it reads line by line.
Show the numbers
| value | |
|---|---|
| core | 111 |
| brief | 80 |
| state-direct | 36 |
| plugin | 26 |
| rm-outside | 15 |
| system | 12 |
| pipe-shell | 8 |
| credentials | 4 |
It fails closed, and saves your work
If the guard crashes or times out, the call is blocked. Before git reset --hard, checkout -- . or clean -f, Foreman snapshots your uncommitted work; fm oops --apply brings it back. Every change to the guard is replayed against thousands of real commands to show what it would newly block or allow.
Show the numbers
| value | budget | |
|---|---|---|
| PreToolUse:Bash:script | 274 | 300 |
| PreToolUse:Bash | 67.1 | 150 |
| PreToolUse:Edit | 56.5 | 150 |
| PreToolUse:Bash:block | 48.7 | 150 |