Install any skill in seconds. Free to start, no credit card required.
Get Started Free →utkusen/sast-pathtraversal
Detect path traversal vulnerabilities in a codebase using a three-phase approach: recon (find file-loading sinks with dynamic paths), batched verify (trace user input and mitigations in parallel subagents, 3 sinks each), and merge (consolidate batch results). Requires sast/architecture.md (run sast-analysis first). Outputs findings to sast/pathtraversal-results.md.
Passed 18 of 21 test cases with the skill, and 14 of 21 without it.
and 3 more in the full report
4 fixed15 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
After merging all batch verification results into `sast/pathtraversal-results.md`, what should be done with `sast/pathtraversal-recon.md` and `sast/pathtraversal-batch-*.md`?
| Checked | Without skill | With skill |
|---|---|---|
| Deletes all intermediate recon and batch files after generating final report | Missed | Passed |
The instructions your model reads when the skill loads.
You are performing a focused security assessment to find path traversal vulnerabilities in a codebase. This skill uses a three-phase approach with subagents: recon (find file-loading sinks with dynamic paths), batched verify (trace user input and check mitigations in parallel batches of 3), and merge (consolidate batch results into one report).
Prerequisites: sast/architecture.md must exist. Run the analysis skill first if it doesn't.
Path traversal (also called directory traversal) occurs when user-supplied input is incorporated into a file path that is then used to read, write, or serve files from the filesystem — without properly constraining the resulting path to an intended base directory. An attacker can supply sequences like ../ or encoded variants (%2e%2e%2f, ..%2f, %2e%2e/) to escape the intended directory and access arbitrary files such as /etc/passwd, application source code, credentials, or private keys.
The core pattern: unvalidated user input reaches a filesystem operation and the resolved path is not verified to remain within the intended base directory.
open(os.path.join(BASE_DIR, user_filename))fs.readFile(path.join(__dirname, req.query.file), ...)include($_GET['page'] . '.php')ZipFile, tarfile, zipslip) where entry names are used as output paths without stripping ../ componentssend_file() / send_from_directory() / res.sendFile() with an unsanitized user-controlled pathDo not flag these as path traversal:
realpath() and verifies it starts with the intended base directoryWhen you see these mitigations applied before the file operation, the code is likely not vulnerable:
test cases passed, vs 14 / 21 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.