Pentest Validation
Quality Gates:
- Authorization confirmed before ANY exploitation
- Target URL is staging/dev (NOT production)
- Budget cap enforced ($15 default)
- Time cap enforced (30 min default)
- All exploitation attempts logged
Quick Reference Card
The 4-Phase Pipeline
| Phase |
Agent(s) |
Purpose |
Parallelism |
| 1. Recon |
qe-security-scanner |
SAST, DAST, dependency scan, secrets |
Internal parallel |
| 2. Analysis |
qe-security-reviewer + qe-security-auditor |
Code review + compliance check |
Both in parallel |
| 3. Validation |
qe-pentest-validator |
Graduated exploit validation |
Per-vuln-type parallel |
| 4. Report |
qe-quality-gate |
"No Exploit, No Report" filter |
Sequential |
Graduated Exploitation Tiers
| Tier |
Handler |
Cost |
Latency |
Use When |
| 1 |
Agent Booster (WASM) |
$0 |
<1ms |
Code pattern is conclusive (eval, innerHTML, hardcoded creds) |
| 2 |
Haiku |
$0.0002 |
~500ms |
Need payload test against live target |
| 3 |
Sonnet/Opus |
$0.003-$0.015 |
2-5s |
Full exploit chain with data proof |
When to Use This Skill
| Scenario |
Tier |
Estimated Cost |
| PR security review (source only) |
1 |
$0 |
| Pre-release validation (staging) |
1-2 |
$1-5 |
| Full pentest validation |
1-3 |
$5-15 |
| Compliance audit evidence |
1-3 |
$5-15 |
Configuration
pentest:
target_url: https://staging.app.com # REQUIRED for Tier 2-3
source_repo: ./src # REQUIRED for Tier 1+
exploitation_tier: 2 # 1=pattern-only, 2=payload-test, 3=full-exploit
vuln_types: # Which pipelines to run
- injection # SQL, NoSQL, command injection
- xss # Reflected, stored, DOM XSS
- auth # Auth bypass, session, JWT
- ssrf # URL scheme abuse, metadata
max_cost_usd: 15 # Budget cap per run
timeout_minutes: 30 # Time cap per run
require_authorization: true # MUST confirm target ownership
no_production: true # Block production URLs
production_patterns: # URL patterns to block
- "*.prod.*"
- "api.*"
- "www.*"
Safeguards (Mandatory)
Authorization Gate
Every pentest validation run MUST:
- Display target URL and exploitation tier to user
- Require explicit confirmation: "I own/authorized testing of this target"
- Log authorization with timestamp
- Block if target URL matches production patterns
What This Skill Does NOT Do
- Full autonomous reconnaissance (Nmap, Subfinder)
- Zero-day exploit development
- Attack targets without explicit authorization
- Test production systems
- Store actual exfiltrated data (only proof of access)
- Social engineering or phishing simulation
- Port scanning or service discovery
Validation Pipelines
Injection Pipeline
| Attack |
Tier 1 (Pattern) |
Tier 2 (Payload) |
Tier 3 (Full) |
| SQL injection |
String concat in query |
' OR '1'='1 response diff |
UNION SELECT data extraction |
| NoSQL injection |
$where, $gt in query |
Operator injection test |
Collection enumeration |
| Command injection |
exec(), system() calls |
Command delimiter test |
Reverse shell proof |
| LDAP injection |
String concat in filter |
Wildcard injection |
Directory enumeration |
XSS Pipeline
| Attack |
Tier 1 (Pattern) |
Tier 2 (Payload) |
Tier 3 (Full) |
| Reflected XSS |
No output encoding |
<img onerror> reflection |
Browser JS execution via Playwright |
| Stored XSS |
innerHTML assignment |
Payload stored + retrieved |
Cookie theft PoC |
| DOM XSS |
document.write(location) |
Fragment injection |
DOM manipulation proof |
Auth Pipeline
| Attack |
Tier 1 (Pattern) |
Tier 2 (Payload) |
Tier 3 (Full) |
| JWT none |
No algorithm validation |
Modified JWT accepted |
Admin access with forged token |
| Session fixation |
No session rotation |
Pre-set session reused |
Cross-user session hijack |
| Credential stuffing |
No rate limiting |
100 attempts unblocked |
Valid credential discovery |
| IDOR |
No authorization check |
Access other user data |
Full CRUD on foreign resources |
SSRF Pipeline
| Attack |
Tier 1 (Pattern) |
Tier 2 (Payload) |
Tier 3 (Full) |
| Internal URL |
User-controlled URL fetch |
http://169.254.169.254 |
Cloud metadata extraction |
| DNS rebinding |
URL validation bypass |
Rebind to internal IP |
Internal service access |
| Protocol smuggling |
URL scheme not restricted |
file:///etc/passwd |
File content in response |
Agent Coordination
Orchestration Pattern
// Phase 1: Recon (parallel scans)
await Task("Security Scan", {
target: "./src",
layers: { sast: true, dast: true, dependencies: true, secrets: true }
}, "qe-security-scanner");
// Phase 2: Analysis (parallel review)
await Promise.all([
Task("Code Security Review", {
findings: phase1Results,
depth: "comprehensive"
}, "qe-security-reviewer"),
Task("Compliance Audit", {
findings: phase1Results,
frameworks: ["owasp-top-10"]
}, "qe-security-auditor")
]);
// Phase 3: Validation (graduated exploitation)
await Task("Exploit Validation", {
findings: [...phase1Results, ...phase2Results],
target_url: "https://staging.app.com",
exploitation_tier: 2,
vuln_types: ["injection", "xss", "auth", "ssrf"],
max_cost_usd: 15,
timeout_minutes: 30
}, "qe-pentest-validator");
// Phase 4: Report ("No Exploit, No Report" gate)
await Task("Security Quality Gate", {
findings: phase3Results.confirmedFindings,
gate: "no-exploit-no-report",
require_poc: true
}, "qe-quality-gate");
Finding Classification
| Status |
Meaning |
Action |
confirmed-exploitable |
Exploitation succeeded with PoC |
Report with evidence |
likely-exploitable |
Partial exploitation, defenses detected |
Report with caveats |
not-exploitable |
All exploitation attempts failed |
Filter from report |
inconclusive |
WAF/defense blocked, unclear if vulnerable |
Report for manual review |
Exploit Playbook Memory
Namespace Structure
aqe/pentest/
playbook/
exploit/{vuln_type}/{tech_stack}/{technique}
bypass/{defense_type}/{technique}
payload/{vuln_type}/{variant}
results/
validation-{timestamp}
poc/
{finding_id}-poc
Learning Loop
- Before validation: Query playbook for known patterns matching findings
- During validation: Try known payloads first (higher success rate)
- After validation: Store new successful patterns with confidence scores
- Over time: Agent converges on most effective payloads per tech stack
Cost Optimization
Estimated Cost by Scenario
| Scenario |
Tier Mix |
Findings |
Est. Cost |
Est. Time |
| PR check (source only) |
100% Tier 1 |
5 |
$0 |
<5s |
| Sprint validation |
70% T1, 30% T2 |
15 |
$2-5 |
5-10 min |
| Release validation |
40% T1, 40% T2, 20% T3 |
25 |
$8-15 |
15-30 min |
| Full pentest |
20% T1, 30% T2, 50% T3 |
40 |
$15-30 |
30-60 min |
Cost vs Shannon Comparison
| Metric |
Shannon |
AQE Pentest Validation |
| Cost per run |
~$50 |
$5-15 (graduated tiers) |
| Runtime |
60-90 min |
15-30 min (parallel pipelines) |
| False positive rate |
Low (exploit-proven) |
Low (same principle) |
| Learning |
None (static prompts) |
ReasoningBank playbook |
Success Metrics
| Metric |
Target |
Measurement |
| False positive reduction |
>60% of findings eliminated |
Pre/post validator comparison |
| Exploit confirmation rate |
>80% of confirmed findings truly exploitable |
Manual PoC verification |
| Cost per run |
<$15 USD |
Token tracking per pipeline |
| Time per run |
<30 minutes |
Execution time metrics |
| Playbook growth |
100+ patterns after 6 months |
Memory namespace count |
Related Skills
Remember
"No Exploit, No Report." A vulnerability scanner that can't prove exploitation delivers uncertain value. This skill transforms security findings from theoretical risks into proven vulnerabilities with evidence. Every confirmed finding comes with a reproducible proof-of-concept. Every false positive is eliminated before it reaches the report.
Think proof, not prediction. Don't report what MIGHT be vulnerable. Prove what IS vulnerable.
1---2name: qe-pentest-validation3description: Orchestrate security finding validation through graduated exploitation. 4-phase pipeline: recon (SAST/DAST), analysis (code review), validation (exploit proof), report (No Exploit, No Report gate). Eliminates false positives by proving exploitability.4---5
6# Pentest Validation
7
8<default_to_action>
9When validating security findings:
101. REQUIRE explicit authorization for target URL
112. SCAN with qe-security-scanner (SAST + dependency + secrets)
123. ANALYZE with qe-security-reviewer + qe-security-auditor (parallel)
134. VALIDATE with qe-pentest-validator (graduated exploitation, parallel per vuln type)
145. REPORT only confirmed findings with PoC evidence ("No Exploit, No Report")
156. UPDATE exploit playbook with new patterns
16
17**Quality Gates:**
18- Authorization confirmed before ANY exploitation
19- Target URL is staging/dev (NOT production)
20- Budget cap enforced ($15 default)
21- Time cap enforced (30 min default)
22- All exploitation attempts logged
23</default_to_action>
24
25## Quick Reference Card
26
27### The 4-Phase Pipeline
28
29| Phase | Agent(s) | Purpose | Parallelism |
30|-------|----------|---------|-------------|
31| **1. Recon** | qe-security-scanner | SAST, DAST, dependency scan, secrets | Internal parallel |
32| **2. Analysis** | qe-security-reviewer + qe-security-auditor | Code review + compliance check | Both in parallel |
33| **3. Validation** | qe-pentest-validator | Graduated exploit validation | Per-vuln-type parallel |
34| **4. Report** | qe-quality-gate | "No Exploit, No Report" filter | Sequential |
35
36### Graduated Exploitation Tiers
37
38| Tier | Handler | Cost | Latency | Use When |
39|------|---------|------|---------|----------|
40| **1** | Agent Booster (WASM) | $0 | <1ms | Code pattern is conclusive (eval, innerHTML, hardcoded creds) |
41| **2** | Haiku | $0.0002 | ~500ms | Need payload test against live target |
42| **3** | Sonnet/Opus | $0.003-$0.015 | 2-5s | Full exploit chain with data proof |
43
44### When to Use This Skill
45
46| Scenario | Tier | Estimated Cost |
47|----------|------|----------------|
48| PR security review (source only) | 1 | $0 |
49| Pre-release validation (staging) | 1-2 | $1-5 |
50| Full pentest validation | 1-3 | $5-15 |
51| Compliance audit evidence | 1-3 | $5-15 |
52
53---
54
55## Configuration
56
57```yaml
58pentest:
59 target_url: https://staging.app.com # REQUIRED for Tier 2-3
60 source_repo: ./src # REQUIRED for Tier 1+
61 exploitation_tier: 2 # 1=pattern-only, 2=payload-test, 3=full-exploit
62 vuln_types: # Which pipelines to run
63 - injection # SQL, NoSQL, command injection
64 - xss # Reflected, stored, DOM XSS
65 - auth # Auth bypass, session, JWT
66 - ssrf # URL scheme abuse, metadata
67 max_cost_usd: 15 # Budget cap per run
68 timeout_minutes: 30 # Time cap per run
69 require_authorization: true # MUST confirm target ownership
70 no_production: true # Block production URLs
71 production_patterns: # URL patterns to block
72 - "*.prod.*"
73 - "api.*"
74 - "www.*"
75```
76
77---
78
79## Safeguards (Mandatory)
80
81### Authorization Gate
82Every pentest validation run MUST:
831. Display target URL and exploitation tier to user
842. Require explicit confirmation: "I own/authorized testing of this target"
853. Log authorization with timestamp
864. Block if target URL matches production patterns
87
88### What This Skill Does NOT Do
89- Full autonomous reconnaissance (Nmap, Subfinder)
90- Zero-day exploit development
91- Attack targets without explicit authorization
92- Test production systems
93- Store actual exfiltrated data (only proof of access)
94- Social engineering or phishing simulation
95- Port scanning or service discovery
96
97---
98
99## Validation Pipelines
100
101### Injection Pipeline
102| Attack | Tier 1 (Pattern) | Tier 2 (Payload) | Tier 3 (Full) |
103|--------|-------------------|-------------------|----------------|
104| SQL injection | String concat in query | `' OR '1'='1` response diff | UNION SELECT data extraction |
105| NoSQL injection | `$where`, `$gt` in query | Operator injection test | Collection enumeration |
106| Command injection | `exec()`, `system()` calls | Command delimiter test | Reverse shell proof |
107| LDAP injection | String concat in filter | Wildcard injection | Directory enumeration |
108
109### XSS Pipeline
110| Attack | Tier 1 (Pattern) | Tier 2 (Payload) | Tier 3 (Full) |
111|--------|-------------------|-------------------|----------------|
112| Reflected XSS | No output encoding | `<img onerror>` reflection | Browser JS execution via Playwright |
113| Stored XSS | `innerHTML` assignment | Payload stored + retrieved | Cookie theft PoC |
114| DOM XSS | `document.write(location)` | Fragment injection | DOM manipulation proof |
115
116### Auth Pipeline
117| Attack | Tier 1 (Pattern) | Tier 2 (Payload) | Tier 3 (Full) |
118|--------|-------------------|-------------------|----------------|
119| JWT none | No algorithm validation | Modified JWT accepted | Admin access with forged token |
120| Session fixation | No session rotation | Pre-set session reused | Cross-user session hijack |
121| Credential stuffing | No rate limiting | 100 attempts unblocked | Valid credential discovery |
122| IDOR | No authorization check | Access other user data | Full CRUD on foreign resources |
123
124### SSRF Pipeline
125| Attack | Tier 1 (Pattern) | Tier 2 (Payload) | Tier 3 (Full) |
126|--------|-------------------|-------------------|----------------|
127| Internal URL | User-controlled URL fetch | `http://169.254.169.254` | Cloud metadata extraction |
128| DNS rebinding | URL validation bypass | Rebind to internal IP | Internal service access |
129| Protocol smuggling | URL scheme not restricted | `file:///etc/passwd` | File content in response |
130
131---
132
133## Agent Coordination
134
135### Orchestration Pattern
136```typescript
137// Phase 1: Recon (parallel scans)
138await Task("Security Scan", {
139 target: "./src",
140 layers: { sast: true, dast: true, dependencies: true, secrets: true }
141}, "qe-security-scanner");
142
143// Phase 2: Analysis (parallel review)
144await Promise.all([
145 Task("Code Security Review", {
146 findings: phase1Results,
147 depth: "comprehensive"
148 }, "qe-security-reviewer"),
149
150 Task("Compliance Audit", {
151 findings: phase1Results,
152 frameworks: ["owasp-top-10"]
153 }, "qe-security-auditor")
154]);
155
156// Phase 3: Validation (graduated exploitation)
157await Task("Exploit Validation", {
158 findings: [...phase1Results, ...phase2Results],
159 target_url: "https://staging.app.com",
160 exploitation_tier: 2,
161 vuln_types: ["injection", "xss", "auth", "ssrf"],
162 max_cost_usd: 15,
163 timeout_minutes: 30
164}, "qe-pentest-validator");
165
166// Phase 4: Report ("No Exploit, No Report" gate)
167await Task("Security Quality Gate", {
168 findings: phase3Results.confirmedFindings,
169 gate: "no-exploit-no-report",
170 require_poc: true
171}, "qe-quality-gate");
172```
173
174### Finding Classification
175| Status | Meaning | Action |
176|--------|---------|--------|
177| `confirmed-exploitable` | Exploitation succeeded with PoC | Report with evidence |
178| `likely-exploitable` | Partial exploitation, defenses detected | Report with caveats |
179| `not-exploitable` | All exploitation attempts failed | Filter from report |
180| `inconclusive` | WAF/defense blocked, unclear if vulnerable | Report for manual review |
181
182---
183
184## Exploit Playbook Memory
185
186### Namespace Structure
187```
188aqe/pentest/
189 playbook/
190 exploit/{vuln_type}/{tech_stack}/{technique}
191 bypass/{defense_type}/{technique}
192 payload/{vuln_type}/{variant}
193 results/
194 validation-{timestamp}
195 poc/
196 {finding_id}-poc
197```
198
199### Learning Loop
2001. **Before validation**: Query playbook for known patterns matching findings
2012. **During validation**: Try known payloads first (higher success rate)
2023. **After validation**: Store new successful patterns with confidence scores
2034. **Over time**: Agent converges on most effective payloads per tech stack
204
205---
206
207## Cost Optimization
208
209### Estimated Cost by Scenario
210| Scenario | Tier Mix | Findings | Est. Cost | Est. Time |
211|----------|----------|----------|-----------|-----------|
212| PR check (source only) | 100% Tier 1 | 5 | $0 | <5s |
213| Sprint validation | 70% T1, 30% T2 | 15 | $2-5 | 5-10 min |
214| Release validation | 40% T1, 40% T2, 20% T3 | 25 | $8-15 | 15-30 min |
215| Full pentest | 20% T1, 30% T2, 50% T3 | 40 | $15-30 | 30-60 min |
216
217### Cost vs Shannon Comparison
218| Metric | Shannon | AQE Pentest Validation |
219|--------|---------|----------------------|
220| Cost per run | ~$50 | $5-15 (graduated tiers) |
221| Runtime | 60-90 min | 15-30 min (parallel pipelines) |
222| False positive rate | Low (exploit-proven) | Low (same principle) |
223| Learning | None (static prompts) | ReasoningBank playbook |
224
225---
226
227## Success Metrics
228
229| Metric | Target | Measurement |
230|--------|--------|-------------|
231| False positive reduction | >60% of findings eliminated | Pre/post validator comparison |
232| Exploit confirmation rate | >80% of confirmed findings truly exploitable | Manual PoC verification |
233| Cost per run | <$15 USD | Token tracking per pipeline |
234| Time per run | <30 minutes | Execution time metrics |
235| Playbook growth | 100+ patterns after 6 months | Memory namespace count |
236
237---
238
239## Related Skills
240
241- [security-testing](../security-testing/) - OWASP vulnerability scanning
242- [qe-security-compliance](../qe-security-compliance/) - SAST/DAST automation
243- [compliance-testing](../compliance-testing/) - Regulatory compliance
244- [api-testing-patterns](../api-testing-patterns/) - API security testing
245- [chaos-engineering-resilience](../chaos-engineering-resilience/) - Security under chaos
246
247---
248
249## Remember
250
251**"No Exploit, No Report."** A vulnerability scanner that can't prove exploitation delivers uncertain value. This skill transforms security findings from theoretical risks into proven vulnerabilities with evidence. Every confirmed finding comes with a reproducible proof-of-concept. Every false positive is eliminated before it reaches the report.
252
253**Think proof, not prediction.** Don't report what MIGHT be vulnerable. Prove what IS vulnerable.