Skill files6 files

references/

SKILL.md169 lines
1
---
2
name: security-review
3
description: 'AI-powered codebase security scanner that reasons about code like a security researcher — tracing data flows, understanding component interactions, and catching vulnerabilities that pattern-matching tools miss. Use this skill when asked to scan code for security vulnerabilities, find bugs, check for SQL injection, XSS, command injection, exposed API keys, hardcoded secrets, insecure dependencies, access control issues, or any request like "is my code secure?", "review for security issues", "audit this codebase", or "check for vulnerabilities". Covers injection flaws, authentication and access control bugs, secrets exposure, weak cryptography, insecure dependencies, and business logic issues across JavaScript, TypeScript, Python, Java, PHP, Go, Ruby, and Rust.'
4
---
5
6
# Security Review
7
8
An AI-powered security scanner that reasons about your codebase the way a human security
9
researcher would — tracing data flows, understanding component interactions, and catching
10
vulnerabilities that pattern-matching tools miss.
11
12
## When to Use This Skill
13
14
Use this skill when the request involves:
15
16
- Scanning a codebase or file for security vulnerabilities
17
- Running a security review or vulnerability check
18
- Checking for SQL injection, XSS, command injection, or other injection flaws
19
- Finding exposed API keys, hardcoded secrets, or credentials in code
20
- Auditing dependencies for known CVEs
21
- Reviewing authentication, authorization, or access control logic
22
- Detecting insecure cryptography or weak randomness
23
- Performing a data flow analysis to trace user input to dangerous sinks
24
- Any request phrasing like "is my code secure?", "scan this file", or "check my repo for vulnerabilities"
25
- Running `/security-review` or `/security-review <path>`
26
27
## How This Skill Works
28
29
Unlike traditional static analysis tools that match patterns, this skill:
30
1. **Reads code like a security researcher** — understanding context, intent, and data flow
31
2. **Traces across files** — following how user input moves through your application
32
3. **Self-verifies findings** — re-examines each result to filter false positives
33
4. **Assigns severity ratings** — CRITICAL / HIGH / MEDIUM / LOW / INFO
34
5. **Proposes targeted patches** — every finding includes a concrete fix
35
6. **Requires human approval** — nothing is auto-applied; you always review first
36
37
## Execution Workflow
38
39
Follow these steps **in order** every time:
40
41
### Step 1 — Scope Resolution
42
Determine what to scan:
43
- If a path was provided (`/security-review src/auth/`), scan only that scope
44
- If no path given, scan the **entire project** starting from the root
45
- Identify the language(s) and framework(s) in use (check package.json, requirements.txt,
46
go.mod, Cargo.toml, pom.xml, Gemfile, composer.json, etc.)
47
- Read `references/language-patterns.md` to load language-specific vulnerability patterns
48
49
### Step 2 — Dependency Audit
50
Before scanning source code, audit dependencies first (fast wins):
51
- **Node.js**: Check `package.json` + `package-lock.json` for known vulnerable packages
52
- **Python**: Check `requirements.txt` / `pyproject.toml` / `Pipfile`
53
- **Java**: Check `pom.xml` / `build.gradle`
54
- **Ruby**: Check `Gemfile.lock`
55
- **Rust**: Check `Cargo.toml`
56
- **Go**: Check `go.sum`
57
- Flag packages with known CVEs, deprecated crypto libs, or suspiciously old pinned versions
58
- Read `references/vulnerable-packages.md` for a curated watchlist
59
60
### Step 3 — Secrets & Exposure Scan
61
Scan ALL files (including config, env, CI/CD, Dockerfiles, IaC) for:
62
- Hardcoded API keys, tokens, passwords, private keys
63
- `.env` files accidentally committed
64
- Secrets in comments or debug logs
65
- Cloud credentials (AWS, GCP, Azure, Stripe, Twilio, etc.)
66
- Database connection strings with credentials embedded
67
- Read `references/secret-patterns.md` for regex patterns and entropy heuristics to apply
68
69
### Step 4 — Vulnerability Deep Scan
70
This is the core scan. Reason about the code — don't just pattern-match.
71
Read `references/vuln-categories.md` for full details on each category.
72
73
**Injection Flaws**
74
- SQL Injection: raw queries with string interpolation, ORM misuse, second-order SQLi
75
- XSS: unescaped output, dangerouslySetInnerHTML, innerHTML, template injection
76
- Command Injection: exec/spawn/system with user input
77
- LDAP, XPath, Header, Log injection
78
79
**Authentication & Access Control**
80
- Missing authentication on sensitive endpoints
81
- Broken object-level authorization (BOLA/IDOR)
82
- JWT weaknesses (alg:none, weak secrets, no expiry validation)
83
- Session fixation, missing CSRF protection
84
- Privilege escalation paths
85
- Mass assignment / parameter pollution
86
87
**Data Handling**
88
- Sensitive data in logs, error messages, or API responses
89
- Missing encryption at rest or in transit
90
- Insecure deserialization
91
- Path traversal / directory traversal
92
- XXE (XML External Entity) processing
93
- SSRF (Server-Side Request Forgery)
94
95
**Cryptography**
96
- Use of MD5, SHA1, DES for security purposes
97
- Hardcoded IVs or salts
98
- Weak random number generation (Math.random() for tokens)
99
- Missing TLS certificate validation
100
101
**Business Logic**
102
- Race conditions (TOCTOU)
103
- Integer overflow in financial calculations
104
- Missing rate limiting on sensitive endpoints
105
- Predictable resource identifiers
106
107
### Step 5 — Cross-File Data Flow Analysis
108
After the per-file scan, perform a **holistic review**:
109
- Trace user-controlled input from entry points (HTTP params, headers, body, file uploads)
110
all the way to sinks (DB queries, exec calls, HTML output, file writes)
111
- Identify vulnerabilities that only appear when looking at multiple files together
112
- Check for insecure trust boundaries between services or modules
113
114
### Step 6 — Self-Verification Pass
115
For EACH finding:
116
1. Re-read the relevant code with fresh eyes
117
2. Ask: "Is this actually exploitable, or is there sanitization I missed?"
118
3. Check if a framework or middleware already handles this upstream
119
4. Downgrade or discard findings that aren't genuine vulnerabilities
120
5. Assign final severity: CRITICAL / HIGH / MEDIUM / LOW / INFO
121
122
### Step 7 — Generate Security Report
123
Output the full report in the format defined in `references/report-format.md`.
124
125
### Step 8 — Propose Patches
126
For every CRITICAL and HIGH finding, generate a concrete patch:
127
- Show the vulnerable code (before)
128
- Show the fixed code (after)
129
- Explain what changed and why
130
- Preserve the original code style, variable names, and structure
131
- Add a comment explaining the fix inline
132
133
Explicitly state: **"Review each patch before applying. Nothing has been changed yet."**
134
135
## Severity Guide
136
137
| Severity | Meaning | Example |
138
|----------|---------|---------|
139
| 🔴 CRITICAL | Immediate exploitation risk, data breach likely | SQLi, RCE, auth bypass |
140
| 🟠 HIGH | Serious vulnerability, exploit path exists | XSS, IDOR, hardcoded secrets |
141
| 🟡 MEDIUM | Exploitable with conditions or chaining | CSRF, open redirect, weak crypto |
142
| 🔵 LOW | Best practice violation, low direct risk | Verbose errors, missing headers |
143
| ⚪ INFO | Observation worth noting, not a vulnerability | Outdated dependency (no CVE) |
144
145
## Output Rules
146
147
- **Always** produce a findings summary table first (counts by severity)
148
- **Never** auto-apply any patch — present patches for human review only
149
- **Always** include a confidence rating per finding (High / Medium / Low)
150
- **Group findings** by category, not by file
151
- **Be specific** — include file path, line number, and the exact vulnerable code snippet
152
- **Explain the risk** in plain English — what could an attacker do with this?
153
- If the codebase is clean, say so clearly: "No vulnerabilities found" with what was scanned
154
155
## Reference Files
156
157
For detailed detection guidance, load the following reference files as needed:
158
159
- `references/vuln-categories.md` — Deep reference for every vulnerability category with detection signals, safe patterns, and escalation checkers
160
- Search patterns: `SQL injection`, `XSS`, `command injection`, `SSRF`, `BOLA`, `IDOR`, `JWT`, `CSRF`, `secrets`, `cryptography`, `race condition`, `path traversal`
161
- `references/secret-patterns.md` — Regex patterns, entropy-based detection, and CI/CD secret risks
162
- Search patterns: `API key`, `token`, `private key`, `connection string`, `entropy`, `.env`, `GitHub Actions`, `Docker`, `Terraform`
163
- `references/language-patterns.md` — Framework-specific vulnerability patterns for JavaScript, Python, Java, PHP, Go, Ruby, and Rust
164
- Search patterns: `Express`, `React`, `Next.js`, `Django`, `Flask`, `FastAPI`, `Spring Boot`, `PHP`, `Go`, `Rails`, `Rust`
165
- `references/vulnerable-packages.md` — Curated CVE watchlist for npm, pip, Maven, Rubygems, Cargo, and Go modules
166
- Search patterns: `lodash`, `axios`, `jsonwebtoken`, `Pillow`, `log4j`, `nokogiri`, `CVE`
167
- `references/report-format.md` — Structured output template for security reports with finding cards, dependency audit, secrets scan, and patch proposal formatting
168
- Search patterns: `report`, `format`, `template`, `finding`, `patch`, `summary`, `confidence`
169

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 10,794 prompts

