github Dicklesworthstone/destructive_command_guard v0.12.4

3 hours ago

dcg v0.12.4 — security release

Upgrade recommended for everyone. This closes a bypass of dcg's flagship
always-on rm -rf protection.

Security

  • Quoted rm flags no longer bypass the always-on rm -rf guard
    (bd-5xgt).
    bash concatenates adjacent quoted and unquoted characters, so
    rm -r'f' / (and rm -'r'f /, rm -r"f" /, rm '-r'f /) really runs
    rm -rf / — but dcg allowed them, because the rm flag char-class
    matching saw the literal quote and stopped. This defeated the core guarantee
    on every platform via trivial quote insertion.

    rm option-position tokens are now dequoted (balanced single/double quotes
    and backslash escapes) before flag parsing. Because option tokens are always
    executed syntax rather than data, this cannot turn a quoted-data mention into
    a false positive:

    • core.git was never affected (git reset --ha'r'd etc. already denied);
    • quoted data arguments stay allowed — echo 'rm -rf /',
      grep 'rm -rf' file, printf '%s' 'rm -rf /';
    • an unbalanced quote is a shell syntax error that never runs rm, and
      stays allowed;
    • the temp-directory carve-outs (rm -rf /tmp/x) and every existing rm
      behavior are unchanged.

    Found via the fuzz_normalize idempotence invariant, then confirmed with
    each allowed case cross-checked against real bash argv. Regression corpus:
    tests/corpus/bypass_attempts/quoted_flags.toml.

Verification

Every archive has .sha256, .minisig (key ID 69B3955C8D2E62A8),
.sigstore.json (local-release cosign key, DER SHA256
0e6947743daf39d6413cb25f6c96601427e38885f3a756e9f98f37d66e6df7a4) and SLSA
.intoto.jsonl provenance sidecars. install.sh --require-minisign /
install.ps1 -RequireMinisign -Verify enforce them.

Don't miss a new destructive_command_guard release

NewReleases is sending notifications on new releases.