Repository Analysis

Dicklesworthstone/destructive_command_guard

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

7.1 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of Dicklesworthstone/destructive_command_guard, a Rust project with 5,861 GitHub stars. SynthScan v2.0 examined 317,002 lines of code across 504 source files, recording 1289 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 7.1 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

7.1
Adjusted Score
7.1
Raw Score
100%
Time Factor
2026-08-28
Last Push
5.9K
Stars
Rust
Language
317.0K
Lines of Code
504
Files
1.3K
Pattern Hits
2026-08-29
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 3MEDIUM 446LOW 840

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1289 distinct pattern matches across 15 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators394 hits · 1244 pts
SeverityFileLineSnippetContext
MEDIUMinstall.sh226# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh228# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh1725# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh1727# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh1811# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh1813# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4074# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4076# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4159# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4161# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4198# ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMinstall.sh4200# ═══════════════════════════════════════════════════════════════════════════════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
334 more matches not shown…
Over-Commented Block668 hits · 568 pts
SeverityFileLineSnippetContext
LOWuninstall.sh1#!/usr/bin/env bashCOMMENT
LOWinstall.sh1#!/usr/bin/env bashCOMMENT
LOWinstall.sh81if ( : </dev/tty >/dev/tty ) 2>/dev/null; thenCOMMENT
LOWinstall.sh281 elif command -v gtimeout >/dev/null 2>&1; thenCOMMENT
LOWinstall.sh2521 AUTO_CONFIGURED=1COMMENT
LOWinstall.sh2561 # Codex CLI (https://github.com/openai/codex) is OpenAI's coding assistant.COMMENT
LOWinstall.sh2581 # (codex-rs/hooks/src/schema.rs documents it as "Codex extension"; ClaudeCOMMENT
LOWinstall.sh3361 # block decision lives in the JSON payload (`{"decision":"block",...}`),COMMENT
LOWinstall.sh3621}COMMENT
LOWinstall.sh3641 # matcher copied from the Claude entry would never fire. Listing bothCOMMENT
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.rs201 )COMMENT
LOWtests/codex_hook_protocol.rs441 );COMMENT
LOWtests/codex_hook_protocol.rs1001 "Claude bypass must produce no stdout\n{outcome}"COMMENT
LOWtests/codex_hook_protocol.rs1621 assert!(claude.is_allow_shape(), "Claude allow shape\n{claude}");COMMENT
LOWtests/codex_hook_protocol.rs2001// KNOWN BEHAVIOR: `DCG_DISABLE=core.git` does NOT disable core.git withCOMMENT
LOWtests/codex_hook_protocol.rs2121COMMENT
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/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_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_290_oversized_hook_input.rs1//! Repro for issue #290: an oversized hook payload must not fail open blind.COMMENT
LOWtests/config_schema_drift.rs1//! Drift check for the committed `config.schema.json`.COMMENT
LOWtests/repro_327_dead_override_keys.rs1//! Regression tests for issue #327: `overrides.allowlist` andCOMMENT
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_dotnet_directory_delete.rs1//! Regression tests for issue #222: `windows.filesystem` must block the .NETCOMMENT
LOWtests/agent_hook_output.rs461 );COMMENT
LOWtests/golden_isomorphism.rs1//! Golden isomorphism tests for the evaluator.COMMENT
LOWtests/robot_mode.rs1//! Tests for robot mode (`--robot` flag and `DCG_ROBOT` env var).COMMENT
LOWtests/repro_heredoc_pipeline_producer_bypass.rs1//! Regression tests for a heredoc-producer pipeline bypass found whileCOMMENT
LOWtests/repro_heredoc_pipeline_producer_bypass.rs181 // `cat <<EOF >log … EOF | bash` sends the heredoc body to `log`, so theCOMMENT
LOWtests/repro_329_heredoc_prose_data_sink.rs1//! Regression tests for issue #329: prose about destructive commands writtenCOMMENT
LOWtests/cli_e2e.rs1#![allow(clippy::needless_raw_string_hashes)]COMMENT
LOWtests/cli_e2e.rs3761 /// dcg resolves its working directory with `std::env::current_dir()` onCOMMENT
LOWtests/stdin_batch_mode.rs1//! End-to-end tests for stdin batch mode (`dcg hook --batch`).COMMENT
LOWtests/suggestion_scoring.rs1//! Comprehensive tests for Command Rewriting Suggestions scoring and analysis.COMMENT
LOWtests/repro_252_vscode_agent_host.rs1//! Regression tests for issue #252: the VS Code "Agent Host" batchedCOMMENT
LOWtests/repro_256_launcher_assignment_fp.rs1//! Regression tests for issue #256: leading `NAME=value` assignment prefixesCOMMENT
LOWtests/security_regressions_v2.rs1//! Regression tests for security bypasses fixed in Jan 2025.COMMENT
LOWtests/repro_255_utf8_escape_panic.rs1//! Regression tests for issue #255: escape-sequence scanning panicked onCOMMENT
LOWtests/regression_corpus.rs1//! Regression corpus test harness with full isomorphism verification.COMMENT
LOWtests/regression_corpus.rs21//! command = "git reset --hard"COMMENT
LOWtests/regression_corpus.rs41//! - `rule_id` (pack:pattern format)COMMENT
LOWtests/config_toggles_e2e.rs1#![allow(COMMENT
LOWtests/memory_tests.rs1//! Memory leak detection tests for DCGCOMMENT
LOWtests/memory_tests.rs101 }COMMENT
LOWtests/suggestion_self_consistency.rs1//! Registry-wide suggestion self-consistency (#316).COMMENT
LOWtests/agent_profile_comprehensive.rs1//! Comprehensive testing for Agent-Specific Profiles (Epic 9).COMMENT
LOWtests/repro_294_unknown_dialect_pack_fanout.rs1//! Regression tests for issue #294: under `ShellDialect::Unknown` the regexCOMMENT
608 more matches not shown…
Verbosity Indicators45 hits · 74 pts
SeverityFileLineSnippetContext
LOWtests/codex_hook_protocol.rs1452 // Step 1: Get a Claude deny with allow-once codeCOMMENT
LOWtests/codex_hook_protocol.rs1499 // Step 2: Redeem the allow-once code using `dcg allow-once <code> --yes`COMMENT
LOWtests/codex_hook_protocol.rs1523 // Step 3: Retry the same command — should now be allowedCOMMENT
LOWtests/codex_hook_protocol.rs2225 // Step 1: Codex deny — creates pending exception in hermetic HOMECOMMENT
LOWtests/codex_hook_protocol.rs2265 // Step 2: Redeem the allow-once codeCOMMENT
LOWtests/codex_hook_protocol.rs2292 // Step 3: Retry under Codex — must now be allowed (exit 0)COMMENT
LOWtests/cli_e2e.rs1189 // Step 2: Use dcg allow-once <code> --yes to activate the exceptionCOMMENT
LOWtests/cli_e2e.rs1198 // Step 3: Re-run the same command, should now be allowedCOMMENT
LOWtests/cli_e2e.rs1202 // Step 4: Run it again to verify reusable (not single-use)COMMENT
LOWtests/cli_e2e.rs1287 // Step 1: Block and get codeCOMMENT
LOWtests/cli_e2e.rs1292 // Step 2: Allow itCOMMENT
LOWtests/cli_e2e.rs1296 // Step 3: Same command in same directory is allowedCOMMENT
LOWtests/cli_e2e.rs1300 // Step 4: Create a different directory outside the original temp dirCOMMENT
LOWtests/cli_e2e.rs1304 // Step 5: Same command in different directory is still blockedCOMMENT
LOWtests/cli_e2e.rs1314 // Step 1: Block and get codeCOMMENT
LOWtests/cli_e2e.rs1319 // Step 2: Allow it with --single-useCOMMENT
LOWtests/cli_e2e.rs1328 // Step 3: First run is allowedCOMMENT
LOWtests/cli_e2e.rs1332 // Step 4: Second run is blocked again (single-use consumed)COMMENT
LOWtests/cli_e2e.rs1342 // Step 1: Block to create pending entryCOMMENT
LOWtests/cli_e2e.rs1347 // Step 2: Check list shows pendingCOMMENT
LOWtests/cli_e2e.rs1357 // Step 3: Allow itCOMMENT
LOWtests/cli_e2e.rs1361 // Step 4: Check list shows active entryCOMMENT
LOWtests/cli_e2e.rs1508 // Step 2: Revoke the exception before it's usedCOMMENT
LOWtests/cli_e2e.rs1517 // Step 3: Command should be blocked againCOMMENT
LOWtests/cli_e2e.rs1527 // Step 1: Block and get codeCOMMENT
LOWtests/cli_e2e.rs1532 // Step 2: Dry-run allowCOMMENT
LOWtests/cli_e2e.rs1539 // Step 3: Command should still be blocked (dry-run doesn't write)COMMENT
LOWtests/cli_e2e.rs1178 // Step 1: Run blocked command in hook mode, verify it's denied with a codeCOMMENT
LOWtests/cli_e2e.rs1423 // Step 2: Try to allow without --force - should failCOMMENT
LOWtests/cli_e2e.rs1497 // Step 1: Block and allowCOMMENT
LOWsrc/main.rs2457 // Step 1: pack_aware_quick_reject should NOT reject this commandCOMMENT
LOWsrc/main.rs2463 // Step 2: Normalize commandCOMMENT
LOWsrc/main.rs2466 // Step 3: Check against pack registry (should block)COMMENT
LOWsrc/scan.rs4812 // Step 1: ExtractCOMMENT
LOWsrc/scan.rs4819 // Step 2: EvaluateCOMMENT
LOWsrc/cli.rs3804 // Step 7: Check for empty packCOMMENT
LOWsrc/cli.rs3814 // Step 8: Check for duplicate pattern namesCOMMENT
LOWsrc/cli.rs3717 // Step 1: Check if file existsCOMMENT
LOWsrc/cli.rs3728 // Step 2: Read file contentCOMMENT
LOWsrc/cli.rs3742 // Step 3: Parse YAMLCOMMENT
LOWsrc/cli.rs3761 // Step 4: Validate schema versionCOMMENT
LOWsrc/cli.rs3776 // Step 5: Validate ID formatCOMMENT
LOWsrc/cli.rs3790 // Step 6: Validate version format (semver)COMMENT
LOWsrc/cli.rs3837 // Step 9: Validate regex patternsCOMMENT
LOWsrc/cli.rs3859 // Step 10: Check for collision with built-in packsCOMMENT
Structural Annotation Overuse45 hits · 74 pts
SeverityFileLineSnippetContext
LOWtests/codex_hook_protocol.rs1452 // Step 1: Get a Claude deny with allow-once codeCOMMENT
LOWtests/codex_hook_protocol.rs1499 // Step 2: Redeem the allow-once code using `dcg allow-once <code> --yes`COMMENT
LOWtests/codex_hook_protocol.rs1523 // Step 3: Retry the same command — should now be allowedCOMMENT
LOWtests/codex_hook_protocol.rs2225 // Step 1: Codex deny — creates pending exception in hermetic HOMECOMMENT
LOWtests/codex_hook_protocol.rs2265 // Step 2: Redeem the allow-once codeCOMMENT
LOWtests/codex_hook_protocol.rs2292 // Step 3: Retry under Codex — must now be allowed (exit 0)COMMENT
LOWtests/cli_e2e.rs1189 // Step 2: Use dcg allow-once <code> --yes to activate the exceptionCOMMENT
LOWtests/cli_e2e.rs1198 // Step 3: Re-run the same command, should now be allowedCOMMENT
LOWtests/cli_e2e.rs1202 // Step 4: Run it again to verify reusable (not single-use)COMMENT
LOWtests/cli_e2e.rs1287 // Step 1: Block and get codeCOMMENT
LOWtests/cli_e2e.rs1292 // Step 2: Allow itCOMMENT
LOWtests/cli_e2e.rs1296 // Step 3: Same command in same directory is allowedCOMMENT
LOWtests/cli_e2e.rs1300 // Step 4: Create a different directory outside the original temp dirCOMMENT
LOWtests/cli_e2e.rs1304 // Step 5: Same command in different directory is still blockedCOMMENT
LOWtests/cli_e2e.rs1314 // Step 1: Block and get codeCOMMENT
LOWtests/cli_e2e.rs1319 // Step 2: Allow it with --single-useCOMMENT
LOWtests/cli_e2e.rs1328 // Step 3: First run is allowedCOMMENT
LOWtests/cli_e2e.rs1332 // Step 4: Second run is blocked again (single-use consumed)COMMENT
LOWtests/cli_e2e.rs1342 // Step 1: Block to create pending entryCOMMENT
LOWtests/cli_e2e.rs1347 // Step 2: Check list shows pendingCOMMENT
LOWtests/cli_e2e.rs1357 // Step 3: Allow itCOMMENT
LOWtests/cli_e2e.rs1361 // Step 4: Check list shows active entryCOMMENT
LOWtests/cli_e2e.rs1508 // Step 2: Revoke the exception before it's usedCOMMENT
LOWtests/cli_e2e.rs1517 // Step 3: Command should be blocked againCOMMENT
LOWtests/cli_e2e.rs1527 // Step 1: Block and get codeCOMMENT
LOWtests/cli_e2e.rs1532 // Step 2: Dry-run allowCOMMENT
LOWtests/cli_e2e.rs1539 // Step 3: Command should still be blocked (dry-run doesn't write)COMMENT
LOWtests/cli_e2e.rs1178 // Step 1: Run blocked command in hook mode, verify it's denied with a codeCOMMENT
LOWtests/cli_e2e.rs1423 // Step 2: Try to allow without --force - should failCOMMENT
LOWtests/cli_e2e.rs1497 // Step 1: Block and allowCOMMENT
LOWsrc/main.rs2457 // Step 1: pack_aware_quick_reject should NOT reject this commandCOMMENT
LOWsrc/main.rs2463 // Step 2: Normalize commandCOMMENT
LOWsrc/main.rs2466 // Step 3: Check against pack registry (should block)COMMENT
LOWsrc/scan.rs4812 // Step 1: ExtractCOMMENT
LOWsrc/scan.rs4819 // Step 2: EvaluateCOMMENT
LOWsrc/cli.rs3804 // Step 7: Check for empty packCOMMENT
LOWsrc/cli.rs3814 // Step 8: Check for duplicate pattern namesCOMMENT
LOWsrc/cli.rs3717 // Step 1: Check if file existsCOMMENT
LOWsrc/cli.rs3728 // Step 2: Read file contentCOMMENT
LOWsrc/cli.rs3742 // Step 3: Parse YAMLCOMMENT
LOWsrc/cli.rs3761 // Step 4: Validate schema versionCOMMENT
LOWsrc/cli.rs3776 // Step 5: Validate ID formatCOMMENT
LOWsrc/cli.rs3790 // Step 6: Validate version format (semver)COMMENT
LOWsrc/cli.rs3837 // Step 9: Validate regex patternsCOMMENT
LOWsrc/cli.rs3859 // Step 10: Check for collision with built-in packsCOMMENT
AI Slop Vocabulary20 hits · 70 pts
SeverityFileLineSnippetContext
MEDIUMtests/install/test_helper.bash152 # 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.rs590# 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.sh339 # 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
MEDIUMscripts/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
MEDIUMscripts/e2e_harness_matrix.sh7# dcg's value is entirely in what a *harness* does with its output. A changeCOMMENT
MEDIUMscripts/e2e_harness_matrix.sh9# the exit code, or the stream a harness reads changes. The unit tests callCOMMENT
MEDIUMscripts/e2e_harness_matrix.sh11# payload each harness actually sends and asserts on the exact bytes it emits.COMMENT
MEDIUMscripts/e2e_harness_matrix.sh13# Every case is triple-asserted: the decision field the harness parses, theCOMMENT
MEDIUMscripts/e2e_harness_matrix.sh128# assert_case <harness> <case> <payload> <expect: deny|allow>COMMENT
MEDIUMscripts/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.yml1401 # samples also support the harness's 95/95 one-sided binomial toleranceCOMMENT
MEDIUMsrc/heredoc.rs817 // Use robust wrapper stripping to handle env flags (e.g. -u, -C) correctly.COMMENT
MEDIUMsrc/main.rs815/// (#331): the harness-reported `cwd` when present (else the hook processCOMMENT
MEDIUMsrc/packs/platform/github.rs57 // 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.bash522# 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
MEDIUMscripts/scan_gitdiff_e2e.sh288 # Create a safe script firstCOMMENT
MEDIUMscripts/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
MEDIUMscripts/scan_precommit_e2e.sh202 # Create a shell script with a destructive commandCOMMENT
MEDIUMscripts/scan_precommit_e2e.sh289 # Create a markdown file that mentions dangerous commands but doesn't execute themCOMMENT
MEDIUMscripts/scan_precommit_e2e.sh358 # Create a safe shell scriptCOMMENT
MEDIUMscripts/scan_precommit_e2e.sh366 # Create a dangerous DockerfileCOMMENT
MEDIUMscripts/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
Modern AI Meta-Vocabulary13 hits · 37 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md476 # Containers and orchestrationCOMMENT
MEDIUMtests/codex_hook_protocol.rs378// 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.rs2386 // `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
Excessive Try-Catch Wrapping27 hits · 26 pts
SeverityFileLineSnippetContext
MEDIUMinstall.sh3154def main():CODE
LOWinstall.sh3157 except Exception:CODE
LOWinstall.sh3166 except Exception:CODE
LOWinstall.sh3187 except Exception:CODE
LOWinstall.sh3198 except Exception:CODE
LOWinstall.sh3236except Exception:CODE
LOWinstall.sh3292except Exception:CODE
LOWtests/install/test_helper.bash338except Exception:CODE
LOWtests/install/test_helper.bash450except Exception:CODE
LOWtests/install/test_helper.bash505except 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
Redundant / Tautological Comments19 hits · 24 pts
SeverityFileLineSnippetContext
LOWuninstall.sh349 # Check if dcg is configuredCOMMENT
LOWuninstall.sh452 # Check if dcg is configuredCOMMENT
LOWuninstall.sh677 # Check if our settings existCOMMENT
LOWuninstall.sh693 # Check if file is now empty (just whitespace)COMMENT
LOWinstall.sh616# Check if a specific agent was detectedCOMMENT
LOWinstall.sh682# Check if installed version matches targetCOMMENT
LOWinstall.sh1136 # Check if the completions subcommand exists (added in v0.2.11+)COMMENT
LOWinstall.sh1551# Check if already at target version (skip download if so, unless --force)COMMENT
LOWinstall.sh1567 # Check if existing lock is stale (process no longer running)COMMENT
LOWinstall.sh1876 # Check if the exact current dcg hook is already configured. A stale dcgCOMMENT
LOWinstall.sh2197 # Check if Gemini CLI appears to be installed (has config dir or gemini command exists)COMMENT
LOWinstall.sh2453 # Check if Aider is installed (command exists)COMMENT
LOWinstall.sh2470 # Check if git-commit-verify is already set to trueCOMMENT
LOWinstall.sh2477 # Check if git-commit-verify exists but is falseCOMMENT
LOWinstall.sh2538 # Check if Continue is installedCOMMENT
LOWinstall.sh2600 # Check if Codex is installedCOMMENT
LOWinstall.sh2624 # 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.sh284 # Check if detection worksCOMMENT
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
LOWscripts/e2e_harness_matrix.sh17# Usage:COMMENT
LOWscripts/templates/test_pack.sh8# Usage:COMMENT
Hyper-Verbose Identifiers17 hits · 15 pts
SeverityFileLineSnippetContext
LOWuninstall.sh593def strip_dcg_platform_fields(entry):CODE
LOWinstall.sh2975def strip_dcg_platform_fields(entry):CODE
LOWscripts/check_cli_versions.sh118def github_repo_from_releases_url(url)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.yml1209 def reject_non_finite_json_constant(value):CODE
LOW.github/workflows/ci.yml1224 def finite_nonnegative_number(value, label):CODE
LOWsrc/perf.rs557 .split("def classify_toolchain_binding(")CODE
LOWsrc/cli.rs13303export function childOutcomeFromTermination(CODE
LOWsrc/cli.rs13329function describeChildCollectionFailure(reason: unknown): string {{CODE
LOWsrc/cli.rs20865 assert!(source.contains("export function childOutcomeFromTermination("));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
Deep Nesting5 hits · 3 pts
SeverityFileLineSnippetContext
LOWscripts/audit_patterns.py42CODE
LOWscripts/perf_baseline.py108CODE
LOWscripts/perf_baseline.py529CODE
LOWscripts/perf_baseline.py578CODE
LOWscripts/perf_baseline.py632CODE
Unused Imports1 hit · 0 pts
SeverityFileLineSnippetContext
LOWscripts/perf_baseline.py11CODE