跳到正文
cccskills
免费在 GitHub 公开

code-vuln-audit

Scan projects for known dependency vulnerabilities, exposed credentials, and risky code patterns such as SQL injection. Produces text or JSON reports with file locations and severity levels, with options to run individual checks.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Scan code for security issues: dependency vulnerabilities (npm/pip audit), secret leaks (regex and entropy analysis), and OWASP anti-patterns like SQL injection, XSS, or command injection. Use when the user mentions security scans, vulnerability detection, secret leaks, API keys, OWASP, npm audit, pip-audit, hardcoded passwords, or code security checks.

集成工具AWS
查看安装方法

适用场景

  • Checking dependency vulnerabilities before release
  • Finding hardcoded API keys and passwords
  • Reviewing code for common security weaknesses
  • Exporting findings as JSON for further processing

包含的文件(3)

  • SKILL.md5.2 KB
  • LICENSE1.1 KB
  • scripts/security_scan.py29.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

code-vuln-audit

A code security scanning tool with three core scanning capabilities:

  1. Dependency Vulnerability Scanning — Automatically detects known vulnerabilities in npm / pip dependencies
  2. Secret Leak Detection — Discovers hardcoded secrets, tokens, and passwords via regex matching + Shannon entropy analysis
  3. OWASP Pattern Detection — Identifies common security anti-patterns such as SQL injection, XSS, command injection, and insecure deserialization

Quick Start

# Scan the current directory (all checks)
python3 scripts/security_scan.py .

# Scan dependencies only
python3 scripts/security_scan.py --mode deps .

# Detect secret leaks only
python3 scripts/security_scan.py --mode secrets /path/to/project

# Detect OWASP security patterns only
python3 scripts/security_scan.py --mode owasp .

# Output report in JSON format
python3 scripts/security_scan.py --format json --output report.json .

# Only show findings at high severity and above
python3 scripts/security_scan.py --severity high .

Scan Module Details

1. Dependency Vulnerability Scanning (deps)

Automatically detects the project type and invokes the appropriate tool:

Project TypeDetection FileTool Used
Node.jspackage.json + package-lock.jsonnpm audit
Pythonrequirements.txt / pyproject.toml / Pipfilepip-audit

If the corresponding audit tool is not installed, a helpful message is displayed instead of an error.

2. Secret Leak Detection (secrets)

Detection is performed in two ways:

Regex Matching: Covers common secret formats

Secret TypeExample Pattern
AWS Access Key20-character string starting with AKIA
GitHub TokenStarts with ghp_ or github_pat_
Slack TokenStarts with xoxb- or xoxp-
Stripe KeyStarts with sk_live_ or pk_live_
Private Key File-----BEGIN PRIVATE KEY-----
Generic API KeyFormat like api_key = "..."
Credentials in URLhttps://user:pass@host
JWT TokeneyJ... format

Shannon Entropy Analysis: Computes information entropy for string constants in code (threshold > 4.5 and length >= 20) to discover secrets in non-standard formats.

3. OWASP Pattern Detection (owasp)

Covers statically detectable security patterns from the OWASP Top 10:

OWASP CategoryDetection Patterns
A02: Cryptographic FailuresWeak hashes (MD5/SHA1), weak ciphers (DES/RC4)
A03: InjectionSQL injection, command injection (os.system / subprocess shell / eval / exec), XSS (innerHTML / document.write / dangerouslySetInnerHTML / v-html)
A04: Insecure DesignPath traversal
A05: Security MisconfigurationDebug mode enabled, CORS wildcard, binding to 0.0.0.0
A08: Integrity FailuresInsecure deserialization (pickle / yaml.load / marshal / unserialize)
A10: SSRFUser input passed directly to HTTP requests

Supported languages: Python, JavaScript/TypeScript, Java, PHP, Ruby, Go, and more.

Parameters

ParameterDescriptionDefault
TARGETDirectory to scanCurrent directory
--mode MODEScan mode: all, deps, secrets, owaspall
--format FORMATOutput format: text, jsontext
--output FILEOutput file pathstdout
--severity LEVELMinimum reporting level: low, medium, high, criticallow
--exclude-dir DIRAdditional directories to exclude (repeatable)-
--max-file-kb SIZEMaximum file size to scan in KB512
-h, --helpShow help-