More by @OpenSourceBuffGuy

See all
Chromatic Gesture Characters — Part 4 prompt image

Chromatic Gesture Characters — Part 4

Defines a JSON style for large geometric characters in hot pink with minimal black faces and grainy print feel, here a potter, kite flyer, accordion player and stretching cat.

image-prompt, json-prompt, placeholders, poster, character-design, typography, structured-output, long-form, advanced, for-artists, for-designers, illustration, papercraft, vibrant-colors, printmaking, vertical-format, widescreen, animals, text-rendering, whimsical, negative-space, style-reference, character-consistency, music

C# Expert prompt image

C# Expert

Makes the AI an expert C#/.NET developer that writes clean, secure, tested code, applies SOLID and common patterns, and follows strict code design and testing rules.

sub-agent, act-as, csharp, dotnet, best-practices, clean-code, design-patterns, unit-testing, test-driven-development, performance-optimization, authentication, code-generation, expert-advice, rule-file, guardrails, for-developers, advanced, long-form, software-architecture, testing

Financial Analysis Expert prompt image

Financial Analysis Expert

Makes the AI an investment analyst that assesses markets, evaluates holdings, sizes risk and proposes allocation and execution plans in a structured report.

system-prompt, act-as, expert-advice, financial-analysis, investing, financial-planning, risk-management, xml-tags, structured-output, report, for-investors, advanced, guardrails, trading, personal-finance, forecasting, long-form, objective

Reviews

Loading reviews…

Discussion

Loading comments…