@vigolium/piolium 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +117 -0
- package/agents/access-auditor.md +300 -0
- package/agents/assumption-breaker.md +154 -0
- package/agents/attack-designer.md +116 -0
- package/agents/code-scanner.md +139 -0
- package/agents/concurrency-auditor.md +238 -0
- package/agents/confirm-writer.md +257 -0
- package/agents/context-reviewer.md +274 -0
- package/agents/cross-verifier.md +165 -0
- package/agents/cve-scout.md +381 -0
- package/agents/env-builder.md +282 -0
- package/agents/env-profiler.md +205 -0
- package/agents/evidence-collector.md +140 -0
- package/agents/finding-grader.md +142 -0
- package/agents/finding-writer.md +148 -0
- package/agents/flow-tracer.md +106 -0
- package/agents/goal-backtracer.md +146 -0
- package/agents/history-miner.md +467 -0
- package/agents/independent-verifier.md +118 -0
- package/agents/intent-mapper.md +183 -0
- package/agents/longshot-collector.md +128 -0
- package/agents/longshot-prober.md +126 -0
- package/agents/patch-auditor.md +73 -0
- package/agents/poc-author.md +124 -0
- package/agents/poc-runner.md +194 -0
- package/agents/probe-lead.md +269 -0
- package/agents/red-challenger.md +101 -0
- package/agents/report-composer.md +208 -0
- package/agents/review-adjudicator.md +216 -0
- package/agents/spec-auditor.md +155 -0
- package/agents/taint-tracer.md +265 -0
- package/agents/test-locator.md +209 -0
- package/agents/threat-modeler.md +132 -0
- package/agents/variant-scanner.md +108 -0
- package/agents/variant-spotter.md +110 -0
- package/bin/piolium.mjs +376 -0
- package/extensions/piolium/_vendor/yaml.bundle.d.mts +6 -0
- package/extensions/piolium/_vendor/yaml.bundle.mjs +139 -0
- package/extensions/piolium/agent-runner.ts +322 -0
- package/extensions/piolium/agents.ts +266 -0
- package/extensions/piolium/audit-state.ts +522 -0
- package/extensions/piolium/bundled-resources.ts +97 -0
- package/extensions/piolium/candidate-scan.ts +966 -0
- package/extensions/piolium/command-target.ts +177 -0
- package/extensions/piolium/console-stream.ts +57 -0
- package/extensions/piolium/export-results.ts +380 -0
- package/extensions/piolium/findings.ts +448 -0
- package/extensions/piolium/heartbeat.ts +182 -0
- package/extensions/piolium/help.ts +234 -0
- package/extensions/piolium/index.ts +1865 -0
- package/extensions/piolium/longshot.ts +530 -0
- package/extensions/piolium/matcher-suggestions.ts +196 -0
- package/extensions/piolium/matcher-utils.ts +83 -0
- package/extensions/piolium/modes/balanced.ts +750 -0
- package/extensions/piolium/modes/confirm-bootstrap.ts +186 -0
- package/extensions/piolium/modes/confirm.ts +697 -0
- package/extensions/piolium/modes/deep.ts +917 -0
- package/extensions/piolium/modes/diff.ts +177 -0
- package/extensions/piolium/modes/lite.ts +540 -0
- package/extensions/piolium/modes/longshot.ts +595 -0
- package/extensions/piolium/modes/merge.ts +204 -0
- package/extensions/piolium/modes/phase-runner.ts +267 -0
- package/extensions/piolium/modes/reinvest.ts +546 -0
- package/extensions/piolium/modes/revisit.ts +279 -0
- package/extensions/piolium/modes.ts +48 -0
- package/extensions/piolium/phase-labels.ts +123 -0
- package/extensions/piolium/phase-status-strip.ts +92 -0
- package/extensions/piolium/prompt-prefix-editor.ts +39 -0
- package/extensions/piolium/providers/anthropic-vertex.ts +836 -0
- package/extensions/piolium/recon.ts +409 -0
- package/extensions/piolium/result-stats.ts +105 -0
- package/extensions/piolium/retry.ts +120 -0
- package/extensions/piolium/scheduler.ts +212 -0
- package/extensions/piolium/secrets.ts +368 -0
- package/extensions/piolium/tools/web-tools.ts +148 -0
- package/package.json +77 -0
- package/skills/agentic-actions-auditor/SKILL.md +327 -0
- package/skills/agentic-actions-auditor/references/action-profiles.md +186 -0
- package/skills/agentic-actions-auditor/references/cross-file-resolution.md +209 -0
- package/skills/agentic-actions-auditor/references/foundations.md +94 -0
- package/skills/agentic-actions-auditor/references/vector-a-env-var-intermediary.md +77 -0
- package/skills/agentic-actions-auditor/references/vector-b-direct-expression-injection.md +83 -0
- package/skills/agentic-actions-auditor/references/vector-c-cli-data-fetch.md +83 -0
- package/skills/agentic-actions-auditor/references/vector-d-pr-target-checkout.md +88 -0
- package/skills/agentic-actions-auditor/references/vector-e-error-log-injection.md +88 -0
- package/skills/agentic-actions-auditor/references/vector-f-subshell-expansion.md +82 -0
- package/skills/agentic-actions-auditor/references/vector-g-eval-of-ai-output.md +91 -0
- package/skills/agentic-actions-auditor/references/vector-h-dangerous-sandbox-configs.md +102 -0
- package/skills/agentic-actions-auditor/references/vector-i-wildcard-allowlists.md +88 -0
- package/skills/audit/SKILL.md +562 -0
- package/skills/audit/assets/icon.svg +7 -0
- package/skills/audit/hooks/scripts/validate_phase_output.py +550 -0
- package/skills/audit/references/adversarial-review.md +148 -0
- package/skills/audit/references/architecture-aware-sast.md +306 -0
- package/skills/audit/references/audit-workflow.md +737 -0
- package/skills/audit/references/chamber-protocol.md +384 -0
- package/skills/audit/references/creative-attack-modes.md +221 -0
- package/skills/audit/references/deep-analysis.md +273 -0
- package/skills/audit/references/domain-attack-playbooks.md +1129 -0
- package/skills/audit/references/knowledge-base-template.md +513 -0
- package/skills/audit/references/real-env-validation.md +191 -0
- package/skills/audit/references/report-templates.md +417 -0
- package/skills/audit/references/triage-and-prereqs.md +134 -0
- package/skills/audit/scripts/consolidate_drafts.py +554 -0
- package/skills/audit/scripts/partition_findings.py +152 -0
- package/skills/audit/scripts/rg-hotspots.sh +121 -0
- package/skills/audit/scripts/stamp_file_state.py +349 -0
- package/skills/code-reviewer/SKILL.md +65 -0
- package/skills/codeql/SKILL.md +281 -0
- package/skills/codeql/references/build-fixes.md +90 -0
- package/skills/codeql/references/diagnostic-query-templates.md +339 -0
- package/skills/codeql/references/extension-yaml-format.md +209 -0
- package/skills/codeql/references/important-only-suite.md +153 -0
- package/skills/codeql/references/language-details.md +207 -0
- package/skills/codeql/references/macos-arm64e-workaround.md +179 -0
- package/skills/codeql/references/performance-tuning.md +111 -0
- package/skills/codeql/references/quality-assessment.md +172 -0
- package/skills/codeql/references/ruleset-catalog.md +63 -0
- package/skills/codeql/references/run-all-suite.md +92 -0
- package/skills/codeql/references/sarif-processing.md +79 -0
- package/skills/codeql/references/threat-models.md +51 -0
- package/skills/codeql/workflows/build-database.md +280 -0
- package/skills/codeql/workflows/create-data-extensions.md +261 -0
- package/skills/codeql/workflows/run-analysis.md +301 -0
- package/skills/differential-review/SKILL.md +220 -0
- package/skills/differential-review/adversarial.md +203 -0
- package/skills/differential-review/methodology.md +234 -0
- package/skills/differential-review/patterns.md +300 -0
- package/skills/differential-review/reporting.md +369 -0
- package/skills/fp-check/SKILL.md +125 -0
- package/skills/fp-check/references/bug-class-verification.md +114 -0
- package/skills/fp-check/references/deep-verification.md +143 -0
- package/skills/fp-check/references/evidence-templates.md +91 -0
- package/skills/fp-check/references/false-positive-patterns.md +115 -0
- package/skills/fp-check/references/gate-reviews.md +27 -0
- package/skills/fp-check/references/standard-verification.md +78 -0
- package/skills/insecure-defaults/SKILL.md +117 -0
- package/skills/insecure-defaults/references/examples.md +409 -0
- package/skills/last30days/SKILL.md +444 -0
- package/skills/sarif-parsing/SKILL.md +483 -0
- package/skills/sarif-parsing/resources/jq-queries.md +162 -0
- package/skills/sarif-parsing/resources/sarif_helpers.py +331 -0
- package/skills/security-threat-model/LICENSE.txt +201 -0
- package/skills/security-threat-model/SKILL.md +81 -0
- package/skills/security-threat-model/agents/openai.yaml +4 -0
- package/skills/security-threat-model/references/prompt-template.md +255 -0
- package/skills/security-threat-model/references/security-controls-and-assets.md +32 -0
- package/skills/semgrep/SKILL.md +212 -0
- package/skills/semgrep/references/rulesets.md +162 -0
- package/skills/semgrep/references/scan-modes.md +110 -0
- package/skills/semgrep/references/scanner-task-prompt.md +140 -0
- package/skills/semgrep/scripts/merge_sarif.py +203 -0
- package/skills/semgrep/workflows/scan-workflow.md +311 -0
- package/skills/semgrep-rule-creator/SKILL.md +168 -0
- package/skills/semgrep-rule-creator/references/quick-reference.md +202 -0
- package/skills/semgrep-rule-creator/references/workflow.md +240 -0
- package/skills/semgrep-rule-variant-creator/SKILL.md +205 -0
- package/skills/semgrep-rule-variant-creator/references/applicability-analysis.md +250 -0
- package/skills/semgrep-rule-variant-creator/references/language-syntax-guide.md +324 -0
- package/skills/semgrep-rule-variant-creator/references/workflow.md +518 -0
- package/skills/sharp-edges/SKILL.md +292 -0
- package/skills/sharp-edges/references/auth-patterns.md +252 -0
- package/skills/sharp-edges/references/case-studies.md +274 -0
- package/skills/sharp-edges/references/config-patterns.md +333 -0
- package/skills/sharp-edges/references/crypto-apis.md +190 -0
- package/skills/sharp-edges/references/lang-c.md +205 -0
- package/skills/sharp-edges/references/lang-csharp.md +285 -0
- package/skills/sharp-edges/references/lang-go.md +270 -0
- package/skills/sharp-edges/references/lang-java.md +263 -0
- package/skills/sharp-edges/references/lang-javascript.md +269 -0
- package/skills/sharp-edges/references/lang-kotlin.md +265 -0
- package/skills/sharp-edges/references/lang-php.md +245 -0
- package/skills/sharp-edges/references/lang-python.md +274 -0
- package/skills/sharp-edges/references/lang-ruby.md +273 -0
- package/skills/sharp-edges/references/lang-rust.md +272 -0
- package/skills/sharp-edges/references/lang-swift.md +287 -0
- package/skills/sharp-edges/references/language-specific.md +588 -0
- package/skills/spec-to-code-compliance/SKILL.md +357 -0
- package/skills/spec-to-code-compliance/resources/COMPLETENESS_CHECKLIST.md +69 -0
- package/skills/spec-to-code-compliance/resources/IR_EXAMPLES.md +417 -0
- package/skills/spec-to-code-compliance/resources/OUTPUT_REQUIREMENTS.md +105 -0
- package/skills/supply-chain-risk-auditor/SKILL.md +67 -0
- package/skills/supply-chain-risk-auditor/resources/results-template.md +41 -0
- package/skills/variant-analysis/METHODOLOGY.md +327 -0
- package/skills/variant-analysis/SKILL.md +142 -0
- package/skills/variant-analysis/resources/codeql/cpp.ql +119 -0
- package/skills/variant-analysis/resources/codeql/go.ql +69 -0
- package/skills/variant-analysis/resources/codeql/java.ql +71 -0
- package/skills/variant-analysis/resources/codeql/javascript.ql +63 -0
- package/skills/variant-analysis/resources/codeql/python.ql +80 -0
- package/skills/variant-analysis/resources/semgrep/cpp.yaml +98 -0
- package/skills/variant-analysis/resources/semgrep/go.yaml +63 -0
- package/skills/variant-analysis/resources/semgrep/java.yaml +61 -0
- package/skills/variant-analysis/resources/semgrep/javascript.yaml +60 -0
- package/skills/variant-analysis/resources/semgrep/python.yaml +72 -0
- package/skills/variant-analysis/resources/variant-report-template.md +75 -0
- package/skills/vuln-report/SKILL.md +137 -0
- package/skills/vuln-report/agents/openai.yaml +4 -0
- package/skills/vuln-report/references/report-template.md +135 -0
- package/skills/wooyun-legacy/SKILL.md +367 -0
- package/skills/wooyun-legacy/references/bank-penetration.md +222 -0
- package/skills/wooyun-legacy/references/checklists/command-execution-checklist.md +119 -0
- package/skills/wooyun-legacy/references/checklists/csrf-checklist.md +74 -0
- package/skills/wooyun-legacy/references/checklists/file-upload-checklist.md +108 -0
- package/skills/wooyun-legacy/references/checklists/info-disclosure-checklist.md +114 -0
- package/skills/wooyun-legacy/references/checklists/logic-flaws-checklist.md +95 -0
- package/skills/wooyun-legacy/references/checklists/misconfig-checklist.md +124 -0
- package/skills/wooyun-legacy/references/checklists/path-traversal-checklist.md +87 -0
- package/skills/wooyun-legacy/references/checklists/rce-checklist.md +93 -0
- package/skills/wooyun-legacy/references/checklists/sql-injection-checklist.md +97 -0
- package/skills/wooyun-legacy/references/checklists/ssrf-checklist.md +99 -0
- package/skills/wooyun-legacy/references/checklists/unauthorized-access-checklist.md +89 -0
- package/skills/wooyun-legacy/references/checklists/weak-password-checklist.md +115 -0
- package/skills/wooyun-legacy/references/checklists/xss-checklist.md +103 -0
- package/skills/wooyun-legacy/references/checklists/xxe-checklist.md +130 -0
- package/skills/wooyun-legacy/references/info-disclosure.md +975 -0
- package/skills/wooyun-legacy/references/logic-flaws.md +721 -0
- package/skills/wooyun-legacy/references/path-traversal.md +1191 -0
- package/skills/wooyun-legacy/references/telecom-penetration.md +156 -0
- package/skills/wooyun-legacy/references/unauthorized-access.md +980 -0
- package/skills/wooyun-legacy/references/xss.md +746 -0
- package/skills/zeroize-audit/SKILL.md +371 -0
- package/skills/zeroize-audit/configs/c.yaml +21 -0
- package/skills/zeroize-audit/configs/default.yaml +128 -0
- package/skills/zeroize-audit/configs/rust.yaml +83 -0
- package/skills/zeroize-audit/prompts/report_template.md +238 -0
- package/skills/zeroize-audit/prompts/system.md +163 -0
- package/skills/zeroize-audit/prompts/task.md +97 -0
- package/skills/zeroize-audit/references/compile-commands.md +231 -0
- package/skills/zeroize-audit/references/detection-strategy.md +191 -0
- package/skills/zeroize-audit/references/ir-analysis.md +252 -0
- package/skills/zeroize-audit/references/mcp-analysis.md +221 -0
- package/skills/zeroize-audit/references/poc-generation.md +470 -0
- package/skills/zeroize-audit/references/rust-zeroization-patterns.md +867 -0
- package/skills/zeroize-audit/schemas/input.json +83 -0
- package/skills/zeroize-audit/schemas/output.json +140 -0
- package/skills/zeroize-audit/tools/analyze_asm.sh +202 -0
- package/skills/zeroize-audit/tools/analyze_cfg.py +381 -0
- package/skills/zeroize-audit/tools/analyze_heap.sh +211 -0
- package/skills/zeroize-audit/tools/analyze_ir_semantic.py +429 -0
- package/skills/zeroize-audit/tools/diff_ir.sh +135 -0
- package/skills/zeroize-audit/tools/diff_rust_mir.sh +189 -0
- package/skills/zeroize-audit/tools/emit_asm.sh +67 -0
- package/skills/zeroize-audit/tools/emit_ir.sh +77 -0
- package/skills/zeroize-audit/tools/emit_rust_asm.sh +178 -0
- package/skills/zeroize-audit/tools/emit_rust_ir.sh +150 -0
- package/skills/zeroize-audit/tools/emit_rust_mir.sh +158 -0
- package/skills/zeroize-audit/tools/extract_compile_flags.py +284 -0
- package/skills/zeroize-audit/tools/generate_poc.py +1329 -0
- package/skills/zeroize-audit/tools/mcp/apply_confidence_gates.py +113 -0
- package/skills/zeroize-audit/tools/mcp/check_mcp.sh +68 -0
- package/skills/zeroize-audit/tools/mcp/normalize_mcp_evidence.py +125 -0
- package/skills/zeroize-audit/tools/scripts/check_llvm_patterns.py +481 -0
- package/skills/zeroize-audit/tools/scripts/check_mir_patterns.py +554 -0
- package/skills/zeroize-audit/tools/scripts/check_rust_asm.py +424 -0
- package/skills/zeroize-audit/tools/scripts/check_rust_asm_aarch64.py +300 -0
- package/skills/zeroize-audit/tools/scripts/check_rust_asm_x86.py +283 -0
- package/skills/zeroize-audit/tools/scripts/find_dangerous_apis.py +375 -0
- package/skills/zeroize-audit/tools/scripts/semantic_audit.py +923 -0
- package/skills/zeroize-audit/tools/track_dataflow.sh +196 -0
- package/skills/zeroize-audit/tools/validate_rust_toolchain.sh +298 -0
- package/skills/zeroize-audit/workflows/phase-0-preflight.md +150 -0
- package/skills/zeroize-audit/workflows/phase-1-source-analysis.md +144 -0
- package/skills/zeroize-audit/workflows/phase-2-compiler-analysis.md +139 -0
- package/skills/zeroize-audit/workflows/phase-3-interim-report.md +46 -0
- package/skills/zeroize-audit/workflows/phase-4-poc-generation.md +46 -0
- package/skills/zeroize-audit/workflows/phase-5-poc-validation.md +136 -0
- package/skills/zeroize-audit/workflows/phase-6-final-report.md +44 -0
- package/skills/zeroize-audit/workflows/phase-7-test-generation.md +42 -0
- package/themes/piolium-srcery.json +94 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Review Chamber Protocol
|
|
2
|
+
|
|
3
|
+
Defines the debate format, agent interaction rules, round limits, and convergence criteria for the
|
|
4
|
+
Phase 10 Review Chamber multi-agent debate system.
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
A Review Chamber is a 4-agent debate team that processes a threat scenario cluster (grouped
|
|
9
|
+
DFD/CFD slices sharing trust boundaries). Four roles — Attack Ideator, Code Tracer, Devil's
|
|
10
|
+
Advocate, and Chamber Synthesizer — operate through structured rounds of hypothesis generation,
|
|
11
|
+
evidence gathering, adversarial challenge, and verdict synthesis.
|
|
12
|
+
|
|
13
|
+
Findings emerge from structured argumentation, not solitary analysis. This eliminates the
|
|
14
|
+
confirmation bias inherent in a single agent both imagining and validating an attack.
|
|
15
|
+
|
|
16
|
+
## Chamber Formation
|
|
17
|
+
|
|
18
|
+
### Cluster Formation
|
|
19
|
+
|
|
20
|
+
After Phase 4 (SAST + inline enrichment) and Phase 9 (spec gap) complete, the orchestrator forms threat
|
|
21
|
+
clusters from the KB:
|
|
22
|
+
|
|
23
|
+
1. Read `## High-Risk DFD Slices` and `## High-Risk CFD Slices` from `archon/attack-surface/knowledge-base-report.md`
|
|
24
|
+
2. Group slices by shared trust boundary or component affinity (slices accessing the same data store,
|
|
25
|
+
enforcement point, or transport layer belong together)
|
|
26
|
+
3. Each cluster becomes one chamber
|
|
27
|
+
4. Typical audit produces 3-8 chambers depending on architecture complexity
|
|
28
|
+
5. Priority ordering: clusters touching authentication/authorization first, then data ingestion,
|
|
29
|
+
then external API surface, then internal components
|
|
30
|
+
|
|
31
|
+
### Chamber Directory Structure
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
archon/chamber-workspace/
|
|
35
|
+
chamber-01-auth-flows/
|
|
36
|
+
debate.md # append-only debate transcript
|
|
37
|
+
evidence/ # tracer evidence attachments (on-demand QL queries, screenshots)
|
|
38
|
+
variant-candidates/ # scout-discovered variant candidates
|
|
39
|
+
chamber-02-data-ingestion/
|
|
40
|
+
debate.md
|
|
41
|
+
evidence/
|
|
42
|
+
variant-candidates/
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### NNN Range Assignment
|
|
46
|
+
|
|
47
|
+
To prevent finding ID collisions across parallel chambers, the orchestrator assigns non-overlapping
|
|
48
|
+
ranges before spawning:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Chamber 1: p7-001 through p7-019
|
|
52
|
+
Chamber 2: p7-020 through p7-039
|
|
53
|
+
Chamber 3: p7-040 through p7-059
|
|
54
|
+
Chamber 4: p7-060 through p7-079
|
|
55
|
+
...
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The Synthesizer receives its assigned range in the spawn prompt.
|
|
59
|
+
|
|
60
|
+
### Concurrency Limit
|
|
61
|
+
|
|
62
|
+
Up to 3 chambers run simultaneously. If more than 3 clusters exist, the orchestrator spawns the
|
|
63
|
+
first 3 in priority order, then spawns subsequent chambers as earlier ones complete.
|
|
64
|
+
|
|
65
|
+
## Agent Roles and Constraints
|
|
66
|
+
|
|
67
|
+
### Attack Ideator
|
|
68
|
+
|
|
69
|
+
- Generates attack hypotheses by cycling through 8 creative modes
|
|
70
|
+
(see `creative-attack-modes.md`)
|
|
71
|
+
- Does NOT trace code paths, does NOT issue verdicts
|
|
72
|
+
- Reads: KB (threat model, domain attack research, attack surface), CodeQL structural analysis
|
|
73
|
+
section, enrichment notes, spec gap analysis
|
|
74
|
+
- Writes: hypothesis batches to debate transcript
|
|
75
|
+
- Produces 3-7 numbered hypotheses (H-01 through H-07) per batch
|
|
76
|
+
|
|
77
|
+
### Code Tracer
|
|
78
|
+
|
|
79
|
+
- Takes each hypothesis and traces through actual code with evidence
|
|
80
|
+
- Uses Method 2.6 from `deep-analysis.md`: call-graph-slices.json, entry-points.json, sinks.json,
|
|
81
|
+
flow-paths-all-severities.md, on-demand QL queries against live DB
|
|
82
|
+
- Does NOT generate hypotheses, does NOT issue final verdicts
|
|
83
|
+
- Reads: source code, CodeQL artifacts, KB structural analysis
|
|
84
|
+
- Writes: per-hypothesis evidence blocks to debate transcript
|
|
85
|
+
- Produces: reachability verdict (REACHABLE / UNREACHABLE / PARTIAL) with file:line chains
|
|
86
|
+
|
|
87
|
+
### Devil's Advocate
|
|
88
|
+
|
|
89
|
+
- Challenges EVERY finding the Tracer marks reachable
|
|
90
|
+
- Searches 5 protection layers: language, framework, middleware, application, documentation
|
|
91
|
+
- Must argue against even obvious vulnerabilities — inability to construct credible defense is
|
|
92
|
+
itself strong evidence of a genuine vulnerability
|
|
93
|
+
- Does NOT generate hypotheses
|
|
94
|
+
- Reads: source code, framework documentation, project SECURITY.md, deployment configs
|
|
95
|
+
- Writes: defense briefs to debate transcript
|
|
96
|
+
- Must explicitly check all 8 Claude-Specific FP patterns from `triage-and-prereqs.md`
|
|
97
|
+
|
|
98
|
+
### Chamber Synthesizer
|
|
99
|
+
|
|
100
|
+
- Orchestrates the debate flow by writing phase markers to the transcript
|
|
101
|
+
- Reads all arguments from other roles and makes judgment calls
|
|
102
|
+
- Requests additional investigation rounds when evidence is insufficient
|
|
103
|
+
- Assigns calibrated severity per `triage-and-prereqs.md` Severity Calibration
|
|
104
|
+
- Only role that writes finding drafts to `archon/findings-draft/`
|
|
105
|
+
- Manages the attack pattern registry (append confirmed patterns)
|
|
106
|
+
- Does NOT generate hypotheses, does NOT trace code
|
|
107
|
+
|
|
108
|
+
## Debate Protocol
|
|
109
|
+
|
|
110
|
+
### Round Flow
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Synthesizer writes "## Round 1 -- Ideation" marker to debate.md
|
|
114
|
+
│
|
|
115
|
+
▼
|
|
116
|
+
Ideator reads marker, generates 3-7 hypotheses, appends to debate.md
|
|
117
|
+
│
|
|
118
|
+
▼
|
|
119
|
+
Synthesizer writes "## Round 2 -- Tracing" marker
|
|
120
|
+
│
|
|
121
|
+
▼
|
|
122
|
+
Tracer reads hypotheses, traces each through code, appends evidence to debate.md
|
|
123
|
+
│
|
|
124
|
+
▼
|
|
125
|
+
Synthesizer writes "## Round 3 -- Challenge" marker
|
|
126
|
+
│
|
|
127
|
+
▼
|
|
128
|
+
Devil's Advocate reads Tracer evidence, writes defense brief per hypothesis, appends to debate.md
|
|
129
|
+
│
|
|
130
|
+
▼
|
|
131
|
+
Synthesizer writes "## Round 4 -- Synthesis" marker
|
|
132
|
+
│
|
|
133
|
+
▼
|
|
134
|
+
Synthesizer reads all arguments, issues verdicts OR writes "INVESTIGATE:" directives
|
|
135
|
+
│
|
|
136
|
+
▼
|
|
137
|
+
[Optional] Rounds 5-6: Focused re-investigation (max 2 additional rounds per hypothesis)
|
|
138
|
+
│
|
|
139
|
+
▼
|
|
140
|
+
Synthesizer writes finding drafts for VALID findings, closes chamber
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Agent Communication
|
|
144
|
+
|
|
145
|
+
Within archon-audit-claude: agents communicate via the shared `debate.md` file AND `SendMessage`.
|
|
146
|
+
The Synthesizer uses `SendMessage` to notify each agent when its turn begins. Agents read
|
|
147
|
+
the transcript to understand prior arguments.
|
|
148
|
+
|
|
149
|
+
Within archon-audit-codex: agents poll `debate.md` for new sections (file-based coordination).
|
|
150
|
+
|
|
151
|
+
### Turn-Taking Rules
|
|
152
|
+
|
|
153
|
+
1. Only ONE agent writes to `debate.md` at a time (serialized by debate rounds)
|
|
154
|
+
2. Each agent appends to the end of the file — never edits prior sections
|
|
155
|
+
3. Each section is tagged with the role name: `### [IDEATOR]`, `### [TRACER]`, `### [ADVOCATE]`,
|
|
156
|
+
`### [SYNTHESIZER]`
|
|
157
|
+
4. Timestamps are included for debugging and performance analysis
|
|
158
|
+
|
|
159
|
+
### Round Limits
|
|
160
|
+
|
|
161
|
+
- **Maximum 7 hypotheses per ideation batch**: if the Ideator generates more, the Synthesizer
|
|
162
|
+
prioritizes by expected impact and defers the rest
|
|
163
|
+
- **Maximum 3 rounds per hypothesis**: 1 initial trace+challenge round + 2 follow-up rounds.
|
|
164
|
+
If unresolved after 3 rounds, the Synthesizer issues a judgment call or marks INCONCLUSIVE
|
|
165
|
+
- **Maximum 6 total rounds per chamber** (1 ideation + 1 tracing + 1 challenge + 1 synthesis +
|
|
166
|
+
2 follow-up). The Synthesizer may not request more than 2 follow-up rounds.
|
|
167
|
+
|
|
168
|
+
## Convergence Criteria
|
|
169
|
+
|
|
170
|
+
Debate ends for a hypothesis when any condition is met:
|
|
171
|
+
|
|
172
|
+
| Condition | Verdict | Action |
|
|
173
|
+
|-----------|---------|--------|
|
|
174
|
+
| Tracer: UNREACHABLE, Advocate confirms no alternate path | DROP | No draft written |
|
|
175
|
+
| Tracer: REACHABLE, Advocate cannot find blocking protection (2 attempts) | VALID | Write finding draft |
|
|
176
|
+
| Tracer: REACHABLE, Advocate finds blocking protection | FALSE POSITIVE | No draft written |
|
|
177
|
+
| 3 rounds without resolution | Synthesizer judgment | Verdict or INCONCLUSIVE |
|
|
178
|
+
| Duplicate of already-adjudicated finding | DUPLICATE | No draft written |
|
|
179
|
+
| Severity determined to be Low | DROP (low severity) | No draft written |
|
|
180
|
+
|
|
181
|
+
A chamber closes when all hypotheses have reached a terminal verdict.
|
|
182
|
+
|
|
183
|
+
## Pre-Finding Quality Gate
|
|
184
|
+
|
|
185
|
+
Before the Synthesizer writes any finding draft, apply this 5-point check:
|
|
186
|
+
|
|
187
|
+
1. **Attacker control verified?** Tracer confirmed input reaches the path (not inferred)?
|
|
188
|
+
2. **Framework protection checked?** Advocate searched all 5 layers?
|
|
189
|
+
3. **Same-origin confusion?** Is the attack cross-trust-boundary, not same-session?
|
|
190
|
+
4. **Config vs. vulnerability?** Exploitation requires only normal attacker position (not admin)?
|
|
191
|
+
5. **Test/example code?** Vulnerable code ships to production?
|
|
192
|
+
|
|
193
|
+
If any check fails, the finding is dropped. If ambiguous, the Synthesizer adds
|
|
194
|
+
`Pre-FP-Flag: check-N-ambiguous` to the finding draft for Phase 11 priority.
|
|
195
|
+
|
|
196
|
+
## Cross-Chamber Intelligence
|
|
197
|
+
|
|
198
|
+
### Attack Pattern Registry
|
|
199
|
+
|
|
200
|
+
File: `archon/attack-pattern-registry.json`
|
|
201
|
+
|
|
202
|
+
When the Synthesizer confirms a finding, it checks the registry:
|
|
203
|
+
- Pattern exists → append to `confirmed_instances`
|
|
204
|
+
- New pattern → create entry with `detection_signature` and `untested_candidates`
|
|
205
|
+
|
|
206
|
+
Other chambers read the registry before starting new ideation rounds. The Ideator
|
|
207
|
+
incorporates confirmed patterns to look for the same class of vulnerability in its cluster's scope.
|
|
208
|
+
|
|
209
|
+
Schema:
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"patterns": [{
|
|
214
|
+
"id": "AP-001",
|
|
215
|
+
"title": "Unsafe ObjectInputStream deserialization",
|
|
216
|
+
"bug_class": "deserialization",
|
|
217
|
+
"root_cause": "ObjectInputStream.readObject() without ObjectInputFilter",
|
|
218
|
+
"detection_signature": {
|
|
219
|
+
"codeql": "<QL query fragment>",
|
|
220
|
+
"grep": "<regex pattern>",
|
|
221
|
+
"semgrep": "<semgrep pattern>"
|
|
222
|
+
},
|
|
223
|
+
"confirmed_instances": [
|
|
224
|
+
{"finding_ref": "p7-003-admin-deser.md", "file": "src/admin/AdminService.java:142"}
|
|
225
|
+
],
|
|
226
|
+
"untested_candidates": [
|
|
227
|
+
{"file": "src/backup/BackupRestoreService.java:201", "reason": "Uses ObjectInputStream"}
|
|
228
|
+
],
|
|
229
|
+
"severity": "CRITICAL"
|
|
230
|
+
}]
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Variant Scout Integration
|
|
235
|
+
|
|
236
|
+
The Variant Scout (optional 5th agent) monitors the debate transcript for confirmed patterns
|
|
237
|
+
and immediately searches for structural variants in sibling components. Findings are written to
|
|
238
|
+
`archon/chamber-workspace/<chamber-id>/variant-candidates/` for the Synthesizer to decide
|
|
239
|
+
whether to open a new debate round or defer to Phase 12.
|
|
240
|
+
|
|
241
|
+
## Debate Transcript Format
|
|
242
|
+
|
|
243
|
+
File: `archon/chamber-workspace/<chamber-id>/debate.md`
|
|
244
|
+
|
|
245
|
+
```markdown
|
|
246
|
+
# Review Chamber: <chamber-id>
|
|
247
|
+
|
|
248
|
+
Cluster: <description of threat scenario cluster>
|
|
249
|
+
DFD Slices: <comma-separated slice identifiers from KB>
|
|
250
|
+
NNN Range: <assigned range, e.g., 001-019>
|
|
251
|
+
Started: <ISO timestamp>
|
|
252
|
+
Status: ACTIVE | CLOSED
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Round 1 -- Ideation
|
|
257
|
+
|
|
258
|
+
### [IDEATOR] Hypothesis Batch -- <ISO timestamp>
|
|
259
|
+
|
|
260
|
+
**H-01: <hypothesis title>**
|
|
261
|
+
- Attack class: <e.g., TOCTOU, second-order injection, trust boundary confusion>
|
|
262
|
+
- Chain: <multi-step chain description if applicable>
|
|
263
|
+
- Preconditions: <attacker starting position>
|
|
264
|
+
- Target asset: <what the attacker gains>
|
|
265
|
+
- Entry point: <suspected entry, may be approximate>
|
|
266
|
+
- Sink: <suspected sensitive operation>
|
|
267
|
+
- Creativity signal: <why a solo agent would miss this>
|
|
268
|
+
|
|
269
|
+
**H-02: <hypothesis title>**
|
|
270
|
+
...
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Round 2 -- Tracing
|
|
275
|
+
|
|
276
|
+
### [TRACER] Evidence for H-01 -- <ISO timestamp>
|
|
277
|
+
|
|
278
|
+
**Reachability: REACHABLE | UNREACHABLE | PARTIAL**
|
|
279
|
+
|
|
280
|
+
Code path:
|
|
281
|
+
1. `<file:line>` -- <description>
|
|
282
|
+
2. `<file:line>` -- <description>
|
|
283
|
+
3. `<file:line>` -- <description>
|
|
284
|
+
|
|
285
|
+
Sanitizers on path:
|
|
286
|
+
- `<file:line>` -- <description of control and bypassability>
|
|
287
|
+
|
|
288
|
+
CodeQL slice: call-graph-slices.json entry #<N>, reachable: <true|false>
|
|
289
|
+
On-demand query: <path to .ql file if run>
|
|
290
|
+
|
|
291
|
+
**Assessment**: <summary of reachability evidence>
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Round 3 -- Challenge
|
|
296
|
+
|
|
297
|
+
### [ADVOCATE] Defense Brief for H-01 -- <ISO timestamp>
|
|
298
|
+
|
|
299
|
+
**Protection search results:**
|
|
300
|
+
|
|
301
|
+
| Layer | Protection Found | Blocks Attack? |
|
|
302
|
+
|-------|-----------------|----------------|
|
|
303
|
+
| Language | <finding> | <Yes/No> |
|
|
304
|
+
| Framework | <finding> | <Yes/No> |
|
|
305
|
+
| Middleware | <finding> | <Yes/No> |
|
|
306
|
+
| Application | <finding> | <Yes/No> |
|
|
307
|
+
| Documentation | <finding> | <Yes/No> |
|
|
308
|
+
|
|
309
|
+
**Claude FP Pattern Check**: <which of the 8 patterns were checked, any matches>
|
|
310
|
+
|
|
311
|
+
**Defense argument**: <strongest case for false positive>
|
|
312
|
+
|
|
313
|
+
**Verdict recommendation**: Cannot disprove | Disproved by <layer> protection
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Round 4 -- Synthesis
|
|
318
|
+
|
|
319
|
+
### [SYNTHESIZER] Verdict for H-01 -- <ISO timestamp>
|
|
320
|
+
|
|
321
|
+
**Prosecution summary**: <key evidence from Tracer>
|
|
322
|
+
|
|
323
|
+
**Defense summary**: <key argument from Advocate>
|
|
324
|
+
|
|
325
|
+
**Pre-FP Gate**: all checks passed | failed on check-<N>
|
|
326
|
+
|
|
327
|
+
**Verdict: VALID | FALSE POSITIVE | DROP | INCONCLUSIVE**
|
|
328
|
+
**Severity: MEDIUM | HIGH | CRITICAL**
|
|
329
|
+
**Rationale**: <one-sentence justification citing evidence from both sides>
|
|
330
|
+
|
|
331
|
+
**Finding draft written to**: archon/findings-draft/p7-<NNN>-<slug>.md
|
|
332
|
+
**Registry updated**: AP-<NNN> <title> (or "no new pattern")
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## [Optional] Round 5 -- Focused Re-investigation
|
|
337
|
+
|
|
338
|
+
### [SYNTHESIZER] Investigation Request -- <ISO timestamp>
|
|
339
|
+
|
|
340
|
+
**Directed to**: TRACER | ADVOCATE
|
|
341
|
+
**Regarding**: H-<NN>
|
|
342
|
+
**Question**: <specific question>
|
|
343
|
+
|
|
344
|
+
### [TRACER|ADVOCATE] Response for H-<NN> -- <ISO timestamp>
|
|
345
|
+
...
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## Chamber Summary
|
|
350
|
+
|
|
351
|
+
| Hypothesis | Verdict | Severity | Finding Draft |
|
|
352
|
+
|-----------|---------|----------|---------------|
|
|
353
|
+
| H-01 | VALID | HIGH | p7-001-<slug>.md |
|
|
354
|
+
| H-02 | FALSE POSITIVE | -- | -- |
|
|
355
|
+
| H-03 | DROP (unreachable) | -- | -- |
|
|
356
|
+
| ... | | | |
|
|
357
|
+
|
|
358
|
+
Findings written: <count>
|
|
359
|
+
Patterns added to registry: <count>
|
|
360
|
+
Variant candidates: <count>
|
|
361
|
+
|
|
362
|
+
Chamber closed: <ISO timestamp>
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
## Relationship to Phase 11
|
|
366
|
+
|
|
367
|
+
The Devil's Advocate within the chamber subsumes most of Phase 11 Stage 2's adversarial function.
|
|
368
|
+
Phase 11 is reduced to **P11-LITE**:
|
|
369
|
+
|
|
370
|
+
- **Stage 1 (unchanged)**: apply `fp-check` skill to all VALID findings. Catches systematic
|
|
371
|
+
FP patterns the Advocate might share with other chamber agents.
|
|
372
|
+
- **Stage 2 (CRITICAL/HIGH only)**: spawn one fresh cold-verification agent per CRITICAL/HIGH
|
|
373
|
+
finding with ONLY the finding draft path (no debate transcript). Focus on real-environment
|
|
374
|
+
reproduction per `real-env-validation.md`. Medium findings skip Stage 2 entirely — already
|
|
375
|
+
challenged by the Devil's Advocate during debate.
|
|
376
|
+
|
|
377
|
+
## Error Recovery
|
|
378
|
+
|
|
379
|
+
- **Agent crashes mid-round**: Synthesizer detects via missing response. Notifies orchestrator.
|
|
380
|
+
Orchestrator spawns replacement agent with the current debate transcript as context.
|
|
381
|
+
- **Chamber stalls**: if no new content appears in debate.md for an extended period, the
|
|
382
|
+
orchestrator messages the Synthesizer to check status or force convergence.
|
|
383
|
+
- **Session recovery**: orchestrator reads `debate.md` Status field. ACTIVE chambers with
|
|
384
|
+
incomplete rounds are resumed from the last completed round marker.
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# Creative Attack Generation Modes
|
|
2
|
+
|
|
3
|
+
Eight structured thinking modes for the Attack Ideator agent. Cycle through all 8 modes for each
|
|
4
|
+
threat cluster, generating at least one hypothesis per applicable mode. Hypotheses that span
|
|
5
|
+
multiple modes (e.g., chaining + race condition) are the most valuable and should be prioritized.
|
|
6
|
+
|
|
7
|
+
## Mode 1: Vulnerability Chaining
|
|
8
|
+
|
|
9
|
+
Chain individually-low-severity issues into high-severity exploit paths. No single issue may
|
|
10
|
+
qualify as a finding alone, but the combination crosses a trust boundary.
|
|
11
|
+
|
|
12
|
+
**Thinking prompts:**
|
|
13
|
+
- "If IDOR gives read access to user metadata, and metadata contains session tokens, then
|
|
14
|
+
IDOR + token reuse = account takeover"
|
|
15
|
+
- "If SSRF is limited to internal DNS resolution, and internal DNS resolves to metadata endpoints,
|
|
16
|
+
then SSRF + cloud metadata = credential theft"
|
|
17
|
+
- "This CVE was patched, but the patch only covers the HTTP path. The WebSocket path uses the same
|
|
18
|
+
parser without the fix"
|
|
19
|
+
- "Phase 1 advisory + Phase 9 spec gap: can a known CVE's patch be bypassed through a protocol
|
|
20
|
+
compliance gap?"
|
|
21
|
+
- "Low-severity information disclosure + low-severity injection = high-severity authenticated RCE"
|
|
22
|
+
|
|
23
|
+
**Cross-reference inputs:**
|
|
24
|
+
- Phase 1 advisory intelligence (known CVEs, patch commits)
|
|
25
|
+
- Phase 9 spec gap analysis (protocol compliance gaps)
|
|
26
|
+
- Phase 4 SAST enrichment notes (individually-dropped low-severity findings)
|
|
27
|
+
- Phase 3 domain attack research (known attack chains per domain)
|
|
28
|
+
|
|
29
|
+
## Mode 2: Business Logic Abuse
|
|
30
|
+
|
|
31
|
+
Think about what the application is *designed* to do and how that design can be abused.
|
|
32
|
+
Business logic bugs are invisible to SAST tools.
|
|
33
|
+
|
|
34
|
+
**Thinking prompts:**
|
|
35
|
+
- "Can I refund more than I paid? Process a negative quantity?"
|
|
36
|
+
- "Can I invite myself to a higher-privilege role?"
|
|
37
|
+
- "Can I skip step 2 and go directly from step 1 to step 3?"
|
|
38
|
+
- "Can I exhaust another tenant's quota by manipulating the accounting?"
|
|
39
|
+
- "Can I register the same resource twice and exploit the race between checks?"
|
|
40
|
+
- "Can I abuse a legitimate feature (export, share, webhook) as an exfiltration channel?"
|
|
41
|
+
- "Can I manipulate the order of operations to bypass a check that assumes sequential execution?"
|
|
42
|
+
- "Can I abuse an undo/rollback mechanism to restore a revoked privilege?"
|
|
43
|
+
|
|
44
|
+
**Focus areas:**
|
|
45
|
+
- Multi-step workflows (payment, registration, approval, provisioning)
|
|
46
|
+
- Quota and rate systems (credits, API limits, storage)
|
|
47
|
+
- Invitation and delegation systems
|
|
48
|
+
- State machines with transitions (draft -> published -> archived)
|
|
49
|
+
|
|
50
|
+
## Mode 3: Race Conditions and TOCTOU
|
|
51
|
+
|
|
52
|
+
Identify state-dependent operations and ask "what if the state changes between check and use?"
|
|
53
|
+
Race conditions are notoriously difficult to find through static analysis.
|
|
54
|
+
|
|
55
|
+
**Thinking prompts:**
|
|
56
|
+
- "The balance check and deduction are not atomic — double-spend?"
|
|
57
|
+
- "Role is checked, then 100ms later the privileged action executes. Can I change my role between?"
|
|
58
|
+
- "Symlink substitution between stat() and open()?"
|
|
59
|
+
- "Database isolation level is READ COMMITTED — phantom reads in this multi-query operation?"
|
|
60
|
+
- "The session is validated, then the request body is parsed. Can I invalidate the session mid-parse?"
|
|
61
|
+
- "Two concurrent requests to the same endpoint — does the second see the first's uncommitted state?"
|
|
62
|
+
- "The file is written, then permissions are set. Is there a window where the file is world-readable?"
|
|
63
|
+
|
|
64
|
+
**Detection strategy:**
|
|
65
|
+
- Look for check-then-act patterns without locking or atomic transactions
|
|
66
|
+
- Identify shared mutable state accessed by concurrent handlers
|
|
67
|
+
- Find operations that span multiple I/O calls (DB, file, network)
|
|
68
|
+
- Check for non-atomic read-modify-write sequences
|
|
69
|
+
|
|
70
|
+
## Mode 4: Second-Order and Stored Attacks
|
|
71
|
+
|
|
72
|
+
Look for inputs that are stored before being used in a dangerous context. The storage creates
|
|
73
|
+
temporal and spatial separation that hides the attack from simple source-to-sink analysis.
|
|
74
|
+
|
|
75
|
+
**Thinking prompts:**
|
|
76
|
+
- "User input stored in profile field, later rendered unescaped in admin dashboard (stored XSS)"
|
|
77
|
+
- "Username stored in table A, later concatenated into query when joining table B (second-order SQLi)"
|
|
78
|
+
- "Webhook URL stored in config, later fetched by background job (stored SSRF)"
|
|
79
|
+
- "Template variable stored in database, later rendered by email templating engine (stored SSTI)"
|
|
80
|
+
- "Filename stored during upload, later used in a shell command during processing (stored command injection)"
|
|
81
|
+
- "JSON payload stored in event queue, later deserialized by a consumer with different trust level"
|
|
82
|
+
|
|
83
|
+
**Detection strategy:**
|
|
84
|
+
- Identify all write paths (user input -> database/file/cache/queue)
|
|
85
|
+
- For each stored value, trace all read paths and their consumption contexts
|
|
86
|
+
- Check if the read context applies different (weaker) sanitization than the write context
|
|
87
|
+
- Pay special attention to cross-service data flows where the consuming service trusts stored data
|
|
88
|
+
|
|
89
|
+
## Mode 5: Trust Boundary Confusion
|
|
90
|
+
|
|
91
|
+
Identify where identity, authorization, or trust assumptions change across component boundaries.
|
|
92
|
+
|
|
93
|
+
**Thinking prompts:**
|
|
94
|
+
- "Microservice A trusts microservice B's claims without re-verification"
|
|
95
|
+
- "Frontend validation assumed to be present by backend"
|
|
96
|
+
- "Internal API endpoints exposed through a public reverse proxy with no re-auth"
|
|
97
|
+
- "Plugin/extension code running with host-level privileges"
|
|
98
|
+
- "The auth middleware checks tokens, but this endpoint is registered before the middleware in the
|
|
99
|
+
route chain"
|
|
100
|
+
- "The API gateway validates JWT, but the downstream service accepts any request from the gateway IP"
|
|
101
|
+
- "Admin panel is 'internal only' but shares the same origin as the public app (CORS, cookies)"
|
|
102
|
+
- "The CLI tool runs with user privileges but shells out to a helper that runs as root"
|
|
103
|
+
|
|
104
|
+
**Detection strategy:**
|
|
105
|
+
- Map all trust boundaries from the Phase 3 threat model
|
|
106
|
+
- For each boundary, check: does crossing it require re-authentication? Re-authorization?
|
|
107
|
+
- Identify implicit trust assumptions (IP-based trust, shared-origin trust, process-level trust)
|
|
108
|
+
- Check middleware ordering: are security checks applied before or after route registration?
|
|
109
|
+
- Look for "internal" APIs accessible from external networks
|
|
110
|
+
|
|
111
|
+
## Mode 6: Parser and Protocol Differentials
|
|
112
|
+
|
|
113
|
+
Look for places where two components interpret the same input differently. Parser differentials
|
|
114
|
+
are high-severity because they bypass controls that appear correct in isolation.
|
|
115
|
+
|
|
116
|
+
**Thinking prompts:**
|
|
117
|
+
- "HTTP request smuggling between proxy and backend (CL vs TE)"
|
|
118
|
+
- "JSON parser differential (duplicate keys — which value wins?)"
|
|
119
|
+
- "URL parser differential (authority parsing, percent-encoding, backslash handling)"
|
|
120
|
+
- "Content-Type mismatch between what the validator checks and what the processor consumes"
|
|
121
|
+
- "XML namespace-aware vs namespace-unaware parser (SAML signature wrapping)"
|
|
122
|
+
- "Multipart boundary parsing difference between framework and application code"
|
|
123
|
+
- "Header folding: proxy treats continuation line as part of previous header, backend treats it as new"
|
|
124
|
+
- "Path normalization: security check uses one library, router uses another"
|
|
125
|
+
|
|
126
|
+
**Cross-reference inputs:**
|
|
127
|
+
- Phase 9 spec gap analysis (RFC compliance gaps in parsers)
|
|
128
|
+
- Phase 3 domain attack research Mode C (protocol-specific attack patterns)
|
|
129
|
+
- `deep-analysis.md` Section 6 (parsing/normalization/sanitization discrepancies)
|
|
130
|
+
|
|
131
|
+
**Detection strategy:**
|
|
132
|
+
- Identify every parser in the system (URL, JSON, XML, multipart, headers, cookies, query strings)
|
|
133
|
+
- For each parser, check: is the same parser used by both the security check and the consumer?
|
|
134
|
+
- Look for double-encoding, normalization order issues, and spec-non-compliant behavior
|
|
135
|
+
- Check for polyglot inputs that are valid in multiple formats
|
|
136
|
+
|
|
137
|
+
## Mode 7: State Machine Attacks
|
|
138
|
+
|
|
139
|
+
Analyze multi-step protocols and state machines for out-of-order, replay, or missing-transition
|
|
140
|
+
attacks.
|
|
141
|
+
|
|
142
|
+
**Thinking prompts:**
|
|
143
|
+
- "Can I replay step 3 of the OAuth flow to get a second access token?"
|
|
144
|
+
- "Can I send the password reset link to a different email by modifying the request between steps?"
|
|
145
|
+
- "What happens if I send an API request during the 'pending deletion' grace period?"
|
|
146
|
+
- "The session invalidation is async — there is a window where the old session still works"
|
|
147
|
+
- "Can I reuse a one-time code (TOTP, email verification, invite link) by racing the invalidation?"
|
|
148
|
+
- "Can I transition from 'suspended' back to 'active' by calling an endpoint that assumes 'pending'?"
|
|
149
|
+
- "Can I bypass the email verification step by directly calling the post-verification endpoint?"
|
|
150
|
+
- "The payment flow assumes state A -> B -> C, but can I go A -> C directly?"
|
|
151
|
+
|
|
152
|
+
**Detection strategy:**
|
|
153
|
+
- Map all state machines (user lifecycle, order lifecycle, auth flow, payment flow)
|
|
154
|
+
- For each transition, verify: is the previous state checked? Is the check atomic?
|
|
155
|
+
- Look for state stored in client-side tokens (JWT, cookies) that can be replayed
|
|
156
|
+
- Check for async state updates where the old state remains valid during propagation
|
|
157
|
+
- Identify one-time tokens and verify they are actually invalidated after use
|
|
158
|
+
|
|
159
|
+
## Mode 8: Supply Chain and Dependency Interaction
|
|
160
|
+
|
|
161
|
+
Use Phase 1 dependency intelligence to generate hypotheses about how dependencies interact
|
|
162
|
+
with application code.
|
|
163
|
+
|
|
164
|
+
**Thinking prompts:**
|
|
165
|
+
- "This dependency has a known deserialization gadget. Does the application ever deserialize
|
|
166
|
+
user-controlled data with this library?"
|
|
167
|
+
- "This transitive dependency is 3 years out of date. What security fixes happened since then?"
|
|
168
|
+
- "The application monkey-patches this library's validation function. Does the patch weaken security?"
|
|
169
|
+
- "The library provides a safe API and an unsafe API. Which one does the application use?"
|
|
170
|
+
- "The library's default configuration is insecure. Does the application override the defaults?"
|
|
171
|
+
- "Two dependencies implement the same protocol differently. Does the application use both on the
|
|
172
|
+
same data path?"
|
|
173
|
+
- "The dependency was designed for server-side use. The application uses it in a browser context."
|
|
174
|
+
- "The library's error handling returns sensitive information. Does the application expose these errors?"
|
|
175
|
+
|
|
176
|
+
**Cross-reference inputs:**
|
|
177
|
+
- Phase 1 advisory intelligence (CVEs, GHSAs, patch commits)
|
|
178
|
+
- Phase 3 domain attack research Mode A (library-as-target) and Mode B (library-as-consumer)
|
|
179
|
+
- `supply-chain-risk-auditor` skill output
|
|
180
|
+
- `sharp-edges` and `insecure-defaults` skill outputs
|
|
181
|
+
|
|
182
|
+
**Detection strategy:**
|
|
183
|
+
- For each security-relevant dependency, trace how the application uses it
|
|
184
|
+
- Check if the application uses the dependency's safe or unsafe API surface
|
|
185
|
+
- Verify default configurations are overridden appropriately
|
|
186
|
+
- Look for version pinning issues and dependency confusion opportunities
|
|
187
|
+
|
|
188
|
+
## Applying Multiple Modes
|
|
189
|
+
|
|
190
|
+
The most creative and impactful hypotheses combine multiple modes. When generating a hypothesis
|
|
191
|
+
batch, explicitly attempt at least 2 cross-mode combinations:
|
|
192
|
+
|
|
193
|
+
**Examples:**
|
|
194
|
+
- Mode 1 (chaining) + Mode 3 (TOCTOU): "Chain a race condition in the payment check with an IDOR
|
|
195
|
+
to achieve unauthorized fund transfer"
|
|
196
|
+
- Mode 4 (stored) + Mode 5 (trust boundary): "Store a payload via the low-trust user API that gets
|
|
197
|
+
executed by the high-trust admin renderer"
|
|
198
|
+
- Mode 6 (parser differential) + Mode 7 (state machine): "Use a URL parser differential to bypass
|
|
199
|
+
the OAuth redirect_uri check, then replay the authorization code"
|
|
200
|
+
- Mode 2 (business logic) + Mode 8 (supply chain): "The caching library serves stale responses.
|
|
201
|
+
Abuse this to serve a revoked user's data to a new user inheriting the same cache key"
|
|
202
|
+
|
|
203
|
+
## Ideator Output Format
|
|
204
|
+
|
|
205
|
+
Each hypothesis must include ALL of these fields:
|
|
206
|
+
|
|
207
|
+
```markdown
|
|
208
|
+
**H-<NN>: <hypothesis title>**
|
|
209
|
+
- Attack class: <primary mode used>
|
|
210
|
+
- Cross-modes: <secondary modes if applicable, or "none">
|
|
211
|
+
- Chain: <multi-step chain description, or "single-step">
|
|
212
|
+
- Preconditions: <attacker starting position and required capabilities>
|
|
213
|
+
- Target asset: <what the attacker gains>
|
|
214
|
+
- Entry point: <suspected entry point in the code>
|
|
215
|
+
- Sink: <suspected sensitive operation>
|
|
216
|
+
- Creativity signal: <why a solo agent would miss this — what makes it non-obvious>
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
The "creativity signal" field is mandatory. If the hypothesis is obvious (e.g., "SQL injection in
|
|
220
|
+
a query that concatenates user input"), it does not need the Ideator — the SAST tools already
|
|
221
|
+
found it. The Ideator's value is in hypotheses that require human-like lateral thinking.
|