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.
npx agentmods add skills/byamb4/find-cve-agent/code-injection-codegennpx skills add ByamB4/find-cve-agent --skill code-injection-codegengit clone --depth 1 https://github.com/ByamB4/find-cve-agentWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00032 | $0.01239 |
| Opus 5 | $0.00016 | $0.00620 |
| Sonnet 5 | $0.00006 | $0.00248 |
| Haiku 4.5 | $0.00003 | $0.00124 |
Grade A, and why
code-injection-codegen 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 2d ago.
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.
// Exploit: schema.type = '"; }); process.mainModule.require("child_process").execSync("id"); //' How it starts
The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Injection via Code Generation
When to Use
Audit any package that dynamically generates or evaluates code — schema validators, template engines, expression evaluators, serializers with code generation, JIT compilers, query builders that emit JavaScript.
This is the highest-yield vulnerability class for CVE hunting. ~90% acceptance rate when confirmed.
Key Insight
Code generation packages often interpolate user-controlled values directly into generated code strings. Unlike template injection (where user input goes INTO a template), here user input becomes PART of the generated code itself.
Process
Step 1: Find Code Evaluation Sinks
Search for all dynamic code execution:
# JavaScript/TypeScript
grep -rn "new Function\(" .
grep -rn "eval(" .
grep -rn "vm\.run" .
grep -rn "vm\.compileFunction" .
grep -rn "setTimeout(" . | grep -v "setTimeout(function"
grep -rn "setInterval(" . | grep -v "setInterval(function"
grep -rn "new AsyncFunction" .
grep -rn "script\.runIn" .
# Python
grep -rn "eval(" .
grep -rn "exec(" .
grep -rn "compile(" . | grep -v "re.compile"
# Ruby
grep -rn "\.eval\b" .
grep -rn "instance_eval" .
grep -rn "class_eval" .
# PHP
grep -rn "eval(" .
grep -rn "assert(" .
grep -rn "create_function" .
grep -rn "preg_replace.*\/e" .
Step 2: Trace Data Flow to Sink
For each sink found:
- Identify what string is being evaluated
- Trace backwards — is any part of that string derived from user input?
- Check for template literals:
new Function(`return ${userInput}`) - Check for string concatenation:
new Function("return " + userInput) - Check for variable interpolation in generated code
Step 3: Check for Block Comment Escape
JSON.stringify does NOT escape */. If generated code wraps values in block comments:
// VULNERABLE PATTERN:
let code = `/* ${JSON.stringify(userValue)} */ actual_code_here`;
// Attacker input: */ malicious_code /*
// Result: /* */ malicious_code /* */ actual_code_here
Search for this pattern:
grep -rn "\/\*.*JSON\.stringify" .
grep -rn "\/\*.*\$\{" .
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago First seen · 166 lines · 32 tokens per session scan A 76209f7d4635
code-injection-codegen is a skill published in the GitHub repository ByamB4/find-cve-agent (46 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 1,239 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-30.
Other skills, from other repositories
wordpress-plugin-hunt
Hunt WP plugins via REST, exploit CVEs when version known.
deep-invade
Deep pentest WP: SSRF, plugin CVE, JS mine, port scan chain.
zimbra-attack
Zimbra SOAP user enum, CVE-2022-37042, SSRF when webmail.
bug-bounty-hunting
Hunt vulnerabilities like an expert, not a linear software engineer: come at a target from the overlooked angle, reason by analogy and transfer proven attack mechanisms, attack the hidden assumptions and the seams between systems, drill to the mechanism, then keep it honest with proof and persistence (acceptance !=…
bugcrowd-reporting
Bugcrowd-specific reporting tactics complementing report-writing: VRT category search-and-fallback strategy when no exact match exists, manual severity override when VRT defaults underrate impact, severity-request paragraph as first body section, OOS-clause rebuttal templates (rate limiting on auth-flow endpoints…
apk-redteam-pipeline
End-to-end Android APK red-team pipeline — automated APK acquisition (Play Store + apkpure + apkmirror fallback), jadx decompilation, secret/URL/JWT/Firebase grep, pinned-cert extraction, exported-component enumeration, Frida runtime instrumentation templates, intent-injection probes. Built from an authorized external…