Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions host-setup/agent-safety/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,16 @@ text says, because the harm it covers was never in the text.
launcher this does not name, and what those cost is a leak requirement 8 reports after the fact
rather than a deny before it.

Both are read over the whole command rather than tied to one loop, deliberately, and that is
coarser than it could be. Deciding which `&` backgrounds which compound needs a parse this rule
does not have, and four rounds of narrowing a scan that tried each closed the shapes it was shown
and left the next one: a statement between the loop and its group's closer, a `disown` before a
`wait`, a subshell the sequencing had already reaped. Reading any fork as fatal costs a false
deny on `<loop> & wait`, a bound nothing in the command text can verify. A `timeout` the command
backgrounds as a whole still bounds what it runs, since
that `timeout` process outlives the shell that started it, so the ordinary
`timeout 900 <command> &` is unaffected.
This scan is coarser than it could be, deliberately: it does not carve out which loop a fork
sits near, only whether one is anywhere in the text being read at all. Deciding which `&`
backgrounds which compound needs a parse this rule does not have, and four rounds of narrowing
a scan that tried each closed the shapes it was shown and left the next one: a statement between
the loop and its group's closer, a `disown` before a `wait`, a subshell the sequencing had
already reaped. Reading any fork as fatal costs a false deny on `<loop> & wait`, a bound nothing
in the command text can verify. A fork between `timeout` and the wrapper it runs is read as
fatal too, which is a false deny in the same direction for a plain `setsid` there. A `timeout`
the command backgrounds as a whole still bounds what it runs, since that `timeout` process
Comment thread
ptr727 marked this conversation as resolved.
Resolved
outlives the shell that started it, so the ordinary `timeout 900 <command> &` is unaffected.

Two heredoc limits are known and unclosed rather than accepted, both narrow and both written
here so a reader does not have to find them. A body kept because a shell reads it has its own
Expand Down Expand Up @@ -315,7 +316,7 @@ flowchart TD
isgit -- yes --> deny4["DENY - requirement 4\n(fails closed for a\nprotected-default branch\nwith undeterminable rules)"]
isgit -- no --> isprimary{"A mutating git op\ntargeting a primary\ncheckout, not exempt?"}
isprimary -- yes --> deny6["DENY - requirement 6"]
isprimary -- no --> iswait{"A while, until or\narithmetic-for loop\nthat sleeps, with no\ntimeout, no arithmetic\nguard and no read\nof an input redirect?"}
isprimary -- no --> iswait{"A while, until or\narithmetic-for loop\nthat sleeps, with no\narithmetic guard, no\nread of an input redirect,\nand (no timeout, or a\nfork out of the timeout's\nreach)?"}
iswait -- yes --> deny7["DENY - requirement 7"]
iswait -- no --> isghwrite{"A GitHub-write\ncommand at all?"}
isghwrite -- no --> allow["ALLOW"]
Expand Down
Loading