/spec-security-review:spec-security-reviewfrom spec-security-review
Performs reusable SAST, SCA, authorization, XSS, supply-chain, and AI/LLM security reviews. Use when the user asks for a security audit, SCA, SAST, access-control review, XSS review, dependency review, OWASP review, release security assessment, or secure remediation plan.
Ships in spec-security-review. 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.
None: SKILL.md is the whole skill.
Use this skill to perform a structured, evidence-based security review for any project or task. Default to read-only analysis unless the user explicitly asks to implement fixes.
For a ready-to-fill request template, backend/frontend/SCA modules, quick prompt, and severity rules, see the Spec Templates & Modules section at the end of this file.
Enumerate routes from URL/router/controller files. For each endpoint, inspect:
Flag:
Trace user, API, AI, markdown, rich-text, document, or config data into:
[innerHTML]bypassSecurityTrustHtmlbypassSecurityTrustResourceUrlsrc or srcdocDOMParserElementRef or nativeElementdocument or window DOM writesnew Function, eval, or dynamic templatesFor each path, document:
Before performing SCA analysis, identify the actual package-management system actively used by the repository.
Determine dependency authority in this priority order:
Python:
Node.js:
Rules:
Prefer lockfiles over manifest-only files whenever available.
Do not analyze fallback manifests if a higher-priority dependency source exists.
Do not mix dependency ecosystems unless the repository genuinely uses multiple package managers.
Detect and report conflicting dependency sources.
If multiple manifests exist, determine which is actively used from:
Validation requirements:
Review:
Flag:
Inspect:
Flag:
Use this format for every finding:
### [Severity] Finding Title
Repository:
Endpoint/Feature:
File:
Lines:
Type: SAST / SCA / Supply-chain / AI Security
OWASP:
Snippet:
```code
...
Source-to-sink or access-control explanation: Why risky: Potential impact: Recommended remediation:
## Reporting Rules
- Put Critical and High findings first.
- Include exact file paths and line numbers.
- Include snippets, but redact secrets.
- Distinguish confirmed findings from potential/context-dependent risks.
- Do not claim the review proves no other issues exist.
- Include scan limitations when tools could not run.
- For implementation requests, produce a short remediation plan before editing.
Also add a strict validation and verification phase before finalizing the report.
Validation requirements:
* Recheck every completed finding, endpoint review, dependency review, and AI/LLM review.
* Verify whether each required check from the scope was actually covered.
* Detect missed routes, missed files, missed dependencies, missed auth flows, missed sinks, and missed privilege paths.
* If coverage is incomplete, retry the analysis automatically with focused re-scans for the missed areas.
* After retry, clearly state:
* what was successfully validated
* what additional findings were discovered
* what still could not be verified
* exact reason why verification was not possible
Add a final “Validation Summary” section containing:
1. Checks completed successfully
2. Checks retried
3. Newly identified findings after retry
4. Areas with partial confidence
5. Areas not covered
6. Reasons for non-coverage
7. False-positive checks performed
8. Overall confidence level
Also require:
* cross-validation between SAST, SCA, authorization, XSS, and AI-security findings
* verification that generated reports fully match actual code paths
* confirmation that no required OWASP category was skipped
* confirmation that all high-risk endpoints were reviewed
* explicit mention of what was done vs what was not done
If something is skipped, the report must explicitly explain:
* why it was skipped
* what evidence was unavailable
* what additional access or files are required
* estimated residual risk because of the gap
---
# Spec Templates & Modules
Use these templates to request a reusable security audit for any repository, release, PR, or task.
## Request Template
```markdown
# Security Review Request
Project: {{PROJECT_NAME}}
Repositories:
{{REPOSITORIES}}
Branch or release: {{BRANCH_OR_RELEASE}}
Application type: {{APP_TYPE}}
Tech stack: {{TECH_STACK}}
Review mode: {{MODE}}
Options: read-only audit, remediation plan, implement fixes, PR review.
## Scope
Analyze:
- source code
- API routes, controllers, services, and middleware
- authentication and authorization flows
- shared modules and utilities
- configuration and environment files
- dependency manifests and lockfiles
- Docker, CI/CD, and infrastructure files
- third-party integrations
- AI, LLM, vector DB, or agentic workflows
## Required Checks
### SAST
- missing authentication
- missing role checks
- IDOR/BOLA
- broken access control
- privilege escalation
- injection risks
- XSS and unsafe rendering
- CSRF, CORS, and session issues
- unsafe file upload or download
- hardcoded secrets
- sensitive data exposure
- insecure logging or telemetry
- dangerous dynamic execution
### SCA And Supply Chain
- vulnerable dependencies
- outdated packages
- unpinned or wildcard dependencies
- lockfile drift
- abandoned packages
- packages installed outside lockfiles
- Docker base image risks
- build context secret leakage
- CI/CD dependency install risks
- dependency confusion risks
### AI And LLM Security
- prompt injection
- unsafe agent tools
- SQL, file, network, or browser tools exposed to users
- PHI/PII sent to external providers
- vector DB data exposure
- model telemetry leakage
- unsafe model output rendering
## Evidence Requirements
For every finding, include:
1. Finding title
2. Severity: Critical / High / Medium / Low
3. Repository
4. Endpoint or feature
5. File path
6. Line number(s)
7. Vulnerable snippet
8. Source-to-sink or access-control explanation
9. Why it is risky
10. Potential impact
11. Recommended remediation
12. SAST / SCA / Supply-chain / AI Security classification
13. OWASP category
## Output Format
Produce:
- executive summary
- critical and high findings first
- endpoint-by-endpoint backend authorization findings
- source-to-sink frontend XSS findings
- dependency and supply-chain findings
- AI/LLM security findings, if applicable
- prioritized remediation plan
- scan limitations
Append this when you need a deep API access-control review:
Perform a deep backend authorization and access-control review.
Enumerate all routes from router, URL, controller, and view files.
For each endpoint, identify:
- HTTP method and path
- authentication requirement
- permission class or middleware
- role checks
- object lookup fields
- user-controlled IDs
- queryset or service-layer filtering
- ownership, tenancy, assignment, or scope checks
Find:
- missing authentication
- missing role checks
- IDOR/BOLA
- privilege escalation
- unsafe admin access
- provider or staff overreach
- public mutation endpoints
- insecure operational APIs
Return endpoint-by-endpoint findings with file and line references.
Append this when you need unsafe rendering review:
Perform an exhaustive frontend XSS and unsafe rendering review.
Trace all user-controlled, API-controlled, AI-controlled, markdown, rich-text, document, or config data flowing into:
- innerHTML
- sanitizer bypasses
- iframe src or srcdoc
- markdown renderers
- DOMParser
- ElementRef or nativeElement
- direct document/window DOM manipulation
- new Function or eval
- dynamic templates
For every exploitable path, explain:
source -> transformation -> sanitization or missing sanitization -> sink -> impact -> fix.
Before performing SCA analysis, identify the actual package-management system actively used by the repository.
Determine dependency authority in this priority order:
Python:
Node.js:
Rules:
Prefer lockfiles over manifest-only files whenever available.
Do not analyze fallback manifests if a higher-priority dependency source exists.
Do not mix dependency ecosystems unless the repository genuinely uses multiple package managers.
Detect and report conflicting dependency sources.
If multiple manifests exist, determine which is actively used from:
Validation requirements:
Append this when you need backend dependency review:
Perform a complete backend dependency and supply-chain security review.
Analyze:
- package manifests
- lockfiles
- requirements files
- Dockerfiles
- CI/CD files
- package install commands
- public or private package indexes
- AI/LLM/vector dependencies
Identify:
- vulnerable packages
- unpinned versions
- wildcard dependencies
- abandoned packages
- dependency confusion risks
- packages installed outside lockfiles
- Docker base image and root user risks
- build context secret leakage
- CI secrets exposure
- risky AI integrations
Use the security-audit-spec skill.
Project: {{PROJECT_NAME}}
Repos: {{REPOSITORIES}}
Branch: {{BRANCH}}
Run:
1. backend authorization review
2. frontend XSS source-to-sink review
3. dependency and supply-chain review
4. AI/LLM integration review, if applicable
Return exact files, lines, snippets, impact, and remediation.
Also add a strict validation and verification phase before finalizing the report.
Validation requirements:
Recheck every completed finding, endpoint review, dependency review, and AI/LLM review.
Verify whether each required check from the scope was actually covered.
Detect missed routes, missed files, missed dependencies, missed auth flows, missed sinks, and missed privilege paths.
If coverage is incomplete, retry the analysis automatically with focused re-scans for the missed areas.
After retry, clearly state:
Add a final “Validation Summary” section containing:
Also require:
If something is skipped, the report must explicitly explain:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
spec-security-review@trackmind is listed by trackmind-ai/marketplace — review the source before installing
npx claudepluginhub trackmind-ai/marketplace --plugin spec-security-review