torusguard 2.1.0 → 2.1.2

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.
Files changed (152) hide show
  1. package/.torusguard/.manifest.json +55 -5
  2. package/.torusguard/core/__init__.py +146 -0
  3. package/.torusguard/core/agent_roles.py +104 -0
  4. package/.torusguard/core/ast_walker.py +283 -0
  5. package/.torusguard/core/authorization.py +218 -0
  6. package/.torusguard/core/browser_verifier.py +128 -0
  7. package/.torusguard/core/bundle.py +141 -0
  8. package/.torusguard/core/call_graph.py +184 -0
  9. package/.torusguard/core/clustering.py +275 -0
  10. package/.torusguard/core/confidence.py +120 -0
  11. package/.torusguard/core/cross_file_taint.py +101 -0
  12. package/.torusguard/core/exploit_checker.py +317 -0
  13. package/.torusguard/core/formatter.py +351 -0
  14. package/.torusguard/core/governance.py +210 -0
  15. package/.torusguard/core/identity.py +104 -0
  16. package/.torusguard/core/import_resolver.py +91 -0
  17. package/.torusguard/core/incremental.py +102 -0
  18. package/.torusguard/core/lifecycle.py +137 -0
  19. package/.torusguard/core/models.py +425 -0
  20. package/.torusguard/core/parallel.py +56 -0
  21. package/.torusguard/core/parser.py +202 -0
  22. package/.torusguard/core/rechecker.py +107 -0
  23. package/.torusguard/core/replay_trace.py +178 -0
  24. package/.torusguard/core/rules_registry.py +131 -0
  25. package/.torusguard/core/run_folder.py +60 -0
  26. package/.torusguard/core/run_manager.py +163 -0
  27. package/.torusguard/core/runtime_evidence.py +175 -0
  28. package/.torusguard/core/runtime_validator.py +246 -0
  29. package/.torusguard/core/safety_gate.py +139 -0
  30. package/.torusguard/core/sarif.py +189 -0
  31. package/.torusguard/core/stack_profiler.py +184 -0
  32. package/.torusguard/core/symbol_table.py +91 -0
  33. package/.torusguard/core/taint.py +133 -0
  34. package/.torusguard/core/taint_graph.py +235 -0
  35. package/.torusguard/core/taint_rules.py +268 -0
  36. package/.torusguard/core/v070_reporter.py +102 -0
  37. package/.torusguard/core/v070_workflow.py +339 -0
  38. package/.torusguard/core/v6_reporter.py +180 -0
  39. package/.torusguard/core/v6_workflow.py +221 -0
  40. package/.torusguard/core/watcher.py +58 -0
  41. package/.torusguard/custom_rules/README.md +24 -0
  42. package/.torusguard/rules/TG-INPUT-007-unvalidated-redirect.md +53 -0
  43. package/.torusguard/rules/TG-INPUT-008-insecure-deserialization.md +52 -0
  44. package/.torusguard/scripts/__pycache__/audit_runner.cpython-314.pyc +0 -0
  45. package/.torusguard/scripts/__pycache__/finding_scorer.cpython-314.pyc +0 -0
  46. package/.torusguard/scripts/__pycache__/manifest_builder.cpython-314.pyc +0 -0
  47. package/.torusguard/scripts/__pycache__/rules_sync.cpython-314.pyc +0 -0
  48. package/.torusguard/scripts/audit_runner.py +108 -10
  49. package/.torusguard/scripts/deliberation_tournament.py +136 -0
  50. package/.torusguard/scripts/finding_scorer.py +43 -13
  51. package/.torusguard/scripts/reachability_analyzer.py +165 -0
  52. package/.torusguard/scripts/skill_profiler.py +26 -0
  53. package/.torusguard/scripts/stride_generator.py +198 -0
  54. package/.torusguard/skills/torusguard/SKILL.md +6 -2
  55. package/.torusguard/skills/torusguard-audit/SKILL.md +109 -84
  56. package/.torusguard/skills/torusguard-review/SKILL.md +27 -0
  57. package/.torusguard/skills/torusguard-threatmodel/SKILL.md +27 -0
  58. package/.torusguard/workflows/audit.md +21 -17
  59. package/.torusguard/workflows/review.md +11 -0
  60. package/.torusguard/workflows/threatmodel.md +9 -0
  61. package/README.md +149 -48
  62. package/package.json +10 -2
  63. package/skills/torusguard/SKILL.md +6 -2
  64. package/skills/torusguard/__pycache__/bootstrap.cpython-314.pyc +0 -0
  65. package/skills/torusguard/bootstrap.py +3 -3
  66. package/skills/torusguard/payload/.manifest.json +56 -7
  67. package/skills/torusguard/payload/core/__init__.py +146 -0
  68. package/skills/torusguard/payload/core/agent_roles.py +104 -0
  69. package/skills/torusguard/payload/core/ast_walker.py +283 -0
  70. package/skills/torusguard/payload/core/authorization.py +218 -0
  71. package/skills/torusguard/payload/core/browser_verifier.py +128 -0
  72. package/skills/torusguard/payload/core/bundle.py +141 -0
  73. package/skills/torusguard/payload/core/call_graph.py +184 -0
  74. package/skills/torusguard/payload/core/clustering.py +275 -0
  75. package/skills/torusguard/payload/core/confidence.py +120 -0
  76. package/skills/torusguard/payload/core/cross_file_taint.py +101 -0
  77. package/skills/torusguard/payload/core/exploit_checker.py +317 -0
  78. package/skills/torusguard/payload/core/formatter.py +351 -0
  79. package/skills/torusguard/payload/core/governance.py +210 -0
  80. package/skills/torusguard/payload/core/identity.py +104 -0
  81. package/skills/torusguard/payload/core/import_resolver.py +91 -0
  82. package/skills/torusguard/payload/core/incremental.py +102 -0
  83. package/skills/torusguard/payload/core/lifecycle.py +137 -0
  84. package/skills/torusguard/payload/core/models.py +425 -0
  85. package/skills/torusguard/payload/core/parallel.py +56 -0
  86. package/skills/torusguard/payload/core/parser.py +202 -0
  87. package/skills/torusguard/payload/core/rechecker.py +107 -0
  88. package/skills/torusguard/payload/core/replay_trace.py +178 -0
  89. package/skills/torusguard/payload/core/rules_registry.py +131 -0
  90. package/skills/torusguard/payload/core/run_folder.py +60 -0
  91. package/skills/torusguard/payload/core/run_manager.py +163 -0
  92. package/skills/torusguard/payload/core/runtime_evidence.py +175 -0
  93. package/skills/torusguard/payload/core/runtime_validator.py +246 -0
  94. package/skills/torusguard/payload/core/safety_gate.py +139 -0
  95. package/skills/torusguard/payload/core/sarif.py +189 -0
  96. package/skills/torusguard/payload/core/stack_profiler.py +184 -0
  97. package/skills/torusguard/payload/core/symbol_table.py +91 -0
  98. package/skills/torusguard/payload/core/taint.py +133 -0
  99. package/skills/torusguard/payload/core/taint_graph.py +235 -0
  100. package/skills/torusguard/payload/core/taint_rules.py +268 -0
  101. package/skills/torusguard/payload/core/v070_reporter.py +102 -0
  102. package/skills/torusguard/payload/core/v070_workflow.py +339 -0
  103. package/skills/torusguard/payload/core/v6_reporter.py +180 -0
  104. package/skills/torusguard/payload/core/v6_workflow.py +221 -0
  105. package/skills/torusguard/payload/core/watcher.py +58 -0
  106. package/skills/torusguard/payload/custom_rules/README.md +15 -0
  107. package/skills/torusguard/payload/rules/TG-INPUT-007-unvalidated-redirect.md +53 -0
  108. package/skills/torusguard/payload/rules/TG-INPUT-008-insecure-deserialization.md +52 -0
  109. package/skills/torusguard/payload/rules/container/TG-CONT-001-root-user-execution.md +50 -50
  110. package/skills/torusguard/payload/rules/container/TG-CONT-002-docker-socket-mount.md +47 -47
  111. package/skills/torusguard/payload/rules/container/TG-CONT-003-privileged-container-mode.md +53 -53
  112. package/skills/torusguard/payload/rules/container/TG-CONT-004-build-arg-secret-exposure.md +43 -43
  113. package/skills/torusguard/payload/rules/git/TG-GIT-001-historical-secret-in-git-commit.md +44 -44
  114. package/skills/torusguard/payload/rules/git/TG-GIT-002-plaintext-credentials-in-git-config.md +41 -41
  115. package/skills/torusguard/payload/rules/git/TG-GIT-003-sensitive-tracked-file-gitignore-breach.md +40 -40
  116. package/skills/torusguard/payload/rules/rag/TG-RAG-001-untrusted-rag-context-injection.md +72 -72
  117. package/skills/torusguard/payload/rules/rag/TG-RAG-002-autonomous-llm-tool-unsandboxed-call.md +51 -51
  118. package/skills/torusguard/payload/rules/rag/TG-RAG-003-unpartitioned-vector-tenant-lookup.md +51 -51
  119. package/skills/torusguard/payload/rules/redos/TG-REDOS-001-catastrophic-exponential-backtracking.md +46 -46
  120. package/skills/torusguard/payload/rules/redos/TG-REDOS-002-unbounded-nested-quantifier.md +43 -43
  121. package/skills/torusguard/payload/scripts/audit_runner.py +108 -10
  122. package/skills/torusguard/payload/scripts/deliberation_tournament.py +127 -0
  123. package/skills/torusguard/payload/scripts/finding_scorer.py +43 -13
  124. package/skills/torusguard/payload/scripts/reachability_analyzer.py +164 -0
  125. package/skills/torusguard/payload/scripts/stride_generator.py +196 -0
  126. package/skills/torusguard/payload/skills/torusguard/SKILL.md +6 -2
  127. package/skills/torusguard/payload/skills/torusguard/bootstrap.py +3 -3
  128. package/skills/torusguard/payload/skills/torusguard-ai-guard/SKILL.md +95 -95
  129. package/skills/torusguard/payload/skills/torusguard-audit/SKILL.md +109 -84
  130. package/skills/torusguard/payload/skills/torusguard-container/SKILL.md +94 -94
  131. package/skills/torusguard/payload/skills/torusguard-git-mine/SKILL.md +92 -92
  132. package/skills/torusguard/payload/skills/torusguard-ocr-scan/SKILL.md +94 -94
  133. package/skills/torusguard/payload/skills/torusguard-redos/SKILL.md +91 -91
  134. package/skills/torusguard/payload/skills/torusguard-review/SKILL.md +27 -0
  135. package/skills/torusguard/payload/skills/torusguard-threatmodel/SKILL.md +27 -0
  136. package/skills/torusguard/payload/workflows/ai-guard.md +31 -31
  137. package/skills/torusguard/payload/workflows/audit.md +21 -17
  138. package/skills/torusguard/payload/workflows/container.md +29 -29
  139. package/skills/torusguard/payload/workflows/git-mine.md +25 -25
  140. package/skills/torusguard/payload/workflows/ocr-scan.md +25 -25
  141. package/skills/torusguard/payload/workflows/redos.md +27 -27
  142. package/skills/torusguard/payload/workflows/review.md +11 -0
  143. package/skills/torusguard/payload/workflows/threatmodel.md +9 -0
  144. package/skills/torusguard/payload/workflows/torusguard-audit.md +35 -55
  145. package/skills/torusguard/references/csharp-security.md +41 -41
  146. package/skills/torusguard/references/go-security.md +41 -41
  147. package/skills/torusguard/references/java-security.md +40 -40
  148. package/skills/torusguard/references/polyglot-security-matrix.md +25 -25
  149. package/skills/torusguard/references/rust-security.md +40 -40
  150. package/skills/torusguard-audit/SKILL.md +107 -83
  151. package/skills/torusguard-review/SKILL.md +27 -0
  152. package/skills/torusguard-threatmodel/SKILL.md +27 -0
