Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add makifbaysal/tasktrooper --skill path-traversal-and-file-handlinggit clone --depth 1 https://github.com/makifbaysal/tasktrooperWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/makifbaysal/tasktrooper/path-traversal-and-file-handling)<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/path-traversal-and-file-handling"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/path-traversal-and-file-handling/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/path-traversal-and-file-handling"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/path-traversal-and-file-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.01768 |
| Opus 5.5 | $0.00021 | $0.00707 |
| Sonnet 5.5 | $0.00010 | $0.00354 |
| Haiku 4.5 | $0.00005 | $0.00177 |
Grade C, and why
path-traversal-and-file-handling scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
Archive entry names are attacker input: `../../.ssh/authorized_keys`, absolute paths, and symlink entries that point outside and are then written through. How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Path Traversal and File Handling
Overview
Join, normalize, resolve and clean are lexical: they rewrite a string, they do not ask the filesystem where it points. A path check that runs on the string and an open that runs on the filesystem disagree whenever there is a .., an absolute path, or a symlink.
Core principle: resolve the real path first, then check containment by path components, then open what you checked — or use an API that confines the open itself.
1. Traversal (CWE-22)
// ❌ HasPrefix on a cleaned string: "/srv/files-private/x" passes for base "/srv/files",
// and a symlink inside base escapes entirely
p := filepath.Join(base, name)
if !strings.HasPrefix(filepath.Clean(p), base) { return errBadPath }
f, _ := os.Open(p)
// ✅ Go 1.24+: the root confines every lookup, symlinks included
root, _ := os.OpenRoot(base)
f, err := root.Open(name)
// older Go: reject non-local names first — filepath.IsLocal(name) (Go 1.20+)
// ❌ normalize() is lexical; a symlink under base still escapes
Path p = base.resolve(name).normalize();
if (!p.startsWith(base)) throw new SecurityException();
// ✅ compare real paths (Path.startsWith is component-wise, String.startsWith is not)
Path real = base.resolve(name).toRealPath();
if (!real.startsWith(base.toRealPath())) throw new SecurityException();
# ❌ os.path.join drops base entirely when name is absolute ("/etc/passwd")
path = os.path.join(UPLOAD_DIR, name)
# ✅
root = Path(UPLOAD_DIR).resolve()
path = (root / name).resolve()
if not path.is_relative_to(root): # Python 3.9+
abort(400)
// ❌ startsWith without a trailing separator; "/data/app-secrets" passes for "/data/app"
const p = path.resolve(base, name); if (!p.startsWith(base)) throw ...
// ✅
const p = path.resolve(base, name); if (!p.startsWith(base + path.sep)) throw ...
// and for symlinks: fs.realpathSync(p) before the check
Flask: send_from_directory. Express: res.sendFile(name, { root: base }) (rejects escaping paths) rather than res.sendFile(path.join(base, name)).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed fe510c0e8b1b
- 1mo ago First seen · 125 lines · 52 tokens per session scan C df7cbb93c390
path-traversal-and-file-handling is a skill published in the GitHub repository makifbaysal/tasktrooper (123 stars, last pushed today), licensed Apache-2.0. It adds 52 tokens to every session and 1,768 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-09.
path-traversal-and-file-handling compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| path-traversal-and-file-handlingmakifbaysal/tasktrooper | Skill | 123 | today | Apache-2.0 | C | 52 | Claude Code, Codex |
| cuequivariance-jaxNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 38 | Claude Code, Codex |
| cuequivariance-torchNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 37 | Claude Code, Codex |
| cudnn-compile-and-serializeNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 59 | Claude Code, Codex |
| cudnn-installNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 49 | Claude Code, Codex |
| ccclNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 206 | Claude Code, Codex |
| holoscan-install-wheelNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 34 | Claude Code, Codex |