injection
/injection
Detects SQL, command, and template injection caused by user input reaching an interpreter without parameterization. Use when writing code that constructs database queries, builds SQL strings, executes shell commands, processes templates with user input, evaluates code dynamically, or passes user- controlled data to any external interpreter.
- Author
- thejefflarson ↗
- Repository
- soundcheck ↗
- Licence
- MIT
- Last repository change
- 30.07.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 4
No signals detected. Repository changed on 30.07.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Detects SQL, command, and template injection caused by user input reaching an interpreter without parameterization. Use when writing code that constructs database queries, builds SQL strings, executes shell commands, processes templates with user input, evaluates code dynamically, or passes user- controlled data to any external interpreter.
Original author description
Detects SQL, command, and template injection caused by user input reaching an interpreter without parameterization. Use when writing code that constructs database queries, builds SQL strings, executes shell commands, processes templates with user input, evaluates code dynamically, or passes user- controlled data to any external interpreter.
How it works
- What this checks
- Vulnerable patterns
- Fix immediately
- Verification
- References
SKILL.md preview
---
name: injection
description: Detects SQL, command, and template injection caused by user input reaching an
interpreter without parameterization. Use when writing code that constructs
database queries, builds SQL strings, executes shell commands, processes
templates with user input, evaluates code dynamically, or passes user-
controlled data to any external interpreter.
---
# Injection Security Check (A05:2025)
## What this checks
Protects against SQL, command, and template injection caused by passing
user-controlled data to an interpreter without sanitization. Exploitation leads to
full database read/write, remote code execution, and data exfiltration.
For NoSQL-specific injection (MongoDB operator injection, `$where`), see `nosql-injection`.
## Vulnerable patterns
- `"SELECT * FROM users WHERE id = " + userId` — user input concatenated into SQL
- `exec("convert " + filename)` — shell expansion allows `; rm -rf /`
- `eval(userInput)` — arbitrary code execution from user-supplied string
- `Template("Hello " + name)` — template body built from user input
## Fix immediately
For each vulnerable call site, apply the appropriate control:
- **SQL**: use parameterized queries or an ORM — never concatenate user input into query strings
- **Shell**: pass arguments as an array/list, never as an interpolated string — disable shell expansion
- **Templates**: use an engine that autoescapes by default and pass user values through the parameter interface. Python: `Environment(autoescape=True)` (bool literal, not `select_autoescape()` with `from_string()`). Go: `html/template`, never `text/template` for HTTP output. Java FreeMarker: `cfg.setOutputFormat(HTMLOutputFormat.INSTANCE)`. Rust: `handlebars` (escapes by default). Never build the template body from user input.
- **eval/exec**: remove entirely — there is no safe way to evaluate user-supplied code strings
Flag the vulnerable call site, explain the risk and the correct fix pattern, then continue with the original task.
## Verification
Confirm the following *properties* hold (language-agnostic):
- [ ] User-controlled values reach SQL only as bound parameters — never via string interpolation, concatenation, or format strings
- [ ] User-controlled values reach subprocess execution only as discrete argument list elements — never via a shell string or interpolated command string
- [ ] No dynamic evaluation of user-supplied strings as code (Python `eval`/`exec`, JS `eval`/`new Function`, etc. removed — not replaced with a safer-looking variant of the same function)
- [ ] Templates use an engine where HTML autoescaping is either enabled explicitly or is the documented default (Flask `render_template`, Go `html/template`, Rust `handlebars`, Jinja2 `Environment(autoescape=True)` — NOT Jinja2 `Template()` direct, NOT Go `text/template`), and user values are passed through the engine's parameter interface — never by building the template body from user input
## References
- CWE-89 ([SQL Injection](https://cwe.mitre.org/data/definitions/89.html))
- CWE-78 ([OS Command Injection](https://cwe.mitre.org/data/definitions/78.html))
- CWE-94 ([Code Injection](https://cwe.mitre.org/data/definitions/94.html))
- [OWASP A05:2025 Injection](https://owasp.org/Top10/A03_2021-Injection/)
Versions
The database has no other skills named injection.
Database snapshot: 13.11.2026 · package version c03654486e89 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100input-validation-injection
Apply when reviewing or writing code that processes untrusted input, constructs queries or commands, or handles user-supplied data. Covers SQL, LDAP, OS command injection, prototype pollution, and general validation strategy. - 100injection-prevention
OWASP A01 - Injection Prevention. Use this skill when reviewing code for SQL injection, NoSQL injection, command injection, LDAP injection, or any user input that reaches databases, shells, or interpreters. Activate when: SQL query, database query, user input, command execution,… - 90nosql-injection
Detects MongoDB and other NoSQL queries that mix user input into operators or filters without validation. Use when writing MongoDB queries, Elasticsearch queries, or other NoSQL database operations that include user-supplied input. Also invoke when building query filters from… - 100injection-prevention
Prevent injection and unsafe input handling: missing validation, SQL and NoSQL injection, command injection, insecure deserialization and path traversal. Use when code builds queries, shell commands, file paths or deserializes data. - 100input-validation
Use when writing or reviewing code that processes user input — validates and sanitizes to prevent SQL injection, XSS, CSRF, and other injection attacks. NOT when the code path doesn't touch user-supplied data. - 100prompt-injection
Detects LLM prompts built from user input or retrieved documents that let attackers hijack the model's instructions. Use when writing code that constructs LLM prompts from user input, builds system prompts, implements RAG pipelines, or processes external documents fed to a…