Output Format

Text Output (default)

=== Security Scan Report ===
Target: /path/to/project
Modules: deps, secrets, owasp

[CRITICAL] AWS Access Key ID
  File: src/config.py:15
  Code: AWS_KEY = "AKIAIOSFODNN7EXAMPLE"

[HIGH] SQL Injection (f-string)
  File: src/db.py:42
  Code: cursor.execute(f"SELECT * FROM users WHERE id={user_id}")

--- Summary ---
Critical: 1 | High: 1 | Medium: 0 | Low: 0
Total findings: 2

JSON Output

{
  "target": "/path/to/project",
  "scan_time": "2026-04-14T10:30:00",
  "findings": [
    {
      "scanner": "secrets",
      "name": "AWS Access Key ID",
      "severity": "critical",
      "file": "src/config.py",
      "line": 15,
      "snippet": "AWS_KEY = \"AKIAIOSFODNN7EXAMPLE\"",
      "category": "secret-pattern"
    }
  ],
  "summary": {"critical": 1, "high": 0, "medium": 0, "low": 0, "total": 1}
}

Exit Codes

Exit CodeMeaning
0No findings
1Findings present (at least one security issue)
2Scanner internal error

Prerequisites

  • Python 3.7+ (uses standard library only)
  • Dependency scanning requires the corresponding tools: npm (for Node.js projects), pip-audit (for Python projects)
  • If an audit tool is missing, that module will be skipped with a notice — other modules continue to run normally

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Get a simulated peer review of a paper, abstract, or selected sections. Receive assessments of originality, methods, results, and writing, with specific revision suggestions, severity ratings, and a prioritized checklist for improving the manuscript.

中文简介正在准备中。当前显示英语简介。

  • Run a simulated peer review before submitting a paper
  • Check whether methods and conclusions are adequately supported
  • Review an abstract for novelty and clarity
zebbern/claude-code-guide46722026年10月20日 更新

Guide Windows domain penetration testing through Active Directory reconnaissance, credential attacks, privilege escalation, and certificate service checks. Use references for tools such as BloodHound and Impacket to examine attack paths and understand testing prerequisites.

中文简介正在准备中。当前显示英语简介。

  • Planning Active Directory penetration tests
  • Investigating attack paths with BloodHound
  • Reviewing Kerberos and NTLM authentication risks
zebbern/claude-code-guide46722026年10月20日 更新

Test REST, SOAP, and GraphQL APIs for authentication flaws, improper access to other users’ records, and unsafe input handling. Guides endpoint discovery and request variations to identify vulnerabilities and document evidence of unauthorized access.

中文简介正在准备中。当前显示英语简介。

  • Discovering API endpoints for security testing
  • Checking access to other users’ records
  • Assessing GraphQL schemas and query handling
zebbern/claude-code-guide46722026年10月20日 更新

Explores alternative APIs, the interfaces other code uses to call a module. Parallel sub-agents develop distinctly different designs, then present signatures, usage examples, and trade-offs to help choose or combine an approach before implementation.

中文简介正在准备中。当前显示英语简介。

  • Comparing API designs before implementation
  • Weighing simplicity against flexibility
  • Reviewing interfaces from the caller's perspective
zebbern/claude-code-guide46722026年10月20日 更新

Trace system behavior across code, APIs, authentication, data, and networks through an interactive workflow. Store steps, branches, and findings in SQLite, then export diagrams and documentation for security audits, debugging, architecture reviews, or incident analysis.

中文简介正在准备中。当前显示英语简介。

  • Documenting authentication flows for security audits
  • Tracing branches while debugging system behavior
  • Reviewing how system components interact
zebbern/claude-code-guide46722026年10月20日 更新

Compare login approaches and authentication providers, then use implementation examples and security checklists to plan or review an app’s login flow. Covers sessions, tokens, external login providers, passkeys, and common implementation mistakes.

中文简介正在准备中。当前显示英语简介。

  • Choose a login approach for a new app
  • Compare NextAuth / Auth.js, Clerk, and Supabase Auth
  • Review token storage and refresh behavior
zebbern/claude-code-guide46722026年10月20日 更新

查看 zebbern 的全部技能

报告此技能的问题