What's Changed in v0.18.0
New configuration
- Declared heredoc data receivers (#684): a
[[heredoc.data_receivers]]entry in the user, system or an explicitDCG_CONFIGfile names a program, and optionally its subcommands, that reads stdin as data, so the quoted body ofmytool search - <<'EOF'is not judged as shell. The program and subcommand words must match in the command as submitted; wrappers, rebound or path-spoofed programs, nested shell scripts, unquoted delimiters, here-strings and pipelines that run the output get no exemption. A repository's.dcg.tomlcannot add receivers. See docs/configuration.md. - Operator-set denial trailer (#679):
[output] denial_trailer = "..."replaces the closing instruction of every denial reason an agent reads, and[rules."<pack_id>:<pattern_name>"] denial_trailersets it for one rule. Wording only; the command is still denied. A repository.dcg.tomlcannot set it.
Protection
rimrafis reviewed likerm -rf(#675): the newcore.filesystem:rimraf-generalrule deniesrimrafof anything outside a literal temp directory, also throughnpx,pnpx,bunx,npm exec,pnpm,yarnandbun.trash,trash-put,gio trashand moves into a Trash directory are denied for an empty, dynamic, current-directory, home, root or broad operand. If your agents runrimraf dist, they will now get a denial; allowlist the command or the rule if that is intended.- tmux server protection (#686): the opt-in
system.processespack deniestmux kill-serverandtmux kill-session. Machines that already enable the pack get these rules on upgrade. kill -1(#676): a-1after a PID (kill 12345 -1) is now denied; the explanation now says a leading-1is SIGHUP.- Hardened heredoc pipeline evaluation.
- Variable assignments are credited only where the shell applies them when dcg resolves
rm,mvand redirect targets, and embedded-code analysis that runs out of its structural bounds is reported as incomplete, never as clean.
Antigravity (agy) and dcg doctor
- Windows (#677):
dcg install --agywrites a handler that cmd.exe can run. - Linux and macOS (#685):
install.shregisters a detected Antigravity (skipped with--no-configure), and both installers check the registration before reporting protection.dcg doctorchecks the effectiverun_commandregistration across user and workspace hook files and repairs missing or disabled dcg hooks without touching other handlers. dcg doctorreports custom packs that fail to load, and an inheritedDCG_BYPASS, as errors.
False positives fixed
- A new home-directory file created with
>next to a stderr redirect such as2>/dev/null(#681). - A heredoc given to a script or
ssh 'bash -s'whose body mentions another language (#687). - A literal-bound executable in a pipeline, such as
T=/usr/bin/true; $T -d | cat(#680). - Literal Python in a read-only final pipeline filter, including a backtick (#653).
- Python heredocs that write prose to documentation files with
pathlibor append text with+=(#664). - Python helpers that read a known file, and clearer reporting of structural analysis limits (#673).
- A quoted heredoc fed to
nodewith runtime options such as--input-type=module(#674).
Allowlists and installer
- A rule allowlist entry for
heredoc.posix:substitution-unverifiednow takes effect, waiving only the substitutions dcg could not parse (#661).dcg corpus --use-allowlistruns a corpus against the active allowlist. install.shrecovers a lock left with an empty or missing pid file instead of failing with "Another installer is running".
Dependencies
toml1.2.3,toml_edit0.25.21,sha20.11.2,vergen-gix10.1.0.
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.2...v0.18.0