/security-sweep:security-sweep [scope: all|secrets|injection|auth|config|deps|ai|mobile|data] [path]from security-sweep
Scans codebase for security vulnerabilities, hardcoded secrets, injection flaws, misconfigurations, and attack surfaces. Detects tech stack and runs targeted checks for secrets, injection, auth, config, deps, AI, mobile, and data issues.
Ships in security-sweep. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run a comprehensive security scan of the codebase. This skill identifies vulnerabilities, hardcoded secrets, injection flaws, misconfigurations, and attack surfaces across web and mobile applications.
$0 (optional): Scan scope — one of: all, secrets, injection, auth, config, deps, ai, mobile, data. Defaults to all.$1 (optional): Path to scan. Defaults to the project root.If $ARGUMENTS is empty, run a full all scan from the project root.
Before scanning, detect the project's tech stack by checking for indicator files. This determines which language-specific checks to run.
| Indicator File | Stack | Scan Focus |
|---|---|---|
package.json | Node.js/JS/TS | npm patterns, XSS sinks, eval, child_process |
requirements.txt, pyproject.toml, setup.py, Pipfile | Python | pickle, subprocess, Jinja2, Django/Flask patterns |
pom.xml, build.gradle, build.gradle.kts | Java/Kotlin | JDBC injection, ObjectInputStream, Spring patterns |
Gemfile | Ruby | Marshal, system(), ERB patterns |
go.mod | Go | fmt.Sprintf in SQL, crypto patterns |
Cargo.toml | Rust | unsafe blocks, FFI |
composer.json | PHP | exec, unserialize, include with vars |
*.csproj | .NET | BinaryFormatter, SqlCommand concat |
AndroidManifest.xml | Android | exported components, cleartext, SharedPreferences |
Info.plist, *.xcodeproj, Podfile | iOS | NSUserDefaults, ATS bypass |
Dockerfile | Docker | FROM :latest, root user, secrets in build |
*.tf, *.hcl | Terraform | public ACLs, open CIDR |
next.config.* | Next.js | SSR-specific checks |
pubspec.yaml | Flutter/Dart | Dart-specific mobile checks |
Use Glob to detect which of these exist, then tailor the scan accordingly.
Run the scans below in order. If a scope argument was provided, only run that specific scan module. Use the patterns from patterns.md for each module.
For each scan module, use Grep with the relevant regex patterns from patterns.md. Search across the detected file types. Skip node_modules/, vendor/, .git/, dist/, build/, __pycache__/, .venv/, venv/, .next/, .nuxt/, target/, Pods/, .gradle/ directories.
Scan for hardcoded API keys, tokens, private keys, credentials, database connection strings, and committed secret files. See patterns.md Section 1.
Also check:
.env files exist in the repo (they should be gitignored).gitignore covers .env*, *.pem, *.key, *.p12, credentials*.json*.pem, *.key, *.p12, *.pfx, *.jks files are presentScan for SQL injection, XSS, command injection, SSRF, insecure deserialization, and path traversal patterns. See patterns.md Section 2.
Scan for JWT misuse, weak password handling, insecure session config, broken access control. See patterns.md Section 3.
Scan for CORS misconfiguration, missing security headers, exposed debug endpoints, insecure TLS, Docker issues, Kubernetes/Terraform misconfig. See patterns.md Section 4.
Check dependency manifests for:
preinstall/postinstall with curl/wget/bash)Scan for AI-specific issues: hardcoded AI API keys, prompt injection vectors, eval/exec of LLM output, system prompt leakage, excessive agent permissions. See patterns.md Section 5.
Scan for insecure data storage, missing certificate pinning, cleartext traffic, debug flags, weak crypto. See patterns.md Section 6.
Scan for PII in logs, sensitive data in URLs, plaintext HTTP to external hosts. See patterns.md Section 7.
After all scans complete, produce a structured report.
Start with a summary banner:
============================================
SECURITY SWEEP REPORT
Project: <project name>
Scanned: <date>
Tech Stack: <detected stacks>
============================================
SUMMARY
CRITICAL: <count>
HIGH: <count>
MEDIUM: <count>
LOW: <count>
INFO: <count>
TOTAL: <count>
============================================
Then list findings grouped by severity (CRITICAL first), with this format for each:
[SEVERITY] CATEGORY — Finding Title
File: path/to/file.ext:line_number
Evidence: <the matching code snippet, max 2 lines>
Risk: <1-sentence explanation of the attack scenario>
Fix: <specific remediation with code example>
Ref: <CWE or OWASP reference>
[INFO] rather than flagging it at high severity. Use your contextual understanding of the code to distinguish real issues from benign matches.Read to examine surrounding code before classifying severity. For example, a pickle.load() in a test fixture is lower risk than one in a web endpoint.node_modules/, vendor/, generated files, or lock files.console.log(req.body) in 20 files), group them as one finding with a count rather than listing each separately.What SKILL.md sets; muted values are Claude Code's defaults
maxnpx claudepluginhub onome-aj/security-sweep-plugin --plugin security-sweepOther plugins' skills for the same job