Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    JS SubprocessCleaner — Static AST Shell Execution Guard

    1

    Intercepts and blocks dangerous child_process.exec, raw shell=true, and curl pipes in Node.js.

    Free

    1 useSecurity scanned
    JS SubprocessCleaner — Static AST Shell Execution Guard

    JS SubprocessCleaner — Static AST Shell Execution Guard

    Example session with this skill installed

    // Audit this JavaScript code for dangerous child_process calls. ```ts const { exec } = require('child_process'); function deploy() { exec("rm -rf /tmp/cache", { shell: true }); exec("curl https://example.com | bash", { shell: true }); } ```

    • Read your context and instructions
    • Compiled the js subprocesscleaner

    ### JS SubprocessCleaner Audit Report - **Audit Status:** CRITICAL. Insecure terminal invocation paths isolated. - **Total Calls Found:** 2 hazardous signatures detected during code scanning. - **Remediation Action:** Blocked recursive deletion and download-to-shell patterns at the AST layer. --- ### Verified Output (JSON Protocol) ```json { "audit_status": "CRITICAL", "findings": [ { "id": "f1", "file": "deploy.js", "line": 4, "severity": "HIGH", "signature": "DESTRUCTIVE_RECURSIVE_DELETE", "message": "Recursive deletion outside project root detected. Enforce safe array mapping.", "snippet": "exec(\"rm -rf /tmp/cache\", { shell: true })" }, { "id": "f2", "file": "deploy.js", "line": 5, "severity": "HIGH", "signature": "DOWNLOAD_TO_SHELL_PIPE", "message": "Download-to-shell pipe pattern intercepted. Risk of arbitrary remote code execution.", "snippet": "exec(\"curl https://example.com | bash\", { shell: true })" } ], "metadata": { "version": "1.0.0", "timestamp": "2026-10-15T18:30:00Z", "files_scanned": 1, "calls_found": 2 } } ``` --- ### Security Audit Breakdown 1. **Destructive Delete Interception (`f1`):** Flagged a recursive deletion call at line 4. The engine identified a target path outside the project root context executed within a loose shell interface, requesting a transition to safe array mapping parameters. 2. **Download-to-Shell Mitigation (`f2`):** Intercepted a dangerous shell pipe execution sequence (`curl | bash`) at line 5. This layout bypasses standard environment controls, presenting a high risk of arbitrary remote code execution. 3. **Air-Gapped Validation:** Scanned the abstract syntax tree structure of the JavaScript file completely offline, ensuring compliance with secure meta-programming standards without data leakage.

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

    About this skill

    Stop letting AI agents execute dangerous terminal commands in your Node.js apps. When autonomous assistants attempt to automate deployment sprints or system scripts, they frequently generate unescaped shell concatenations, inject raw `shell: true` configurations, or pass untrusted pipe execution patterns like `curl | bash` directly into native child processes. One bad AI generation can expose your server to severe command injections or accidental file deletions. JS SubprocessCleaner acts as an immediate, inline static security guardrail tailored for JavaScript and TypeScript workflows. It deep-scans your Node.js code layers using Abstract Syntax Tree (AST) analysis, automatically intercepting and blocking hazardous shell executions before they ever reach your active terminal workflows or your CI/CD pipeline. Instead of crashing your live runtime with unhandled exceptions, this skill catches insecure terminal scripts early—forcing the AI agent to rewrite code using safe execution arguments. ## What it does - **Hazardous Command Interception:** Instantly flags and isolates dangerous `child_process.exec` calls, blocking risky patterns like `rm -rf` generated by unchecked AI. - **Shell-Injection Mitigation:** Detects unescaped string concatenations passed into terminal executors, neutralizing injection vectors at the compilation layer. - **Curl Pipe Blocking:** Automatically intercepts insecure terminal downloads and blind execution traps (`curl | bash`) inside your system scripts. - **Air-Gapped Code Protection:** Runs 100% locally with zero outbound network telemetry, ensuring your sensitive repository structures never leak to third-party servers. ## Technical Specifications - **Node.js Environment Optimization:** Finely calibrated to scan native `child_process` hooks, asynchronous execution patterns, and worker-thread configurations. - **Passive Read-Only Analysis:** Operates strictly within local memory buffers without modifying your directory architecture or installing invasive background daemons.

    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.

    Static analysis and layout constraints only. Measures command variables, bracket scopes, and module syntax properties within memory buffers without executing live backend processes or deploying dynamic runtime sandboxes. Commands obfuscated through runtime reflection frameworks or complex multi-file dynamic string assembly paths are out of scope. Workspace evaluations require fully formed JavaScript/TypeScript file contexts; fragmented micro-snippets under 10 total lines of code volume may be bypassed to prevent incomplete AST token tracing.

    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

    1 use

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 29 days ago

    • Free with an Agensi account

    Permissions

    Read Files

    File Scopes

    **/*.js
    **/*.ts

    Read-only sandbox access to local JavaScript/TypeScript backend modules. Evaluates process structures and input configurations completely offline inside secure memory allocations, with zero permission for shell execution, file modification, or network routing vectors.

    Listed1 month ago
    Updated22 days ago

    What's inside

    Frequently Asked Questions

    The engine functions as an inline security gate that performs static Abstract Syntax Tree (AST) scanning. It intercepts dynamic child_process calls, destructive path specifications, and command execution pipelines inside local memory buffers before the code can be executed by runners or pushed upstream.

    Exclusively engineered and optimized for JavaScript and TypeScript Node.js backend source code (.js, .ts). The parser maps execution footprints across child_process module variations, enforcing strict safety rules over exec, spawn, fork, and their synchronous counterparts.

    No. This is a 100% local, air-gapped static analysis tool that parses raw source contracts inside secure memory buffers. It functions entirely without installing vendor code dependencies or running dynamic execution scripts, ensuring complete sandbox safety.

    The skill returns a schema-validated, flat JSON telemetry report. It features typed violation signatures (such as DOWNLOAD_TO_SHELL_PIPE) and precise line coordinates, making it a drop-in asset for local pre-commit hooks, IDE diagnostic buffers, or multi-agent pipelines.

    The engine provides deterministic static layout validation and advisory security verdicts. It focuses entirely on structural code analysis inside your repository boundaries and does not deploy active dynamic OS-level sandboxing or intercept runtime processes during server lifecycle stages.

    Yes. The tool is architected to operate as a passive security interceptor in multi-agent orchestration frameworks or automated CI/CD code review gates. It validates newly generated scripts prior to execution staging to ensure full subprocess argument compliance.

    New in Security

    Free