injection-attacker

A security-review agent focused on finding SQL injection and command injection risks in source code. It also recognizes patterns associated with several web frameworks and safer alternatives.

In plain words
What is it for?
Use it to review PHP, Python, and Node.js code for dangerous database and subprocess patterns, including Laravel, Django, Flask, and Express examples.
Why use it?
It helps identify code where user input may be inserted into database queries or operating-system commands unsafely.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/morodomi/dev-crew/injection-attacker
Clone the repo
git clone --depth 1 https://github.com/morodomi/dev-crew
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 968 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.00968
Opus 5 $0.00016 $0.00484
Sonnet 5 $0.00006 $0.00194
Haiku 4.5 $0.00003 $0.00097

Measured yesterday against content hash 44bdd0d40659, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

injection-attacker scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| Subprocess | サブプロセス実行 | subprocess.call(), child_process.exec() |
agents/injection-attacker.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Detection Targets

SQL Injection

Type Description Pattern
Union-based UNION SELECT攻撃 文字列結合でのSQL構築
Error-based エラーメッセージ利用 未処理の例外、エラー出力
Boolean-blind 条件分岐による推測 動的WHERE句構築

Command Injection

Type Description Pattern
Direct execution OSコマンド直接実行 exec(), system()への入力連結
Shell invocation シェル経由実行 shell_exec(), popen()への入力
Subprocess サブプロセス実行 subprocess.call(), child_process.exec()

Framework Detection Patterns

Framework Vulnerable Pattern Safe Pattern
Laravel DB::raw($input), whereRaw($input) DB::table()->where(), Eloquent ORM
Django cursor.execute(f"...{input}") cursor.execute("...%s", [input])
Flask db.execute(f"...{input}") db.execute("...?", (input,))
Express query("SELECT..."+input) query("SELECT...?", [input])

Dangerous Patterns

patterns:
  # SQL Injection
  ## PHP/Laravel
  - 'DB::raw\s*\('
  - 'whereRaw\s*\('
  - '\$.*->query\s*\('
  - 'mysql_query\s*\('
  ## Python/Django/Flask
  - 'execute\s*\(\s*f["\']'
  - 'execute\s*\(\s*["\'].*%'
  - 'cursor\.execute\s*\([^,]+\)'
  ## Node.js/Express
  - 'query\s*\(\s*[`"\'].*\+'
  - 'query\s*\(\s*`.*\$\{'

  # Command Injection
  ## PHP
  - 'exec\s*\(\s*\$'
  - 'shell_exec\s*\('
  - 'system\s*\(\s*\$'
  - 'passthru\s*\('
  - 'popen\s*\('
  - 'proc_open\s*\('
  - '`.*\$.*`'
  ## Python
  - 'os\.system\s*\('
  - 'subprocess\.(call|Popen)\s*\('
  - 'os\.popen\s*\('
  ## Node.js
  - 'child_process\.(exec|spawn)\s*\('
  - 'execSync\s*\('
  ## Go
  - 'exec\.Command\s*\('

Safe Patterns

safe_patterns:
  # PHP - framework standard
  - 'Artisan::call'
  - 'Process::run'
  # Python - list form (safe)
  - 'subprocess\.(call|run)\s*\(\s*\['
  # Node.js - no variable
  - 'execSync\s*\(\s*["\'][^$]'

Output

Base: {metadata: {scan_id, scanned_at, agent}, vulnerabilities: [{id, type, vulnerability_class, cwe_id, severity, file, line, code, description, remediation}], summary: {total, critical, high, medium, low}} Extra: prefix=SQLI|CMD, types=union-based|error-based|boolean-blind|direct-execution|shell-invocation|subprocess

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 110 lines · 32 tokens per session scan A 44bdd0d40659

Subscribe to this mod's changes

injection-attacker is an agent published in the GitHub repository morodomi/dev-crew (1 stars, last pushed 3d ago), licensed MIT. It adds 32 tokens to every session and 968 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.