More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair Archive & Extraction Bugs

    1

    Repair Archive & Extraction Bugs is a bounded ToolForge Labs workflow.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Archive & Extraction Bugs

    Repair Archive & Extraction Bugs

    Example session with this skill installed

    I have a Node.js extraction function using adm-zip that is vulnerable to path traversal. Fix it to ensure files only extract to /tmp/app/data and handle symlinks safely.

    • Read your context and instructions
    • Compiled the repair archive

    I have analyzed the extraction logic and identified the missing path normalization and symlink validation steps. I have implemented a bounded repair that enforces the /tmp/app/data root invariant.

    Secure Extraction Repair

    const admZip = require('adm-zip');
    const path = require('path');
    const fs = require('fs');
    
    function secureExtract(zipPath, targetDir) {
      const zip = new admZip(zipPath);
      const resolvedTarget = path.resolve(targetDir);
    
      zip.getEntries().forEach((entry) => {
        // 1. Path Traversal Protection (Zip-Slip)
        const entryPath = entry.entryName;
        const fullPath = path.resolve(resolvedTarget, entryPath);
        
        if (!fullPath.startsWith(resolvedTarget)) {
          throw new Error(`Security Alert: Blocked path traversal attempt in ${entryPath}`);
        }
    
        // 2. Symlink Policy Enforcement
        if (entry.isSymbolicLink) {
          // In this repair, we block symlinks to prevent arbitrary read/write via link targets
          console.warn(`Skipping symlink: ${entryPath}`);
          return;
        }
    
        // 3. Directory Creation and Extraction
        if (entry.isDirectory) {
          fs.mkdirSync(fullPath, { recursive: true });
        } else {
          const mode = entry.attr >>> 16 & 0xFFF; // Preserve permissions safely
          zip.extractEntryTo(entry, resolvedTarget, false, true);
          fs.chmodSync(fullPath, mode || 0o644);
        }
      });
    }
    

    Next steps

    1. Verify Root Path: Ensure the runtime user has write permissions specifically to /tmp/app/data.

    Integration Test: Run the provided implementation against a test archive containing ../ sequences to confirm the traversal block.
    3.

    Resource Limits: If handling large archives, consider migrating this logic to unzipper with a stream-based buffer to avoid memory exhaustion.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Repair Archive & Extraction Bugs is a bounded ToolForge Labs workflow. Repair archive creation/extraction failures across ZIP/TAR/GZIP, Unicode names, symlinks, path traversal, permissions, truncation, streaming, resource limits, atomic publication, and cleanup. Works from repositories or partial code/archive evidence. Produces safe bounded repairs and deterministic malicious/edge fixtures. It works from a full repository or partial evidence such as snippets, logs, configuration, traces, tickets, and architecture notes. The skill preserves existing product and security policy, separates verified facts from assumptions, avoids invented execution claims, and produces concrete repair or review steps with focused deterministic validation or traceable evidence.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.

    Cannot verify production systems, external services, or facts that are not present in supplied evidence. With partial context it returns bounded diagnosis/review, explicit assumptions, and a deterministic validation plan rather than claiming successful execution.

    How to use

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Read Files
    Write Files

    Use a clean branch or a controlled review workspace. Supply repository files, logs, traces, configuration, or evidence needed for the task. Review all patches/findings before merge or operational action; keep production credentials and destructive production actions out of the workflow.

    Listed2 months ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill identifies and fixes complex failures in ZIP, TAR, and GZIP operations, specifically targeting issues like Unicode character corruption, symlink vulnerabilities, and path traversal security risks. It is designed to ensure your archive handling is both robust against edge cases and secure against malicious exploits.

    You do not need a complete codebase; the skill can analyze and provide repairs based on partial evidence such as error logs, snippets, configuration files, or architecture notes. It will clearly distinguish between facts found in your data and assumptions made during the repair process.

    The skill produces 'safe bounded repairs' which include concrete code fixes and deterministic validation fixtures to test the repair. It also provides a clear set of review steps to ensure the fix aligns with your existing security policies.

    Yes, the skill is optimized for modern environments, including Node.js and other high-performance platforms that utilize streaming extractions and atomic publication to prevent data corruption.

    This skill is a ToolForge Labs workflow designed for easy integration into leading AI agent platforms and IDE extensions. Setup is minimal, requiring only the provision of the archive evidence or repository access to begin the diagnostic process.

    New in Testing & Debugging