More screenshots

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIGitHub CopilotGitHub CopilotGemini CLIGemini CLI+17 more

    Repair Path Traversal & Symlink Escapes

    1

    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.

    Secure checkout via Stripe

    0 installsSecurity scanned

    See it in action

    You say

    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.

    Your agent does

    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.

    What you get

    Patch path traversal vulnerabilities in file upload and extraction logic.Enforce strict filesystem boundaries for temporary file operations.Prevent symlink escapes using TOCTOU-resistant resolution methods.Generate regression tests for directory traversal edge cases.

    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.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    • One-time purchase, yours forever

    Listedtoday

    Frequently Asked Questions