mrkeyoor.comAsk

Dicklesworthstone/destructive_command_guardtested 04 Oct 2026commit 2259375

destructive_command_guard review

Trial dcg as an extra command check if you can verify the hook and effective policy in your coding client.

  • Install 45 s
  • Build 527 s
6,760/6,760tests passed
  • 362 packages
Dev Toolsevaluationupdated 31 Oct 2026
+1stars / 7d

Use Destructive Command Guard (dcg) if you want an extra check on destructive commands proposed by coding agents and can verify the hook in your actual client. Destructive Command Guard is a Rust safety hook for AI coding agents that blocks destructive shell, Git, and filesystem commands. Its configurable rules and explicit bypass make it an additional precaution alongside permissions, backups, and the agent's own execution controls.

Verdict

Trial dcg as an extra command check if you can verify the hook and effective policy in your coding client. Our run on October 4, 2026 tested commit 2259375 in our sandbox. Its install, build, and test commands completed successfully, but replayed summaries prevent treating the stored parser totals as a unique test inventory. The documented bypass, configurable policy, and untested live integrations leave permissions, backups, and client enforcement essential.

We ran it

Lab card: what happened when we ran destructive_command_guard
Lab card from our sandbox run
Screenshot of destructive_command_guard (github.com/Dicklesworthstone/destructive_command_guard)
github.com/Dicklesworthstone/destructive_command_guard
Install✓ · 45s362 packages
Build✓ · 527s
Tests✓ · 608s6760 passed · 0 failed of 6760 (cargo test)
Repo666 files~382,126 lines of source · 26.2 MB · 14 CI workflows · tests dir

Answers from our run

Does destructive_command_guard build from source?

Dependencies installed in 45 seconds (362 packages), and the build succeeded in 527 seconds. We cloned commit 2259375 into a clean Debian container with 3 CPUs and no project-specific setup.

Do destructive_command_guard's tests pass?

Yes. The project's own test command finished in 608 seconds and reported 6760 passed, 0 failed (cargo test).

Who should not use destructive_command_guard?

Anyone requiring an execution boundary that a caller cannot disable: the documented environment bypass disables protection for an invocation.

What are the alternatives to destructive_command_guard?

Shellfirm, Harden-Runner. Trial dcg as an extra command check if you can verify the hook and effective policy in your coding client.

Setup4/5Strong setup evidence with remaining checks: our recorded install completed in 45 seconds and build succeeded, but live client enforcement and pack configuration were not validated.
Docs5/5Unusually complete documentation within this dimension: supplied extracts explain defaults, optional packs, critical-rule policy, bypasses, and client protocol differences.
Community4/5Strong attention and maintenance signals: the supplied snapshot records 6,234 stars and an October 30, 2026 push; neither establishes adoption or support responsiveness.
Maturity4/5Strong but bounded evidence: build and test commands succeeded in our recorded run, while replayed summaries limit test-count interpretation and live detection accuracy remains untested.

Discussed on

  1. hnShow HN: Destructive_command_guard (Dcg)3 points

Who it’s for

Developers who want destructive Git and filesystem commands screened before a supported coding agent executes them.
Teams willing to select optional packs, inspect effective policy, and check that their client enforces denials.
Maintainers who want the documented scan mode for reviewing dangerous command patterns in scripts or CI.

Who it’s NOT for

Anyone requiring an execution boundary that a caller cannot disable: the documented environment bypass disables protection for an invocation.
Teams expecting database, cloud, and container protection merely from installing the binary. Those packs require configuration.
Users treating a successful Cargo test command as proof of detection accuracy or working integration with every advertised agent.
Organizations requiring an approved standard license without further review. The supplied repository metadata reports NOASSERTION rather than a standard SPDX license identifier.

Setup reality

Our run on October 4, 2026 tested commit 2259375 in our sandbox. The attached harness records successful install, build, and test commands: install took 45 seconds, build took 527 seconds, and cargo test took 608 seconds; each returned exit code 0 without timing out. The recorded dependency count is 362.

These are source-checkout command outcomes, not a timed trial of the README's binary installer or proof that an agent hook was installed and enforced. The sandbox record specifies 3 CPUs, 12 GB of memory, and image lab-rust:1. It does not establish a live agent session, production command-history coverage, cloud or database workloads, or native Windows behavior.

The README offers binary installers that configure detected agent hooks. Its documented setup convenience still leaves two checks for the user: whether the intended client actually invokes the hook, and whether the selected packs and policy produce the intended decision.

Should you add it to your coding agent?

Add dcg when a command-pattern check would help protect valuable working files and you can verify its behavior in the client you use. Keep recoverable copies and restrict the credentials available to the agent. The reason is concrete: the README documents a bypass that disables protection for one invocation, plus allowlists and hook removal.

Destructive Command Guard is a Rust safety hook for AI coding agents that blocks destructive shell, Git, and filesystem commands. That describes its documented purpose; our sandbox run did not independently measure how reliably it detects destructive commands.

What our recorded sandbox run establishes

Our run on October 4, 2026 tested commit 2259375 in our sandbox. Install completed in 45 seconds, build in 527 seconds, and cargo test in 608 seconds. All three commands returned exit code 0 without timing out. The harness stores command status, exit code, elapsed time, timeout status, and parsed test summaries separately, so command completion and parser totals answer different questions.

