Repository navigation
What's Changed in v0.17.2
New opt-in pack
system.processes: enable it withenabled = ["system.processes"]on machines shared by several agents. It denies kills that pick their targets by pattern, parent-tree walk or broadcast (pkill,killall,kill -1, kills fed bypgrep/pidof/lsof -t/ps,xargs kill,find -exec kill, remote pattern kills overssh, interpreter broadcasts, andlaunchctl bootoutof a whole GUI domain). Kills of recorded PIDs stay allowed: literal PIDs,$!, job specs, recorded process groups,kill -0probes, and a pidfile read back withkill "$(cat job.pid)". The pack is off by default.
Command analysis
- More command forms are analyzed the way the shell runs them: Windows
cmdcommands that build their program name or switches from variable expansions,modprobeoptions supplied through the environment, PowerShell call expressions that follow comments, and more wrapper, declaration and variable-binding forms are normalized before the packs run, so the existingwindows.*,system.servicesand core rules apply to them. Known false positive: a program named by a quoted variable that is given-Dor-dand a word, such as"$CC" main.c -D NDEBUG, is judged like the unquoted spelling and can be denied ascore.git:branch-dynamic-token; name the program literally, or allow the exact command once it is reviewed. - A literal value given to a pager, editor, browser or similar setting is judged as the command it runs (
PAGER,EDITOR,VISUAL,BROWSER,SHELLand similar). Ordinary values such asless,vimorcode --waitstay allowed, and the extra check runs only for commands that name one of these settings. - Clearer attribution for degraded heredoc analysis: a denial from a degraded analysis of a quoted Python or JavaScript heredoc body is reported as
heredoc.shell:incomplete-analysis.
False positives fixed
- A quoted
forloop word that the loop only prints no longer tripscontainers.docker(#666). - Large quoted data heredocs no longer trip the oversized-command scan: inert data bodies are masked before the fallback scan, and the scan splits at statement boundaries for POSIX shells, PowerShell and
cmd. - Script operands in
xargsandparallelpipelines are no longer mistaken for interpreter source flags.
Output change
dcg config --format jsonreports the heredoc fallback settings under their config keys (#555):fallback_on_parse_errorandfallback_on_timeout(previouslyfail_open_on_parse_error/fail_open_on_timeout). Scripts that parse this output need the new key names.
Dependencies
nix0.32.0, plus aCargo.lockrefresh within the existing requirements (clap4.6.10,rich_rust0.2.4,hyper1.13.0,h20.4.21,globset0.4.22,ignore0.4.35,crc32fast1.5.6,zlib-rs0.6.9).
See CHANGELOG.md for details.
Installation
curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/main/install.sh" | bash -s -- --easy-modeOr via Homebrew / Scoop:
brew install dicklesworthstone/tap/dcg
# or upgrade:
brew upgrade dcgscoop update
scoop install dcgVerification
All release archives, installers, and SHA256SUMS are signed with Minisign (keyid: 69B3955C8D2E62A8):
minisign -Vm SHA256SUMS -P RWSoYi6NXJWzaRs1mJmOwwXrZfPWcq6MXnQlNMLBYKzlIQTLwuVQG6uO
sha256sum -c SHA256SUMS --ignore-missingFull Changelog: v0.17.1...v0.17.2