sc-path-traversal

Detect path traversal vulnerabilities in user-supplied file paths across languages.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/kocakburhan/emlakdefter --skill sc-path-traversal-kocakburhan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sc-path-traversal
Source: https://github.com/kocakburhan/emlakdefter/tree/main/.agents/skills/security-check/skills/sc-path-traversal
Command: npx skills add https://github.com/kocakburhan/emlakdefter --skill sc-path-traversal-kocakburhan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Path traversal and directory traversal vulnerabilities can expose sensitive files and data when user-controlled input is used to build file paths.

Core Features & Use Cases

  • Detects path traversal, LFI, RFI, zip slip, and symlink attacks across languages.
  • Provides safe path resolution examples and validation patterns.
  • Use Case: Integrate into CI pipelines to scan code paths that handle user-supplied paths.

Quick Start

Use the sc-path-traversal skill to scan a sample project for vulnerable file access patterns and verify that file reads are properly constrained.

Frequently Asked Questions about sc-path-traversal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent path traversal vulnerabilities in file access code?

To prevent path traversal vulnerabilities, you must canonicalize user-supplied file paths using realpath or resolve and enforce strict boundary checks to ensure requested files remain inside the allowed directory.

What is the difference between LFI, RFI, and symlink attacks?

LFI (Local File Inclusion) and RFI (Remote File Inclusion) exploit user input to load unauthorized files, while symlink attacks use symbolic links to escape directory boundaries. All three compromise file access security by manipulating paths.

How do I detect zip slip vulnerabilities in my project?

You can detect zip slip vulnerabilities by scanning code that handles file extraction to verify that resolved archive paths remain strictly within the intended target directory, preventing directory traversal during decompression.

Can I scan for path traversal and LFI vulnerabilities across multiple programming languages?

Yes, this detection mechanism analyzes user-supplied file paths across multiple languages and environments, covering LFI, RFI, zip slip, and symlink attacks to identify vulnerable file access patterns.

What is the best way to integrate path traversal detection into a CI pipeline?

The best way to integrate path traversal detection into a CI pipeline is to scan code paths handling user-supplied input, verifying that file reads are properly constrained by canonicalization and boundary checks.

Why does path canonicalization fail to stop directory traversal without boundary checks?

Path canonicalization resolves relative references but fails to stop directory traversal without boundary checks because it only normalizes the path; strict validation is required to ensure the resolved path remains inside the allowed directory.