ajtazer/heckit / skills/cve-hunting/command-injection
command-injection
VerifiedDetect OS command injection via shell execution sinks where user-controlled input reaches system commands without proper sanitization.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.6 KB |
| references/false-positive-indicators.md | markdown | 1.5 KB |
| references/poc-skeleton.md | markdown | 2.0 KB |
| references/sinks.md | markdown | 3.0 KB |
references/false-positive-indicators.md
View on GitHub# False Positive Indicators -- Command Injection
## When Command Injection is NOT Exploitable
### 1. Uses Argument Arrays (No Shell)
The command uses the array/list form of execution:
```js
cp.execFile('convert', [userInput, 'output.png']); // No shell
cp.spawn('git', ['clone', url]); // No shell (default)
```
**Caveat**: Argument injection is still possible. Check for `--flag` injection with git, ffmpeg, and other tools that accept command-execution flags.
### 2. Input is Hardcoded or From Config
The command string contains no external input. Trace ALL parts of the command string -- even if the command name is hardcoded, arguments might come from user input.
### 3. Input Has Strict Allowlist Validation
User input is validated against a strict allowlist before use. Blocklist validation (rejecting specific characters) is almost always bypassable -- only allowlist validation is reliable.
### 4. Proper Escaping Applied
Language-specific escaping is correctly applied to ALL user-controlled parts:
- PHP: `escapeshellarg()`
- Python: `shlex.quote()`
- Ruby: `Shellwords.escape()`
### 5. Read-Only Command With No Side Effects
The command only reads data. Caveat: even read-only commands can leak sensitive data if the attacker controls the file path.
### 6. Sandboxed/Containerized Environment
Container with no sensitive data, chroot, seccomp profile. Still report but note reduced impact.
### 7. Node.js Runtime Rejection
Node.js rejects null bytes in execFile arguments but most shell metacharacters pass through in exec().
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |