Expand description
Cross-cutting path-operand gate (adversarial-review audit fix). The engine gates its 15
resolved commands’ file reads/writes by locus (HP-20); the ~1600 legacy commands are a
parallel surface. pathgates.toml describes, per legacy command, the ROLE each path
argument plays — read (a disclosing read), write (a write-target), or ignore (a URL,
an -i identity, a converter’s transcode input) — and a single walker here gates each path
by the matching locus face. Roles come from a positional policy (with skip_first /
last_write / remote_aware modifiers) plus a per-flag map; the three flat lists
(read / read_after_first / write) are shorthand for the common positional policies.
awk is gated in its own handler instead (its regex programs contain / and $).
Role assignment is authored knowledge, not inferred from spelling: the same ~/.ssh/id_rsa
is a denied read for scp (exfil) but an ignore transcode input for ffmpeg. The gate
only ever turns an already-allowed verdict into Denied (handlers::dispatch); it can
never widen one.
Functions§
- should_
deny - Whether
cmd’s already-allowed verdict must be overridden toDeniedbecause one of its path arguments reads/writes a sensitive locus. Returnsfalsefor commands in no gate.