Vulnerability Scanner
Think like an attacker, defend like an expert. 2025 threat landscape awareness.
🔧 Runtime Scripts
Execute for automated validation:
| Script |
Purpose |
Usage |
scripts/security_scan.py |
Validate security principles applied |
python scripts/security_scan.py <project_path> |
📋 Reference Files
| File |
Purpose |
| checklists.md |
OWASP Top 10, Auth, API, Data protection checklists |
1. Security Expert Mindset
Core Principles
| Principle |
Application |
| Assume Breach |
Design as if attacker already inside |
| Zero Trust |
Never trust, always verify |
| Defense in Depth |
Multiple layers, no single point |
| Least Privilege |
Minimum required access only |
| Fail Secure |
On error, deny access |
Threat Modeling Questions
Before scanning, ask:
- What are we protecting? (Assets)
- Who would attack? (Threat actors)
- How would they attack? (Attack vectors)
- What's the impact? (Business risk)
2. OWASP Top 10:2025
Risk Categories
| Rank |
Category |
Think About |
| A01 |
Broken Access Control |
Who can access what? IDOR, SSRF |
| A02 |
Security Misconfiguration |
Defaults, headers, exposed services |
| A03 |
Software Supply Chain 🆕 |
Dependencies, CI/CD, build integrity |
| A04 |
Cryptographic Failures |
Weak crypto, exposed secrets |
| A05 |
Injection |
User input → system commands |
| A06 |
Insecure Design |
Flawed architecture |
| A07 |
Authentication Failures |
Session, credential management |
| A08 |
Integrity Failures |
Unsigned updates, tampered data |
| A09 |
Logging & Alerting |
Blind spots, no monitoring |
| A10 |
Exceptional Conditions 🆕 |
Error handling, fail-open states |
2025 Key Changes
2021 → 2025 Shifts:
├── SSRF merged into A01 (Access Control)
├── A02 elevated (Cloud/Container configs)
├── A03 NEW: Supply Chain (major focus)
├── A10 NEW: Exceptional Conditions
└── Focus shift: Root causes > Symptoms
3. Supply Chain Security (A03)
Attack Surface
| Vector |
Risk |
Question to Ask |
| Dependencies |
Malicious packages |
Do we audit new deps? |
| Lock files |
Integrity attacks |
Are they committed? |
| Build pipeline |
CI/CD compromise |
Who can modify? |
| Registry |
Typosquatting |
Verified sources? |
Defense Principles
- Verify package integrity (checksums)
- Pin versions, audit updates
- Use private registries for critical deps
- Sign and verify artifacts
4. Attack Surface Mapping
What to Map
| Category |
Elements |
| Entry Points |
APIs, forms, file uploads |
| Data Flows |
Input → Process → Output |
| Trust Boundaries |
Where auth/authz checked |
| Assets |
Secrets, PII, business data |
Prioritization Matrix
Risk = Likelihood × Impact
High Impact + High Likelihood → CRITICAL
High Impact + Low Likelihood → HIGH
Low Impact + High Likelihood → MEDIUM
Low Impact + Low Likelihood → LOW
5. Risk Prioritization
CVSS + Context
| Factor |
Weight |
Question |
| CVSS Score |
Base severity |
How severe is the vuln? |
| EPSS Score |
Exploit likelihood |
Is it being exploited? |
| Asset Value |
Business context |
What's at risk? |
| Exposure |
Attack surface |
Internet-facing? |
Prioritization Decision Tree
Is it actively exploited (EPSS >0.5)?
├── YES → CRITICAL: Immediate action
└── NO → Check CVSS
├── CVSS ≥9.0 → HIGH
├── CVSS 7.0-8.9 → Consider asset value
└── CVSS <7.0 → Schedule for later
6. Exceptional Conditions (A10 - New)
Fail-Open vs Fail-Closed
| Scenario |
Fail-Open (BAD) |
Fail-Closed (GOOD) |
| Auth error |
Allow access |
Deny access |
| Parsing fails |
Accept input |
Reject input |
| Timeout |
Retry forever |
Limit + abort |
What to Check
- Exception handlers that catch-all and ignore
- Missing error handling on security operations
- Race conditions in auth/authz
- Resource exhaustion scenarios
7. Scanning Methodology
Phase-Based Approach
1. RECONNAISSANCE
└── Understand the target
├── Technology stack
├── Entry points
└── Data flows
2. DISCOVERY
└── Identify potential issues
├── Configuration review
├── Dependency analysis
└── Code pattern search
3. ANALYSIS
└── Validate and prioritize
├── False positive elimination
├── Risk scoring
└── Attack chain mapping
4. REPORTING
└── Actionable findings
├── Clear reproduction steps
├── Business impact
└── Remediation guidance
8. Code Pattern Analysis
High-Risk Patterns
| Pattern |
Risk |
Look For |
| String concat in queries |
Injection |
"SELECT * FROM " + user_input |
| Dynamic code execution |
RCE |
eval(), exec(), Function() |
| Unsafe deserialization |
RCE |
pickle.loads(), unserialize() |
| Path manipulation |
Traversal |
User input in file paths |
| Disabled security |
Various |
verify=False, --insecure |
Secret Patterns
| Type |
Indicators |
| API Keys |
api_key, apikey, high entropy |
| Tokens |
token, bearer, jwt |
| Credentials |
password, secret, key |
| Cloud |
AWS_, AZURE_, GCP_ prefixes |
9. Cloud Security Considerations
Shared Responsibility
| Layer |
You Own |
Provider Owns |
| Data |
✅ |
❌ |
| Application |
✅ |
❌ |
| OS/Runtime |
Depends |
Depends |
| Infrastructure |
❌ |
✅ |
Cloud-Specific Checks
- IAM: Least privilege applied?
- Storage: Public buckets?
- Network: Security groups tightened?
- Secrets: Using secrets manager?
10. Anti-Patterns
| ❌ Don't |
✅ Do |
| Scan without understanding |
Map attack surface first |
| Alert on every CVE |
Prioritize by exploitability + asset |
| Ignore false positives |
Maintain verified baseline |
| Fix symptoms only |
Address root causes |
| Scan once before deploy |
Continuous scanning |
| Trust third-party deps blindly |
Verify integrity, audit code |
11. Reporting Principles
Finding Structure
Each finding should answer:
- What? - Clear vulnerability description
- Where? - Exact location (file, line, endpoint)
- Why? - Root cause explanation
- Impact? - Business consequence
- How to fix? - Specific remediation
Severity Classification
| Severity |
Criteria |
| Critical |
RCE, auth bypass, mass data exposure |
| High |
Data exposure, privilege escalation |
| Medium |
Limited scope, requires conditions |
| Low |
Informational, best practice |
Remember: Vulnerability scanning finds issues. Expert thinking prioritizes what matters. Always ask: "What would an attacker do with this?"
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
1---
2name: vulnerability-scanner
3description: "Advanced vulnerability analysis principles. OWASP 2025, Supply Chain Security, attack surface mapping, risk prioritization."
4risk: offensive
5source: community
6date_added: "2026-02-27"
7metadata:
8 source: https://skillmd.com/skills/kursku/vulnerability-scanner
9---
10
11# Vulnerability Scanner
12
13> Think like an attacker, defend like an expert. 2025 threat landscape awareness.
14
15## 🔧 Runtime Scripts
16
17**Execute for automated validation:**
18
19| Script | Purpose | Usage |
20|--------|---------|-------|
21| `scripts/security_scan.py` | Validate security principles applied | `python scripts/security_scan.py <project_path>` |
22
23## 📋 Reference Files
24
25| File | Purpose |
26|------|---------|
27| [checklists.md](checklists.md) | OWASP Top 10, Auth, API, Data protection checklists |
28
29---
30
31## 1. Security Expert Mindset
32
33### Core Principles
34
35| Principle | Application |
36|-----------|-------------|
37| **Assume Breach** | Design as if attacker already inside |
38| **Zero Trust** | Never trust, always verify |
39| **Defense in Depth** | Multiple layers, no single point |
40| **Least Privilege** | Minimum required access only |
41| **Fail Secure** | On error, deny access |
42
43### Threat Modeling Questions
44
45Before scanning, ask:
461. What are we protecting? (Assets)
472. Who would attack? (Threat actors)
483. How would they attack? (Attack vectors)
494. What's the impact? (Business risk)
50
51---
52
53## 2. OWASP Top 10:2025
54
55### Risk Categories
56
57| Rank | Category | Think About |
58|------|----------|-------------|
59| **A01** | Broken Access Control | Who can access what? IDOR, SSRF |
60| **A02** | Security Misconfiguration | Defaults, headers, exposed services |
61| **A03** | Software Supply Chain 🆕 | Dependencies, CI/CD, build integrity |
62| **A04** | Cryptographic Failures | Weak crypto, exposed secrets |
63| **A05** | Injection | User input → system commands |
64| **A06** | Insecure Design | Flawed architecture |
65| **A07** | Authentication Failures | Session, credential management |
66| **A08** | Integrity Failures | Unsigned updates, tampered data |
67| **A09** | Logging & Alerting | Blind spots, no monitoring |
68| **A10** | Exceptional Conditions 🆕 | Error handling, fail-open states |
69
70### 2025 Key Changes
71
72```
732021 → 2025 Shifts:
74├── SSRF merged into A01 (Access Control)
75├── A02 elevated (Cloud/Container configs)
76├── A03 NEW: Supply Chain (major focus)
77├── A10 NEW: Exceptional Conditions
78└── Focus shift: Root causes > Symptoms
79```
80
81---
82
83## 3. Supply Chain Security (A03)
84
85### Attack Surface
86
87| Vector | Risk | Question to Ask |
88|--------|------|-----------------|
89| **Dependencies** | Malicious packages | Do we audit new deps? |
90| **Lock files** | Integrity attacks | Are they committed? |
91| **Build pipeline** | CI/CD compromise | Who can modify? |
92| **Registry** | Typosquatting | Verified sources? |
93
94### Defense Principles
95
96- Verify package integrity (checksums)
97- Pin versions, audit updates
98- Use private registries for critical deps
99- Sign and verify artifacts
100
101---
102
103## 4. Attack Surface Mapping
104
105### What to Map
106
107| Category | Elements |
108|----------|----------|
109| **Entry Points** | APIs, forms, file uploads |
110| **Data Flows** | Input → Process → Output |
111| **Trust Boundaries** | Where auth/authz checked |
112| **Assets** | Secrets, PII, business data |
113
114### Prioritization Matrix
115
116```
117Risk = Likelihood × Impact
118
119High Impact + High Likelihood → CRITICAL
120High Impact + Low Likelihood → HIGH
121Low Impact + High Likelihood → MEDIUM
122Low Impact + Low Likelihood → LOW
123```
124
125---
126
127## 5. Risk Prioritization
128
129### CVSS + Context
130
131| Factor | Weight | Question |
132|--------|--------|----------|
133| **CVSS Score** | Base severity | How severe is the vuln? |
134| **EPSS Score** | Exploit likelihood | Is it being exploited? |
135| **Asset Value** | Business context | What's at risk? |
136| **Exposure** | Attack surface | Internet-facing? |
137
138### Prioritization Decision Tree
139
140```
141Is it actively exploited (EPSS >0.5)?
142├── YES → CRITICAL: Immediate action
143└── NO → Check CVSS
144 ├── CVSS ≥9.0 → HIGH
145 ├── CVSS 7.0-8.9 → Consider asset value
146 └── CVSS <7.0 → Schedule for later
147```
148
149---
150
151## 6. Exceptional Conditions (A10 - New)
152
153### Fail-Open vs Fail-Closed
154
155| Scenario | Fail-Open (BAD) | Fail-Closed (GOOD) |
156|----------|-----------------|---------------------|
157| Auth error | Allow access | Deny access |
158| Parsing fails | Accept input | Reject input |
159| Timeout | Retry forever | Limit + abort |
160
161### What to Check
162
163- Exception handlers that catch-all and ignore
164- Missing error handling on security operations
165- Race conditions in auth/authz
166- Resource exhaustion scenarios
167
168---
169
170## 7. Scanning Methodology
171
172### Phase-Based Approach
173
174```
1751. RECONNAISSANCE
176 └── Understand the target
177 ├── Technology stack
178 ├── Entry points
179 └── Data flows
180
1812. DISCOVERY
182 └── Identify potential issues
183 ├── Configuration review
184 ├── Dependency analysis
185 └── Code pattern search
186
1873. ANALYSIS
188 └── Validate and prioritize
189 ├── False positive elimination
190 ├── Risk scoring
191 └── Attack chain mapping
192
1934. REPORTING
194 └── Actionable findings
195 ├── Clear reproduction steps
196 ├── Business impact
197 └── Remediation guidance
198```
199
200---
201
202## 8. Code Pattern Analysis
203
204### High-Risk Patterns
205
206| Pattern | Risk | Look For |
207|---------|------|----------|
208| **String concat in queries** | Injection | `"SELECT * FROM " + user_input` |
209| **Dynamic code execution** | RCE | `eval()`, `exec()`, `Function()` |
210| **Unsafe deserialization** | RCE | `pickle.loads()`, `unserialize()` |
211| **Path manipulation** | Traversal | User input in file paths |
212| **Disabled security** | Various | `verify=False`, `--insecure` |
213
214### Secret Patterns
215
216| Type | Indicators |
217|------|-----------|
218| API Keys | `api_key`, `apikey`, high entropy |
219| Tokens | `token`, `bearer`, `jwt` |
220| Credentials | `password`, `secret`, `key` |
221| Cloud | `AWS_`, `AZURE_`, `GCP_` prefixes |
222
223---
224
225## 9. Cloud Security Considerations
226
227### Shared Responsibility
228
229| Layer | You Own | Provider Owns |
230|-------|---------|---------------|
231| Data | ✅ | ❌ |
232| Application | ✅ | ❌ |
233| OS/Runtime | Depends | Depends |
234| Infrastructure | ❌ | ✅ |
235
236### Cloud-Specific Checks
237
238- IAM: Least privilege applied?
239- Storage: Public buckets?
240- Network: Security groups tightened?
241- Secrets: Using secrets manager?
242
243---
244
245## 10. Anti-Patterns
246
247| ❌ Don't | ✅ Do |
248|----------|-------|
249| Scan without understanding | Map attack surface first |
250| Alert on every CVE | Prioritize by exploitability + asset |
251| Ignore false positives | Maintain verified baseline |
252| Fix symptoms only | Address root causes |
253| Scan once before deploy | Continuous scanning |
254| Trust third-party deps blindly | Verify integrity, audit code |
255
256---
257
258## 11. Reporting Principles
259
260### Finding Structure
261
262Each finding should answer:
2631. **What?** - Clear vulnerability description
2642. **Where?** - Exact location (file, line, endpoint)
2653. **Why?** - Root cause explanation
2664. **Impact?** - Business consequence
2675. **How to fix?** - Specific remediation
268
269### Severity Classification
270
271| Severity | Criteria |
272|----------|----------|
273| **Critical** | RCE, auth bypass, mass data exposure |
274| **High** | Data exposure, privilege escalation |
275| **Medium** | Limited scope, requires conditions |
276| **Low** | Informational, best practice |
277
278---
279
280> **Remember:** Vulnerability scanning finds issues. Expert thinking prioritizes what matters. Always ask: "What would an attacker do with this?"
281
282## When to Use
283This skill is applicable to execute the workflow or actions described in the overview.