More screenshots
Works with the AI Agents you already use
Repair Path Traversal & Symlink Escapes
Repair file path traversal and symlink escape bugs where canonicalization, archive paths, workspace roots, temporary paths, or TOCTOU checks allow access outside an approved root.
$1
Repair Path Traversal & Symlink Escapes
Example session with this skill installed
Our export service joins a user filename to /srv/exports and checks strings.HasPrefix(cleaned, root). Symlinks inside the directory can also point outside it. Repair with a disposable temp tree and preserve the existing export root and overwrite rules.
- Read your context and instructions
- Compiled the repair path traversal
The boundary check compares strings instead of filesystem authority and happens before symlink resolution/open. The repair uses root-relative validation plus repository-supported no-follow/dirfd-style operations, tests .., deceptive prefixes, symlinks, replacement races, and preserves the configured export root.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Inconsistent path normalization and weak filesystem boundaries lead to critical path traversal vulnerabilities. Manual patches often fail to account for symlink escapes, TOCTOU races, or mismatched trust boundaries across the codebase.
What it does
- Identifies and repairs path traversal defects by synchronizing normalization and validation logic.
- Enforces strict workspace root boundaries for open, create, and delete operations.
- Implements TOCTOU-resistant file operations to prevent symlink-based attacks.
- Generates deterministic local fixtures and regression tests to verify boundary enforcement.
- Aligns state ownership and cleanup tasks with specific file transactions.
Why this beats prompting it yourself
General prompts often miss subtle edge cases like archive entry manipulation or symlink resolution order. This skill follows a rigorous methodology to map trust boundaries and state transitions, ensuring security fixes don't break existing storage layouts or archive policies.
Use cases
- Hardening a file upload handler against path traversal via malicious filenames.
- Restricting archive extraction logic to prevent writing files outside a designated directory.
- Refactoring filesystem utilities to resolve symlinks safely within a sandbox.
- Fixing race conditions in temporary file cleanup routines.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
Cannot redesign approved filesystem roots, permissions, storage layout, archive policy, overwrite policy, and public errors; cannot verify production infrastructure or prove every runtime, proxy, network, filesystem, or scheduler ordering.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 months ago
Permissions
Run on a clean branch with repository files and disposable local fixtures. Review patches and validation before merge. Keep production services, real credentials, customer payloads, and deployment out of scope.