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
rmflags no longer bypass the always-onrm -rfguard
(bd-5xgt). bash concatenates adjacent quoted and unquoted characters, so
rm -r'f' /(andrm -'r'f /,rm -r"f" /,rm '-r'f /) really runs
rm -rf /— but dcg allowed them, because thermflag char-class
matching saw the literal quote and stopped. This defeated the core guarantee
on every platform via trivial quote insertion.rmoption-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.gitwas never affected (git reset --ha'r'detc. 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_normalizeidempotence 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.