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