pub fn command_allow_patterns(command: &str) -> Vec<String>Expand description
Allow patterns for one contract/validator command: the exact command forms
the contract declares — the verbatim command and each of its
&& / || / ; / | segments, each as a Bash(<form>*) prefix rule.
Prefix-suffix matching still admits the natural reinvocations that made
verbatim-only rules untenable (observed live): python3 extract_links.py
matches the segment rule from python3 extract_links.py && echo EXIT_OK,
and a trailing extra flag matches the declared prefix.
Nothing wider (ticket validator-immutability-proof, review P1 #5). The
old leading-two-token rule widened python3 -m pytest to
Bash(python3 -m*) and heredoc contracts to Bash(python3 -*) —
arbitrary interpreter use (python3 -c '<any write>') under a “read-only”
role. A validator needs to RUN the declared commands, nothing else, and
engine-run contract commands (validation_round’s captured PASS/FAIL
evidence) mean heredoc forms need no validator Bash rule at all. The
read-only guarantee now rests on the denied Write/Edit tools, the deny
list, and the validator.tamper identity assertion
(crate::validator_integrity) — with Bash precision no longer working
against it.