Skip to content

v0.12.0

Latest

Choose a tag to compare

@Dicklesworthstone Dicklesworthstone released this 20 Aug 20:59
· 1 commit to main since this release

dcg v0.12.0

Manual DSR release (GitHub Actions throttled). Built on ts2 + mac-mini-max at tag commit 70e7ce4, signed with the project minisign key 69B3955C8D2E62A8 and the pinned local-release cosign key.

Added

  • ssh <host> '<command>' remote payloads are scanned (#326). ssh concatenates every argv word after the destination and hands the result to the remote login shell — an inline-shell wrapper exactly like sh -c, minus the flag. dcg treated the quoted payload as opaque argv data, so ssh host 'dropdb mydb' rode through while the unquoted spelling was denied. The heredoc pipeline now extracts the payload (walking the modeled OpenSSH option grammar — bundled flags, attached values like -p2222, separate values like -o X=y, and -- — to locate the destination) and recursively evaluates it, so quoted and unquoted spellings reach the same decision and every enabled pack applies to the remote command. Read-only remote diagnostics stay allowed, the payload's own quoting still classifies remote data as data, and echo/grep/commit-message mentions of ssh stay inert. The opt-in remote.ssh pack is unchanged and still adds its curated remote-execution rules on top.

Fixed

  • The dead overrides.allowlist / overrides.allowlist_rules config keys are removed and loudly reported (#327). Both keys parsed, appeared in dcg config schema with worked examples, and were never consulted during evaluation. They are gone from the schema; a config still carrying them parses, grants nothing, and is named explicitly by dcg config (a Warnings: section), dcg config --format json (warnings + overrides.removed_keys_present), and dcg doctor, each pointing at the surfaces that work: overrides.allow, per-rule exempt_target_globs, and dcg allowlist add. dcg config --format json now also echoes the enforcement-relevant overrides, rules, and policy sections so CI can assert what is actually loaded.
  • core.filesystem:redirect-truncate-root-home no longer recommends an alternative it then denies (#316 follow-up). The "Make a backup" suggestion now routes the write through a temp file (cp <file> <file>.bak && echo data > /tmp/<subdir>/out && cp -f /tmp/<subdir>/out <file>), which the hook allows end-to-end even for home-path targets. Two sibling rows with the same latent trap were fixed in the same pass (the truncate rules' head-preserving rewrite, and mv-sensitive-source-root-home's in-place rename suggestion, now rendered with the explicit gated marker), and the suggestion self-consistency sweep now instantiates {path} with a home path for every root-home/sensitive rule so the class cannot silently return.

Verification

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, full cargo nextest run (4977 passed), ./scripts/e2e_test.sh (374/374), Windows lib cross-check (x86_64-pc-windows-gnu).
  • Both issue reproduction tables re-verified end-to-end against the release binary (posix and unknown dialects).

Install / verify:

curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/main/install.sh?$(date +%s)" | bash -s -- --easy-mode
minisign -Vm dcg-<target>.tar.xz -x dcg-<target>.tar.xz.minisig \
  -P 'RWSoYi6NXJWzaRs1mJmOwwXrZfPWcq6MXnQlNMLBYKzlIQTLwuVQG6uO'