# Path Traversal Detection

> Detects unsafe file access involving user input

- Skill: `zakirkun/path-traversal-detection` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/path-traversal-detection`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/path-traversal-detection/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/path-traversal-detection

---


# Path Traversal

## Overview
Path Traversal (Directory Traversal) occurs when user-supplied input is used to construct a file path without proper neutralization of special elements (like `../`).

## Remediation
Always sanitize user input, use `filepath.Clean` in Go, or `os.path.abspath` in Python, and verify that the final resolved path resides within the expected base directory.

