ajtazer/heckit / skills/cve-hunting/path-traversal
path-traversal
VerifiedDetect path traversal and Zip Slip vulnerabilities where user-controlled path components can escape intended directories.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.7 KB |
| references/false-positive-indicators.md | markdown | 1.4 KB |
| references/poc-skeleton.md | markdown | 2.8 KB |
| references/sinks.md | markdown | 2.3 KB |
references/false-positive-indicators.md
View on GitHub# False Positive Indicators -- Path Traversal
## When Path Traversal is NOT Exploitable
### 1. Proper Path Validation
Uses resolve + startsWith check BEFORE file access:
```js
const resolved = path.resolve(baseDir, userInput);
if (!resolved.startsWith(baseDir + path.sep)) throw new Error('invalid');
```
### 2. Uses realpath to Canonicalize
Python `os.path.realpath()` or Node.js `fs.realpathSync()` resolves symlinks and normalizes the path, then checks it against the base directory.
### 3. Go filepath.Rel Check
```go
rel, err := filepath.Rel(base, absPath)
if err != nil || strings.HasPrefix(rel, "..") { /* reject */ }
```
### 4. Archive Library Handles Internally
Some archive libraries sanitize entry paths in newer versions. VERIFY which version:
- Python `zipfile.extractall()` with `filter='data'` (Python 3.12+)
- tar-stream with path validation callback
### 5. Input is From Trusted Source
Path comes from database, config file, or admin-only input. Not user-controlled.
### 6. Directory is Read-Only or No Sensitive Files
The target directory contains only public/non-sensitive files and is read-only.
### 7. Already Patched (Check Version)
Known CVE already exists for this exact vector in this exact version. Check NVD.
### 8. Static File Server with Built-in Protection
Frameworks like Express `res.sendFile()` with `root` option prevent traversal. Check if the framework handles it.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |