secure
Security audit a codebase path — OWASP Top 10 (2025), secrets, dependency CVEs, misconfigs; write severity-ranked report to myreports/
- License 许可
- MIT
- 最近更新
- 2026-10-19
- Stars
- ★ 2
- Forks
- 1
01 前言 Front Matter
- name
- secure
- description
- Security audit a codebase path — OWASP Top 10 (2025), secrets, dependency CVEs, misconfigs; write severity-ranked report to myreports/
- argument-hint
- <path> (optional, defaults to .)
03 SKILL.md 正文
IMMEDIATE EXIT if path invalid:
- If
$ARGUMENTSis non-empty and the path does not exist: output "❌ Path not found: $ARGUMENTS" and STOP.
Target: $ARGUMENTS (default .)
-
Detect stack — check for
package.json,requirements.txt,go.mod,Gemfile,Cargo.toml,pom.xml -
Run available CLI scanners (skip silently if not installed):
- SAST:
semgrep --config p/security-audit --config p/owasp-top-ten <target> --json 2>/dev/null - Secrets:
gitleaks detect --source <target> --no-git 2>/dev/null - Python deps:
pip-audit -r requirements.txt 2>/dev/null(preferred oversafety) - Node deps:
npm audit --json 2>/dev/null(if package.json present) - Deps (general):
grype dir:<target> 2>/dev/null
- SAST:
-
If no scanners available: use
grep+Readfor manual pattern matching- raise request to install proper tool to user.
-
Manual checks — always run regardless of scanner output, cite
file:line:- Secrets: regex
(?i)(api[_-]?key|secret|password|token|private[_-]?key)\s*[=:]\s*['"][^'"]{8,}; also scan.env*files - Injection (OWASP A03): unsanitised input reaching
exec,eval,query,system,subprocess,os.popen, template literals in SQL - Broken Access Control (OWASP A01/A10): missing auth guards, path traversal
../, SSRF (user-controlled URLs passed to HTTP clients), open redirects - Auth failures (OWASP A07): weak hashing (MD5/SHA1/DES), hardcoded credentials, missing JWT validation, no MFA enforcement
- Misconfig (OWASP A05):
DEBUG=True, open CORS (*), HTTP endpoints, world-readable secrets files, missing security headers (X-Frame-Options,Content-Security-Policy,Strict-Transport-Security) - Exceptional conditions (OWASP A10 2025): bare
except:clauses, exception handlers that return success, swallowed errors
- Secrets: regex
-
Allowed: up to 5 WebSearch queries for CVE lookups, library-specific known issues, or exploit pattern verification
-
Severity scale — Critical (RCE/auth bypass/exposed secrets) | High (injection/privesc) | Medium (misconfig/info leak) | Low (hardening gaps)
-
Determine label: basename of the resolved target path, with file extension stripped
-
mkdir -p myreportsand createmyreports/.gitignore(*) if it doesn't exist -
Write report to
myreports/secure-<label>.md:- Header:
# Security Audit: <target> — <YYYY-MM-DD> - Summary line:
Critical: N | High: N | Medium: N | Low: N - Findings sorted Critical → Low; format:
- [SEVERITY] file:line — description - Sections: Secrets / Injection / Access Control / Auth / Misconfig / Dependencies / Exceptional Conditions
- "None found" for clean sections
- Header:
-
Output: "✅ Security report written to myreports/secure-<label>.md"
04 同仓库更多 Skills
example
Brief description of what this skill does
mdupdate
Refine .md file by integrating user's inline answers
mdresearch
Research codebase state from context file
mdplan
Generate step-by-step implementation plan from research
mdimplement
Execute implementation plan with testing and verification
ruff
Format and lint-fix Python file(s) or directory via ruff format + ruff check --fix