AI Code Security Auditor: Slopsquatting + Guardrail Diff

    by Ariel Mnang'at

    1

    Audit AI-generated code for hallucinated packages, silently removed auth guardrails, and agent-specific vulnerabilities.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    AI Code Security Auditor: Slopsquatting + Guardrail Diff

    Example session with this skill installed

    Run a security audit on this AI-generated PR. It adds a new Express route for user profiles and updates the package.json. Check for slopsquatting and guardrail bypasses.

    • Read your context and instructions
    • Compiled the ai code security

    I have completed the 7-pass security audit of the proposed changes. I identified one critical dependency risk and a high-severity guardrail bypass.

    Security Audit Report

    SeverityFile:LineVulnerability ClassExploitation StoryRecommended Fix
    CRITICALpackage.json:14Slopsquatting (Hallucination)The agent added express-auth-guard-v2 which does not exist in npm; attacker could register this to execute arbitrary code.Remove express-auth-guard-v2 and use established passport or express-jwt.
    HIGHroutes/user.js:22Guardrail BypassThe agent removed the checkAuth middleware from the GET /profile/:id route, allowing IDOR access to any profile.Re-add router.get('/:id', checkAuth, userController.getProfile);
    MEDIUMroutes/user.js:45Secrets in CodeA hardcoded DEV_SECRET_KEY was added for local testing but would be committed to the repo.Move string to .env and use process.env.DEV_SECRET_KEY.
    LOWapp.js:10Disabled Protectionshelmet() middleware was commented out by the agent, likely to resolve a CSP header issue during testing.Uncomment app.use(helmet()); and configure specific CSP rules.

    Verdict: DO NOT SHIP.
    The presence of a hallucinated package dependency poses an immediate supply-chain risk.

    Verification Statement

    • Verified: Slopsquatting check performed against npm registry; guardrail diff confirmed removal of middleware in routes/user.js.
    • UNVERIFIED: I could not verify if the new userController has internal tenant checks without access to controllers/user.js.

    Next steps

    1. Remove the hallucinated express-auth-guard-v2 dependency.
    2. Restore the checkAuth middleware to the profile route.
    3. Run npm install and update the lockfile before re-auditing.

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

    About this skill

    AI coding agents often prioritize functional code over secure code, leading to hallucinated dependencies and silently removed guardrails. This skill provides a specialized security audit layer designed specifically to catch the unique failure modes of LLM-generated and agent-written PRs.

    What it does

    • Dependency verification detects "slopsquatting" by cross-referencing imports against lockfiles and registries to catch hallucinated, malicious packages.
    • Guardrail diffing identifies instances where agents silently deleted auth checks, middleware, or validation logic to make code "work."
    • API hallucination hunting flags calls to non-existent framework methods, dead configuration keys, and invented REST endpoints.
    • Agent-specific secret detection scans for hardcoded API keys, JWTs, and high-entropy strings frequently embedded by LLMs during scaffolding.
    • Injection analysis reviews LLM-touching code for prompt-injection backdoors where model outputs are executed without validation.

    How it works

    1. Inventory phase scans the change surface using git diff to identify modified configs, CI workflows, and source files.
    2. Dependency pass runs offline scripts to verify every new import against official package registries and internal lockfiles.
    3. Guardrail audit compares the new code against security-critical patterns like @requires_auth or CSRF middleware to ensure no regressions.
    4. Vulnerability sweep performs a static analysis for OWASP Top 10 issues, specifically looking for hand-rolled crypto or "test fraud" mocks.
    5. Verdict reporting generates a severity-ranked findings table with CVSS scores, specific line citations, and concrete code fixes.

    Frameworks & tools

    The skill utilizes bundled Python scripts check_dependencies.py and diff_guardrails.py. It supports package managers across Node.js (npm/yarn), Python (pip/uv), Go, Rust (Cargo), and PHP (Composer).

    Why this beats prompting it yourself

    Generic prompts often miss "silent deletions" where an agent simply stops including a security decorator. This skill enforces a 7-step systematic audit that treats LLM output as untrusted input, specifically looking for package hallucinations that standard linters ignore.

    Use cases

    • Auditing a large PR generated by Claude Code or Cursor before merging to main.
    • Reviewing fresh project scaffolds for hardcoded secrets and hallucinated library imports.
    • Verifying that AI-refactored modules haven't accidentally bypassed existing auth middleware.
    • Checking LLM-integrated applications for prompt-injection vulnerabilities and unsafe execution sinks.

    Known limitations

    Does not perform dynamic analysis or runtime testing. Verification of packages is metadata-only and requires external registry access for full confirmation of package age and maintainer status.

    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 7 days ago

    Software
    GitPython 3.10+

    Permissions

    Terminal / Shell
    Network Access
    Read Files

    File Scopes

    **/*

    Read-only audit: bundled scripts analyze files and run fully offline with no network calls and no environment-variable reads. Network Access is declared because the auditing agent may verify package metadata (publish date, maintainers) on public registries. No file writes; the report is delivered in chat.

    Listed7 days ago

    What's inside

    Frequently Asked Questions

    Unlike standard linters, this skill specifically targets 'AI slop'—hallucinated packages that don't exist in registries and instances where an agent silently deleted security decorators to make a feature work. It treats AI-generated code as untrusted input rather than just checking for syntax errors.

    This skill is agent-agnostic and designed to audit code produced by tools like Claude Code, Cursor, GitHub Copilot, or custom internal LLM workflows. It works by analyzing the git diff of the PR, regardless of which model or IDE generated the changes.

    You receive the core logic scripts, including the dependency verifier and guardrail diffing engine, along with documentation for integrating the auditor into your existing CI/CD pipeline or local git hooks. It includes support for major package managers across Node.js, Python, Go, Rust, and PHP.

    Dependency verification requires an internet connection to cross-reference imports against live package registries (like npm or PyPI). However, the guardrail diffing and secret detection phases can be configured to run entirely offline against your local lockfiles and codebase.

    While the auditor is highly effective at catching 'hallucinated' dependencies and missing auth checks, it does not perform dynamic runtime analysis or penetration testing. It focuses on static code integrity and identifying vulnerabilities introduced during the LLM's drafting process.

    New in Code Quality & Review

    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.