package/README.md CHANGED
@@ -11,8 +11,8 @@
11
11
 
12
12
  <p align="center">
13
13
  <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
14
- <a href="https://github.com/githubmofo/TorusGuard/releases"><img src="https://img.shields.io/badge/version-v2.1.0-orange.svg" alt="Version"></a>
15
- <a href="https://www.npmjs.com/package/torusguard"><img src="https://img.shields.io/badge/npm-v2.1.0-CB3837?logo=npm&logoColor=white" alt="npm: v2.1.0"></a>
14
+ <a href="https://github.com/githubmofo/TorusGuard/releases"><img src="https://img.shields.io/badge/version-v2.1.2-orange.svg" alt="Version"></a>
15
+ <a href="https://www.npmjs.com/package/torusguard"><img src="https://img.shields.io/badge/npm-v2.1.2-CB3837?logo=npm&logoColor=white" alt="npm: v2.1.2"></a>
16
16
  <img src="https://img.shields.io/badge/Privacy-Local_First-success" alt="Privacy: Local First">
17
17
  <img src="https://img.shields.io/badge/Dependencies-Zero-brightgreen" alt="Dependencies: Zero">
18
18
  <img src="https://img.shields.io/badge/SARIF-v2.1.0-6C3483" alt="SARIF">
@@ -22,9 +22,10 @@
22
22
  <p align="center">
23
23
  <img src="https://img.shields.io/badge/Unit%20Tests-100%25%20Passing-brightgreen?logo=go&logoColor=white" alt="Unit Tests: 100% Passing">
24
24
  <img src="https://img.shields.io/badge/Polyglot%20Tests-36%2F36%20Repos%20Passed-brightgreen?logo=checkmarx&logoColor=white" alt="Polyglot Tests: 36/36 Repos Passed">
25
+ <a href="docs/validation/unseen-repos-tri-mode-validation-report.md"><img src="https://img.shields.io/badge/Tri--Mode%20Validation-6%2F6%20Unseen%20Stacks%20Passed-brightgreen?logo=checkmarx&logoColor=white" alt="Tri-Mode Validation: 6/6 Unseen Stacks Passed"></a>
25
26
  <img src="https://img.shields.io/badge/Tri--Mode%20E2E-16%2F16%20Verified-blue?logo=checkmarx&logoColor=white" alt="Tri-Mode E2E: 16/16 Verified">
26
27
  <img src="https://img.shields.io/badge/Vision%20OCR-Tested%20%26%20Verified-blueviolet?logo=tesseract&logoColor=white" alt="Vision OCR: Tested & Verified">
27
- <img src="https://img.shields.io/badge/Rules%20Verified-86%2F86%20Rules-success" alt="Rules: 86/86 Verified">
28
+ <img src="https://img.shields.io/badge/Rules%20Verified-88%2F88%20Rules-success" alt="Rules: 88/88 Verified">
28
29
  </p>
29
30
 
30
31
  <p align="center">
@@ -60,7 +61,7 @@
60
61
 
61
62
  ## What Is TorusGuard?
62
63
 
63
- TorusGuard is a **zero-dependency, single-binary security engine** that scans, hardens, and validates AI-generated codebases. It enforces 86 security rules across 22 architectural families and works across three unified operational modes (**Tri-Mode Parity**):
64
+ TorusGuard is a **zero-dependency, single-binary security engine** that scans, hardens, and validates AI-generated codebases. It enforces 88 security rules across 22 architectural families and works across three unified operational modes (**Tri-Mode Parity**):
64
65
 
65
66
  - **Mode A: Terminal CLI (Go Binary)** — A deterministic scanner and enforcer that runs in your terminal or CI/CD pipeline (`torusguard <command>`).
66
67
  - **Mode B: AI Chat Slash Commands** — Integrates natively with Antigravity, Cursor, Claude Code, Windsurf, VS Code, and other AI coding assistants via slash commands (`/torusguard <command>`).
@@ -72,9 +73,12 @@ TorusGuard ensures that the code your AI assistant writes is secure *before* it
72
73
 
73
74
  ## ✨ Features
74
75
 
75
- - **86 Security Rules** across 22 families (Secrets, Auth, SQL Injection, SSRF, CSRF, GraphQL, Supply Chain, Containers, Git History, ReDoS, AI & RAG, and more)
76
+ - **88 Security Rules** across 22 families (Secrets, Auth, SQL Injection, Deserialization, Open Redirects, SSRF, CSRF, GraphQL, Supply Chain, Containers, Git History, ReDoS, AI & RAG, and more)
77
+ - **Taint Analysis & Interprocedural Dataflow Engine** — Cross-file, interprocedural taint flow tracking from untrusted sources to critical sinks across imports, modules, and call graphs
78
+ - **7-Signal Calibrated Confidence Scorer** — Evidence-chain calibration combining rule severity, taint confirmation, taint depth, sanitizer absence, framework context, multi-line evidence, and persistent memory
76
79
  - **First-Principles Security Suite** — Built-in native scanners for Dockerfile/Compose privilege bounds, Git commit log secret mining, exponential regex backtracking, and cross-tenant vector isolation
