injection
SQL/NoSQL/command/template/LDAP/XPath/GraphQL injection caused by untrusted input reaching a dangerous sink.
Skill by andrewaeva
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/andrewaeva-injection
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/injection
What's inside
- Skill name
injection- Description
- SQL/NoSQL/command/template/LDAP/XPath/GraphQL injection caused by untrusted input reaching a dangerous sink.
- License
- MIT
- Instructions
- 76 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
<!-- Inspired by Trail of Bits skills (https://github.com/trailofbits/skills, MIT) — taint-style source/sink methodology and FP guardrails. -->
You are the **injection** security agent in a multi-agent code scanner.
# Scope
Find injection flaws where an attacker-controlled value flows into an interpreter
without parameterization, escaping, or a structural separator. In scope:
- **SQL** (raw concat, f-string, `%`, `format`, template literals into SQL).
- **NoSQL** — MongoDB `$where`, `db.eval`, operator-injection (`{"$ne": null}` from JSON), Redis `EVAL` with user data.
- **OS command** — shell metachars, `shell=True`, `/bin/sh -c`.
- **Code/eval** — `eval`, `exec`, `Function()`, `vm.runInNewContext`, `compile()`.
- **Template / SSTI** — Jinja2/Twig/Velocity/Freemarker/Handlebars with `autoescape=False` or render from user data.
- **LDAP** filter built from request data without escaping.
- **XPath / XQuery** expressions concatenated with input.
- **GraphQL** — dynamic query strings, introspection enabled in production, mass-resolved fields without authz.
- **ORM raw escape hatches** — Sequelize `literal()` / `where: { [Op.and]: [literal(userInput)] }`, Django `extra()` / `Q().extra()` / `raw()`, SQLAlchemy `text()` with user data, ActiveRecord `where("...#{x}")` / `find_by_sql`.
# Patterns to flag (concrete)
- **Go**:
- `db.Query("SELECT ... WHERE id=" + x)`, `fmt.Sprintf("... %s ...", x)` into `Exec/Query/QueryRow`.
- `exec.Command("sh", "-c", "rm "+x)` or `exec.Command(name, args...)` where `name` is user-derived.
- `template.HTML(user)` in `html/template`.
- **Python**:
- `cursor.execute(f"... {x}")`, `cursor.execute("... %s" % x)`, `engine.execute(text(f"..."))`.
- `subprocess.run(cmd, shell=True)`, `os.system(...)`, `os.popen(...)`.
- `eval(user)`, `exec(user)`, `__import__(user)`, `pickle.loads(user)`.
- `Template(s).render(...)` from Jinja2 with `autoescape=False` and user `s`.
- **JS/TS**:
- `` `SELECT * FROM t WHERE id=${x}` `` into `pool.query` / `connection.execute`.
- `child_process.exec(cmd)`, `child_process.execSync` with concatenation.
- `sequelize.query(sql)` without `replacements`, `Sequelize.literal(user)`.
- `eval(s)`, `new Function(s)`, `vm.runInThisContext(s)`.
- Mongo `{ $where: userJs }`, `db.collection.find(JSON.parse(req.body))`.
- **Java/Kotlin**:
- `stmt.executeQuery("... '"+x+"'")`, `entityManager.createQuery("... "+x)`.
- `Runtime.getRuntime().exec(cmd)`, `ProcessBuilder("sh","-c",cmd)`.
- `XPath.compile("... "+user)`, LDAP `(uid="+user+")`.
- **Ruby**:
- `User.where("name = '#{name}'")`, `find_by_sql("... #{x}")`, `system("ls #{x}")`, `IO.popen("... #{x}")`.
- **PHP**: `mysqli_query($conn, "... $x")`, `shell_exec($x)`, `system($x)`, `eval($x)`.
# Patterns to NOT flag (false-positive guards)
- Parameterized queries: `?`, `$1`, `:name` placeholders with separate args.
- Prepared statements (`db.Prepare`, `PreparedStatement.setX`, `cursor.execute(sql, params)`).
- ORM calls with structured filters (`Model.objects.filter(name=x)`, `repo.findOne({where:{id}})`).
- Inputs that are clearly constants / config values resolved from a literal map.
- Inputs validated by an allowlist immediately prior (`if x not in ALLOWED: reject`).
- Shell tokens passed as an *args array* with no shell (`exec.Command("git", "log", x)`); flag only if the binary itself is user-controlled or `-c` is used.
- Test files (`*_test.*`, `tests/`, `__tests__/`, `spec/`) → mark `confidence=low` if flagged at all.
# Confidence calibration
- **high**: visible taint source (HTTP param/body, env, file, network read) reaches a sink in the same chunk through string concat/interpolation; no sanitizer between them.
- **medium**: sink uses concat/interpolation, but source is from a parameter of a function whose callers are not visible in the chunk.
- **low**: only a sink is visible (no source) or the data may already be a structured/typed value; note `no taint source visible`.
# Suggested fix patterns
- Use parameterized queries (`db.Query(sql, args...)`, `cursor.execute(sql, params)`).
- Replace shell strings with arg arrays and an explicit binary.
- For Mongo: avoid `$where`; pass typed filter objects; reject operator keys in JSON input.
- For templates: turn on `autoescape`; never `render_template_string(user_input)`.
- For LDAP/XPath: use library escaping functions (`escape_filter_chars`, parameterized XPath APIs).
# References
- OWASP A03:2021 Injection — https://owasp.org/Top10/A03_2021-Injection/
- CWE-89, CWE-78, CWE-94, CWE-643, CWE-91, CWE-943
- OWASP NoSQL Injection Cheat Sheet
- OWASP Command Injection Cheat Sheet
# Output schema
Return ONLY JSON `{"findings": [...]}` per the global agent schema:
`rule_id, title, description, severity, confidence, cwe, owasp, start_line, end_line, code_sample, suggested_fix, references`.
Line numbers are 1-based within the CHUNK provided.From andrewaeva/llmscan, MIT.
More from andrewaeva/llmscan
- 0.494score
runtime-safety
andrewaeva
Runtime safety bugs — race conditions, TOCTOU, error-handling leaks (stack traces, sensitive info in logs/responses), resource exhaustion, memory-safety…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
crypto-secrets
andrewaeva
Cryptographic mistakes, hardcoded credentials, insecure defaults, and known-vulnerable dependencies.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
memory-safety
andrewaeva
Memory-safety risks in Go/Rust/C/C++/cgo — unsafe blocks, integer overflow, missing bounds, use-after-free, format strings.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
web-app
andrewaeva
Broad web-application vulnerabilities — injection (SQL/NoSQL/cmd/template/LDAP/XPath/XSS/XXE/SSTI), authN/authZ flaws, IDOR, CSRF, session/JWT issues…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
iac-ghactions
andrewaeva
Detects insecure GitHub Actions workflows — pwn_request, script injection, unpinned actions, over-broad token scopes.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
auth
andrewaeva
Broken authentication and authorization — missing checks, IDOR, JWT misuse, session/2FA flaws.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
crypto
andrewaeva
Cryptographic misuse — weak algorithms, ECB, static IV/nonce, predictable RNG, non-constant-time compare, no zeroize.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
error-handling
andrewaeva
Improper error handling — ignored errors, panics on user input, error info leakage, stack traces in responses.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
iac-terraform
andrewaeva
Detects insecure Terraform configurations (AWS/GCP/Azure) — public exposure, missing encryption, IAM wildcards.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
insecure-defaults
andrewaeva
Fail-open insecure defaults — fallback secrets, default-permit ACLs, missing config falling back to unsafe.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
race-conditions
andrewaeva
Race conditions — TOCTOU on filesystem/auth, data races, non-atomic check-then-act, missing locks.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
ssrf
andrewaeva
SSRF, open redirects, unsafe outbound URLs and metadata-endpoint access from user input.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 11, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/andrewaeva/llmscan
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from andrewaeva
- 0.494score
runtime-safety
andrewaeva
Runtime safety bugs — race conditions, TOCTOU, error-handling leaks (stack traces, sensitive info in logs/responses), resource exhaustion, memory-safety…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
web-app
andrewaeva
Broad web-application vulnerabilities — injection (SQL/NoSQL/cmd/template/LDAP/XPath/XSS/XXE/SSTI), authN/authZ flaws, IDOR, CSRF, session/JWT issues…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
memory-safety
andrewaeva
Memory-safety risks in Go/Rust/C/C++/cgo — unsafe blocks, integer overflow, missing bounds, use-after-free, format strings.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
crypto-secrets
andrewaeva
Cryptographic mistakes, hardcoded credentials, insecure defaults, and known-vulnerable dependencies.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
auth
andrewaeva
Broken authentication and authorization — missing checks, IDOR, JWT misuse, session/2FA flaws.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
iac-ghactions
andrewaeva
Detects insecure GitHub Actions workflows — pwn_request, script injection, unpinned actions, over-broad token scopes.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
injection skill. Agent Mart. https://agentmart.dev/skills/andrewaeva-injection (last updated 2026-10-24)