Vulnerability Scanner
Think like an attacker, defend like an expert. 2025 threat landscape awareness.
🔧 Runtime Scripts
Execute for automated validation:
| Script |
Purpose |
Usage |
security_scan.py |
Validate security principles applied |
python security_scan.py <project_path> |
📋 Reference Files
| File |
Purpose |
| checklist.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: unknown
5source: community
6date_added: "2026-02-27"
7metadata:
8 source: https://skillmd.com/skills/aibot88/vulnerability-scanner
9---
10
11
12# Vulnerability Scanner
13
14> Think like an attacker, defend like an expert. 2025 threat landscape awareness.
15
16## 🔧 Runtime Scripts
17
18**Execute for automated validation:**
19
20| Script | Purpose | Usage |
21|--------|---------|-------|
22| `security_scan.py` | Validate security principles applied | `python security_scan.py <project_path>` |
23
24## 📋 Reference Files
25
26| File | Purpose |
27|------|---------|
28| [checklist.md](checklist.md) | OWASP Top 10, Auth, API, Data protection checklists |
29
30---
31
32## 1. Security Expert Mindset
33
34### Core Principles
35
36| Principle | Application |
37|-----------|-------------|
38| **Assume Breach** | Design as if attacker already inside |
39| **Zero Trust** | Never trust, always verify |
40| **Defense in Depth** | Multiple layers, no single point |
41| **Least Privilege** | Minimum required access only |
42| **Fail Secure** | On error, deny access |
43
44### Threat Modeling Questions
45
46Before scanning, ask:
471. What are we protecting? (Assets)
482. Who would attack? (Threat actors)
493. How would they attack? (Attack vectors)
504. What's the impact? (Business risk)
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## 4. Attack Surface Mapping
103
104### What to Map
105
106| Category | Elements |
107|----------|----------|
108| **Entry Points** | APIs, forms, file uploads |
109| **Data Flows** | Input → Process → Output |
110| **Trust Boundaries** | Where auth/authz checked |
111| **Assets** | Secrets, PII, business data |
112
113### Prioritization Matrix
114
115```
116Risk = Likelihood × Impact
117
118High Impact + High Likelihood → CRITICAL
119High Impact + Low Likelihood → HIGH
120Low Impact + High Likelihood → MEDIUM
121Low Impact + Low Likelihood → LOW
122```
123
124---
125
126## 5. Risk Prioritization
127
128### CVSS + Context
129
130| Factor | Weight | Question |
131|--------|--------|----------|
132| **CVSS Score** | Base severity | How severe is the vuln? |
133| **EPSS Score** | Exploit likelihood | Is it being exploited? |
134| **Asset Value** | Business context | What's at risk? |
135| **Exposure** | Attack surface | Internet-facing? |
136
137### Prioritization Decision Tree
138
139```
140Is it actively exploited (EPSS >0.5)?
141├── YES → CRITICAL: Immediate action
142└── NO → Check CVSS
143 ├── CVSS ≥9.0 → HIGH
144 ├── CVSS 7.0-8.9 → Consider asset value
145 └── CVSS <7.0 → Schedule for later
146```
147
148---
149
150## 6. Exceptional Conditions (A10 - New)
151
152### Fail-Open vs Fail-Closed
153
154| Scenario | Fail-Open (BAD) | Fail-Closed (GOOD) |
155|----------|-----------------|---------------------|
156| Auth error | Allow access | Deny access |
157| Parsing fails | Accept input | Reject input |
158| Timeout | Retry forever | Limit + abort |
159
160### What to Check
161
162- Exception handlers that catch-all and ignore
163- Missing error handling on security operations
164- Race conditions in auth/authz
165- Resource exhaustion scenarios
166---
167
168## 7. Scanning Methodology
169
170### Phase-Based Approach
171
172```
1731. RECONNAISSANCE
174 └── Understand the target
175 ├── Technology stack
176 ├── Entry points
177 └── Data flows
178
1792. DISCOVERY
180 └── Identify potential issues
181 ├── Configuration review
182 ├── Dependency analysis
183 └── Code pattern search
184
1853. ANALYSIS
186 └── Validate and prioritize
187 ├── False positive elimination
188 ├── Risk scoring
189 └── Attack chain mapping
190
1914. REPORTING
192 └── Actionable findings
193 ├── Clear reproduction steps
194 ├── Business impact
195 └── Remediation guidance
196```
197
198---
199
200## 8. Code Pattern Analysis
201
202### High-Risk Patterns
203
204| Pattern | Risk | Look For |
205|---------|------|----------|
206| **String concat in queries** | Injection | `"SELECT * FROM " + user_input` |
207| **Dynamic code execution** | RCE | `eval()`, `exec()`, `Function()` |
208| **Unsafe deserialization** | RCE | `pickle.loads()`, `unserialize()` |
209| **Path manipulation** | Traversal | User input in file paths |
210| **Disabled security** | Various | `verify=False`, `--insecure` |
211
212### Secret Patterns
213
214| Type | Indicators |
215|------|-----------|
216| API Keys | `api_key`, `apikey`, high entropy |
217| Tokens | `token`, `bearer`, `jwt` |
218| Credentials | `password`, `secret`, `key` |
219| Cloud | `AWS_`, `AZURE_`, `GCP_` prefixes |
220
221---
222
223## 9. Cloud Security Considerations
224
225### Shared Responsibility
226
227| Layer | You Own | Provider Owns |
228|-------|---------|---------------|
229| Data | ✅ | ❌ |
230| Application | ✅ | ❌ |
231| OS/Runtime | Depends | Depends |
232| Infrastructure | ❌ | ✅ |
233
234### Cloud-Specific Checks
235
236- IAM: Least privilege applied?
237- Storage: Public buckets?
238- Network: Security groups tightened?
239- Secrets: Using secrets manager?
240---
241
242## 10. Anti-Patterns
243
244| ❌ Don't | ✅ Do |
245|----------|-------|
246| Scan without understanding | Map attack surface first |
247| Alert on every CVE | Prioritize by exploitability + asset |
248| Ignore false positives | Maintain verified baseline |
249| Fix symptoms only | Address root causes |
250| Scan once before deploy | Continuous scanning |
251| Trust third-party deps blindly | Verify integrity, audit code |
252
253---
254
255## 11. Reporting Principles
256
257### Finding Structure
258
259Each finding should answer:
2601. **What?** - Clear vulnerability description
2612. **Where?** - Exact location (file, line, endpoint)
2623. **Why?** - Root cause explanation
2634. **Impact?** - Business consequence
2645. **How to fix?** - Specific remediation
265### Severity Classification
266
267| Severity | Criteria |
268|----------|----------|
269| **Critical** | RCE, auth bypass, mass data exposure |
270| **High** | Data exposure, privilege escalation |
271| **Medium** | Limited scope, requires conditions |
272| **Low** | Informational, best practice |
273
274---
275
276> **Remember:** Vulnerability scanning finds issues. Expert thinking prioritizes what matters. Always ask: "What would an attacker do with this?"
277
278## When to Use
279This skill is applicable to execute the workflow or actions described in the overview.