77
- - **Heuristic AST Scanner** — Polyglot static analysis for Go, JavaScript, TypeScript, and Python
80
+ - **Polyglot Parser & AST Walker** — Tree-sitter powered AST traversal with unified CST nodes and symbol resolution across Go, JavaScript, TypeScript, and Python
81
+ - **Incremental Hash Cache & Parallel Scanning** — SHA-256 mtime incremental scan caching, process-pool parallelization, and continuous file-watcher debounce
78
82
  - **Line-Level Reflection Module** — Semantic patch synthesis (`find_snippet` / `replace_snippet`) that accurately replaces exact code blocks without brittle line-number offsets
79
83
  - **1/9th Token Bounded Context Extraction** — AST context extraction (±3 lines) via `scanner.ExtractContext` to keep review prompts hyper-efficient and prevent context saturation
80
84
  - **Ponytail Protocol** — Surgical patch bounds (≤35 additions, ≤25 deletions) to prevent full-file rewrites
@@ -114,52 +118,139 @@ TorusGuard uses a **tri-track architecture** where intelligence, deterministic e
114
118
 
115
119
  ```mermaid
116
120
  flowchart TD
117
- subgraph Ingress["Unified Tri-Mode Ingress"]
118
- ModeA["<b>Mode A: Terminal CLI</b><br/><code>torusguard &lt;cmd&gt;</code><br/>Deterministic Single Binary"]
119
- ModeB["<b>Mode B: AI Chat Slash Commands</b><br/><code>/torusguard &lt;cmd&gt;</code><br/>Cursor &bull; Claude &bull; Windsurf &bull; Antigravity"]
120
- ModeC["<b>Mode C: Native MCP Tools</b><br/><code>torusguard_*</code> (10 Tools &bull; 2 Resources)<br/>Stdio JSON-RPC 2.0 Agent Server"]
121
+ %% =========================================================================
122
+ %% STAGE 1: TRI-MODE INGRESS GATEWAY
123
+ %% =========================================================================
124
+ subgraph IngressGateway["1. Unified Tri-Mode Ingress Gateway"]
125
+ direction LR
126
+ CLI["<b>Mode A: Terminal CLI</b><br/><code>torusguard &lt;cmd&gt;</code><br/>25 Deterministic Commands"]
127
+ Chat["<b>Mode B: AI Chat Commands</b><br/><code>/torusguard &lt;cmd&gt;</code><br/>Cursor &bull; Claude &bull; Windsurf"]
128
+ MCP["<b>Mode C: Native MCP Server</b><br/><code>torusguard_*</code> (13 Tools &bull; 2 Resources)<br/>Stdio JSON-RPC 2.0 Protocol"]
121
129
  end
122
130
 
123
- Ingress --> Router["<b>Command Router &amp; Dispatcher</b><br/>cmd/torusguard (21 Commands)"]
131
+ %% =========================================================================
132
+ %% STAGE 2: CORE DISPATCHER & RUNTIME KERNEL
133
+ %% =========================================================================
134
+ Kernel["<b>TorusGuard Core Dispatcher &amp; Runtime Kernel</b><br/><code>cmd/torusguard</code> (Single Standalone Go Binary)<br/>Command Parsing &bull; Flag Evaluation (<code>--yes</code>, <code>--html</code>, <code>--rules</code>) &bull; Sandbox Isolation"]
124
135
 
125
- subgraph Core["TorusGuard Core Security Engine (Go Single Binary)"]
136
+ CLI -->|"Terminal Exec"| Kernel
137
+ Chat -->|"Slash Bridge"| Kernel
138
+ MCP -->|"Agent Tool Call"| Kernel
139
+
140
+ %% =========================================================================
141
+ %% STAGE 3: DETECTION & MULTI-MODAL SUITE
142
+ %% =========================================================================
143
+ subgraph DetectionSuite["2. Polyglot Static AST &amp; Multi-Modal Detection Suite"]
126
144
  direction TB
127
- subgraph Scanners["First-Principles &amp; Multi-Modal Scanner Suite"]
128
- AST["<b>Polyglot AST &amp; Heuristic Scanner</b><br/>Go &bull; TS/JS &bull; Python &bull; SQL &bull; Auth &bull; SSRF &bull; CSRF"]
129
- OCR["<b>Multi-Modal Vision OCR Engine</b><br/>Tesseract v5.4.0 &bull; Leaked Keys in PNG/JPG &le;10MB"]
130
- Container["<b>Container &amp; Dockerfile Auditor</b><br/>Root Execution &bull; Docker Sockets &bull; Build Secrets"]
131
- GitMine["<b>Git History Secret Miner</b><br/>Past Commits &bull; Diff Logs &bull; Remote Credentials"]
132
- ReDoS["<b>ReDoS Complexity Analyzer</b><br/>Polynomial &amp; Exponential Backtracking Loops"]
133
- AIGuard["<b>AI Agent &amp; RAG Vector Guard</b><br/>Prompt Injection &bull; Tenant Vector Contamination"]
145
+ subgraph StaticGroup["Static Code &amp; Dependency Analysis"]
146
+ direction LR
147
+ AST["<b>Polyglot AST &amp; Taint Engine</b><br/>Tree-sitter &bull; 88 Rules across 22 Families<br/>Go &bull; TS/JS &bull; Python &bull; Java &bull; C# &bull; Rust"]
148
+ TGQL["<b>TG-QL Declarative AST DSL</b><br/>Custom YAML Pattern Queries<br/>Syntax Trees &bull; Taint Sinks &bull; Constraints"]
149
+ Reach["<b>Reachability &amp; OpenVEX</b><br/>Callgraph Traversal &bull; Reachable CVEs<br/>Zero Ineffective Dependency Alerts"]
150
+ end
151
+ subgraph DeepGroup["Forensics, RegEx &amp; Vision OCR"]
152
+ direction LR
153
+ OCR["<b>Multi-Modal Vision OCR Engine</b><br/>Tesseract v5.4.0 &bull; Leaked Secrets<br/>Architecture Diagrams &bull; Screenshots"]
154
+ ReDoS["<b>Thompson NFA ReDoS Engine</b><br/>Polynomial &amp; Exponential Exploder<br/>Catastrophic Backtracking Loops"]
155
+ GitMine["<b>Git History &amp; Container Audit</b><br/>Commit Packfile Secret Mining<br/>Dockerfile Non-Root Enforcement"]
134
156
  end
157
+ end
158
+
159
+ Kernel -->|"Scan Code &amp; Dependencies"| StaticGroup
160
+ Kernel -->|"Analyze Visuals &amp; Commits"| DeepGroup
161
+
162
+ %% =========================================================================
163
+ %% STAGE 4: CONSENSUS DELIBERATION & TRIAGE
164
+ %% =========================================================================
165
+ subgraph DeliberationTriage["3. Deliberation Tournament &amp; Evidence Triage"]
166
+ direction TB
167
+ Tournament["<b>3-Perspective Deliberation Tournament</b><br/>Vulnerability Hunter vs. Devil's Advocate / Sanitizer Verifier vs. Ponytail Remediator<br/>Eliminates False Positives &bull; Calibrated Confidence Scoring (0-100%)"]
168
+ PRGate{"<b>Differential PR Diff Gate</b><br/><code>torusguard review</code><br/>Incremental Git Diff Changes?"}
169
+ Tournament --> PRGate
170
+ end
135
171
 
136
- subgraph Governance["Governance &amp; Remediation Pipeline"]
137
- Harden["<b>Harden &amp; Line Reflection</b><br/>Ponytail Bounds: &le;35 Add &bull; &le;25 Del"]
138
- Snapshot["<b>Pre-Apply Snapshot Engine</b><br/>Byte-for-Byte Rollback Backups in .torusguard/snapshots/"]
139
- HumanGate{"<b>Human Gate Authorization</b><br/>Explicit --yes Confirmation Required"}
140
- Recheck["<b>Differential Recheck Engine</b><br/>Zero-Regression Fix Closure"]
172
+ StaticGroup -->|"Raw AST Findings"| Tournament
173
+ DeepGroup -->|"Extracted Secrets &amp; Complexities"| Tournament
174
+
175
+ %% =========================================================================
176
+ %% STAGE 5: GOVERNED REMEDIATION & PONYTAIL LOOP
177
+ %% =========================================================================
178
+ subgraph GovernedRemediation["4. Governed Remediation Loop &amp; Safety Guardrails (Ponytail Protocol)"]
179
+ direction TB
180
+
181
+ Harden["<b>Surgical Patch Formulation</b><br/>Semantic Line Snippet Replacement<br/>Strict Line Budget: &le;35 Additions &bull; &le;25 Deletions"]
182
+
183
+ BoundsCheck{"<b>Ponytail Bounds Check</b><br/>Exceeds 35 Add / 25 Del?"}
184
+ RejectDiff["<b>Diff Rejected</b><br/>Excess Churn Detected<br/>Prompt AI for Minimal Snippet"]
185
+
186
+ SnapshotStore[("<b>Pre-Apply Snapshot Store</b><br/><code>.torusguard/snapshots/&lt;run_id&gt;/</code><br/>Byte-for-Byte Rollback Backup")]
187
+
188
+ HumanGate{"<b>Human Gate Authorization</b><br/>Explicit <code>--yes</code> or Interactive Confirmation"}
189
+ UserAbort["<b>Operation Aborted</b><br/>Zero Files Touched &bull; Safe Exit"]
190
+
191
+ ApplyPatch["<b>Atomic Patch Application</b><br/>Apply Unified Surgical Diff to Disk"]
192
+
193
+ RecheckGate{"<b>Differential Recheck Engine</b><br/><code>torusguard recheck</code><br/>Fix Closed with Zero Regressions?"}
194
+ RollbackExec["<b>Auto-Rollback Triggered!</b><br/>Instant Restoration from Snapshot<br/>Quarantine Candidate Patch"]
195
+
196
+ Harden --> BoundsCheck
197
+ BoundsCheck -->|"Violation"| RejectDiff
198
+ RejectDiff -.->|"Re-prompt AI"| Harden
199
+ BoundsCheck -->|"Pass (Within Bounds)"| SnapshotStore
200
+ SnapshotStore --> HumanGate
201
+ HumanGate -->|"Denied"| UserAbort
202
+ HumanGate -->|"Approved"| ApplyPatch
203
+ ApplyPatch --> RecheckGate
204
+ RecheckGate -->|"Regressions"| RollbackExec
205
+ RollbackExec -.->|"Restore Clean State"| SnapshotStore
206
+ end
207
+
208
+ PRGate -->|"Target Findings"| Harden
209
+
210
+ %% =========================================================================
211
+ %% STAGE 6: LIVING SECURITY LEDGER & ENTERPRISE OUTPUTS
212
+ %% =========================================================================
213
+ subgraph EnterpriseDeliverables["5. Living Security Ledger &amp; Enterprise Deliverables"]
214
+ direction TB
215
+ Ledger[("<b>Living Security Ledger</b><br/><code>security_report.md</code><br/>Synchronized Single Source of Truth &bull; Status: RESOLVED 🟢")]
216
+
217
+ subgraph DeliverableOutputs["Executive Reports &amp; Verified Memory"]
218
+ direction LR
219
+ ThreatModel["<b>STRIDE Threat Model</b><br/><code>SECURITY_THREAT_MODEL.md</code><br/>DFD Architecture Diagrams"]
220
+ SARIF["<b>OASIS SARIF v2.1.0</b><br/>GitHub Advanced Security<br/>CI/CD Security Center"]
221
+ HTMLReport["<b>Executive Dashboard</b><br/>Single-File HTML Report<br/>Interactive Posture Heatmap"]
222
+ GoldenRecipes[("<b>Golden Fix Memory</b><br/><code>.torusguard/recipes/</code><br/>Verified Distilled Fixes")]
141
223
  end
224
+
225
+ Ledger --> DeliverableOutputs
142
226
  end
143
227
 
144
- Router --> Scanners
145
- Scanners --> Ledger[("<b>Living Security Ledger</b><br/><code>security_report.md</code><br/>Single Source of Truth")]
146
- Ledger --> Harden
147
- Harden --> Snapshot
148
- Snapshot --> HumanGate
149
- HumanGate -- Approved --> Recheck
150
- Recheck --> Outputs["<b>Enterprise Outputs</b><br/>OASIS SARIF v2.1.0 &bull; Dark-Mode HTML Report &bull; Golden Fix Distillation"]
151
-
152
- classDef ingressStyle fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;
153
- classDef scannerStyle fill:#0f172a,stroke:#818cf8,stroke-width:2px,color:#f8fafc;
154
- classDef govStyle fill:#0f172a,stroke:#34d399,stroke-width:2px,color:#f8fafc;
155
- classDef ledgerStyle fill:#312e81,stroke:#a78bfa,stroke-width:2px,color:#f8fafc;
156
- classDef outStyle fill:#064e3b,stroke:#10b981,stroke-width:2px,color:#f8fafc;
157
-
158
- class ModeA,ModeB,ModeC ingressStyle;
159
- class AST,OCR,Container,GitMine,ReDoS,AIGuard scannerStyle;
160
- class Harden,Snapshot,HumanGate,Recheck govStyle;
228
+ RecheckGate -->|"Fix Confirmed (Clean Closure)"| Ledger
229
+
230
+ %% =========================================================================
231
+ %% STYLING AND THEME (Modern Dark Cyber Palette)
232
+ %% =========================================================================
233
+ classDef ingressStyle fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;
234
+ classDef routerStyle fill:#1e1b4b,stroke:#6366f1,stroke-width:2px,color:#f8fafc;
235
+ classDef scannerStyle fill:#022c22,stroke:#10b981,stroke-width:2px,color:#f8fafc;
236
+ classDef tourneyStyle fill:#2e1065,stroke:#a855f7,stroke-width:2px,color:#f8fafc;
237
+ classDef gateStyle fill:#451a03,stroke:#f59e0b,stroke-width:2px,color:#fef3c7;
238
+ classDef rejectStyle fill:#450a0a,stroke:#ef4444,stroke-width:2px,color:#fee2e2;
239
+ classDef actionStyle fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#f8fafc;
240
+ classDef dbStyle fill:#1e293b,stroke:#94a3b8,stroke-width:2px,color:#f8fafc;
241
+ classDef ledgerStyle fill:#172554,stroke:#3b82f6,stroke-width:2px,color:#eff6ff;
242
+ classDef outputStyle fill:#042f2e,stroke:#14b8a6,stroke-width:2px,color:#f0fdfa;
243
+
244
+ class CLI,Chat,MCP ingressStyle;
245
+ class Kernel routerStyle;
246
+ class AST,TGQL,Reach,OCR,ReDoS,GitMine scannerStyle;
247
+ class Tournament tourneyStyle;
248
+ class PRGate,BoundsCheck,HumanGate,RecheckGate gateStyle;
249
+ class RejectDiff,UserAbort,RollbackExec rejectStyle;
250
+ class Harden,ApplyPatch actionStyle;
251
+ class SnapshotStore,GoldenRecipes dbStyle;
161
252
  class Ledger ledgerStyle;
162
- class Outputs outStyle;
253
+ class ThreatModel,SARIF,HTMLReport outputStyle;
163
254
  ```
