Files
Pulse/internal/agentexec
rcourtman c48c46a67d Check arguments of auto-approved commands in the default policy
The default command policy approves a list of inspection programs
without a human. Those rules match the start of the command, so the
same programs also ran their other forms without approval: ip and
ifconfig changes, find -delete/-exec/-fprint, du --files0-from,
file -f/-m/-d, sar -o, ss -K, journalctl --vacuum-*/--cursor-file,
ps environments and similar.

After a pattern matches, autoApprovedArgsSafe now splits the command
into shell words after quote removal (refusing anything the shell would
expand) and, for find, du, file, last, blkid, ss, lsof, journalctl,
systemctl, apt-cache, sar, ps, ip, ifconfig, dpkg, pvesh and podman,
refuses options that change the host, write files or read another
file's contents. ip, ifconfig, dpkg and podman use allowlists; the rest
deny the risky options, including getopt_long abbreviations and short
option clusters. Programs that read meaning from the number of operands
refuse unquoted globs. Several patterns are anchored, and service
status takes a plain service name.

Commands without an approval or the Trusted flag also no longer inherit
variables that change how sh, grep, ps, blkid or apt-cache read the
command line (BASH_FUNC_*, BASH_ENV, ENV, SHELLOPTS, BASHOPTS, PS4,
GREP_OPTIONS, PS_FORMAT, PS_PERSONALITY, CMD_ENV, BLKID_FILE,
BLKID_CONF, APT_CONFIG).

Display forms Patrol and operators use keep running without approval;
the tests list both sides. The agent environment test used ps e as its
auto-approved read, which is now refused, so it prints the environment
the shell received through a swapped executable instead. The
agent-lifecycle contract records the rule.
2026-11-14 00:36:37 +00:00
..
2026-03-18 16:06:30 +00:00