Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Rust Guard Auditor — Check Your Rust Runtime Guard Actually

    1

    You bought a runtime guard for Rust. But does it wrap tokio, std, and libc paths? This skill audits guard coverage before an unguarded execl ships.

    $19.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Rust Guard Auditor — Check Your Rust Runtime Guard Actually

    Rust Guard Auditor — Check Your Rust Runtime Guard Actually

    Example session with this skill installed

    Audit this Rust file for guard coverage.

    • Read your context and instructions
    • Compiled the rust guard auditor

    --- INPUT — deploy.rs ---

    // Live run 2: unguarded Rust file. Shell calls without a guard.
    // Covers std::process, tokio::process, and libc paths.

    use std::process::Command;
    use tokio::process::Command as TokioCommand;
    use libc;
    
    async fn deploy_async() {
        TokioCommand::new("echo")
            .arg("async hello")
            .output()
            .await
            .unwrap();
    }
    
    fn deploy_sync() {
        Command::new("ls").arg("-la").output().unwrap();
        Command::new("pwd").output().unwrap();
    }
    
    fn deploy_libc() {
        unsafe {
            libc::execl(
                b"/bin/sh\0".as_ptr() as *const i8,
                b"sh\0".as_ptr() as *const i8,
                b"-c\0".as_ptr() as *const i8,
                b"echo hello\0".as_ptr() as *const i8,
                std::ptr::null::<i8>(),
            );
        }
        unsafe {
            libc::posix_spawn(
                std::ptr::null_mut(),
                b"/bin/echo\0".as_ptr() as *const i8,
                std::ptr::null(),
                std::ptr::null(),
                std::ptr::null_mut(),
                std::ptr::null_mut(),
            );
        }
    }
    
    fn main() {
        deploy_sync();
        deploy_libc();
        let _ = deploy_async();
    }
    

    --- AUDIT OUTPUT ---

    {
      "audit_status": "CRITICAL",
      "findings": [
        {
          "id": "f1",
          "file": "live/scan2.rs",
          "line": 8,
          "severity": "HIGH",
          "signature": "UNGUARDED_SHELL_CALL",
          "message": "tokio::process::Command::new is not wrapped by a guard function",
          "snippet": "TokioCommand::new(\"echo\").arg(\"async hello\").output().await.unwrap()"
        },
        {
          "id": "f2",
          "file": "live/scan2.rs",
          "line": 16,
          "severity": "HIGH",
          "signature": "UNGUARDED_SHELL_CALL",
          "message": "Command::new is not wrapped by a guard function",
          "snippet": "Command::new(\"ls\").arg(\"-la\").output().unwrap()"
        },
        {
          "id": "f3",
          "file": "live/scan2.rs",
          "line": 17,
          "severity": "HIGH",
          "signature": "UNGUARDED_SHELL_CALL",
          "message": "Command::new is not wrapped by a guard function",
          "snippet": "Command::new(\"pwd\").output().unwrap()"
        },
        {
          "id": "f4",
          "file": "live/scan2.rs",
          "line": 22,
          "severity": "HIGH",
          "signature": "GUARD_BYPASS_VIA_LIBC",
          "message": "libc::execl bypasses std::process::Command and any process-level guard",
          "snippet": "libc::execl(b\"/bin/sh\\0\"..., b\"-c\\0\"..., b\"echo hello\\0\"..., null)"
        },
        {
          "id": "f5",
          "file": "live/scan2.rs",
          "line": 33,
          "severity": "HIGH",
          "signature": "GUARD_BYPASS_VIA_LIBC",
          "message": "libc::posix_spawn bypasses std::process::Command and any process-level guard",
          "snippet": "libc::posix_spawn(null_mut(), b\"/bin/echo\\0\"..., null(), null(), null_mut(), null_mut())"
        },
        {
          "id": "f6",
          "file": "live/scan2.rs",
          "line": 16,
          "severity": "MEDIUM",
          "signature": "MISSING_ENV_ISOLATION",
          "message": "Command::new call has no .env() or .env_clear()",
          "snippet": "Command::new(\"ls\").arg(\"-la\").output().unwrap()"
        },
        {
          "id": "f7",
          "file": "live/scan2.rs",
          "line": 8,
          "severity": "MEDIUM",
          "signature": "MISSING_ENV_ISOLATION",
          "message": "tokio::process::Command::new call has no .env() or .env_clear()",
          "snippet": "TokioCommand::new(\"echo\").arg(\"async hello\").output().await.unwrap()"
        }
      ],
      "metadata": {
        "version": "1.0.0",
        "timestamp": "2026-10-06T12:00:00Z",
        "files_scanned": 1,
        "calls_found": 5
      }
    }
    

    --- VALIDATOR ---

    PASS: live\live_run_report.json
    Live run: PASS — 7 findings.

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

    About this skill

    You bought a runtime guard for Rust. It logs every dangerous command. It asks for confirmation. It looks secure. Then you find out the guard only wraps std::process::Command — and your agent used tokio::process::Command or libc::execl. Or the child process inherited every environment variable, including your API keys. Or there is no audit trail. None of this throws an error. The guard just silently covers less than you think.

    Rust Guard Auditor is a static auditor for Rust that checks whether a runtime guard actually wraps every execution point. It finds std::process::Command, tokio::process::Command, async_std::process::Command, and the libc family — libc::execv, execve, execvp, execl, execlp, posix_spawn — then checks each against six rules: is the call wrapped by a guard, is there a network allowlist, is there an audit trail, is there a human-confirmation fallback, is the guard bypassed via libc, is the child environment isolated. It runs nothing, intercepts nothing, and returns a strict JSON report with line numbers and typed signatures.

    What it does

    • Guard coverage check — flags every std, tokio, and async-std Command call not wrapped by a guard function.
    • libc bypass detection — catches libc::execl, execlp, execv, execve, execvp, and posix_spawn that skip process-level guards.
    • Network allowlist check — verifies outbound calls are restricted.
    • Audit trail check — flags calls with no logging.
    • Human confirmation fallback — flags calls with no approval gate.
    • Child environment isolation — flags calls with no explicit .env() or .env_clear().
    • Strict JSON output — audit_status, findings with line numbers, severity, typed signatures.
    • Runs nothing — static analysis only.

    Why it matters

    A runtime guard that covers 80% of execution points is worse than no guard at all — it gives you confidence you should not have. The 20% that slips through is where the incident happens. In Rust, libc::execl and posix_spawn bypass std::process::Command entirely — if your guard sits at the process layer, it is not protecting you. Async pipelines on tokio or async-std add another path. This auditor tells you whether your Rust guard actually covers everything, before an unguarded call reaches production.

    Test Protocol — 12/12 tests passed

    Verified on 2026-10-06 on Python 3.14.7. Contract testing on test harness.

    • 3 positive cases: clean, warning, critical. Result: PASS.
    • 3 negative cases: missing field, bad status, unknown signature. Result: PASS.
    • 3 edge cases: empty findings with critical status, non-ISO timestamp, negative line number. Result: PASS.
    • 3 contradiction cases: clean with findings, warning with HIGH, critical without HIGH. Result: PASS.

    Verdict: contract satisfied.

    Use cases

    • Verifying that a runtime guard you bought actually wraps every Rust shell call.
    • Auditing a multi-agent pipeline where one agent writes Rust and another executes it.
    • Catching libc::execl and posix_spawn bypasses that skip process-level guards.
    • Checking that async tokio or async-std Command calls are also covered.
    • Checking that child processes do not inherit secrets via std::env::vars().
    • Reviewing AI-generated Rust code before it reaches a CI/CD environment.

    Known limitations

    • Static analysis only — reads code, does not execute it. Runtime behavior is out of scope.
    • Rust only — does not scan Python, JavaScript, or Go.
    • Audits configuration, does not enforce — checks that the guard is wired correctly, it does not intercept commands itself.
    • No correctness analysis — judges guard coverage, not whether commands are safe to run.
    • Read-only — does not modify code, install packages, or write files.
    • Does not detect Command::new reassigned to a variable before .output() is called. In that case the audit may flag a false positive — verify findings manually before acting on them.
    • async_std::process::Command is detected when present in the scanned files, but the live run does not exercise it — detection relies on the same AST rules as tokio::process::Command.
    • Severity reflects guard coverage, not command danger. An unguarded ls -la is flagged HIGH because it bypasses the guard layer — the audit judges whether the guard wraps the call, not whether the command itself is destructive.
    • Requires source access. Needs the .rs files to scan.

    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 behavior is out of scope. Rust only — does not scan Python, JavaScript, or Go. Audits configuration, does not enforce — checks that the guard is wired correctly, it does not intercept commands itself. No correctness analysis — judges guard coverage, not whether commands are safe to run. Read-only — does not modify code, install packages, or write files. Does not detect Command::new reassigned to a variable before .output() is called. In that case the audit may flag a false positive — verify findings manually before acting on them. async_std::process::Command is detected when present in the scanned files, but the live run does not exercise it — detection relies on the same AST rules as tokio::process::Command. Severity reflects guard coverage, not command danger. An unguarded ls -la is flagged HIGH because it bypasses the guard layer — the audit judges whether the guard wraps the call, not whether the command itself is destructive. Requires source access. Needs the .rs files to scan.

    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 1 month ago

    Permissions

    Read Files

    File Scopes

    **/*.rs

    Read access scans Rust source files for std::process::Command, tokio::process::Command, async_std::process::Command, and libc exec/posix_spawn calls, then checks each against six guard-coverage rules. No files are written — the skill is advisory and returns a strict JSON report. No code is executed, no commands are intercepted.

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    This skill performs static analysis on Rust source code to ensure that every system command—whether via standard libraries, async frameworks like Tokio, or low-level libc calls—is actually wrapped by your security guard rails. It prevents 'silent bypasses' where an agent might use an unguarded execution path that skips your logging, approval, or environment isolation rules.

    The auditor specifically targets Rust's diverse execution ecosystem, including std::process::Command, tokio::process::Command, async_std::process::Command, and multiple libc functions like execl and posix_spawn. It ensures your security coverage is consistent across both synchronous and asynchronous code.

    No, this is a non-invasive static analysis tool that reads your .rs files without executing them. It does not require access to your production environment or network, making it safe to use within CI/CD pipelines or pre-deployment code reviews.

    The skill generates a structured JSON report that identifies the exact line numbers and typed signatures of unguarded calls. It flags issues such as missing audit trails, lack of human-confirmation gates, and failure to isolate child environments (e.g., missing .env_clear() calls).

    While highly effective at catching direct execution calls, the auditor may flag false positives if a Command object is reassigned to a variable multiple times before being executed. We recommend manually verifying findings against the provided line numbers before modifying your codebase.

    This skill is designed to integrate into AI-driven development workflows, allowing a supervisor agent to audit Rust code generated by a coder agent before it is ever compiled or executed in a sensitive environment.

    New in Code Quality & Review