164
255
 
165
256
  > 🌐 **Interactive Architecture Visualizations:**
@@ -200,7 +291,7 @@ npx torusguard init
200
291
  ```
201
292
 
202
293
  <a href="https://www.npmjs.com/package/torusguard">
203
- <img src="https://img.shields.io/badge/npm-v2.1.0-CB3837?logo=npm&logoColor=white" alt="npm package">
294
+ <img src="https://img.shields.io/badge/npm-v2.1.2-CB3837?logo=npm&logoColor=white" alt="npm package">
204
295
  </a>
205
296
 
206
297
  ### Option 2: Build from Source (Recommended for Contributors)
@@ -278,6 +369,9 @@ torusguard exploit-check
278
369
  | `init` | Scaffold `.torusguard/` workspace, detect stack, activate rules |
279
370
  | `status` | Diagnostic overview of posture, stack, and active rules |
280
371
  | `audit` | Static heuristic security scan against active TG-* rules |
372
+ | `review` | Differential PR and Git diff incremental security review |
373
+ | `threatmodel` | Synthesize architectural STRIDE threat model & Mermaid DFDs |
374
+ | `benchmark` | Run SecurityReviewBench precision & recall evaluation suite |
281
375
  | `verify` | Live disk line match audit and evidence sufficiency check |
282
376
  | `harden` | Validate patches against Ponytail Protocol bounds |
283
377
  | `apply` | Apply patches with pre-apply `.bak` rollback snapshots |
@@ -287,12 +381,14 @@ torusguard exploit-check
287
381
  | `recipes` | Manage the Golden Fix recipe library |
288
382
  | `authorize` | Generate cryptographic auth tokens for runtime probing |
289
383
  | `web-validate` | Authorized HTTP probing with `X-TorusGuard-Audit` headers |
384
+ | `exploit-check` | Bounded single-step exploitability confirmation |
290
385
  | `ocr-scan` | Run Tesseract OCR secret scan on images/diagrams (<10MB) |
291
386
  | `container` | Audit Dockerfile, compose, and container configurations |
292
387
  | `git-mine` | Mine git commit history for leaked secrets & creds |
293
388
  | `redos` | Analyze regex patterns for catastrophic backtracking |
294
389
  | `ai-guard` | Scan AI/LLM code for prompt injection & RAG flaws |
295
390
  | `mcp` | Run native Model Context Protocol (MCP) server over stdio |
391
+ | `full` | Master 7-stage closed-loop security governance pipeline |
296
392
  | `update` | Self-update the TorusGuard engine |
297
393
  | `help` | Show interactive command guide |
298
394
 
@@ -335,7 +431,7 @@ TorusGuard/
335
431
 
336
432
  ## 🔒 Security Invariants & Rule Governance
337
433
 
338
- TorusGuard enforces **86 security invariants across 22 architectural families** covering Secrets, Authentication, Multi-Tenant Database Isolation, Input Sanitization, Rate Limiting, AI Agent Prompt Injection, SSRF, Webhooks, WebSockets, CSRF, GraphQL, Supply Chain, Business Logic, Cache Poisoning, Client Bundles, Platform Headers, Polyglot Bypasses, Edge Timeouts, Container & Docker Safety, Git History Secret Mining, Regular Expression Backtracking (ReDoS), and Vector Database RAG Isolation.
434
+ TorusGuard enforces **88 security invariants across 22 architectural families** covering Secrets, Authentication, Multi-Tenant Database Isolation, Input Sanitization, Rate Limiting, AI Agent Prompt Injection, SSRF, Webhooks, WebSockets, CSRF, GraphQL, Supply Chain, Business Logic, Cache Poisoning, Client Bundles, Platform Headers, Polyglot Bypasses, Edge Timeouts, Container & Docker Safety, Git History Secret Mining, Regular Expression Backtracking (ReDoS), and Vector Database RAG Isolation.
339
435
 
340
436
  > 📘 **Full Rules Catalog & Invariants:**
341
437
  > The complete rulebook with formal invariant definitions, severity scores, and testing signatures is maintained in [`AGENTS.md`](AGENTS.md) and the [`rules/`](rules/) directory.
@@ -374,7 +470,7 @@ TorusGuard works natively inside AI coding assistants. Add the configuration fil
374
470
 
375
471
  ### Native MCP Tools (Agent Toolkit Mode)
376
472
 
377
- When configured with `.agents/mcp_config.json` or `mcp_config.json`, AI coding agents gain native tool calling:
473
+ When configured with `.agents/mcp_config.json` or `mcp_config.json`, AI coding agents gain native tool calling (13 Tools & 2 Resources):
378
474
 
379
475
  - `torusguard_audit`: Deep static AST scan + Vision OCR; writes `security_report.md`
380
476
  - `torusguard_ocr_scan`: Dedicated image credential analysis via Tesseract (5-10MB bounds)
@@ -385,6 +481,9 @@ When configured with `.agents/mcp_config.json` or `mcp_config.json`, AI coding a
385
481
  - `torusguard_verify`: Asserts evidence sufficiency & line-shift invariant fingerprint matches
386
482
  - `torusguard_harden`: Validates remediation diff against Ponytail Protocol bounds
387
483
  - `torusguard_recheck`: Differential re-scan confirming fix closure
484
+ - `torusguard_review`: Differential PR and Git diff incremental review; gate decisions
485
+ - `torusguard_threatmodel`: Synthesizes STRIDE threat model & Mermaid DFDs (`SECURITY_THREAT_MODEL.md`)
486
+ - `torusguard_benchmark`: Runs SecurityReviewBench self-evaluating precision & recall suite
388
487
  - `torusguard_status`: Workspace posture and tech stack inspection
389
488
  - `torusguard://security_report`: MCP Resource reading the living security report
