Files
Pulse/docs/release-control
rcourtman 7cd34f2ca8 Approve log reads only when every operand is under /var/log (#4353)
The default command policy approves `cat`, `head`, `tail` and `grep`
without a human for log reads. Those rules were prefix matches, so the
whole command was approved as long as one word named a `/var/log/` (or
`/log/`) path. This change checks every argument instead.

- Words must be plain, single-quoted or simply double-quoted. Options
must be known for each program, take checked values and come before the
first operand. Every file operand must be a path under `/var/log`, with
no parent segment and no glob that could expand to one.
- grep options that open another file or follow every symlink need
approval. So does a recursive grep whose only operands are globs.
- A single `&` now counts as a command separator, and the
`/etc/os-release` rule takes no extra operands.
- Behaviour change: tail, head and grep on log directories outside
`/var/log` now need approval.

Tests cover the allowed forms, including the single-quoted path that
`pulse_read` builds for tail, and the refused ones. The agent-lifecycle
contract records the rule.
2026-11-13 23:08:29 +00:00
..