Loading...
Loading...
Compare original and translation side by side
| 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 |
| 阶段 | 代理工具 | 目的 | 并行方式 |
|---|---|---|---|
| 1. 侦察 | qe-security-scanner | SAST、DAST、依赖项扫描、敏感信息检测 | 内部并行 |
| 2. 分析 | qe-security-reviewer + qe-security-auditor | 代码安全审查 + 合规性检查 | 两者并行 |
| 3. 验证 | qe-pentest-validator | 分级利用验证 | 按漏洞类型并行 |
| 4. 报告 | qe-quality-gate | “无利用则不报告”过滤 | 串行 |
| 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 |
| 层级 | 处理工具 | 成本 | 延迟 | 使用场景 |
|---|---|---|---|---|
| 1 | Agent Booster (WASM) | $0 | <1ms | 代码模式明确存在风险(如eval、innerHTML、硬编码凭据) |
| 2 | Haiku | $0.0002 | ~500ms | 需要针对真实目标测试 payload |
| 3 | Sonnet/Opus | $0.003-$0.015 | 2-5s | 完整利用链并获取数据证明 |
| 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 |
| 场景 | 层级 | 预估成本 |
|---|---|---|
| PR安全审查(仅源码) | 1 | $0 |
| 发布前验证(预发布环境) | 1-2 | $1-5 |
| 完整渗透测试验证 | 1-3 | $5-15 |
| 合规审计取证 | 1-3 | $5-15 |
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.*"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.*"| Attack | Tier 1 (Pattern) | Tier 2 (Payload) | Tier 3 (Full) |
|---|---|---|---|
| SQL injection | String concat in query | | UNION SELECT data extraction |
| NoSQL injection | | Operator injection test | Collection enumeration |
| Command injection | | Command delimiter test | Reverse shell proof |
| LDAP injection | String concat in filter | Wildcard injection | Directory enumeration |
| 攻击类型 | 层级1(模式检测) | 层级2(Payload测试) | 层级3(完整利用) |
|---|---|---|---|
| SQL注入 | 查询中的字符串拼接 | | UNION SELECT数据提取 |
| NoSQL注入 | 查询中存在 | 操作符注入测试 | 集合枚举 |
| 命令注入 | 存在 | 命令分隔符测试 | 反向Shell证明 |
| LDAP注入 | 过滤器中的字符串拼接 | 通配符注入 | 目录枚举 |
| Attack | Tier 1 (Pattern) | Tier 2 (Payload) | Tier 3 (Full) |
|---|---|---|---|
| Reflected XSS | No output encoding | | Browser JS execution via Playwright |
| Stored XSS | | Payload stored + retrieved | Cookie theft PoC |
| DOM XSS | | Fragment injection | DOM manipulation proof |
| 攻击类型 | 层级1(模式检测) | 层级2(Payload测试) | 层级3(完整利用) |
|---|---|---|---|
| 反射型XSS | 输出未编码 | | 通过Playwright执行浏览器JS |
| 存储型XSS | 存在 | Payload存储并成功检索 | Cookie窃取PoC |
| DOM型XSS | 存在 | 片段注入 | DOM操作证明 |
| 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 |
| 攻击类型 | 层级1(模式检测) | 层级2(Payload测试) | 层级3(完整利用) |
|---|---|---|---|
| JWT none算法 | 未验证算法 | 修改后的JWT被接受 | 伪造令牌获取管理员权限 |
| Session固定 | 未进行Session轮换 | 预设置的Session被复用 | 跨用户会话劫持 |
| 凭证填充 | 无速率限制 | 100次尝试未被拦截 | 有效凭证发现 |
| IDOR | 无授权校验 | 访问其他用户数据 | 对外部资源执行完整CRUD操作 |
| Attack | Tier 1 (Pattern) | Tier 2 (Payload) | Tier 3 (Full) |
|---|---|---|---|
| Internal URL | User-controlled URL fetch | | Cloud metadata extraction |
| DNS rebinding | URL validation bypass | Rebind to internal IP | Internal service access |
| Protocol smuggling | URL scheme not restricted | | File content in response |
| 攻击类型 | 层级1(模式检测) | 层级2(Payload测试) | 层级3(完整利用) |
|---|---|---|---|
| 内部URL访问 | 用户可控制URL获取 | 访问 | 云元数据提取 |
| DNS重绑定 | URL验证绕过 | 重绑定到内部IP | 内部服务访问 |
| 协议走私 | URL协议未限制 | 访问 | 响应中包含文件内容 |
// 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");// 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");| Status | Meaning | Action |
|---|---|---|
| Exploitation succeeded with PoC | Report with evidence |
| Partial exploitation, defenses detected | Report with caveats |
| All exploitation attempts failed | Filter from report |
| WAF/defense blocked, unclear if vulnerable | Report for manual review |
| 状态 | 含义 | 操作 |
|---|---|---|
| 利用成功并获取PoC | 附带证据报告 |
| 部分利用成功,检测到防御措施 | 附带说明报告 |
| 所有利用尝试失败 | 从报告中过滤 |
| WAF/防御措施拦截,是否存在漏洞不明确 | 上报供人工审查 |
aqe/pentest/
playbook/
exploit/{vuln_type}/{tech_stack}/{technique}
bypass/{defense_type}/{technique}
payload/{vuln_type}/{variant}
results/
validation-{timestamp}
poc/
{finding_id}-pocaqe/pentest/
playbook/
exploit/{vuln_type}/{tech_stack}/{technique}
bypass/{defense_type}/{technique}
payload/{vuln_type}/{variant}
results/
validation-{timestamp}
poc/
{finding_id}-poc| 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 |
| 场景 | 层级组合 | 漏洞数量 | 预估成本 | 预估时间 |
|---|---|---|---|---|
| PR检查(仅源码) | 100% 层级1 | 5 | $0 | <5秒 |
| 迭代验证 | 70% 层级1,30% 层级2 | 15 | $2-5 | 5-10分钟 |
| 发布验证 | 40% 层级1,40% 层级2,20% 层级3 | 25 | $8-15 | 15-30分钟 |
| 完整渗透测试 | 20% 层级1,30% 层级2,50% 层级3 | 40 | $15-30 | 30-60分钟 |
| 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 |
| 指标 | Shannon | AQE渗透测试验证 |
|---|---|---|
| 单次运行成本 | ~$50 | $5-15(分级层级) |
| 运行时间 | 60-90分钟 | 15-30分钟(并行流水线) |
| 误报率 | 低(基于利用证明) | 低(相同原理) |
| 学习能力 | 无(静态提示) | ReasoningBank手册 |
| 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 |
| 指标 | 目标 | 测量方式 |
|---|---|---|
| 误报减少率 | 消除>60%的漏洞 | 验证前后的漏洞数量对比 |
| 漏洞确认率 | >80%的已确认漏洞真实可利用 | 人工PoC验证 |
| 单次运行成本 | <15美元 | 按流水线跟踪Token成本 |
| 单次运行时间 | <30分钟 | 执行时间指标 |
| 手册增长 | 6个月后积累100+模式 | 记忆命名空间数量 |