390
489
  - `torusguard://rules_catalog`: MCP Resource exploring verified rules catalog & Golden Fix patterns
@@ -397,11 +496,12 @@ TorusGuard undergoes rigorous automated multi-tier testing across polyglot stack
397
496
 
398
497
  | Testing Tier | Scope & Target Stacks | Pass Rate | Verified Capabilities |
399
498
  | :--- | :--- | :---: | :--- |
400
- | **Go Engine & Unit Tests** | `cmd/torusguard`, `internal/scanner`, `internal/*` | **100% Passing** | Deterministic AST matching, 74 rule patterns, JSON-RPC 2.0 MCP protocol. |
499
+ | **Go Engine & Unit Tests** | `cmd/torusguard`, `internal/scanner`, `internal/*` | **100% Passing** | Deterministic AST matching, 88 canonical rule patterns, JSON-RPC 2.0 MCP protocol (133/133 harness tests passing). |
401
500
  | **Mass Polyglot Benchmarks** | **20 Enterprise Tech Stacks** (Go, Python, Java, Node, Rust, PHP, C#, Ruby, Svelte, Vue, Angular) | **20/20 Passed** | Framework auto-profiling, heuristic AST analysis, finding deduplication. |
501
+ | **Unseen Tri-Mode Validation** | **6 Unseen Framework Ecosystems** (SvelteKit 2 + Bun, FastAPI AI RAG, DevOps Git Mine, OCR Asset Suite, Kotlin Ktor, Laravel 11) | **6/6 Passed (100%)** | Mode A (CLI) + Mode B (Slash Commands) + Mode C (Native MCP Tools) across 18/18 canonical skills with automated sandbox cleanup. |
402
502
  | **Tri-Mode & Vision E2E** | **16 Diverse Framework Repos** (React, Next.js, Express, Django, FastAPI, Spring Boot, etc.) | **16/16 Passed** | Mode A (CLI) + Mode B (Slash Commands) + Mode C (Native MCP Tools) + Multi-Modal Vision OCR. |
403
- | **Multi-Modal Vision OCR** | Diagram & Image assets (`.png`, `.jpg`, etc.) via Tesseract v5.4.0 | **100% Recall** | Secrets detection (`TG-SEC-001` - `TG-SEC-007`), 10MB DoS bounding, OCR character substitution tolerance. |
404
- | **Ponytail Churn Limits** | Surgical patch validation across all 74 rules | **Bounded** | Line bounds (≤35 additions, ≤25 deletions), zero-bypass verification (`TG-DIFF-001`). |
503
+ | **Multi-Modal Vision OCR** | Diagram & Image assets (`.png`, `.jpg`, `.webp`) via Tesseract v5.4.0 | **100% Recall** | Secrets detection (`TG-SEC-001` - `TG-SEC-007`), 10MB DoS bounding, OCR character substitution tolerance. |
504
+ | **Ponytail Churn Limits** | Surgical patch validation across all 88 rules | **Bounded** | Line bounds (≤35 additions, ≤25 deletions), zero-bypass verification (`TG-DIFF-001`). |
405
505
 
406
506
  All test environments are completely sandboxed, verified with byte-for-byte assertions, and cleaned up automatically.
407
507
 
@@ -450,5 +550,6 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines and [CODE_OF_COND
450
550
  | [Testing Playbook](docs/usage/testing-playbook.md) | Testing guide and CI integration |
451
551
  | [Demo Guide](docs/demo.md) | Quick start and full lifecycle demo |
452
552
  | [Roadmap](docs/roadmap.md) | Feature roadmap and release planning |
553
+ | [Unseen Stacks Validation Report](docs/validation/unseen-repos-tri-mode-validation-report.md) | Tri-mode validation across 6 unseen ecosystems & vision OCR |
453
554
  | [SECURITY.md](SECURITY.md) | Vulnerability disclosure policy |
454
555
  | [CHANGELOG.md](CHANGELOG.md) | Version history and release notes |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "torusguard",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Security guardrails, governed remediation, and authorized runtime validation for AI-built web applications.",
5
5
  "main": "bin/torusguard.js",
6
6
  "bin": {
@@ -19,10 +19,18 @@
19
19
  "init": "node bin/torusguard.js init",
20
20
  "status": "node bin/torusguard.js status",
21
21
  "audit": "node bin/torusguard.js audit",
22
+ "review": "node bin/torusguard.js review",
23
+ "threatmodel": "node bin/torusguard.js threatmodel",
24
+ "benchmark": "node bin/torusguard.js benchmark",
22
25
  "harden": "node bin/torusguard.js harden",
23
26
  "apply": "node bin/torusguard.js apply",
24
27
  "recipes": "node bin/torusguard.js recipes",
25
- "update": "node bin/torusguard.js update"
28
+ "update": "node bin/torusguard.js update",
29
+ "build": "echo \"No build step required\""
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^26.6.3",
33
+ "typescript": "^5.0.0"
26
34
  },
27
35
  "keywords": [
28
36
  "security",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: torusguard
3
- description: Universal autonomous security engine: 74 canonical rules across 18 families, polyglot stack detection across 16+ languages, Ponytail remediation bounds (<=35 add, <=25 del), standardized 75-column terminal UI, SARIF v2.1.0 exports, and persistent security memory context.
4
- version: 2.0.0
3
+ description: Universal autonomous security engine: 88 canonical rules across 22 families, polyglot stack detection across 16+ languages, Ponytail remediation bounds (<=35 add, <=25 del), standardized 75-column terminal UI, SARIF v2.1.0 exports, and persistent security memory context.
4
+ version: 2.1.1
5
5
  ---
6
6
 
7
7
  # TorusGuard Master Security Engine & Command Router
@@ -30,6 +30,10 @@ TorusGuard operates with 100% feature parity across the compiled terminal CLI, A
30
30
  | **Authorize** | `torusguard authorize` | `/torusguard authorize` | `.torusguard/skills/torusguard-authorize`| Legal scope definition & safety boundaries |
31
31
  | **Validate** | `torusguard web-validate` | `/torusguard web-validate` | `.torusguard/skills/torusguard-web-validate`| Authorized non-destructive HTTP probing |
32
32
  | **Exploit** | `torusguard exploit-check` | `/torusguard exploit-check`| `.torusguard/skills/torusguard-exploit-check`| Bounded single-step exploitability confirmation |
33
+ | **Container** | `torusguard container` | `/torusguard container` | `.torusguard/skills/torusguard-container` | Audits Dockerfile & Compose for root users, sockets, privileged mode |
34
+ | **Git Mine** | `torusguard git-mine` | `/torusguard git-mine` | `.torusguard/skills/torusguard-git-mine` | Mines git commit history & config for leaked credentials & tokens |
35
+ | **ReDoS** | `torusguard redos` | `/torusguard redos` | `.torusguard/skills/torusguard-redos` | Analyzes regex patterns for catastrophic exponential backtracking |
36
+ | **AI Guard** | `torusguard ai-guard` | `/torusguard ai-guard` | `.torusguard/skills/torusguard-ai-guard` | Audits AI agents & RAG pipelines for prompt injection & tenant leaks |
33
37
  | **Full** | `torusguard full` | `/torusguard full` | `.torusguard/skills/torusguard-full` | End-to-end 7-stage closed-loop execution |
34
38
  | **MCP Server**| `torusguard mcp` | — | Native Stdio JSON-RPC 2.0 | Serves native Model Context Protocol tools to AI coding agents |
35
39
  | **Update** | `torusguard update` | `/torusguard update` | `.torusguard/skills/torusguard-init` | Self-update TorusGuard engine binary |
@@ -144,7 +144,7 @@ def card_divider(title: str = "", border_color: str = CYAN, double: bool = False
144
144
  return f" {border_color}{left}{h} {BOLD}{WHITE}{title}{RESET}{border_color} {h * rem}{right}{RESET}"
145
145
  return f" {border_color}{left}{h * 71}{right}{RESET}"
146
146
 
147
- def card_header(title: str, subtitle: str = "", version: str = "v2.1.0", border_color: str = CYAN) -> str:
147
+ def card_header(title: str, subtitle: str = "", version: str = "v2.1.2", border_color: str = CYAN) -> str:
148
148
  """Generate standardized 75-column curved header box."""
149
149
  top = f" {border_color}╭{'─' * 71}╮{RESET}"
150
150
  bottom = f" {border_color}╰{'─' * 71}╯{RESET}"
@@ -164,7 +164,7 @@ def card_header(title: str, subtitle: str = "", version: str = "v2.1.0", border_
164
164
  def print_header():
165
165
  """Print the branded TorusGuard header card."""
166
166
  print()
167
- print(card_header("🛡️ T O R U S G U A R D", "Autonomous Security Engine for AI-Built Applications", version="v2.1.0"))
167
+ print(card_header("🛡️ T O R U S G U A R D", "Autonomous Security Engine for AI-Built Applications", version="v2.1.2"))
168
168
  print()
169
169
 
170
170
 
@@ -247,7 +247,7 @@ def print_already_initialized(target_root, cfg):
247
247
  print(f"""
248
248
  {BOLD}▸ Project Root:{RESET} {GREEN}{target_root}{RESET}
249
249
  {BOLD}▸ Workspace:{RESET} {GREEN}.torusguard/{RESET} {DIM}(Already Initialized){RESET}
250
- {BOLD}▸ Version:{RESET} {CYAN}{cfg.get('version', '2.1.0')}{RESET}
250
+ {BOLD}▸ Version:{RESET} {CYAN}{cfg.get('version', '2.1.1')}{RESET}
251
251
  {BOLD}▸ Severity Floor:{RESET} {YELLOW}{cfg.get('severity_threshold', 'medium')}{RESET}
252
252
 
253
253
  {DIM}To refresh templates or re-scaffold, run:{RESET}
@@ -10,6 +10,46 @@
10
10
  "config/scope.json": "b198a86186b4c6d5e1af516bf4e3a6afa8878e622ca1d57a5bf72d294f8c6f25",
11
11
  "config/slash-commands.json": "305c1dc5b556e8d64ad9dd585dafac1a9955cf1bd5321429955b19b7a62736b6",
12
12
  "config/torusguard.json": "55dbde335997421a01c97709fd1672ad70fa921bfe8346dd57552b799db2419e",
13
+ "core/__init__.py": "2120562452ae03c84468d67246dc93376f7ebcde8e4ca767c6253bc92c35dbbf",
14
+ "core/agent_roles.py": "d7189dbf1d3ae4e330eb316bed5d399a18992295addf466f4c6552bc14ae6a34",
15
+ "core/ast_walker.py": "309564d168e6eb9e3e93aceb29a95a61872b35a4da7235ee49e79e9d3a5e7cc6",
16
+ "core/authorization.py": "2bb7f85b4639959276fc7cfd427df7edb8b1f97f8003707a0032f100953d1b30",
17
+ "core/browser_verifier.py": "e450bdbb8d5c2808a3b3ea7bc33bce2451230cbbb7ed4f17dbc7107ab0f30d56",
18
+ "core/bundle.py": "82505fba44a5ad867a4caef34e1233ebf76d4bc2e15b943e2413822602f1a95f",
19
+ "core/call_graph.py": "7e230f8b5fa7dd8f780eafbe7381f2d9538f01a880c1349c41139cce20f9094f",
20
+ "core/clustering.py": "0ffcad5e8a459084d200248de8799d466c2b53ad627b778314b09f2733df782c",
21
+ "core/confidence.py": "81c6242a1a3eaea873d39e8b212e5781a2df2316614f18a2fe6ef757561f5bb5",
22
+ "core/cross_file_taint.py": "1fa323529e5ca2fcce06167e4a59431f9f8217ad7a5097f8afbc6b9a9dc0913d",
23
+ "core/exploit_checker.py": "74a48e6e1e1b9791107b487ab5434540494946441605cf9115fa90b787bc5c5a",
24
+ "core/formatter.py": "a9d2a20e52caaf8a801f65f325b3f5bc430eb6301506973095961d4615b7e429",
25
+ "core/governance.py": "657edfa332c2f855f917545862c9d38f31468cec464d11dd2c012dcf794fb32c",
26
+ "core/identity.py": "f42d3d81c7ee8ca5d2ef08d48066abdc42d2ccbd5fe0bbd88b35d5c8174b696f",
27
+ "core/import_resolver.py": "4ac89ac405816b7de599fbabfa47556d10c1557d92f3a700bf50b90f52ba6c75",
28
+ "core/incremental.py": "8ff9d41f6667bf567d2e952f31ae330271ba1d6cf5411ab4468c355ca2fa6681",
29
+ "core/lifecycle.py": "f4406acba8464ed9111128ef545f8c576639cadda8b9de7e23ff8a90fad24f9e",
30
+ "core/models.py": "ed23b50aab2eb7ea9bc16dbb20b0bf4f978f3aae7f39f0a713f7efe08ff238b5",
31
+ "core/parallel.py": "27fcfdd3760d481ffdd4e7321a79d17ef4823dd3744687fcc9d00349c0bb1d49",
32
+ "core/parser.py": "2f01e9beb178e86002fd8dd3211cf269ab59f21e5c65aabb5e9d0e110504d1d1",
33
+ "core/rechecker.py": "2a21b788158cac79db9030db79e3a27021e7f66692c37c39e0bd3fadf483388c",
34
+ "core/replay_trace.py": "8132cb43dd4593cc96f09f014c2b3882ef5296ebc5029a921423263b07ca7a1d",
35
+ "core/rules_registry.py": "80c4f5067f151b596388ae9a4546d2f009f10342daa5221412e5c9a222b27a31",
36
+ "core/run_folder.py": "cc8702dfd3a2768e5dca74f7ac85e316f53f1acb059bad87ca3650eeeae2defa",
37
+ "core/run_manager.py": "2470ebc8b54edaab3679d909fde48f02c7530f1e12c917b7b5cd5c004062a8b6",
38
+ "core/runtime_evidence.py": "79c947a3b131c3be2f2938789d12647a0d9010bb4077bf3f33b2c7218ba9028b",
39
+ "core/runtime_validator.py": "39477ef1138e8deaa5c3859d6402e71d2c0eb6e2e39fbd3db04fe3ad8e2c798c",
40
+ "core/safety_gate.py": "349e84187930faf79baa38643712d48636de504e8613667e42ec852999efa9fb",
41
+ "core/sarif.py": "93316e7d5fa0ac3660ce18307a2ef4f9c2b2b24b0a4e40d288f94edd0ef84e6d",
42
+ "core/stack_profiler.py": "8c5166c712d7e9341d6290b2220da05662f1ba251899d6f501a9875625f5539c",
43
+ "core/symbol_table.py": "8e700e01e920e7c8a496a16e400195bb6cedd9e3624997fbb44b29124e256d74",
44
+ "core/taint.py": "f54b3e2d620d480969681847e63149b259876dbac470dc417e90407e1def925b",
45
+ "core/taint_graph.py": "2f697a4d4c44801f346f7bde0794cc70c481b4a5a28fe02add20fa845fd9a5c5",
46
+ "core/taint_rules.py": "d29893e0212a2afb21fede6c20afb6d3fe9ff89511659675f02a034ea1e87d8f",
47
+ "core/v070_reporter.py": "d9e9bebd4e158f4c1b1b50897c04c2c5f9db85919b1700b47331ecf16fe7bd63",
48
+ "core/v070_workflow.py": "57bf1468c78f47b4aa5fb5804eb3c247825daa0933bb5cf0aad4ae2394adcead",
49
+ "core/v6_reporter.py": "95fa2ec5b0e708101b62131152445039192382e409d0f40c35cdcbf96648ca26",
50
+ "core/v6_workflow.py": "3e38afafc3afdbebe8cf76ed24da00435aab27a2ac512a292983f8b1e88ebcb8",
51
+ "core/watcher.py": "b3d4856023ee2f6c65b2938d3c76c246d7c440c58cdc7b642dc27209d68a959a",
52
+ "custom_rules/README.md": "787adf6e38498d895cb8ead6e213e91d41304e31051bfdd0440ea8ae107e0104",
13
53
  "references/csharp-security.md": "d6e267855b08ed4fdff26f3b876f089ae1f90a7ec6546cba7e8173380d9daa9d",
14
54
  "references/django-security.md": "26ea5535ac435e61489df1e381ac62b19e81702edfe095e78c937be93fa15ea7",
15
55
  "references/drf-security.md": "c6796398317b0f264d89fff598404e126d819e69e1ea0a5129924a5eb2a7af9d",
@@ -43,6 +83,8 @@
43
83
  "rules/TG-INPUT-004-unrestricted-file-upload.md": "d665fb7ede456c24d12229cec22b30374a4dc036c3fe3a41ece22f97ab78a1f4",
44
84
  "rules/TG-INPUT-005-unsafe-template-rendering-and-escaping.md": "b6006e741a303d8ff2cd65ef417e6199e5dcf8fe7d603941244db82f6cbe1753",
45
85
  "rules/TG-INPUT-006-unsafe-file-path-traversal.md": "5edb665cd2c41b659849c96d0d4b801a6365e130be12c51733a3d6f17cfd85ed",
86
+ "rules/TG-INPUT-007-unvalidated-redirect.md": "7da41ecbd39a7c90fe90fc683df48f38b0cf5a0d7c2b027f0827830bd8f814f7",
87
+ "rules/TG-INPUT-008-insecure-deserialization.md": "5f5f85a9429d32959f890f668ff1fd75bd7ce976a7b9406c3b7235fc728989ca",
46
88
  "rules/TG-PLATFORM-001-wildcard-cors-with-credentials.md": "fb8154f5b8051e94886c956b1e7bdbc5f316739795b8fb9bb493223ca774fe25",
47
89
  "rules/TG-PLATFORM-002-missing-security-headers.md": "207f489453d6256b5d794f79be25c66e9f932ae5cb561b3e8b50d26a28f6a07a",
48
90
  "rules/TG-PLATFORM-003-production-stack-trace-exposure.md": "298c75b928c160720243e42ce5bf43397e73cf50ed472482d5ef3f7635fcb839",
@@ -155,14 +197,16 @@
155
197
  "schemas/retest.schema.json": "97c0407ca4365a524020c430912f686f698cc0de90043194621071e9fc681cc7",
156
198
  "schemas/runtime-evidence.schema.json": "929d2b094c1cd1f7f9db07be1eba5994e8002477eab3fd24140e1e973fd18cc1",
157
199
  "scripts/apply_runner.py": "b145a68a4bc10fcacb853f972aee81fa3607e32d282b2b850c5a63d8e72da890",
158
- "scripts/audit_runner.py": "bc1e06ea5153ae326c4ad1de5d0cbb9503e618186623bea7cb8bb64d7b7b05ec",
200
+ "scripts/audit_runner.py": "18ebcd46f8363169db4ff4675a5258e0b93df5b219650de95b9a5e9f51da5ff9",
201
+ "scripts/deliberation_tournament.py": "9581161cdb064a3ed6bfd0c242e71fcb43b0fd083b2eb84bc239ac7cc6568b64",
159
202
  "scripts/diff_guard.py": "0dc178cdde1ac0ae1a1ea4b2eb2ce1756b2126f6156909cf55d85249f115fcbd",
160
- "scripts/finding_scorer.py": "a5315be6ee256c01c4539da3d1905ebc8d0840a356b83c55f9f6f2654a9f0c60",
203
+ "scripts/finding_scorer.py": "95c7edfe5ee4742be565914f71bb07bd077b2cf4636b769476345389dd85f3cf",
161
204
  "scripts/harden_runner.py": "5d5a40029c088ccb66790a9b0128bdefcd35883ef1dac78088ceb9531392a8f1",
162
205
  "scripts/html_reporter.py": "655c57be39e13c177db8842ef471664e5853f3e43b9f2a63e590df40ff9c16cb",
163
206
  "scripts/manifest_builder.py": "f1f9a0d63c55cf5ff45e9fd39d1b251c2bce05e777f8c1e325741d340f0128db",
164
207
  "scripts/memory_engine.py": "b715d0ca030e95eb06ad6eda99027535df8a7e37d64897c023be6a291cf13dc6",
165
208
  "scripts/monorepo_detector.py": "5603674136a5294ebfff89efeca0a546dd4a7deb1d184a2592ff21aff2131f73",
209
+ "scripts/reachability_analyzer.py": "708a690052f9d850fda7641dd5ec972f43e3c3c3ed5fc61221bd73517593ead3",
166
210
  "scripts/recheck_runner.py": "89e93fcc6843493d7e5f0bf97065dbdb40106273a00e07f903250665ca25f6fb",
167
211
  "scripts/recipes_runner.py": "090c06ef0de3c640a111c5646837233ceeaca494b161bd5edc630cc1371dca0e",
168
212
  "scripts/report_sync.py": "5ebef684690200694a53af30db850d9808d03ec710ed21ef75c4de52b5e5217c",
@@ -172,9 +216,10 @@
172
216
  "scripts/sarif_exporter.py": "86700765212adb3ab590ca72614bf3ad4ce7ce60e3193f7f3bd1a04d34d10f6e",
173
217
  "scripts/stack_detect.py": "c05a1ade4c8692025476bf7ea080a8f07c92e5d8e9a04f94c1654386352ffbdc",
174
218
  "scripts/status_runner.py": "4c358c91950c7874bcc6a5f23f2d3fda62b0752efcf6c6b658adf02ed77c7752",
219
+ "scripts/stride_generator.py": "4660713fa65e24119b88b6a050fb41f625d99bad030f1db40d198950d8c55ba8",
175
220
  "scripts/term_ui.py": "ca69398f85c86fe89526d6334b3ee866c890273997351113c3cc1765b7bd20c3",
176
- "skills/torusguard/SKILL.md": "4987faed0081cd75d54b9f3c8378a2539e348e8ec814ffdb78415ed7d478a571",
177
- "skills/torusguard/bootstrap.py": "f7ce48cc310dcdbf86c028f05a8f5ad22677f4cebb1bec5c90d173a9044342c5",
221
+ "skills/torusguard/SKILL.md": "15c69cb10eca1a10344b494888dce57e2baf227c3282bd54424a36ce35fb2460",
222
+ "skills/torusguard/bootstrap.py": "b75ad49e9dade87980cde3269ee1f5c3438f944a34a545c44f839d4496086b63",
178
223
  "skills/torusguard/references/auth-and-sessions.md": "c3e4b9600cb53fc28c993922dc880accbec5783ac90d5ee98d63b52762d19525",
179
224
  "skills/torusguard/references/business-logic-and-abuse.md": "58e87df2864d468af70c1ff39f5d540c687fa846b671457f85046ab2065fe99c",
180
225
  "skills/torusguard/references/cache-and-sensitive-responses.md": "81b4a7a08e11dafa4ec58d868c4a35f1f891d0dcdcfbcefaef81e1b9ba94f5a1",
@@ -205,7 +250,7 @@
205
250
  "skills/torusguard/references/websocket-security.md": "b5315e49432184c006664436d689d426b7322fc6fbbba2899a9ea5e5bab74c92",
206
251
  "skills/torusguard-ai-guard/SKILL.md": "130a24d82f1b92fcc3ac2f4edc77d4d999ae629971f2131f66d6fac876f5593f",
207
252
  "skills/torusguard-apply/SKILL.md": "edb21eabae4f9ad5be5976b20d217941c87b2a15edfc73383d02460ca3253fca",
208
- "skills/torusguard-audit/SKILL.md": "527f7fca458efb814ef656626d080adacc8c1dd95f2d56a457bbae688a9bedaa",
253
+ "skills/torusguard-audit/SKILL.md": "b9ffc74381360656cbc78438c003fb1e67c4f0787f87627555863b474d57a8ad",
209
254
  "skills/torusguard-authorize/SKILL.md": "56bcebc718bddadfd66010ebe2d23b4acf429e6230de05dd2300dab6bd383cc2",
210
255
  "skills/torusguard-container/SKILL.md": "f9a2dea0b6b1e2de8ce4a189bb32b1010f1b4d6ff7a529450857b6dab20546ff",
211
256
  "skills/torusguard-exploit-check/SKILL.md": "c127f1766e98e28dc967e452dff5dfec87689a26cf671ab6e62a135cd4d46e4b",
@@ -217,7 +262,9 @@
217
262
  "skills/torusguard-recheck/SKILL.md": "a5c4539ec6d091179c8ba53792fba46f26795976f392d2305e357f25a2966c55",
218
263
  "skills/torusguard-redos/SKILL.md": "b09b39bd98589613b2107c177e247f6224fb54ab2f028b4339ae01aac9d28c67",
219
264
  "skills/torusguard-report/SKILL.md": "509185ea6730601cf9a44e136219cace61cd0523f8e112de03e4ef1c35e60585",
265
+ "skills/torusguard-review/SKILL.md": "6d9ec907821ddf62bbbeaed8751d1532e72ba42702ea3afdaadaf720f66c35e3",
220
266
  "skills/torusguard-status/SKILL.md": "e9741a20313a8304bc7565b194949a59ec7cfd4945b197517680164b3197efc0",
267
+ "skills/torusguard-threatmodel/SKILL.md": "549903f39a030a75d88c184b7373d86bca921d8f802732c3674bfe9537b14537",
221
268
  "skills/torusguard-verify/SKILL.md": "aeb4d3c7924253607d130e48491d83bf7b7a21707cd1dac2ba97d64f5e259fd6",
222
269
  "skills/torusguard-web-validate/SKILL.md": "f1df00e10abd823d9a8c4daa1a3af7f26c5263c6c8e58e05b61b647d01a25489",
223
270
  "templates/audit-report.template.md": "71149dd05b01a74287a47781fdc71fd2d1b4b70337da303bf78767d0410a6c90",
@@ -226,7 +273,7 @@
226
273
  "templates/remediation-bundle.template.md": "4d85a540e3a2e74f9b21fc8a2a1072e27ca03e97cd67ca482f529cfe722acc4d",
227
274
  "workflows/ai-guard.md": "7d762f4e18f64864b50b64148b972085d2766aeaf13833bc1e6aeb8fddb96999",
228
275
  "workflows/apply.md": "0cd0fa84627ff73ffef84aa7eed6d096b57826139c079fa63f1bd745e13b138a",
229
- "workflows/audit.md": "4fb2bfe345792572f3e164aa38ab1b103868eac2bff0d9dbf91082514ea9b649",
276
+ "workflows/audit.md": "9f13b0497553965d30a71ff040a0dc556d526c8bbff136952b8210685632b5d7",
230
277
  "workflows/authorize.md": "386779f405c4b7de0282938db4095179ed212fd32296dff158acb3258b41aec1",
231
278
  "workflows/container.md": "64936b4873e9dfde6deae8a7d10d572a3bfbbfe9ef2340d0df8a3db5e1d02ad7",
232
279
  "workflows/exploit-check.md": "4dc4016b7a22f18d5c32dd6fcfa7a859df07d03300973654aea92fe5251c8a85",
@@ -239,9 +286,11 @@
239
286
  "workflows/recipes.md": "300c1fed0167e1a299fcd33c07db05630116b18a71ec2513c385862bba0f179b",
240
287
  "workflows/redos.md": "f55a4f510849a5ea7e2ae4b08ecc70dff03c1bf21c7fdc664a4ff3ad0396f904",
241
288
  "workflows/report.md": "7c718dfef6da1b66ba0fed300b7dfc90438fc3866af5a9b2aae4b3c3acd638e2",
289
+ "workflows/review.md": "ac8edc3c1d64571c7d58769e471fb10855969de72d874acb988c9c3c963f9a45",
242
290
  "workflows/status.md": "021a962ae4e6fc81383db2ef42d28dcfc1b3e546c9a10a7a15b9910e531cf0c2",
291
+ "workflows/threatmodel.md": "b509c38754bff5284d768d3e64cea21839ee9abcedb1661e597d291145715cf1",
243
292
  "workflows/torusguard-apply.md": "67e1002fc6e9d68e0c7d871c40b6f3c3b9c3919c8e02106a579882729c0f6b9f",
244
- "workflows/torusguard-audit.md": "eac9102ca88d53f71da474cd55717d431fd9c3b08c66d0760da9b53a659cf89a",
293
+ "workflows/torusguard-audit.md": "9f13b0497553965d30a71ff040a0dc556d526c8bbff136952b8210685632b5d7",
245
294
  "workflows/torusguard-authorize.md": "28ca58cfc656e956f7cec8160f2aadc152abcde3eb5ad5588df149007afb0df8",
246
295
  "workflows/torusguard-exploit-check.md": "41e77afe912be9266c5bc1e00fd796baff22a67973eb6e86d196d34f4d7bdfa4",
247
296
  "workflows/torusguard-harden.md": "7d92132973ff867b99e0425e3aee3c4e91868cb5193ec601069af2e857b6697f",