
Agent Security Scanning
- 53 installs
- 31 repo stars
- Updated April 12, 2026
- itallstartedwithaidea/agent-skills
Agent Security Scanning is an agent skill that detects vulnerabilities in AI-generated code using OWASP LLM guidance, dependency CVE checks, and agent-specific threat patterns before production.
About
Agent Security Scanning is a Ship-phase skill for solo builders who increasingly ship code written or refactored by agents. Functional tests often green-light behavior while leaving injection, XSS, SSRF, weak validation, and bad crypto in place—patterns studies associate with higher defect rates in AI-generated code. This skill runs a structured scanning mindset across static analysis of the changed codebase, dependency vulnerability checks against CVE knowledge, and threats unique to LLM apps such as prompt injection, tool misuse, and exfiltration via tool calls. Findings are normalized with severity and CWE labels plus actionable fixes, so you can triage in a pre-release pass without pretending a linter alone understands agent habits. It complements your normal CI and human review rather than replacing compliance programs or pen tests.
- Three-layer pipeline: static code analysis, dependency CVE scanning, agent-specific threat modeling
- Calibrated for AI-generated patterns: unsanitized dynamic SQL, eval(), unvalidated deserialization
- OWASP Top 10 for LLM Applications plus prompt-injection and tool-misuse vectors
- Each finding includes severity, CWE classification, and concrete remediation with code examples
- Flags data exfiltration risks through tool calls and insecure auth/crypto patterns common in agent output
Agent Security Scanning by the numbers
- 53 all-time installs (skills.sh)
- +3 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #1,292 of 2,203 Security skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/itallstartedwithaidea/agent-skills --skill agent-security-scanningAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 53 |
|---|---|
| repo stars | ★ 31 |
| Security audit | 3 / 3 scanners passed |
| Last updated | April 12, 2026 |
| Repository | itallstartedwithaidea/agent-skills ↗ |
What it does
Run an agent-guided security pass on AI-generated code for OWASP-LLM issues, dependency CVEs, and typical agent codegen anti-patterns before you deploy.
Who is it for?
Best when you're shipping APIs, SaaS, or agent tools where most implementation velocity comes from LLM codegen and you need a dedicated security lens.
Skip if: Formal compliance-only audits with no code changes, or projects with zero agent-generated surface where a standard SAST-only workflow already suffices.
When should I use this skill?
Before production when reviewing AI-generated code for exploitable vulnerabilities, dependency CVEs, and LLM-specific threats.
What you get
You receive a prioritized list of findings with CWE tags and remediation examples so you can fix issues before deploy instead of discovering them in production.
- Severity-rated vulnerability findings with CWE IDs
- Remediation guidance with example fixes per finding class
By the numbers
- Covers three scanning layers: static analysis, dependency CVE matching, and agent-specific threat modeling
Files
Agent Security Scanning
Part of Agent Skills™ by googleadsagent.ai™
Description
Agent Security Scanning detects vulnerabilities in AI-generated code before it reaches production. The agent applies OWASP Top 10 for LLM Applications, scans for known CVEs in dependencies, identifies prompt injection vectors, and flags insecure patterns specific to agent-generated code—such as unsanitized dynamic SQL, eval() usage, and unvalidated deserialization.
AI code generators produce code that "works" but frequently contains security vulnerabilities invisible to functional testing. Studies show that AI-generated code contains exploitable vulnerabilities at higher rates than human-written code, particularly in input validation, authentication, and cryptographic operations. This skill applies security analysis specifically calibrated for the patterns that AI agents produce.
The scanning pipeline covers three layers: static analysis of generated code (injection, XSS, SSRF), dependency vulnerability scanning (CVE database matching), and agent-specific threat modeling (prompt injection, tool misuse, data exfiltration through tool calls). Each finding includes a severity rating, CWE classification, and a concrete remediation with code example.
Use When
- Reviewing AI-generated code before committing or deploying
- Scanning dependencies for known CVEs after
npm installorpip install - Auditing agent tool call patterns for potential misuse
- Implementing security gates in CI/CD pipelines
- The user requests security review, vulnerability scan, or penetration testing
- Building applications that handle user input, authentication, or payments
How It Works
graph TD
A[AI-Generated Code] --> B[Layer 1: Static Analysis]
B --> C[Injection: SQL, XSS, SSRF, Command]
B --> D[Auth: Hardcoded Secrets, Weak Crypto]
B --> E[Data: PII Exposure, Logging Secrets]
A --> F[Layer 2: Dependency Scan]
F --> G[CVE Database Match]
F --> H[License Compliance]
A --> I[Layer 3: Agent Threat Model]
I --> J[Prompt Injection Vectors]
I --> K[Tool Call Audit]
I --> L[Data Exfiltration Paths]
C --> M[Severity Classification + CWE]
D --> M
E --> M
G --> M
J --> M
K --> M
L --> M
M --> N[Remediation Report]The three-layer scan runs in parallel. Static analysis catches code-level vulnerabilities, dependency scanning catches known CVEs, and agent threat modeling catches risks unique to AI-powered applications.
Implementation
import re
from dataclasses import dataclass
@dataclass
class SecurityFinding:
severity: str # CRITICAL, HIGH, MEDIUM, LOW
cwe: str
title: str
file: str
line: int
description: str
remediation: str
class AgentSecurityScanner:
PATTERNS = [
{
"name": "SQL Injection",
"pattern": r'f["\'].*(?:SELECT|INSERT|UPDATE|DELETE).*\{.*\}',
"severity": "CRITICAL",
"cwe": "CWE-89",
"remediation": "Use parameterized queries instead of string interpolation",
},
{
"name": "Command Injection",
"pattern": r'(?:os\.system|subprocess\.call|exec)\s*\(.*(?:f["\']|\+\s*\w)',
"severity": "CRITICAL",
"cwe": "CWE-78",
"remediation": "Use subprocess with list args, never shell=True with user input",
},
{
"name": "Hardcoded Secret",
"pattern": r'(?:password|secret|api_key|token)\s*=\s*["\'][^"\']{8,}["\']',
"severity": "HIGH",
"cwe": "CWE-798",
"remediation": "Use environment variables or a secrets manager",
},
{
"name": "Eval Usage",
"pattern": r'\beval\s*\(',
"severity": "HIGH",
"cwe": "CWE-95",
"remediation": "Use ast.literal_eval for data, or a sandboxed interpreter",
},
{
"name": "Insecure Deserialization",
"pattern": r'pickle\.loads?\s*\(',
"severity": "HIGH",
"cwe": "CWE-502",
"remediation": "Use JSON or msgpack instead of pickle for untrusted data",
},
]
def scan_file(self, filepath: str, content: str) -> list[SecurityFinding]:
findings = []
for i, line in enumerate(content.splitlines(), 1):
for pattern in self.PATTERNS:
if re.search(pattern["pattern"], line, re.IGNORECASE):
findings.append(SecurityFinding(
severity=pattern["severity"],
cwe=pattern["cwe"],
title=pattern["name"],
file=filepath,
line=i,
description=f"Detected {pattern['name']} pattern",
remediation=pattern["remediation"],
))
return findings
def scan_dependencies(self, lockfile: str) -> list[SecurityFinding]:
"""Scan package lockfile against CVE databases."""
# Delegates to `npm audit` or `pip-audit`
pass
def scan_agent_threats(self, tool_calls: list[dict]) -> list[SecurityFinding]:
findings = []
for call in tool_calls:
if call["tool"] == "Shell" and any(
dangerous in call.get("command", "")
for dangerous in ["rm -rf", "curl | sh", "wget | bash", "> /dev/"]
):
findings.append(SecurityFinding(
severity="CRITICAL", cwe="CWE-78",
title="Dangerous Shell Command",
file="agent_session", line=0,
description=f"Agent issued dangerous command: {call['command'][:100]}",
remediation="Restrict agent shell access to an allowlist of safe commands",
))
return findingsBest Practices
- Run security scanning on every AI-generated code change, not just human-written code
- Classify findings by CWE for standardized tracking and reporting
- Block merges on CRITICAL and HIGH findings; track MEDIUM in follow-up tickets
- Scan dependencies weekly, not just at install time—new CVEs are published daily
- Audit agent tool calls for dangerous patterns (file deletion, network access, eval)
- Maintain a suppression list for acknowledged false positives with expiration dates
Platform Compatibility
| Platform | Support | Notes |
|---|---|---|
| Cursor | Full | Pre-commit + CI integration |
| VS Code | Full | Security extension ecosystem |
| Windsurf | Full | Security scanning support |
| Claude Code | Full | Code review + scanning |
| Cline | Full | Security-aware review |
| aider | Partial | Code-level scanning |
Related Skills
- CodeQL & Semgrep - Deep static analysis with data flow tracking that catches vulnerabilities regex-based scanning misses
- Secret Protection - Credential leak prevention across pre-commit, CI/CD, and runtime layers
- Sandbox Hardening - Execution isolation that limits the blast radius of any vulnerability that escapes scanning
- Code Review - Structured quality gate that applies security review as one of its core evaluation dimensions
Keywords
security-scanning owasp cve vulnerability-detection prompt-injection agent-security static-analysis dependency-audit
---
© 2026 googleadsagent.ai™ | Agent Skills™ | MIT License
Related skills
How it compares
Use as a codegen-aware security reviewer, not as a substitute for dependency bots alone or generic lint rules that ignore LLM-specific threat models.
FAQ
Who is agent-security-scanning for?
Developers and small teams using agent-skills workflows who need a structured pre-production security review tuned for AI-written code.
When should I use agent-security-scanning?
In Ship before merging or deploying agent-generated features, after large dependency upgrades, or when adding tools that accept user-influenced prompts.
Is agent-security-scanning safe to install?
Check the Security Audits panel on this Prism page and limit network or secret access in your agent environment according to how you run dependency and code scans.