From appsec
This skill should be used when the user asks to "check for injection", "analyze SQL injection", "find injection vulnerabilities", "check for command injection", "find NoSQL injection", "check for LDAP injection", or mentions "injection" in a security context. Maps to OWASP Top 10 2021 A03:2021 - Injection.
npx claudepluginhub florianbuetow/claude-code --plugin appsecThis skill uses the workspace's default tool permissions.
Analyze source code for injection vulnerabilities where user-supplied data flows
Acquire memory dumps from live systems/VMs and analyze with Volatility 3 for processes, networks, DLLs, injections in incident response or malware hunts.
Provides x86-64/ARM disassembly patterns, calling conventions, control flow recognition for static analysis of executables and compiled binaries.
Identifies anti-debugging checks like IsDebuggerPresent, NtQueryInformationProcess in Windows binaries; suggests bypasses via patches/hooks/scripts for malware analysis, CTFs, authorized RE.
Analyze source code for injection vulnerabilities where user-supplied data flows into interpreters without proper validation, sanitization, or parameterization. This is the most code-scannable OWASP category -- most injection patterns leave clear syntactic fingerprints in source code.
Read ../../shared/schemas/flags.md for the full flag specification. This skill
supports all cross-cutting flags. Key behaviors:
| Flag | Injection-Specific Behavior |
|---|---|
--scope | Default changed. Injection analysis focuses on files containing database queries, system calls, LDAP operations, and eval constructs. |
--depth quick | Scanners + Grep patterns only, no data-flow tracing. |
--depth standard | Full code read of scoped files, local data-flow analysis within each file. |
--depth deep | Trace user input from HTTP entry points through call chains to sinks. Cross-file taint analysis. |
--depth expert | Deep + red team simulation: craft proof-of-concept payloads, DREAD scoring. |
--severity | Filter output. Injection findings are typically critical or high. |
--fix | Generate parameterized replacements for each finding. |
OWASP A03:2021 - Injection
User-supplied data is not validated, filtered, or sanitized by the application. Dynamic queries or commands are constructed using string concatenation or interpolation with hostile data. Common injection types:
STRIDE Mapping: Tampering, Information Disclosure, Elevation of Privilege
Read references/detection-patterns.md for the full pattern catalog with
language-specific examples, regex heuristics, and false positive guidance.
Pattern Summary:
os.system / exec / subprocess with user inputeval() / Function() with user input--scope flag (default: changed)..py, .js, .ts, .jsx, .tsx, .java,
.go, .rb, .php, .cs, .rs, .kt, .scala, .sql, .graphql.Detect available scanners in priority order:
| Scanner | Detect | Injection Coverage |
|---|---|---|
| semgrep | which semgrep | SQL, NoSQL, OS command, LDAP, EL, ORM -- broadest coverage |
| bandit | which bandit | Python: eval, exec, SQL, subprocess, pickle |
| gosec | which gosec | Go: SQL injection, command injection |
| brakeman | which brakeman | Rails: SQL injection, command injection, mass assignment |
| spotbugs | Maven/Gradle plugin | Java: SQL injection, command injection, XXE, LDAP |
Record which scanners are available and which are missing. If none are available, note: "No scanner available -- findings based on code pattern analysis only."
For each available scanner, run against the scoped files:
semgrep scan --config auto --json --quiet <target>
bandit -r <target> -f json -q
gosec -fmt json ./...
Normalize scanner output to the findings schema (see ../../shared/schemas/findings.md).
Use the severity mapping from ../../shared/schemas/scanners.md.
Read each scoped file and analyze for injection patterns not caught by scanners:
At --depth deep or --depth expert, trace data flow across files:
Output findings using the format from ../../shared/schemas/findings.md.
Each finding must include:
INJ-001, INJ-002, etc.These are the primary injection patterns to detect. Each has detailed examples
and regex heuristics in references/detection-patterns.md.
"SELECT * FROM users WHERE id = " + userId`SELECT * FROM users WHERE id = ${userId}`f"SELECT * FROM users WHERE id = {user_id}"Model.objects.raw(user_input), sequelize.query(userInput)os.system("ping " + host), exec("ls " + dir)subprocess.call(cmd, shell=True) where cmd includes user inputeval(request.body), new Function(userCode)()"(uid=" + username + ")" without escapingdb.users.find({username: req.body.username}) where body can contain $gt, $nePrimary: semgrep (broadest injection coverage across languages)
Language-specific: bandit (Python), gosec (Go), brakeman (Rails), spotbugs (Java)
Fallback: Grep regex patterns from references/detection-patterns.md
When scanners are available, run them first and use Claude analysis to:
When no scanners are available, Claude performs full pattern-based analysis using
the Grep heuristics from references/detection-patterns.md and contextual code
reading. Report these findings with confidence: medium.
Use finding ID prefix INJ (e.g., INJ-001, INJ-002).
All findings follow the schema in ../../shared/schemas/findings.md with:
references.owasp: "A03:2021"references.stride: "T" (Tampering), "I" (Info Disclosure), or "E" (Elevation of Privilege)metadata.tool: "injection"metadata.framework: "owasp"metadata.category: "A03"CWE Mapping by Injection Type:
| Injection Type | CWE | Typical Severity |
|---|---|---|
| SQL Injection | CWE-89 | critical |
| OS Command Injection | CWE-78 | critical |
| NoSQL Injection | CWE-943 | high |
| LDAP Injection | CWE-90 | high |
| Expression Language Injection | CWE-917 | high |
| ORM Injection (raw queries) | CWE-89 | high |
| eval/exec Injection | CWE-95 | critical |
After all findings, output a summary:
| Injection Type | Critical | High | Medium | Low |
|---------------|----------|------|--------|-----|
| SQL | | | | |
| OS Command | | | | |
| NoSQL | | | | |
| eval/exec | | | | |
| LDAP | | | | |
| ORM | | | | |
Followed by: top 3 priorities, scanner coverage notes, and overall assessment.