- Home
- Skills
- Code Quality & Review
- AI Code Security Auditor: Slopsquatting + Guardrail Diff
AI Code Security Auditor: Slopsquatting + Guardrail Diff
Audit AI-generated code for hallucinated packages, silently removed auth guardrails, and agent-specific vulnerabilities.
$15
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
| Severity | File:Line | Vulnerability Class | Exploitation Story | Recommended Fix |
|---|---|---|---|---|
| CRITICAL | package.json:14 | Slopsquatting (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. |
| HIGH | routes/user.js:22 | Guardrail Bypass | The 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); |
| MEDIUM | routes/user.js:45 | Secrets in Code | A 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. |
| LOW | app.js:10 | Disabled Protections | helmet() 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
userControllerhas internal tenant checks without access tocontrollers/user.js.
Next steps
- Remove the hallucinated
express-auth-guard-v2dependency. - Restore the
checkAuthmiddleware to the profile route. - Run
npm installand 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
- Inventory phase scans the change surface using
git diffto identify modified configs, CI workflows, and source files. - Dependency pass runs offline scripts to verify every new import against official package registries and internal lockfiles.
- Guardrail audit compares the new code against security-critical patterns like
@requires_author CSRF middleware to ensure no regressions. - Vulnerability sweep performs a static analysis for OWASP Top 10 issues, specifically looking for hand-rolled crypto or "test fraud" mocks.
- 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
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 7 days ago
- Software
Git
Python 3.10+
Permissions
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.
What's inside
Frequently Asked Questions
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.