Skip to content

v0.17.2

Latest

Choose a tag to compare

@Dicklesworthstone Dicklesworthstone released this 26 Nov 00:17
· 2 commits to main since this release

What's Changed in v0.17.2

New opt-in pack

  • system.processes: enable it with enabled = ["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 by pgrep/pidof/lsof -t/ps, xargs kill, find -exec kill, remote pattern kills over ssh, interpreter broadcasts, and launchctl bootout of a whole GUI domain). Kills of recorded PIDs stay allowed: literal PIDs, $!, job specs, recorded process groups, kill -0 probes, and a pidfile read back with kill "$(cat job.pid)". The pack is off by default.

Command analysis

  • More command forms are analyzed the way the shell runs them: Windows cmd commands that build their program name or switches from variable expansions, modprobe options 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 existing windows.*, system.services and core rules apply to them. Known false positive: a program named by a quoted variable that is given -D or -d and a word, such as "$CC" main.c -D NDEBUG, is judged like the unquoted spelling and can be denied as core.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, SHELL and similar). Ordinary values such as less, vim or code --wait stay 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 for loop word that the loop only prints no longer trips containers.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 xargs and parallel pipelines are no longer mistaken for interpreter source flags.

Output change

  • dcg config --format json reports the heredoc fallback settings under their config keys (#555): fallback_on_parse_error and fallback_on_timeout (previously fail_open_on_parse_error / fail_open_on_timeout). Scripts that parse this output need the new key names.

Dependencies

  • nix 0.32.0, plus a Cargo.lock refresh within the existing requirements (clap 4.6.10, rich_rust 0.2.4, hyper 1.13.0, h2 0.4.21, globset 0.4.22, ignore 0.4.35, crc32fast 1.5.6, zlib-rs 0.6.9).

See CHANGELOG.md for details.

Installation

curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/main/install.sh" | bash -s -- --easy-mode

Or via Homebrew / Scoop:

brew install dicklesworthstone/tap/dcg
# or upgrade:
brew upgrade dcg
scoop update
scoop install dcg

Verification

All release archives, installers, and SHA256SUMS are signed with Minisign (keyid: 69B3955C8D2E62A8):

minisign -Vm SHA256SUMS -P RWSoYi6NXJWzaRs1mJmOwwXrZfPWcq6MXnQlNMLBYKzlIQTLwuVQG6uO
sha256sum -c SHA256SUMS --ignore-missing

Full Changelog: v0.17.1...v0.17.2