The attached stored parser summaries report 6,760 passed, 0 failed, and 6,760 total. These are historical parser aggregates, not verified unique or exhaustive test counts: the retained output repeats Cargo summaries before and after a replay marker, so suites may have been counted more than once. We have preserved the stored figures rather than recalculating them from the excerpt.

The retained doctest footer also records ignored cases. Those cases were not failures, and the attached aggregate skipped-test field is unknown. The successful command does not establish that every available test or optional integration ran.

This was an existing recorded execution, not a new run for this correction. The supplied sandbox had 3 CPUs, 12 GB of memory, and image lab-rust:1. We did not establish live agent enforcement, production detection accuracy, runtime latency, cloud or database workload behavior, or native Windows compatibility. No dependency audit result or scanned-package coverage is recorded, so this run supplies no security clearance.

The MrKeyoor testing methodology explains how command outcomes and parsed counts reach a review. That page provides provenance context; its current procedure does not establish which methodology version governed this older run.

Installation does not enable every protection

The README at the measured commit distinguishes no-config defaults from a generated starter configuration. Ordinary Unix defaults include core filesystem, core Git, and system disk packs. Database and container packs are opt-in. Running the documented initializer creates a starter configuration with examples, which is a different state from having no configuration file.

That distinction should guide setup: identify the resources your agent can affect, then enable and check the relevant packs. A list of available cloud or database rules does not mean those rules are active in your installation.

The current README also describes behavior beyond the measured checkout, including automatic Windows-pack activation for recognized Cmd or PowerShell requests on other hosts. Those current documentation claims should not be read as results from our October 4 run.

Check the effective decision and client protocol

The measured-commit README says core packs always participate in evaluation, but their matched rules can still be relaxed through policy. Broad policy settings and individual critical-rule settings behave differently. Inspect the resolved decision before relying on a configuration change; a pack being present does not by itself establish that every match will be denied.

Client coverage also needs qualification. The README lists Codex CLI 0.125.0+ as a hook target, Aider as limited to Git hooks, and Continue as detection-only. For Codex, it documents a denial returned as minimal JSON on stdout while the hook process itself exits successfully. A zero exit status therefore needs to be interpreted within the protocol, rather than treated as an allow decision.

Before using dcg on important work, verify both an allowed command and an expected denial in a disposable workspace through the actual agent client. Check the returned decision and whether execution stops. This is a recommended next step, not a validation completed by our recorded run.

Choose alternatives by where you need protection

Shellfirm challenges risky commands in an interactive shell and provides separate agent hooks. Its README describes confirmation challenges for terminal users and denial behavior for risky agent commands. Consider it as a replacement candidate when interactive shell protection and shared shell-and-agent policy are your main requirements. It also documents detection limits and explicitly describes itself as protection against mistakes rather than a sandbox; we have not compared its accuracy with dcg.

Harden-Runner provides security monitoring tailored for CI/CD runners. Its documentation describes network, file, and process events associated with workflow steps. Consider it a complement when your concern includes CI activity beyond destructive command strings. It serves a different role from a local coding-agent hook. Its free Community tier applies to public repositories on GitHub-hosted runners; private repositories and self-hosted runners require Enterprise under the supplied documentation.

Codex CLI is the coding agent itself. The supplied Codex README establishes that role but does not substantiate the earlier page's detailed comparison of sandbox and approval controls. It therefore does not support recommending Codex as a replacement command guard here.

How to read the ratings

These are editorial ratings, not measured accuracy or security scores. The scale is 1 for a documented obstacle that prevents ordinary use, 2 for substantial friction, 3 for workable use with material limits, 4 for strong supporting evidence with remaining checks, and 5 for unusually complete evidence within the stated dimension. A dimension without enough evidence would remain unassessed.

Setup ease remains 4: our source setup succeeded, and installers are documented, but client enforcement and pack policy still need checking. Documentation remains 5 for its explicit treatment of defaults, policy exceptions, bypasses, and client protocols; that rating does not validate every documented feature. Community remains 4 for visible repository attention and recent maintenance signals. The supplied GitHub snapshot reports 6,234 stars and a last push on October 30, 2026, which establishes attention and activity rather than adoption or support quality. Maturity remains 4 for the successful recorded build and test command plus documented integration detail, with detection accuracy and live deployment behavior still unverified.

The supplied GitHub metadata reports the license as NOASSERTION. Read the actual license terms before deciding whether distribution or organizational use meets your requirements.

Alternatives

ProjectWhat it isPick it when
ShellfirmChallenges risky interactive shell commands and supplies separate hooks for coding agents.Consider it as a replacement candidate when you want interactive confirmation and policy shared across shell and agent use. Compare its documented limitations with your commands; no comparative accuracy test was supplied.
Harden-RunnerProvides CI/CD runner monitoring for network, file, and process activity.Use it as a complement when the concern is workflow activity beyond command strings. Check runner and subscription eligibility before relying on monitoring.

What people are saying

  1. [github-trending] Dicklesworthstone/destructive_command_guard

Sources

  1. Destructive Command Guard README
  2. GitHub repository facts
  3. Release v0.13.9
  4. Quoted heredoc false-positive report
  5. Wildcard Git-path false-negative report

More dev tools reviews