Skilllibrary security-review
install
source · Clone the upstream repo
git clone https://github.com/merceralex397-collab/skilllibrary
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/merceralex397-collab/skilllibrary "$T" && mkdir -p ~/.claude/skills && cp -r "$T/06-agent-role-candidates/security-review" ~/.claude/skills/merceralex397-collab-skilllibrary-security-review && rm -rf "$T"
manifest:
06-agent-role-candidates/security-review/SKILL.mdsource content
Purpose
Perform a structured, read-only security review of a codebase. Identify vulnerabilities mapped to OWASP Top 10 categories, detect hardcoded secrets, audit input validation and auth/authz flows, scan dependency manifests for known CVEs, and flag injection-prone patterns (SQLi, XSS, command injection). Produce a severity-ranked findings report.
When to use
- Before a release or merge of security-sensitive code.
- A PR touches auth, input handling, database queries, or API boundaries.
- A new dependency is added and needs vetting.
- A ticket requests a threat model or attack surface analysis.
- Onboarding a codebase that has never had a formal security review.
Do NOT use when
- The task is to fix a known vulnerability — use an implementer skill for remediation.
- The concern is purely about code style or formatting.
- Performance or load-testing is the goal, not security.
- The review scope is limited to UI/CSS with no data handling.
Operating procedure
- Run
to detect hardcoded secrets and credentials.grep -rn 'password\|secret\|api_key\|token\|AWS_\|PRIVATE_KEY' --include='*.{ts,js,py,go,java,yml,yaml,json,env}' . - Search for SQL injection patterns: run
and check if queries use parameterised bindings.grep -rn 'execute\|raw\|query\|cursor\|sql' --include='*.py' --include='*.ts' --include='*.js' . - Search for XSS patterns: run
and verify output encoding.grep -rn 'innerHTML\|dangerouslySetInnerHTML\|v-html\|document\.write\|\$sce\.trustAsHtml' . - Audit authentication flows: locate auth middleware/modules with
and trace token validation, expiry, and refresh logic.grep -rl 'auth\|login\|session\|jwt\|bearer' --include='*.{ts,js,py,go}' . - Check authorisation: for each protected endpoint, verify that role/permission checks exist before data access.
- Inspect dependency manifests for known vulnerabilities: list all dependencies and check for any
,npm audit
,pip audit
, or equivalent tooling configuration.cargo audit - Review CORS configuration: search for
,Access-Control-Allow-Origin
, or equivalent and verify origins are not wildcarded in production configs.cors( - Check for insecure cryptographic usage: search for
and flag any non-deprecated usage.md5\|sha1\|DES\|ECB - Verify rate limiting and abuse prevention: search for rate-limit middleware or configuration.
- Compile all findings into the output format below, assigning each a severity (Critical / High / Medium / Low / Info) and OWASP category.
Decision rules
- Classify severity by exploitability × impact: Critical = remotely exploitable + data breach; Info = theoretical only.
- A hardcoded secret in any non-test file is always High or Critical.
- Missing input validation on user-facing endpoints is at least Medium.
- Flag dependency vulnerabilities only if the vulnerable code path is reachable or cannot be confirmed unreachable.
- When in doubt between two severity levels, pick the higher one and note the uncertainty.
Output requirements
- Findings Table —
| # | Finding | Severity | OWASP Category | File:Line | Recommendation | - Secrets Scan Summary — count of potential secrets found, with file locations.
- Auth/Authz Flow Diagram — text description of token lifecycle and permission checks.
- Dependency Risk List — flagged packages with known CVEs or missing audit tooling.
- Attack Surface Map — list of entry points (endpoints, CLI args, file uploads) and their validation status.
- Remediation Priority — ordered list of top 5 items to fix first.
References
- OWASP Top 10 (2021): https://owasp.org/Top10/
- CWE/SANS Top 25: https://cwe.mitre.org/top25/
- Project dependency manifests and lock files
- CI/CD security scanning configuration if present
Related skills
— provides the file inventory this skill auditsrepo-evidence-gathering
— converts findings into remediation ticketsticket-creator
— verifies runtime security configuration (TLS, permissions)shell-inspection
— general code quality review (non-security-focused)code-review
Failure handling
- If a file type is unrecognised, skip it but log the path in a "skipped files" appendix.
- If grep results exceed 200 matches for a pattern, sample the first 30 and note the total count.
- If no auth module is found, explicitly state "no authentication layer detected" as a Critical finding.
- If dependency audit tools are unavailable, list unverified packages and recommend installing audit tooling.