SuperAPIAI Directory

crashdummy

github.com · AI security

crashdummy is an open-source tool for red-teaming the guard hooks of AI coding agents. It feeds evasion-crafted destructive shell commands (bash, PowerShell, cmd) and their harmless counterparts into a guard hook, then reports whether the guard rules successfully blocked them (CAUGHT), missed them (MISSED), or raised a false alarm (FALSE ALARM). All test cases are passed only as JSON data and are never actually executed. The tool runs on Python 3.9+ and the standard library, and can be used to test the PreToolUse hooks, command allowlists, or denylists of autonomous coding agents such as Claude Code and Codex CLI.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

crashdummy is a testing tool for the security defenses of AI coding agents, primarily used to red-team the guard hooks, command allowlists, or denylists that protect autonomous coding agents. It is suitable for Claude Code, Codex CLI, and other autonomous coding agents.

Purpose crashdummy feeds evasion-crafted destructive shell commands (covering bash, PowerShell, cmd) into a guard hook, along with harmless twins of those commands, and then reports three categories of results based on the hook's responses: CAUGHT (successfully blocked), MISSED (not detected), and FALSE ALARM. All test cases are passed only as JSON data and are never actually executed.

Key capabilities

  • Provides a corpus of synthetic command payloads containing evasive destructive commands and their harmless twins.
  • Separately computes recall (the proportion of should-block cases that were CAUGHT), strict catch (using all should-block cases), false alarm rate (using eligible harmless twin cases), and fail-open rate (the proportion of HOOK ERROR among all should-block cases).
  • Canaries are reported separately and are not counted in any rate.
  • Supports optional threshold parameters --min-catch, --max-false-alarm, --max-fail-open.
  • Provides JSON output including preflight probe results.
  • Ships with three calibration baseline examples: a naive regex guard that only blocks the literal rm -rf (naive_regex), allow-all, and block-all. The block-all baseline will block the harmless preflight probe and print a warning, but the corpus run will still continue.
  • Third-party hooks run only after explicit opt-in, and duplicate raw results are saved; displays include a pinned SHA and hook reference date, and tools are never automatically fetched or installed.

Usage

  • Runtime environment: Python 3.9+, with only the standard library required at runtime.
  • Default parameters: --timeout 5 seconds, --jobs 4. The documentation notes that 5 seconds is far shorter than Claude Code's default command hook timeout and recommends increasing it according to the actual hook configuration.
  • On Windows, use powershell -NoProfile -ExecutionPolicy Bypass -File examples/my_guard.ps1.
  • Payload field consistency can be checked against the installed CLI via the opt-in capture --dry and capture --yes flows; --yes consumes one short-prompt quota unit.

Use cases

  • Security teams or developers evaluating the interception capability and false-positive behavior of self-developed or third-party AI coding agent guard hooks.
  • Comparing the performance of different guard rules (such as regex, allowlists, blocklists) under evasive commands.
  • Reproducing and verifying GuardFall-type shell injection bypass issues.

Limitations and caveats

  • crashdummy is a testing tool, not a guard tool, and does not constitute a security guarantee.
  • It is not a sandbox: the hook's own code can still access any resource it chooses to access.
  • Payload replay cannot prove which command the agent would actually choose, and hook results do not describe filesystem- or network-level controls.
  • Ratio results depend on the operating system; Windows-only rows are skipped on other platforms.
  • The repository does not include third-party results; the results panel rejects registrations whose hook_command is still marked as "pending".
  • The author may release their own guard tools, but these tools will not appear in the main leaderboard; anyone can reproduce all numbers using the included corpus.
  • The project uses the MIT license.
  • Roadmap: v0.2 targets completion checks for Stop hooks; v0.3 targets validated Codex and Gemini payloads; restore integrity is handled by the independent project putback.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools