AI Slop Code RIsk Monitor

Dicklesworthstone/destructive_command_guard

The Destructive Command Guard (dcg) is for blocking dangerous git and shell commands from being executed by agents.

6.6 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for Dicklesworthstone/destructive_command_guard, a Rust project with 6,139 GitHub stars. SynthScan examined 377,941 lines of code across 577 source files, recording 1590 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 6.6 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

6.6
Adjusted Signal
6.6
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
6.1K
Stars
Rust
Language
377.9K
Lines of Code
577
Files
1.6K
Pattern Hits
2026-10-12
Scan Date
0.01
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 14.4/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 1154 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.1/100 · LOW

Are imports declared and package/API names verified? 4 finding(s).

Agent Over-Engineering Ratio 16.1/100 · LOW

Are wrappers, guards, and repeated structures necessary? 453 finding(s).

PR Review Velocity Impact 28.4/100 · MEDIUM

Which changes need focused human review? 1590 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 4MEDIUM 455LOW 1131

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1590 distinct pattern matches across 16 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Decorative Section Separators404 hits · 1274 pts
SeverityFileLineSnippetContext
MEDIUMinstall.sh237# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh239# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh1861# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh1863# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh1953# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh1955# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4369# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4371# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4461# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4463# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4500# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4502# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM.config/nextest.toml4# =============================================================================COMMENT
MEDIUM.config/nextest.toml6# =============================================================================COMMENT
MEDIUM.config/nextest.toml20# =============================================================================COMMENT
MEDIUM.config/nextest.toml22# =============================================================================COMMENT
MEDIUM.config/nextest.toml46# =============================================================================COMMENT
MEDIUM.config/nextest.toml48# =============================================================================COMMENT
MEDIUM.config/nextest.toml66# =============================================================================COMMENT
MEDIUM.config/nextest.toml68# =============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml6# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml8# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml37# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml39# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml68# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml70# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml88# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml90# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml113# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml115# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml138# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml140# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml173# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml175# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml199# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/multi_segment.toml201# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml12# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml14# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml32# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml34# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml51# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml53# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml70# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml72# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml84# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml86# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml98# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/regex_worst_case.toml100# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml5# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml7# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml24# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml26# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml48# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml50# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml73# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml75# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml87# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml89# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml106# ============================================================================COMMENT
MEDIUMtests/corpus/edge_cases/quoting.toml108# ============================================================================COMMENT
344 more matches not shown…
Over-Commented Block978 hits · 816 pts
SeverityFileLineSnippetContext
LOWuninstall.sh1#!/usr/bin/env bashCOMMENT
LOWinstall.sh1#!/usr/bin/env bashCOMMENT
LOWinstall.sh301# Capture before any download or source-build work can change directories.COMMENT
LOWinstall.sh2601COMMENT
LOWinstall.sh2661# git-commit-verify: enables git hooks (including pre-commit)COMMENT
LOWinstall.sh2701 CONTINUE_STATUS="skipped"COMMENT
LOWinstall.sh2721 # hook_event_name: "PreToolUse", turn_id, tool_use_id, ... }.COMMENT
LOWinstall.sh3561 CURSOR_STATUS="created"COMMENT
LOWinstall.sh3581 # on stdin; no wrapper script is required.COMMENT
LOWinstall.sh3841 # ~/.posit/assistant/settings.json plus per-workspace overrides. We write theCOMMENT
LOWbuild.rs21 .commit_date(true)COMMENT
LOWbuild.rs141/// changes no code path.COMMENT
LOWrust-toolchain.toml1[toolchain]COMMENT
LOW.config/nextest.toml1# cargo-nextest configuration for git_safety_guardCOMMENT
LOWpatches/uring-fs/src/lib.rs1COMMENT
LOWpatches/uring-fs/src/lib.rs21//! let info = io.stat("src/file.txt").await?;COMMENT
LOWtests/codex_hook_protocol.rs1//! Subprocess integration tests for Codex CLI hook protocol.COMMENT
LOWtests/codex_hook_protocol.rs21/// raising this constant cannot weaken the deadline coverage.COMMENT
LOWtests/codex_hook_protocol.rs461 );COMMENT
LOWtests/codex_hook_protocol.rs641///COMMENT
LOWtests/codex_hook_protocol.rs1081COMMENT
LOWtests/codex_hook_protocol.rs1701 assert_eq!(codex.exit_code, 0);COMMENT
LOWtests/codex_hook_protocol.rs2081COMMENT
LOWtests/codex_hook_protocol.rs2201 outcome.is_claude_block_shape(),COMMENT
LOWtests/temporary_allowlist_tests.rs1//! Comprehensive tests for Temporary/Expiring Allowlist Entries (Epic 6).COMMENT
LOWtests/repro_331_rebase_recovery_embedded_cd.rs1//! Regression tests for issue #331: the rebase-recovery auto-allow and permitCOMMENT
LOWtests/repro_498_warn_masks_later_deny.rs1//! Regression tests for issue #498: a match that policy lets run (warn, log,COMMENT
LOWtests/repro_498_warn_masks_later_deny.rs541}COMMENT
LOWtests/repro_498_warn_masks_later_deny.rs621 assert!(COMMENT
LOWtests/repro_498_warn_masks_later_deny.rs721 );COMMENT
LOWtests/allowlist_command_tests.rs101 let cmd = "ee preflight check --cmd \"true\" ; rm -rf /";COMMENT
LOWtests/suggestion_integration.rs1//! Integration tests for Command Rewriting Suggestions end-to-end flow.COMMENT
LOWtests/cross_pack_corpus.rs1//! Cross-pack regression corpus (issue #289 part D).COMMENT
LOWtests/cross_pack_corpus.rs21//! # Case format (TOML)COMMENT
LOWtests/cross_pack_corpus.rs41//! fails so the marker gets removed. `known_failing_dialects` keeps theCOMMENT
LOWtests/repro_459_argv_split_spawns.rs1//! Regression pins for issue #459: argv-split spawns in JavaScript and RubyCOMMENT
LOWtests/repro_459_argv_split_spawns.rs121/// These have contiguous destructive text, so they were caught by the rawCOMMENT
LOWtests/repro_459_argv_split_spawns.rs161/// Argv-split spawns follow #455's single policy for a recursive delete.COMMENT
LOWtests/repro_277_git_stdin_sink_fallback.rs1//! Regression tests for issue #277: a `git commit -F - <<'EOF'` heredoc whoseCOMMENT
LOWtests/agent_exit_codes.rs1//! Tests for exit code compliance with Claude Code hook protocol.COMMENT
LOWtests/repro_412_quoted_heredoc_commit_message.rs1//! Regression tests for issue #412: a German commit message denied by theCOMMENT
LOWtests/repro_412_quoted_heredoc_commit_message.rs181/// The converse, which is the soundness claim the retry rests on: a functionCOMMENT
LOWtests/repro_412_quoted_heredoc_commit_message.rs241// The body was masked for pattern matching and simultaneously mined for inlineCOMMENT
LOWtests/repro_290_oversized_hook_input.rs1//! Repro for issue #290: an oversized hook payload must not fail open blind.COMMENT
LOWtests/repro_290_oversized_hook_input.rs201/// Pad-first evasion inside the command string itself: the destructive partCOMMENT
LOWtests/repro_290_oversized_hook_input.rs261/// Pad-first evasion: the command begins beyond the read cap but within theCOMMENT
LOWtests/repro_290_oversized_hook_input.rs281/// budget, and on a loaded machine dcg printedCOMMENT
LOWtests/repro_441_dead_registry_keywords.rs1//! Regression tests for issue #441: rules whose keyword was missing from theCOMMENT
LOWtests/repro_511_awk_print_into_shell.rs1//! #511: `awk 'BEGIN{print "git reset --hard" | "sh"}'` was allowed.COMMENT
LOWtests/config_schema_drift.rs1//! Drift check for the committed `config.schema.json`.COMMENT
LOWtests/repro_451_windows_pack_activation.rs1//! Regression tests for #451's activation half: a Windows payload arriving on aCOMMENT
LOWtests/repro_451_windows_pack_activation.rs21use std::io::Write;COMMENT
LOWtests/repro_327_dead_override_keys.rs1//! Regression tests for issue #327: `overrides.allowlist` andCOMMENT
LOWtests/credential_file_embedded_e2e.rs201 "node <<'EOF'\nrequire('fs').writeFileSync('/home/me/.bashrc', 'x')\nEOF",COMMENT
LOWtests/suggest_allowlist_e2e.rs1#![allow(clippy::uninlined_format_args)]COMMENT
LOWtests/repro_1o5h_cmd_pwsh_stdin_consumer.rs1//! Regression pins for bd-1o5h: bare `cmd`/`pwsh` reading piped or redirectedCOMMENT
LOWtests/repro_407_relative_git_internals_redirect.rs1//! Regression tests for issue #407: a truncating redirect into `.git` namedCOMMENT
LOWtests/repro_dotnet_directory_delete.rs1//! Regression tests for issue #222: `windows.filesystem` must block the .NETCOMMENT
LOWtests/repro_419_opencode_plugin_executes.rs1//! #419: the generated OpenCode plugin must actually load and deny.COMMENT
LOWtests/repro_419_opencode_plugin_executes.rs21//! than calling the export it expects a loader to use.COMMENT
918 more matches not shown…
AI Slop Vocabulary20 hits · 70 pts
SeverityFileLineSnippetContext
MEDIUMtests/install/test_helper.bash158 # the harness capability before invoking rm, or teardown itself can lose theCOMMENT
MEDIUMtests/corpus/canonical.toml1# Canonical command corpus for golden tests and the shared e2e harness.COMMENT
MEDIUMtests/e2e/framework.rs603# All features enabled for comprehensive testingCOMMENT
MEDIUMtests/e2e/run_agent_e2e.sh4# This script runs comprehensive end-to-end tests for AI agent integration features.COMMENT
MEDIUMtests/e2e/run_install_e2e.sh341 # Extract and source install.sh functions using the robust methodCOMMENT
MEDIUMtests/e2e/run_history_e2e.sh4# This script runs comprehensive end-to-end tests for the DCG history system.COMMENT
MEDIUMscripts/e2e_codex.sh3# Real Codex CLI end-to-end harness for dcg.COMMENT
MEDIUM⚡scripts/e2e_destructive_equivalents.sh272# harness contract by exercising the closed bypass family)COMMENT
MEDIUMscripts/e2e_destructive_equivalents.sh5# Shared end-to-end test harness for the EPIC tracked atCOMMENT
MEDIUM⚡scripts/e2e_harness_matrix.sh7# dcg's value is entirely in what a *harness* does with its output. A changeCOMMENT
MEDIUM⚡scripts/e2e_harness_matrix.sh9# the exit code, or the stream a harness reads changes. The unit tests callCOMMENT
MEDIUM⚡scripts/e2e_harness_matrix.sh11# payload each harness actually sends and asserts on the exact bytes it emits.COMMENT
MEDIUM⚡scripts/e2e_harness_matrix.sh13# Every case is triple-asserted: the decision field the harness parses, theCOMMENT
MEDIUM⚡scripts/e2e_harness_matrix.sh128# assert_case <harness> <case> <payload> <expect: deny|allow>COMMENT
MEDIUM⚡scripts/e2e_harness_matrix.sh129# <jq filter yielding the harness's decision value>COMMENT
MEDIUMscripts/templates/test_pack.sh89 # Create JSON input using robust escapingCOMMENT
MEDIUM.github/workflows/ci.yml1398 # samples also support the harness's 95/95 one-sided binomial toleranceCOMMENT
MEDIUMsrc/heredoc.rs1169 // Use robust wrapper stripping to handle env flags (e.g. -u, -C) correctly.COMMENT
MEDIUMsrc/main.rs1131/// (#331): the harness-reported `cwd` when present (else the hook processCOMMENT
MEDIUMsrc/packs/platform/github.rs58 // We use a robust value matcher that handles quoted strings to prevent bypasses.COMMENT
Self-Referential Comments16 hits · 57 pts
SeverityFileLineSnippetContext
MEDIUMtests/install/test_helper.bash4# This file is sourced by Bats test files to provide:COMMENT
MEDIUMtests/install/test_helper.bash31 # Create a modified version of install.sh that can be sourced.COMMENT
MEDIUMtests/install/test_helper.bash534# Create a test file with known content and checksumCOMMENT
MEDIUMtests/e2e/run_agent_e2e.sh107 # Create a minimal configCOMMENT
MEDIUMtests/e2e/run_history_e2e.sh128 # Create a minimal config that enables historyCOMMENT
MEDIUM⚡scripts/scan_gitdiff_e2e.sh288 # Create a safe script firstCOMMENT
MEDIUM⚡scripts/scan_gitdiff_e2e.sh352 # Create a scriptCOMMENT
MEDIUMscripts/scan_gitdiff_e2e.sh137# Create a fixture git repo with test filesCOMMENT
MEDIUMscripts/scan_gitdiff_e2e.sh465 # Create a markdown file with dangerous commands as documentationCOMMENT
MEDIUMscripts/scan_gitdiff_e2e.sh601 # Create a file with a destructive command (error level)COMMENT
MEDIUM⚡scripts/scan_precommit_e2e.sh202 # Create a shell script with a destructive commandCOMMENT
MEDIUM⚡scripts/scan_precommit_e2e.sh289 # Create a markdown file that mentions dangerous commands but doesn't execute themCOMMENT
MEDIUM⚡scripts/scan_precommit_e2e.sh358 # Create a safe shell scriptCOMMENT
MEDIUM⚡scripts/scan_precommit_e2e.sh366 # Create a dangerous DockerfileCOMMENT
MEDIUM⚡scripts/scan_precommit_e2e.sh432 # Create a shell script with destructive command (use git reset --hard which is always error)COMMENT
MEDIUMscripts/scan_precommit_e2e.sh128# Create a fixture git repo with test filesCOMMENT
Verbosity Indicators32 hits · 53 pts
SeverityFileLineSnippetContext
LOWtests/codex_hook_protocol.rs1529 // Step 1: Get a Claude deny with allow-once codeCOMMENT
LOWtests/codex_hook_protocol.rs1576 // Step 2: Redeem the allow-once code using `dcg allow-once <code> --yes`COMMENT
LOWtests/codex_hook_protocol.rs1600 // Step 3: Retry the same command — should now be allowedCOMMENT
LOW⚡tests/cli_e2e.rs1329 // Step 2: Use dcg allow-once <code> --yes to activate the exceptionCOMMENT
LOW⚡tests/cli_e2e.rs1338 // Step 3: Re-run the same command, should now be allowedCOMMENT
LOW⚡tests/cli_e2e.rs1342 // Step 4: the grant was single-use (the default since #378), so theCOMMENT
LOW⚡tests/cli_e2e.rs1616 // Step 1: Block and get codeCOMMENT
LOW⚡tests/cli_e2e.rs1621 // Step 2: Allow itCOMMENT
LOW⚡tests/cli_e2e.rs1625 // Step 3: Same command in same directory is allowedCOMMENT
LOW⚡tests/cli_e2e.rs1629 // Step 4: Create a different directory outside the original temp dirCOMMENT
LOW⚡tests/cli_e2e.rs1633 // Step 5: Same command in different directory is still blockedCOMMENT
LOW⚡tests/cli_e2e.rs1643 // Step 1: Block and get codeCOMMENT
LOW⚡tests/cli_e2e.rs1648 // Step 2: Allow it with --single-useCOMMENT
LOW⚡tests/cli_e2e.rs1657 // Step 3: First run is allowedCOMMENT
LOW⚡tests/cli_e2e.rs1661 // Step 4: Second run is blocked again (single-use consumed)COMMENT
LOW⚡tests/cli_e2e.rs1671 // Step 1: Block to create pending entryCOMMENT
LOW⚡tests/cli_e2e.rs1676 // Step 2: Check list shows pendingCOMMENT
LOW⚡tests/cli_e2e.rs1686 // Step 3: Allow itCOMMENT
LOW⚡tests/cli_e2e.rs1690 // Step 4: Check list shows active entryCOMMENT
LOW⚡tests/cli_e2e.rs1837 // Step 2: Revoke the exception before it's usedCOMMENT
LOW⚡tests/cli_e2e.rs1846 // Step 3: Command should be blocked againCOMMENT
LOW⚡tests/cli_e2e.rs1856 // Step 1: Block and get codeCOMMENT
LOW⚡tests/cli_e2e.rs1861 // Step 2: Dry-run allowCOMMENT
LOW⚡tests/cli_e2e.rs1868 // Step 3: Command should still be blocked (dry-run doesn't write)COMMENT
LOWtests/cli_e2e.rs1318 // Step 1: Run blocked command in hook mode, verify it's denied with a codeCOMMENT
LOWtests/cli_e2e.rs1752 // Step 2: Try to allow without --force - should failCOMMENT
LOWtests/cli_e2e.rs1826 // Step 1: Block and allowCOMMENT
LOW⚡src/main.rs3127 // Step 1: pack_aware_quick_reject should NOT reject this commandCOMMENT
LOW⚡src/main.rs3133 // Step 2: Normalize commandCOMMENT
LOW⚡src/main.rs3136 // Step 3: Check against pack registry (should block)COMMENT
LOW⚡src/scan.rs4823 // Step 1: ExtractCOMMENT
LOW⚡src/scan.rs4830 // Step 2: EvaluateCOMMENT
Structural Annotation Overuse32 hits · 53 pts
SeverityFileLineSnippetContext
LOWtests/codex_hook_protocol.rs1529 // Step 1: Get a Claude deny with allow-once codeCOMMENT
LOWtests/codex_hook_protocol.rs1576 // Step 2: Redeem the allow-once code using `dcg allow-once <code> --yes`COMMENT
LOWtests/codex_hook_protocol.rs1600 // Step 3: Retry the same command — should now be allowedCOMMENT
LOW⚡tests/cli_e2e.rs1329 // Step 2: Use dcg allow-once <code> --yes to activate the exceptionCOMMENT
LOW⚡tests/cli_e2e.rs1338 // Step 3: Re-run the same command, should now be allowedCOMMENT
LOW⚡tests/cli_e2e.rs1342 // Step 4: the grant was single-use (the default since #378), so theCOMMENT
LOW⚡tests/cli_e2e.rs1616 // Step 1: Block and get codeCOMMENT
LOW⚡tests/cli_e2e.rs1621 // Step 2: Allow itCOMMENT
LOW⚡tests/cli_e2e.rs1625 // Step 3: Same command in same directory is allowedCOMMENT
LOW⚡tests/cli_e2e.rs1629 // Step 4: Create a different directory outside the original temp dirCOMMENT
LOW⚡tests/cli_e2e.rs1633 // Step 5: Same command in different directory is still blockedCOMMENT
LOW⚡tests/cli_e2e.rs1643 // Step 1: Block and get codeCOMMENT
LOW⚡tests/cli_e2e.rs1648 // Step 2: Allow it with --single-useCOMMENT
LOW⚡tests/cli_e2e.rs1657 // Step 3: First run is allowedCOMMENT
LOW⚡tests/cli_e2e.rs1661 // Step 4: Second run is blocked again (single-use consumed)COMMENT
LOW⚡tests/cli_e2e.rs1671 // Step 1: Block to create pending entryCOMMENT
LOW⚡tests/cli_e2e.rs1676 // Step 2: Check list shows pendingCOMMENT
LOW⚡tests/cli_e2e.rs1686 // Step 3: Allow itCOMMENT
LOW⚡tests/cli_e2e.rs1690 // Step 4: Check list shows active entryCOMMENT
LOW⚡tests/cli_e2e.rs1837 // Step 2: Revoke the exception before it's usedCOMMENT
LOW⚡tests/cli_e2e.rs1846 // Step 3: Command should be blocked againCOMMENT
LOW⚡tests/cli_e2e.rs1856 // Step 1: Block and get codeCOMMENT
LOW⚡tests/cli_e2e.rs1861 // Step 2: Dry-run allowCOMMENT
LOW⚡tests/cli_e2e.rs1868 // Step 3: Command should still be blocked (dry-run doesn't write)COMMENT
LOWtests/cli_e2e.rs1318 // Step 1: Run blocked command in hook mode, verify it's denied with a codeCOMMENT
LOWtests/cli_e2e.rs1752 // Step 2: Try to allow without --force - should failCOMMENT
LOWtests/cli_e2e.rs1826 // Step 1: Block and allowCOMMENT
LOW⚡src/main.rs3127 // Step 1: pack_aware_quick_reject should NOT reject this commandCOMMENT
LOW⚡src/main.rs3133 // Step 2: Normalize commandCOMMENT
LOW⚡src/main.rs3136 // Step 3: Check against pack registry (should block)COMMENT
LOW⚡src/scan.rs4823 // Step 1: ExtractCOMMENT
LOW⚡src/scan.rs4830 // Step 2: EvaluateCOMMENT
Modern AI Meta-Vocabulary13 hits · 37 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md516 # Containers and orchestrationCOMMENT
MEDIUMtests/codex_hook_protocol.rs398// Smoke tests — validate the scaffold helpers work before leaf tests dependCOMMENT
MEDIUMtests/repro_313_powershell_read_only_false_positives.rs9//! Windows/guardrails packs enabled as on a native Windows install, and withCOMMENT
MEDIUMtests/scripts/run_e2e_tests.sh5# This script orchestrates all E2E tests for the Destructive Command Guard.COMMENT
MEDIUMdocs/planning/DGC_IMPROVEMENT_PLAN__GPT.md443. [Design principles](#design-principles-guardrails-for-the-whole-project)CODE
MEDIUMdocs/planning/DGC_IMPROVEMENT_PLAN__GPT.md128## Design principles (guardrails for the whole project)COMMENT
MEDIUMdocs/planning/DGC_IMPROVEMENT_PLAN__GPT.md904### Cross-cutting: Performance + safety guardrails (limits, hardening, benchmarks)COMMENT
MEDIUMdocs/planning/DCG_IMPROVEMENT_PLAN__OPUS.md499. [Test Infrastructure & Performance Guardrails](#7-test-infrastructure--performance-guardrails)CODE
MEDIUMscripts/e2e_codex.sh5# This scaffold mirrors scripts/e2e_test.sh logging conventions, but drives theCOMMENT
MEDIUMsrc/packs/mod.rs2868 // `careful_company_running_windows.guardrails:stop-security-service`).COMMENT
MEDIUMsrc/packs/careful_company_running_windows/mod.rs24//! | [`guardrails`] | Turning off the safety net: AV/firewall/EDR, audit logs, and dcg itself |COMMENT
MEDIUMsrc/packs/careful_company_running_windows/mod.rs151 // blocked by `guardrails:dcg-policy-self-weakening`.COMMENT
MEDIUMsrc/packs/careful_company_running_windows/guardrails.rs4//! standing between a bad idea and a bad outcome: the guardrails. This sub-packCOMMENT
Redundant / Tautological Comments18 hits · 24 pts
SeverityFileLineSnippetContext
LOWuninstall.sh364 # Check if dcg is configuredCOMMENT
LOWuninstall.sh467 # Check if dcg is configuredCOMMENT
LOWuninstall.sh692 # Check if our settings existCOMMENT
LOWuninstall.sh708 # Check if file is now empty (just whitespace)COMMENT
LOWinstall.sh695# Check if a specific agent was detectedCOMMENT
LOWinstall.sh761# Check if installed version matches targetCOMMENT
LOWinstall.sh1228 # Check if the completions subcommand exists (added in v0.2.11+)COMMENT
LOWinstall.sh1690 # Check if existing lock is stale (process no longer running)COMMENT
LOWinstall.sh2026 # Check if the exact current dcg hook is already configured. A stale dcgCOMMENT
LOWinstall.sh2346 # Check if Gemini CLI appears to be installed (has config dir or gemini command exists)COMMENT
LOWinstall.sh2602 # Check if Aider is installed (command exists)COMMENT
LOWinstall.sh2619 # Check if git-commit-verify is already set to trueCOMMENT
LOWinstall.sh2626 # Check if git-commit-verify exists but is falseCOMMENT
LOWinstall.sh2687 # Check if Continue is installedCOMMENT
LOWinstall.sh2749 # Check if Codex is installedCOMMENT
LOWinstall.sh2773 # Check if the exact current dcg hook is already configured. A stale dcgCOMMENT
LOWtests/e2e/run_agent_e2e.sh141# Check if jq is availableCOMMENT
LOWtests/e2e/run_install_e2e.sh286 # Check if detection worksCOMMENT
Excessive Try-Catch Wrapping27 hits · 24 pts
SeverityFileLineSnippetContext
LOWinstall.sh3342 except Exception:CODE
LOWinstall.sh3350 except Exception:CODE
LOWinstall.sh3362 except Exception:CODE
LOWinstall.sh3398 except Exception as err:CODE
LOWinstall.sh3407 except Exception:CODE
LOWinstall.sh3451except Exception:CODE
LOWinstall.sh3507except Exception:CODE
LOWtests/install/test_helper.bash350except Exception:CODE
LOWtests/install/test_helper.bash462except Exception:CODE
LOWtests/install/test_helper.bash517except Exception:CODE
LOWscripts/audit_patterns.py19 except Exception as e:CODE
MEDIUMscripts/audit_patterns.py20 print(f"Error reading {filepath}: {e}")CODE
MEDIUMscripts/audit_patterns.py15def scan_file(filepath):CODE
LOWscripts/e2e_fleet_install.sh367except Exception:CODE
LOWscripts/perf_baseline.py138 except Exception:CODE
LOWscripts/perf_baseline.py424 except Exception as exc: # noqa: BLE001CODE
LOWscripts/perf_baseline.py479 except Exception:CODE
LOWscripts/perf_baseline.py499 except Exception:CODE
LOWscripts/perf_baseline.py835 except Exception as exc: # noqa: BLE001CODE
LOWscripts/perf_baseline.py1656 except Exception as exc: # noqa: BLE001CODE
LOWscripts/perf_baseline.py1704 except Exception as exc: # noqa: BLE001CODE
LOWscripts/perf_baseline.py1779 except Exception as exc: # noqa: BLE001CODE
LOWscripts/perf_baseline.py1868 except Exception as exc: # noqa: BLE001CODE
LOWscripts/perf_baseline.py1879 except Exception as exc: # noqa: BLE001CODE
LOWscripts/perf_baseline.py1886 except Exception as exc: # noqa: BLE001CODE
LOWscripts/perf_baseline.py2101 except Exception as exc: # noqa: BLE001CODE
LOWscripts/perf_baseline.py2116 except Exception as certificate_exc: # noqa: BLE001CODE
Example Usage Blocks16 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/e2e/run_tui_e2e.sh12# Usage:COMMENT
LOWtests/e2e/run_agent_e2e.sh8# Usage:COMMENT
LOWtests/e2e/run_install_e2e.sh11# Usage:COMMENT
LOWtests/e2e/robot_mode_test.sh11# Usage:COMMENT
LOWtests/e2e/test_doctor_install_uninstall.sh9# Usage:COMMENT
LOWtests/e2e/run_history_e2e.sh7# Usage:COMMENT
LOWtests/e2e/run_update_e2e.sh11# Usage:COMMENT
LOWscripts/check_benchmark_budgets.sh8# Usage:COMMENT
LOWscripts/scan_gitdiff_e2e.sh11# Usage:COMMENT
LOWscripts/e2e_fleet_install.sh22# Usage:COMMENT
LOWscripts/e2e_test.sh8# Usage:COMMENT
LOWscripts/scan_precommit_e2e.sh11# Usage:COMMENT
LOWscripts/test-quick.sh5# Usage:COMMENT
LOWscripts/coverage.sh5# Usage:COMMENT
LOW⚡scripts/e2e_harness_matrix.sh17# Usage:COMMENT
LOWscripts/templates/test_pack.sh8# Usage:COMMENT
Hyper-Verbose Identifiers21 hits · 22 pts
SeverityFileLineSnippetContext
LOWuninstall.sh608def strip_dcg_platform_fields(entry):CODE
LOWinstall.sh3124def strip_dcg_platform_fields(entry):CODE
LOWscripts/check_cli_versions.sh118def github_repo_from_releases_url(url)CODE
LOWscripts/test_check_scanner_safety.py41 def test_checked_in_vendor_always_gets_domain_and_fatal_sanitizer_checks(self):CODE
LOW⚡scripts/test_check_scanner_safety.py53 def test_domain_violation_cannot_be_masked_by_later_native_passes(self):CODE
LOW⚡scripts/test_check_scanner_safety.py59 def test_sanitizer_failure_is_not_swallowed(self):CODE
LOW⚡scripts/test_check_scanner_safety.py64 def test_real_undefined_behavior_fails_even_with_inherited_recovery_options(self):CODE
LOWscripts/test_check_scanner_safety.py86 def test_safe_native_control_still_passes(self):CODE
LOWscripts/test_check_scanner_safety.py92 def test_repeat_retains_failure_after_subsequent_successes(self):CODE
LOWscripts/test_check_scanner_safety.py110 def test_repeat_retains_timeouts_as_failures(self):CODE
LOWscripts/perf_baseline.py363def create_toolchain_probe_environment(CODE
LOWscripts/perf_baseline.py503def extract_embedded_git_describe(version_output: str) -> Optional[str]:CODE
LOWscripts/perf_baseline.py529def extract_embedded_rustc_toolchain(version_output: str) -> Dict[str, Optional[str]]:CODE
LOWscripts/perf_baseline.py550def invalid_rustc_identity_fields(identity: Dict[str, Any]) -> Dict[str, str]:CODE
LOWscripts/perf_baseline.py578def classify_toolchain_binding(CODE
LOWscripts/perf_baseline.py702def capture_build_input_manifest(repo_root: str) -> Dict[str, Any]:CODE
LOWscripts/perf_baseline.py924def create_isolated_environment() -> Tuple[Dict[str, str], Dict[str, Any]]:CODE
LOWscripts/perf_baseline.py1057def max_allowed_tail_exceedances(sample_count: int) -> int:CODE
LOW.github/workflows/ci.yml1206 def reject_non_finite_json_constant(value):CODE
LOW.github/workflows/ci.yml1221 def finite_nonnegative_number(value, label):CODE
LOWsrc/perf.rs557 .split("def classify_toolchain_binding(")CODE
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippetContext
HIGHdocs/planning/DCG_IMPROVEMENT_PLAN__OPUS.md2031*Document generated by Claude Opus 4.5 on 2026-01-08 (Enhanced Hybrid Version)*COMMENT
HIGHdocs/planning/AGENT_FRIENDLINESS_REPORT.md205*Generated by Claude Opus 4.5 during bd-dpr execution*COMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHscripts/perf_baseline.py913 "git init -q . 2>/dev/null; git config user.email t@t.t\n"CODE
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHscripts/perf_baseline.py407except OSError:CODE
Deep Nesting6 hits · 4 pts
SeverityFileLineSnippetContext
LOWscripts/check_scanner_safety.py81CODE
LOWscripts/audit_patterns.py42CODE
LOWscripts/perf_baseline.py108CODE
LOWscripts/perf_baseline.py529CODE
LOWscripts/perf_baseline.py578CODE
LOWscripts/perf_baseline.py632CODE
Unused Imports3 hits · 2 pts
SeverityFileLineSnippetContext
LOWscripts/check_scanner_safety.py11CODE
LOWscripts/test_check_scanner_safety.py8CODE
LOWscripts/perf_baseline.py11CODE