Path Traversal Detection

Detects unsafe file access involving user input

zakirkun de3302c 2 files · 1.3 KB Updated

File contents

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.

zakirkun/ice-tea/tree/main/skills/fs/path-traversal commit de3302c423

Frequently asked questions

npx skillmds@latest add zakirkun/path-traversal-detection