torusguard 0.9.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 (236) hide show
  1. package/.torusguard/.manifest.json +95 -0
  2. package/.torusguard/ARCHITECTURE.md +168 -0
  3. package/.torusguard/TORUSGUARD.md +145 -0
  4. package/.torusguard/agents/auditor.md +41 -0
  5. package/.torusguard/agents/profiler.md +49 -0
  6. package/.torusguard/agents/remediator.md +41 -0
  7. package/.torusguard/agents/reviewer.md +39 -0
  8. package/.torusguard/agents/validator.md +46 -0
  9. package/.torusguard/config/scope.json +24 -0
  10. package/.torusguard/config/slash-commands.json +102 -0
  11. package/.torusguard/config/torusguard.json +30 -0
  12. package/.torusguard/references/django-security.md +43 -0
  13. package/.torusguard/references/drf-security.md +20 -0
  14. package/.torusguard/references/express-security.md +103 -0
  15. package/.torusguard/references/fastapi-security.md +20 -0
  16. package/.torusguard/references/firebase-security.md +78 -0
  17. package/.torusguard/references/flask-security.md +20 -0
  18. package/.torusguard/references/nextjs-security.md +96 -0
  19. package/.torusguard/references/react-vite-security.md +97 -0
  20. package/.torusguard/references/sqlalchemy-security.md +16 -0
  21. package/.torusguard/references/supabase-security.md +84 -0
  22. package/.torusguard/rules/README.md +62 -0
  23. package/.torusguard/rules/TORUSGUARD.md +145 -0
  24. package/.torusguard/rules/active/.gitkeep +0 -0
  25. package/.torusguard/rules/active/TG-DIFF-001.md +20 -0
  26. package/.torusguard/rules/active/TG-DIFF-002.md +20 -0
  27. package/.torusguard/rules/active/TG-DIFF-003.md +19 -0
  28. package/.torusguard/runs/.gitkeep +0 -0
  29. package/.torusguard/schemas/authorization.schema.json +81 -0
  30. package/.torusguard/schemas/confidence.schema.json +72 -0
  31. package/.torusguard/schemas/evidence.schema.json +66 -0
  32. package/.torusguard/schemas/finding.schema.json +164 -0
  33. package/.torusguard/schemas/provenance.schema.json +46 -0
  34. package/.torusguard/schemas/remediation.schema.json +59 -0
  35. package/.torusguard/schemas/retest.schema.json +53 -0
  36. package/.torusguard/schemas/runtime-evidence.schema.json +72 -0
  37. package/.torusguard/scripts/__pycache__/diff_guard.cpython-311.pyc +0 -0
  38. package/.torusguard/scripts/__pycache__/monorepo_detector.cpython-311.pyc +0 -0
  39. package/.torusguard/scripts/diff_guard.py +171 -0
  40. package/.torusguard/scripts/finding_scorer.py +86 -0
  41. package/.torusguard/scripts/manifest_builder.py +130 -0
  42. package/.torusguard/scripts/monorepo_detector.py +164 -0
  43. package/.torusguard/scripts/run_manager.py +89 -0
  44. package/.torusguard/scripts/safety_gate.py +64 -0
  45. package/.torusguard/scripts/sarif_exporter.py +116 -0
  46. package/.torusguard/scripts/stack_detect.py +152 -0
  47. package/.torusguard/skills/torusguard/SKILL.md +37 -0
  48. package/.torusguard/skills/torusguard/bootstrap.py +158 -0
  49. package/.torusguard/skills/torusguard/references/auth-and-sessions.md +56 -0
  50. package/.torusguard/skills/torusguard/references/business-logic-and-abuse.md +23 -0
  51. package/.torusguard/skills/torusguard/references/cache-and-sensitive-responses.md +10 -0
  52. package/.torusguard/skills/torusguard/references/client-code-exposure.md +55 -0
  53. package/.torusguard/skills/torusguard/references/csrf-and-cross-origin.md +11 -0
  54. package/.torusguard/skills/torusguard/references/dependency-and-supply-chain.md +22 -0
  55. package/.torusguard/skills/torusguard/references/django-security.md +43 -0
  56. package/.torusguard/skills/torusguard/references/drf-security.md +20 -0
  57. package/.torusguard/skills/torusguard/references/fastapi-security.md +20 -0
  58. package/.torusguard/skills/torusguard/references/flask-security.md +20 -0
  59. package/.torusguard/skills/torusguard/references/frontend-no-db.md +53 -0
  60. package/.torusguard/skills/torusguard/references/graphql-security.md +12 -0
  61. package/.torusguard/skills/torusguard/references/input-and-injection.md +51 -0
  62. package/.torusguard/skills/torusguard/references/mass-assignment-and-property-auth.md +22 -0
  63. package/.torusguard/skills/torusguard/references/platform-hardening.md +56 -0
  64. package/.torusguard/skills/torusguard/references/python-dependencies.md +16 -0
  65. package/.torusguard/skills/torusguard/references/python-security-overview.md +12 -0
  66. package/.torusguard/skills/torusguard/references/rate-limit-and-abuse.md +57 -0
  67. package/.torusguard/skills/torusguard/references/secrets-and-config.md +64 -0
  68. package/.torusguard/skills/torusguard/references/sqlalchemy-security.md +16 -0
  69. package/.torusguard/skills/torusguard/references/ssrf-and-outbound-requests.md +46 -0
  70. package/.torusguard/skills/torusguard/references/webhook-security.md +15 -0
  71. package/.torusguard/skills/torusguard/references/websocket-security.md +12 -0
  72. package/.torusguard/skills/torusguard-apply/SKILL.md +46 -0
  73. package/.torusguard/skills/torusguard-audit/SKILL.md +70 -0
  74. package/.torusguard/skills/torusguard-authorize/SKILL.md +47 -0
  75. package/.torusguard/skills/torusguard-exploit-check/SKILL.md +64 -0
  76. package/.torusguard/skills/torusguard-full/SKILL.md +70 -0
  77. package/.torusguard/skills/torusguard-harden/SKILL.md +63 -0
  78. package/.torusguard/skills/torusguard-init/SKILL.md +52 -0
  79. package/.torusguard/skills/torusguard-recheck/SKILL.md +53 -0
  80. package/.torusguard/skills/torusguard-report/SKILL.md +54 -0
  81. package/.torusguard/skills/torusguard-status/SKILL.md +42 -0
  82. package/.torusguard/skills/torusguard-verify/SKILL.md +55 -0
  83. package/.torusguard/skills/torusguard-web-validate/SKILL.md +64 -0
  84. package/.torusguard/templates/audit-report.template.md +54 -0
  85. package/.torusguard/templates/authorization.template.md +34 -0
  86. package/.torusguard/templates/finding-card.template.md +32 -0
  87. package/.torusguard/templates/remediation-bundle.template.md +35 -0
  88. package/.torusguard/workflows/apply.md +95 -0
  89. package/.torusguard/workflows/audit.md +93 -0
  90. package/.torusguard/workflows/authorize.md +95 -0
  91. package/.torusguard/workflows/exploit-check.md +97 -0
  92. package/.torusguard/workflows/harden.md +93 -0
  93. package/.torusguard/workflows/init.md +95 -0
  94. package/.torusguard/workflows/recheck.md +95 -0
  95. package/.torusguard/workflows/report.md +95 -0
  96. package/.torusguard/workflows/status.md +95 -0
  97. package/.torusguard/workflows/verify.md +95 -0
  98. package/.torusguard/workflows/web-validate.md +95 -0
  99. package/LICENSE +21 -0
  100. package/README.md +319 -0
  101. package/bin/torusguard.js +110 -0
  102. package/install.py +98 -0
  103. package/package.json +48 -0
  104. package/skills/torusguard/SKILL.md +41 -0
  105. package/skills/torusguard/__pycache__/bootstrap.cpython-311.pyc +0 -0
  106. package/skills/torusguard/bootstrap.py +256 -0
  107. package/skills/torusguard/payload/.manifest.json +95 -0
  108. package/skills/torusguard/payload/ARCHITECTURE.md +168 -0
  109. package/skills/torusguard/payload/TORUSGUARD.md +145 -0
  110. package/skills/torusguard/payload/agents/auditor.md +41 -0
  111. package/skills/torusguard/payload/agents/profiler.md +49 -0
  112. package/skills/torusguard/payload/agents/remediator.md +41 -0
  113. package/skills/torusguard/payload/agents/reviewer.md +39 -0
  114. package/skills/torusguard/payload/agents/validator.md +46 -0
  115. package/skills/torusguard/payload/config/scope.json +24 -0
  116. package/skills/torusguard/payload/config/slash-commands.json +102 -0
  117. package/skills/torusguard/payload/config/torusguard.json +30 -0
  118. package/skills/torusguard/payload/references/django-security.md +43 -0
  119. package/skills/torusguard/payload/references/drf-security.md +20 -0
  120. package/skills/torusguard/payload/references/express-security.md +103 -0
  121. package/skills/torusguard/payload/references/fastapi-security.md +20 -0
  122. package/skills/torusguard/payload/references/firebase-security.md +78 -0
  123. package/skills/torusguard/payload/references/flask-security.md +20 -0
  124. package/skills/torusguard/payload/references/nextjs-security.md +96 -0
  125. package/skills/torusguard/payload/references/react-vite-security.md +97 -0
  126. package/skills/torusguard/payload/references/sqlalchemy-security.md +16 -0
  127. package/skills/torusguard/payload/references/supabase-security.md +84 -0
  128. package/skills/torusguard/payload/rules/README.md +62 -0
  129. package/skills/torusguard/payload/rules/TORUSGUARD.md +145 -0
  130. package/skills/torusguard/payload/rules/active/.gitkeep +0 -0
  131. package/skills/torusguard/payload/rules/active/TG-DIFF-001.md +20 -0
  132. package/skills/torusguard/payload/rules/active/TG-DIFF-002.md +20 -0
  133. package/skills/torusguard/payload/rules/active/TG-DIFF-003.md +19 -0
  134. package/skills/torusguard/payload/schemas/authorization.schema.json +81 -0
  135. package/skills/torusguard/payload/schemas/confidence.schema.json +72 -0
  136. package/skills/torusguard/payload/schemas/evidence.schema.json +66 -0
  137. package/skills/torusguard/payload/schemas/finding.schema.json +164 -0
  138. package/skills/torusguard/payload/schemas/provenance.schema.json +46 -0
  139. package/skills/torusguard/payload/schemas/remediation.schema.json +59 -0
  140. package/skills/torusguard/payload/schemas/retest.schema.json +53 -0
  141. package/skills/torusguard/payload/schemas/runtime-evidence.schema.json +72 -0
  142. package/skills/torusguard/payload/scripts/diff_guard.py +171 -0
  143. package/skills/torusguard/payload/scripts/finding_scorer.py +86 -0
  144. package/skills/torusguard/payload/scripts/manifest_builder.py +130 -0
  145. package/skills/torusguard/payload/scripts/monorepo_detector.py +164 -0
  146. package/skills/torusguard/payload/scripts/run_manager.py +89 -0
  147. package/skills/torusguard/payload/scripts/safety_gate.py +64 -0
  148. package/skills/torusguard/payload/scripts/sarif_exporter.py +116 -0
  149. package/skills/torusguard/payload/scripts/stack_detect.py +152 -0
  150. package/skills/torusguard/payload/skills/torusguard/SKILL.md +37 -0
  151. package/skills/torusguard/payload/skills/torusguard/bootstrap.py +158 -0
  152. package/skills/torusguard/payload/skills/torusguard/references/auth-and-sessions.md +56 -0
  153. package/skills/torusguard/payload/skills/torusguard/references/business-logic-and-abuse.md +23 -0
  154. package/skills/torusguard/payload/skills/torusguard/references/cache-and-sensitive-responses.md +10 -0
  155. package/skills/torusguard/payload/skills/torusguard/references/client-code-exposure.md +55 -0
  156. package/skills/torusguard/payload/skills/torusguard/references/csrf-and-cross-origin.md +11 -0
  157. package/skills/torusguard/payload/skills/torusguard/references/dependency-and-supply-chain.md +22 -0
  158. package/skills/torusguard/payload/skills/torusguard/references/django-security.md +43 -0
  159. package/skills/torusguard/payload/skills/torusguard/references/drf-security.md +20 -0
  160. package/skills/torusguard/payload/skills/torusguard/references/fastapi-security.md +20 -0
  161. package/skills/torusguard/payload/skills/torusguard/references/flask-security.md +20 -0
  162. package/skills/torusguard/payload/skills/torusguard/references/frontend-no-db.md +53 -0
  163. package/skills/torusguard/payload/skills/torusguard/references/graphql-security.md +12 -0
  164. package/skills/torusguard/payload/skills/torusguard/references/input-and-injection.md +51 -0
  165. package/skills/torusguard/payload/skills/torusguard/references/mass-assignment-and-property-auth.md +22 -0
  166. package/skills/torusguard/payload/skills/torusguard/references/platform-hardening.md +56 -0
  167. package/skills/torusguard/payload/skills/torusguard/references/python-dependencies.md +16 -0
  168. package/skills/torusguard/payload/skills/torusguard/references/python-security-overview.md +12 -0
  169. package/skills/torusguard/payload/skills/torusguard/references/rate-limit-and-abuse.md +57 -0
  170. package/skills/torusguard/payload/skills/torusguard/references/secrets-and-config.md +64 -0
  171. package/skills/torusguard/payload/skills/torusguard/references/sqlalchemy-security.md +16 -0
  172. package/skills/torusguard/payload/skills/torusguard/references/ssrf-and-outbound-requests.md +46 -0
  173. package/skills/torusguard/payload/skills/torusguard/references/webhook-security.md +15 -0
  174. package/skills/torusguard/payload/skills/torusguard/references/websocket-security.md +12 -0
  175. package/skills/torusguard/payload/skills/torusguard-apply/SKILL.md +46 -0
  176. package/skills/torusguard/payload/skills/torusguard-audit/SKILL.md +70 -0
  177. package/skills/torusguard/payload/skills/torusguard-authorize/SKILL.md +47 -0
  178. package/skills/torusguard/payload/skills/torusguard-exploit-check/SKILL.md +64 -0
  179. package/skills/torusguard/payload/skills/torusguard-full/SKILL.md +70 -0
  180. package/skills/torusguard/payload/skills/torusguard-harden/SKILL.md +63 -0
  181. package/skills/torusguard/payload/skills/torusguard-init/SKILL.md +52 -0
  182. package/skills/torusguard/payload/skills/torusguard-recheck/SKILL.md +53 -0
  183. package/skills/torusguard/payload/skills/torusguard-report/SKILL.md +54 -0
  184. package/skills/torusguard/payload/skills/torusguard-status/SKILL.md +42 -0
  185. package/skills/torusguard/payload/skills/torusguard-verify/SKILL.md +55 -0
  186. package/skills/torusguard/payload/skills/torusguard-web-validate/SKILL.md +64 -0
  187. package/skills/torusguard/payload/templates/audit-report.template.md +54 -0
  188. package/skills/torusguard/payload/templates/authorization.template.md +34 -0
  189. package/skills/torusguard/payload/templates/finding-card.template.md +32 -0
  190. package/skills/torusguard/payload/templates/remediation-bundle.template.md +35 -0
  191. package/skills/torusguard/payload/workflows/apply.md +95 -0
  192. package/skills/torusguard/payload/workflows/audit.md +93 -0
  193. package/skills/torusguard/payload/workflows/authorize.md +95 -0
  194. package/skills/torusguard/payload/workflows/exploit-check.md +97 -0
  195. package/skills/torusguard/payload/workflows/harden.md +93 -0
  196. package/skills/torusguard/payload/workflows/init.md +95 -0
  197. package/skills/torusguard/payload/workflows/recheck.md +95 -0
  198. package/skills/torusguard/payload/workflows/report.md +95 -0
  199. package/skills/torusguard/payload/workflows/status.md +95 -0
  200. package/skills/torusguard/payload/workflows/verify.md +95 -0
  201. package/skills/torusguard/payload/workflows/web-validate.md +95 -0
  202. package/skills/torusguard/references/auth-and-sessions.md +56 -0
  203. package/skills/torusguard/references/business-logic-and-abuse.md +23 -0
  204. package/skills/torusguard/references/cache-and-sensitive-responses.md +10 -0
  205. package/skills/torusguard/references/client-code-exposure.md +55 -0
  206. package/skills/torusguard/references/csrf-and-cross-origin.md +11 -0
  207. package/skills/torusguard/references/dependency-and-supply-chain.md +22 -0
  208. package/skills/torusguard/references/django-security.md +43 -0
  209. package/skills/torusguard/references/drf-security.md +20 -0
  210. package/skills/torusguard/references/fastapi-security.md +20 -0
  211. package/skills/torusguard/references/flask-security.md +20 -0
  212. package/skills/torusguard/references/frontend-no-db.md +53 -0
  213. package/skills/torusguard/references/graphql-security.md +12 -0
  214. package/skills/torusguard/references/input-and-injection.md +51 -0
  215. package/skills/torusguard/references/mass-assignment-and-property-auth.md +22 -0
  216. package/skills/torusguard/references/platform-hardening.md +56 -0
  217. package/skills/torusguard/references/python-dependencies.md +16 -0
  218. package/skills/torusguard/references/python-security-overview.md +12 -0
  219. package/skills/torusguard/references/rate-limit-and-abuse.md +57 -0
  220. package/skills/torusguard/references/secrets-and-config.md +64 -0
  221. package/skills/torusguard/references/sqlalchemy-security.md +16 -0
  222. package/skills/torusguard/references/ssrf-and-outbound-requests.md +46 -0
  223. package/skills/torusguard/references/webhook-security.md +15 -0
  224. package/skills/torusguard/references/websocket-security.md +12 -0
  225. package/skills/torusguard-apply/SKILL.md +46 -0
  226. package/skills/torusguard-audit/SKILL.md +70 -0
  227. package/skills/torusguard-authorize/SKILL.md +47 -0
  228. package/skills/torusguard-exploit-check/SKILL.md +64 -0
  229. package/skills/torusguard-full/SKILL.md +70 -0
  230. package/skills/torusguard-harden/SKILL.md +63 -0
  231. package/skills/torusguard-init/SKILL.md +52 -0
  232. package/skills/torusguard-recheck/SKILL.md +53 -0
  233. package/skills/torusguard-report/SKILL.md +54 -0
  234. package/skills/torusguard-status/SKILL.md +42 -0
  235. package/skills/torusguard-verify/SKILL.md +55 -0
  236. package/skills/torusguard-web-validate/SKILL.md +64 -0
@@ -0,0 +1,95 @@
1
+ ---
2
+ description: Legal scope definition, target ownership proof verification, and safety boundary enforcement for runtime validation.
3
+ tools: Read, Grep, Glob, Bash, Write
4
+ version: 0.9.2
5
+ agent: reviewer
6
+ lifecycle-phase: Phase 1 (Authorization Gate)
7
+ required-skills:
8
+ - torusguard-authorize
9
+ scripts-binding:
10
+ - .torusguard/scripts/safety_gate.py
11
+ ---
12
+
13
+ # /torusguard authorize — Legal Scope & Safety Gate
14
+
15
+ $ARGUMENTS
16
+
17
+ ---
18
+
19
+ ## Objective
20
+ Legal scope definition, target ownership proof verification, and safety boundary enforcement.
21
+
22
+ ---
23
+
24
+ ## Mandatory Pre-Flight Context Inspection
25
+
26
+ Inspect authorization parameters and environment safety before executing:
27
+ 1. **Config Record (`.torusguard/config/torusguard.json`):** Assert repository is initialized.
28
+ 2. **Current Scope (`.torusguard/config/scope.json`):** Inspect active allowed targets, paths, and TTL expiry.
29
+ 3. **Environment Classification:** Assert target is local or staging (`localhost`, `127.0.0.1`, `*.local`, `*.staging.*`). Production targets require explicit approval.
30
+ 4. **Destructive Guard:** Ensure state-changing operations (`DELETE`, bulk drops) remain blocked by default.
31
+ 5. **Ownership Proof:** Verify target ownership token or local process binding.
32
+ 6. **TTL Window:** Ensure authorization window does not exceed 24 hours.
33
+
34
+ ---
35
+
36
+ ## When to Use /torusguard authorize
37
+
38
+ | Trigger Scenario | Recommended Action |
39
+ | :--- | :--- |
40
+ | Preparing for live HTTP probes or API validation | Run `/torusguard authorize` |
41
+ | Updating allowed hosts, path prefixes, or rate limits | Run `/torusguard authorize` |
42
+ | Static-only security audit | Skip authorize; run `/torusguard audit` |
43
+ | Checking active legal scope status | Run `/torusguard status` |
44
+ | Expired authorization window | Re-run `/torusguard authorize` |
45
+
46
+ ---
47
+
48
+ ## Execution Steps
49
+
50
+ 1. **Capture Scope Parameters:** Collect target URL, allowed paths, forbidden prefixes, and max request budget.
51
+ 2. **Validate Host Ownership:** Verify target is local or matches authorized test domains.
52
+ 3. **Invoke Safety Gate:**
53
+ ```bash
54
+ python .torusguard/scripts/safety_gate.py check --url <target_url>
55
+ ```
56
+ 4. **Write Scope File (`.torusguard/config/scope.json`):** Save authorized targets, valid TTL timestamp, and request rate caps.
57
+ 5. **Confirm Scope Binding:** Verify `.torusguard/config/scope.json` parses as valid JSON against schema.
58
+
59
+ ---
60
+
61
+ ## Failure Recovery
62
+
63
+ - **Unreachable Host:** Verify local server is running on the specified port.
64
+ - **Production Target Warning:** If target resolves to an external production host, halt and request operator override.
65
+ - **Malformed JSON:** Re-initialize `scope.json` from `.torusguard/schemas/auth-boundary.schema.json`.
66
+ - **Halt Trigger:** Abort immediately if user provides wildcard target (`*`) or third-party domain.
67
+
68
+ ---
69
+
70
+ ## Hallucination Guard
71
+
72
+ - ❌ Never proceed with runtime probing without an explicit, valid `.torusguard/config/scope.json`.
73
+ - ❌ Never authorize destructive HTTP methods (`DELETE`, `DROP`) under default non-destructive policy.
74
+ - ✅ Always validate targets through `.torusguard/scripts/safety_gate.py`.
75
+
76
+ ---
77
+
78
+ ## Output Card Format
79
+
80
+ ```markdown
81
+ ### 🔒 TorusGuard Authorization Gate
82
+ - **Target URL:** [Target Host or URL]
83
+ - **Environment:** [Localhost / Staging / Container]
84
+ - **Allowed Paths:** [Path prefixes or all authorized]
85
+ - **Rate Limit:** [Max requests / concurrency limit]
86
+ - **Scope File:** `.torusguard/config/scope.json`
87
+ - **Status:** AUTHORIZED — ready for `/torusguard web-validate`
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Next Steps
93
+
94
+ 1. Run `/torusguard audit` to scan codebase for AST security vulnerabilities.
95
+ 2. Run `/torusguard web-validate` to begin safe, authorized endpoint validation.
@@ -0,0 +1,97 @@
1
+ ---
2
+ description: Safe, bounded, single-step exploitability confirmation across 5 standard verification statuses.
3
+ tools: Read, Grep, Glob, Bash, Write
4
+ version: 0.9.2
5
+ agent: validator
6
+ lifecycle-phase: Phase 3c (Exploitability Check)
7
+ required-skills:
8
+ - torusguard-exploit-check
9
+ scripts-binding:
10
+ - .torusguard/scripts/safety_gate.py
11
+ - .torusguard/scripts/finding_scorer.py
12
+ ---
13
+
14
+ # /torusguard exploit-check — Bounded Exploitability Confirmation
15
+
16
+ $ARGUMENTS
17
+
18
+ ---
19
+
20
+ ## Objective
21
+ Safe, bounded, single-step exploitability confirmation across 5 standard verification statuses.
22
+
23
+ ---
24
+
25
+ ## Mandatory Pre-Flight Context Inspection
26
+
27
+ Inspect authorization parameters and probe safety constraints:
28
+ 1. **Scope Check (`scope.json`):** Assert endpoint is authorized.
29
+ 2. **Approved Probes:** Use benign canaries (SQLi math, HTML marker, unauth read).
30
+ 3. **Destructive Ban:** Strictly prohibit drops, DOS, or weaponized payloads.
31
+ 4. **Safety Gate:** Verify probe with `safety_gate.py` prior to dispatch.
32
+ 5. **Bound:** Limit to single non-destructive HTTP request per finding.
33
+ 6. **Audit Trail:** Inject `X-TorusGuard-AuthID` header on all outbound requests.
34
+
35
+ ---
36
+
37
+ ## When to Use /torusguard exploit-check
38
+
39
+ | Trigger Scenario | Recommended Action |
40
+ | :--- | :--- |
41
+ | Confirming whether a flaw is practically exploitable | Run `/torusguard exploit-check` |
42
+ | Upgrading Medium confidence finding to Confirmed | Run `/torusguard exploit-check` |
43
+ | Verifying IDOR or tenant isolation boundaries | Run `/torusguard exploit-check` |
44
+ | Routine endpoint header inspection | Run `/torusguard web-validate` |
45
+ | Applying approved remediation patch | Run `/torusguard apply` |
46
+
47
+ ---
48
+
49
+ ## Execution Steps
50
+
51
+ 1. **Verify Authorization Scope:** Confirm target host and route in `scope.json`.
52
+ 2. **Select Safe Canary:** Choose inert mathematical sentinel or unauth GET.
53
+ 3. **Validate With Safety Gate:**
54
+ ```bash
55
+ python .torusguard/scripts/safety_gate.py check --url <target_url> --payload <canary>
56
+ ```
57
+ 4. **Dispatch Bounded Single Probe:** Send request with header `X-TorusGuard-AuthID`.
58
+ 5. **Classify Status:** Evaluate response against 5 outcomes: `Confirmed`, `Needs Review`, `Not Reproducible`, `Blocked by Controls`, `Out of Scope`.
59
+ 6. **Emit Artifacts:** Write `exploit-check.md` and update `findings.json`.
60
+
61
+ ---
62
+
63
+ ## Failure Recovery
64
+
65
+ - **Connection Refused:** Verify target server is running locally on port.
66
+ - **Safety Gate Block:** If `Manual Only`, halt automated probe and request human review.
67
+ - **Ambiguous Response:** Mark finding as `Needs Review`; never assume exploit without proof.
68
+ - **Halt Trigger:** Abort if probe causes server 500 error or unexpected crash.
69
+
70
+ ---
71
+
72
+ ## Hallucination Guard
73
+
74
+ - ❌ Never classify a vulnerability as `Confirmed` without direct sentinel reflection.
75
+ - ❌ Never execute brute force attacks or automated password spraying.
76
+ - ✅ Always provide reproducible curl commands with redacted credentials.
77
+
78
+ ---
79
+
80
+ ## Output Card Format
81
+
82
+ ```markdown
83
+ ### 🎯 TorusGuard Exploitability Confirmation
84
+ - **Target Route:** `[METHOD] /path`
85
+ - **Finding ID:** `TG-XXX-HASH`
86
+ - **Canary Used:** [Inert Math Sentinel / Unauth Read]
87
+ - **Status:** [Confirmed / Not Reproducible / Blocked]
88
+ - **Evidence:** [Response snippet demonstrating leak or block]
89
+ - **Replay Curl:** `curl -X [METHOD] http://localhost:PORT/path ...`
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Next Steps
95
+
96
+ 1. Run `/torusguard harden` to formulate surgical patch bundles for confirmed flaws.
97
+ 2. Run `/torusguard report` to export findings into SARIF v2.1.0 format.
@@ -0,0 +1,93 @@
1
+ ---
2
+ description: Governed remediation formulation under strict Ponytail Protocol bounds (<= 35 additions, <= 25 deletions) and bundle packaging.
3
+ tools: Read, Grep, Glob, Bash, Write
4
+ version: 0.9.2
5
+ agent: remediator
6
+ lifecycle-phase: Phase 4 (Remediation Formulation)
7
+ required-skills:
8
+ - torusguard-harden
9
+ scripts-binding:
10
+ - .torusguard/scripts/run_manager.py
11
+ - .torusguard/scripts/diff_guard.py
12
+ ---
13
+
14
+ # /torusguard harden — Governed Remediation & Bundle Packaging
15
+
16
+ $ARGUMENTS
17
+
18
+ ---
19
+
20
+ ## Objective
21
+ Governed remediation formulation under strict Ponytail Protocol bounds (<=35 add, <=25 del).
22
+
23
+ ---
24
+
25
+ ## Mandatory Pre-Flight Context Inspection
26
+
27
+ Inspect finding targets and patch constraints before generating diffs:
28
+ 1. **Target Finding (`findings.md`):** Identify prioritized verified findings.
29
+ 2. **Ponytail Protocol:** Enforce hard limit ($\le 35$ additions, $\le 25$ deletions). Ban rewrites.
30
+ 3. **Sensitive Path Review:** Flag changes touching `auth/` or `settings.py` for human sign-off.
31
+ 4. **Behavior Preservation:** Ensure patch addresses flaw without breaking public APIs.
32
+ 5. **Dry-Run Rule:** Do NOT apply changes to disk during harden; emit bundle for review.
33
+ 6. **Backup Readiness:** Ensure rollback procedures are prepared before staging patch.
34
+
35
+ ---
36
+
37
+ ## When to Use /torusguard harden
38
+
39
+ | Trigger Scenario | Recommended Action |
40
+ | :--- | :--- |
41
+ | Formulating minimal patches for verified findings | Run `/torusguard harden` |
42
+ | Packaging a 4-artifact remediation bundle for review | Run `/torusguard harden` |
43
+ | Writing and applying changes to code files | Run `/torusguard apply` |
44
+ | Differentially re-scanning code after patch application | Run `/torusguard recheck` |
45
+ | Discovering new vulnerabilities | Run `/torusguard audit` |
46
+
47
+ ---
48
+
49
+ ## Execution Steps
50
+
51
+ 1. **Select Target Finding:** Choose verified flaw from active run directory.
52
+ 2. **Examine Live Code Context:** Read surrounding lines (±15) of vulnerable sink.
53
+ 3. **Draft Unified Diff:** Formulate minimal fix adhering to Ponytail Protocol limits.
54
+ 4. **Audit Patch Safety:** Run `python .torusguard/scripts/diff_guard.py <patch.diff>`.
55
+ 5. **Package 4-Artifact Bundle:** Write `patch.diff`, `plan.md`, `verification.md`, `rollback.md` to `.torusguard/runs/<run_id>/remediation/<finding_id>/`.
56
+
57
+ ---
58
+
59
+ ## Failure Recovery
60
+
61
+ - **Line Churn Exceeded (>35 add or >25 del):** Decompose patch into smaller sequential sub-fixes.
62
+ - **Sensitive Path Conflict:** Mark bundle with `Requires Sensitive-Path Sign-Off` in `plan.md`.
63
+ - **Finding Not Found:** Ensure finding ID exists in active `findings.md`.
64
+ - **Halt Trigger:** Abort if target source file cannot be read from disk.
65
+
66
+ ---
67
+
68
+ ## Hallucination Guard
69
+
70
+ - ❌ Never generate full-file replacements or unconstrained cosmetic code refactoring.
71
+ - ❌ Never modify imports, variables, or functions unrelated to the vulnerability.
72
+ - ✅ Always calculate addition and deletion line counts before emitting `patch.diff`.
73
+
74
+ ---
75
+
76
+ ## Output Card Format
77
+
78
+ ```markdown
79
+ ### 🛠️ TorusGuard Remediation Bundle
80
+ - **Finding Target:** `TG-XXX-HASH` ([Vulnerability Name])
81
+ - **File Affected:** `src/path/to/file.py`
82
+ - **Line Churn:** +[Additions] / -[Deletions] (Ponytail: PASS)
83
+ - **Sensitive Path:** [Yes (Sign-Off Needed) / No (Standard)]
84
+ - **Bundle Path:** `.torusguard/runs/<run_id>/remediation/<finding_id>/`
85
+ - **Status:** READY FOR REVIEW — run `/torusguard apply` to execute
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Next Steps
91
+
92
+ 1. Review proposed diff in `.torusguard/runs/<run_id>/remediation/<finding_id>/patch.diff`.
93
+ 2. Run `/torusguard apply` to execute the governed patch with automatic rollback backup.
@@ -0,0 +1,95 @@
1
+ ---
2
+ description: Baseline project discovery, workspace scaffolding, stack detection, and framework-tailored security rule activation.
3
+ tools: Read, Grep, Glob, Bash, Write
4
+ version: 0.9.2
5
+ agent: profiler
6
+ lifecycle-phase: Phase 0 (Baseline Setup)
7
+ required-skills:
8
+ - torusguard-init
9
+ scripts-binding:
10
+ - .torusguard/scripts/stack_detect.py
11
+ ---
12
+
13
+ # /torusguard init — Project Baseline & Workspace Initialization
14
+
15
+ $ARGUMENTS
16
+
17
+ ---
18
+
19
+ ## Objective
20
+ Baseline project discovery, workspace scaffolding, stack detection, and security rule activation.
21
+
22
+ ---
23
+
24
+ ## Mandatory Pre-Flight Context Inspection
25
+
26
+ Inspect workspace state before running initialization:
27
+ 1. **Config State (`.torusguard/config/torusguard.json`):** Check if workspace is already initialized. If active, prompt before re-writing.
28
+ 2. **Project Manifests:** Check root for `package.json`, `manage.py`, `requirements.txt`, `pyproject.toml`, `go.mod`, or `Cargo.toml`.
29
+ 3. **Disclosure Policy (`SECURITY.md`):** Check for existing responsible disclosure policy.
30
+ 4. **Bootstrapper:** If `.torusguard/` is absent, invoke `python skills/torusguard/bootstrap.py` to unpack offline assets.
31
+ 5. **Runtime Preconditions:** Ensure Python 3.10+ is available in the current execution shell.
32
+
33
+ ---
34
+
35
+ ## When to Use /torusguard init
36
+
37
+ | Trigger Scenario | Recommended Command |
38
+ | :--- | :--- |
39
+ | First-time onboarding in any repository | Run `/torusguard init` |
40
+ | Framework upgrade or major dependency changes | Run `/torusguard init` to refresh tailored rules |
41
+ | Repository already configured | Run `/torusguard audit` |
42
+ | Inspecting existing configuration | Run `/torusguard status` |
43
+ | Testing legal boundaries | Run `/torusguard authorize` |
44
+
45
+ ---
46
+
47
+ ## Execution Steps
48
+
49
+ 1. **Scaffold Directory Topology:** Verify `.torusguard/` structure (`config/`, `rules/active/`, `runs/`, `scripts/`, `workflows/`, `templates/`, `schemas/`).
50
+ 2. **Execute Stack Detection:**
51
+ ```bash
52
+ python .torusguard/scripts/stack_detect.py .
53
+ ```
54
+ 3. **Activate Tailored Rules:** Symlink or copy matching security rules from `.torusguard/rules/` into `.torusguard/rules/active/`.
55
+ 4. **Write Configuration (`.torusguard/config/torusguard.json`):**
56
+ Record detected stack, enabled rules count, timestamp, and runtime constraints.
57
+ 5. **Verify Initialization:** Assert `.torusguard/config/torusguard.json` and `.torusguard/config/scope.json` exist.
58
+
59
+ ---
60
+
61
+ ## Failure Recovery
62
+
63
+ - **Script Exit 1 (Detection Failed):** Check Python version (`python --version` >= 3.10) and verify read access to root manifests.
64
+ - **Permission Error:** Verify write permissions for `.torusguard/config/` and `.torusguard/rules/active/`.
65
+ - **Missing Directories:** Re-run directory scaffolding if any subfolder creation fails.
66
+ - **Halt Condition:** If root directory is empty, halt and prompt user to open the project root.
67
+
68
+ ---
69
+
70
+ ## Hallucination Guard
71
+
72
+ - ❌ Never invent framework dependencies not present in `package.json` or `requirements.txt`.
73
+ - ❌ Never overwrite an existing `.torusguard/config/scope.json` containing authorized domains.
74
+ - ✅ Always execute `.torusguard/scripts/stack_detect.py` to ground detected technologies.
75
+
76
+ ---
77
+
78
+ ## Output Card Format
79
+
80
+ ```markdown
81
+ ### 🛡️ TorusGuard Workspace Initialization
82
+ - **Primary Framework:** [Detected Stack or None]
83
+ - **Components:** [Backend / Frontend / Database]
84
+ - **Active Rules:** [Count] rules enabled in `.torusguard/rules/active/`
85
+ - **Config:** `.torusguard/config/torusguard.json` generated
86
+ - **Scope Template:** `.torusguard/config/scope.json` ready
87
+ - **Status:** READY — run `/torusguard audit` to scan codebase
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Next Steps
93
+
94
+ 1. Run `/torusguard authorize` to define allowed target URLs and legal scan boundaries.
95
+ 2. Run `/torusguard audit` to execute the baseline static security audit.
@@ -0,0 +1,95 @@
1
+ ---
2
+ description: Targeted differential AST re-scan, fix closure verification, and regression state machine transitions.
3
+ tools: Read, Grep, Glob, Bash, Write
4
+ version: 0.9.2
5
+ agent: reviewer
6
+ lifecycle-phase: Phase 6 (Targeted Recheck & Verification)
7
+ required-skills:
8
+ - torusguard-recheck
9
+ scripts-binding:
10
+ - .torusguard/scripts/run_manager.py
11
+ - .torusguard/scripts/finding_scorer.py
12
+ ---
13
+
14
+ # /torusguard recheck — Targeted Differential Recheck & Regression Audit
15
+
16
+ $ARGUMENTS
17
+
18
+ ---
19
+
20
+ ## Objective
21
+ Targeted differential AST re-scan, fix closure verification, and regression state transitions.
22
+
23
+ ---
24
+
25
+ ## Mandatory Pre-Flight Context Inspection
26
+
27
+ Inspect applied patch history and target file scope before re-checking:
28
+ 1. **Applied Patch Record:** Verify `apply-log.json` or modified file list exists in the active run.
29
+ 2. **Scope Limitation:** Restrict differential scan strictly to modified files to conserve token budget.
30
+ 3. **Rollback Availability:** Confirm `.bak` snapshot exists in `pre_apply/` in case regression is detected.
31
+ 4. **4-State Transition Engine:** Prepare to transition findings to `Fixed`, `Partially Fixed`, `Not Fixed`, or `Regression`.
32
+ 5. **Fresh Syntax Validation:** Ensure no compiler or syntax errors exist before re-evaluating rules.
33
+ 6. **AST Consistency:** Ensure imported dependencies on modified lines resolve correctly.
34
+
35
+ ---
36
+
37
+ ## When to Use /torusguard recheck
38
+
39
+ | Trigger Scenario | Recommended Action |
40
+ | :--- | :--- |
41
+ | Immediately after applying a remediation patch | Run `/torusguard recheck` |
42
+ | Verifying that a specific finding is eliminated | Run `/torusguard recheck` |
43
+ | Checking whether a patch introduced new security flaws | Run `/torusguard recheck` |
44
+ | Whole repository baseline audit | Run `/torusguard audit` |
45
+ | Generating final signed release report | Run `/torusguard report` |
46
+
47
+ ---
48
+
49
+ ## Execution Steps
50
+
51
+ 1. **Identify Modified Files:** Extract list of altered files from latest apply step.
52
+ 2. **Execute Differential AST Scan:** Re-run active security rules exclusively against modified files.
53
+ 3. **Evaluate Finding Status:**
54
+ - If original vulnerable AST pattern is absent and no new sink appears: transition to `Fixed`.
55
+ - If new security rule triggers on altered lines: classify as `Regression`.
56
+ 4. **Update Finding State:** Record verified resolution status into `findings.json`.
57
+ 5. **Emit Recheck Report:** Write `recheck-report.md` into the active run folder.
58
+
59
+ ---
60
+
61
+ ## Failure Recovery
62
+
63
+ - **Finding Still Present (`Not Fixed`):** Review patch diff; the remediation did not neutralize the AST sink.
64
+ - **New Vulnerability Detected (`Regression`):** Alert operator; prompt to revert from `.bak` snapshot.
65
+ - **File Not Found:** Verify file path matches git repository layout.
66
+ - **Halt Trigger:** Abort if diff shows changes outside approved patch scope.
67
+
68
+ ---
69
+
70
+ ## Hallucination Guard
71
+
72
+ - ❌ Never mark a finding as `Fixed` without re-scanning the actual AST of the patched file.
73
+ - ❌ Never ignore new warnings introduced in modified lines.
74
+ - ✅ Always provide before/after line comparisons confirming sink removal.
75
+
76
+ ---
77
+
78
+ ## Output Card Format
79
+
80
+ ```markdown
81
+ ### ✅ TorusGuard Differential Recheck
82
+ - **Files Re-scanned:** [List of modified files]
83
+ - **Target Finding:** `TG-XXX-HASH`
84
+ - **Result:** [FIXED / REGRESSION / PARTIAL]
85
+ - **Regressions Introduced:** 0
86
+ - **Report:** `.torusguard/runs/<run_id>/recheck-report.md`
87
+ - **Status:** VERIFIED — ready for `/torusguard report`
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Next Steps
93
+
94
+ 1. Run `/torusguard report` to generate executive summary and export OASIS SARIF v2.1.0 data.
95
+ 2. Commit the verified patch to version control.
@@ -0,0 +1,95 @@
1
+ ---
2
+ description: Executive posture reporting, cluster analysis, signed compliance audit, and OASIS SARIF v2.1.0 structured export.
3
+ tools: Read, Grep, Glob, Bash, Write
4
+ version: 0.9.2
5
+ agent: reviewer
6
+ lifecycle-phase: Phase 7 (Reporting & SARIF Export)
7
+ required-skills:
8
+ - torusguard-report
9
+ scripts-binding:
10
+ - .torusguard/scripts/sarif_exporter.py
11
+ - .torusguard/scripts/run_manager.py
12
+ ---
13
+
14
+ # /torusguard report — Unified Security Posture Report & SARIF Export
15
+
16
+ $ARGUMENTS
17
+
18
+ ---
19
+
20
+ ## Objective
21
+ Executive posture reporting, cluster analysis, signed compliance audit, and SARIF v2.1.0 export.
22
+
23
+ ---
24
+
25
+ ## Mandatory Pre-Flight Context Inspection
26
+
27
+ Inspect run records and reporting parameters before generating release artifacts:
28
+ 1. **Active Run Records:** Ensure target run folder contains `findings.json` or `findings.md`.
29
+ 2. **SARIF v2.1.0 Schema:** Validate output structure against official OASIS SARIF standard.
30
+ 3. **Multi-Analysis Category:** Tag static findings under category `torusguard/static` to prevent CI collision.
31
+ 4. **Secret Masking:** Ensure zero unredacted authorization tokens or API keys appear in report.
32
+ 5. **Role Boundary:** Enforce reviewer agent sign-off before archiving run results.
33
+
34
+ ---
35
+
36
+ ## When to Use /torusguard report
37
+
38
+ | Trigger Scenario | Recommended Action |
39
+ | :--- | :--- |
40
+ | Concluding a security review cycle or audit milestone | Run `/torusguard report` |
41
+ | Exporting SARIF v2.1.0 logs for GitHub Code Scanning | Run `/torusguard report` |
42
+ | Sharing executive posture summaries with stakeholders | Run `/torusguard report` |
43
+ | Applying code modifications | Run `/torusguard apply` |
44
+ | Re-checking modified files | Run `/torusguard recheck` |
45
+
46
+ ---
47
+
48
+ ## Execution Steps
49
+
50
+ 1. **Aggregate Lifecycle Data:** Load all finding cards, verification traces, and recheck logs.
51
+ 2. **Export OASIS SARIF v2.1.0:**
52
+ ```bash
53
+ python .torusguard/scripts/sarif_exporter.py --run <run_dir> --output <run_dir>/results.sarif
54
+ ```
55
+ 3. **Compile Executive Markdown Report:** Generate `report.md` with executive summary, posture score, and metrics.
56
+ 4. **Sign Off Run Manifest:** Update `.torusguard/runs/<run_id>/manifest.json` with final status counts.
57
+ 5. **Archive Results:** Confirm artifacts (`report.md`, `results.sarif`, `summary.md`) are saved on disk.
58
+
59
+ ---
60
+
61
+ ## Failure Recovery
62
+
63
+ - **SARIF Schema Error:** Re-run `sarif_exporter.py` with schema validation flag to locate invalid properties.
64
+ - **Empty Findings List:** Emit valid clean report indicating zero security vulnerabilities detected.
65
+ - **Missing Run Folder:** Point script to latest valid timestamped run in `.torusguard/runs/`.
66
+ - **Halt Trigger:** Abort if unredacted private secrets are detected in output text.
67
+
68
+ ---
69
+
70
+ ## Hallucination Guard
71
+
72
+ - ❌ Never invent vulnerability counts not backed by actual findings in the run ledger.
73
+ - ❌ Never generate invalid SARIF JSON with missing physical location URIs.
74
+ - ✅ Always export standard-compliant SARIF v2.1.0 with AST line fingerprints.
75
+
76
+ ---
77
+
78
+ ## Output Card Format
79
+
80
+ ```markdown
81
+ ### 📊 TorusGuard Security Posture Report
82
+ - **Run ID:** `run-YYYYMMDD-HHMMSS`
83
+ - **Total Findings:** [Count] ([Fixed] Fixed, [Open] Open)
84
+ - **Security Posture Score:** [Score]/100
85
+ - **SARIF v2.1.0 Export:** `.torusguard/runs/<run_id>/results.sarif`
86
+ - **Executive Report:** `.torusguard/runs/<run_id>/report.md`
87
+ - **Status:** COMPLETE — report published
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Next Steps
93
+
94
+ 1. Upload `results.sarif` to GitHub Code Scanning via `.github/workflows/`.
95
+ 2. Share `report.md` with engineering stakeholders and project maintainers.
@@ -0,0 +1,95 @@
1
+ ---
2
+ description: Read-only diagnostic overview of workspace security posture, active configuration, rules catalog, and run history.
3
+ tools: Read, Grep, Glob, Bash
4
+ version: 0.9.2
5
+ agent: reviewer
6
+ lifecycle-phase: System / Diagnostics
7
+ required-skills:
8
+ - torusguard-status
9
+ scripts-binding:
10
+ - .torusguard/scripts/run_manager.py
11
+ ---
12
+
13
+ # /torusguard status — Workspace Security Posture & Diagnostic Overview
14
+
15
+ $ARGUMENTS
16
+
17
+ ---
18
+
19
+ ## Objective
20
+ Read-only diagnostic overview of workspace security posture, active configuration, and run history.
21
+
22
+ ---
23
+
24
+ ## Mandatory Pre-Flight Context Inspection
25
+
26
+ Inspect workspace state and configuration records prior to status display:
27
+ 1. **Config State (`.torusguard/config/torusguard.json`):** Confirm workspace initialization and read detected stack.
28
+ 2. **Active Rules Directory (`.torusguard/rules/active/`):** Count active rule files.
29
+ 3. **Run Folder Ledger (`.torusguard/runs/`):** Check run history and locate latest `manifest.json`.
30
+ 4. **Scope Record (`.torusguard/config/scope.json`):** Check whether runtime authorization TTL is active or expired.
31
+ 5. **Read-Only Invariant:** Ensure command performs zero file modifications or disk mutations.
32
+
33
+ ---
34
+
35
+ ## When to Use /torusguard status
36
+
37
+ | Trigger Scenario | Recommended Action |
38
+ | :--- | :--- |
39
+ | Checking workspace configuration and active security posture | Run `/torusguard status` |
40
+ | Reviewing recent audit runs and finding counts | Run `/torusguard status` |
41
+ | Checking active legal scope authorization TTL | Run `/torusguard status` |
42
+ | Initializing workspace for the first time | Run `/torusguard init` |
43
+ | Executing full security scan | Run `/torusguard audit` |
44
+
45
+ ---
46
+
47
+ ## Execution Steps
48
+
49
+ 1. **Read Configuration:** Load `.torusguard/config/torusguard.json`; extract stack, version, and enabled rule count.
50
+ 2. **Enumerate Active Rules:** Count rule files physically present in `.torusguard/rules/active/`.
51
+ 3. **Inspect Run History:**
52
+ ```bash
53
+ python .torusguard/scripts/run_manager.py list
54
+ ```
55
+ 4. **Evaluate Scope Expiry:** Parse `.torusguard/config/scope.json`; report if TTL is valid or expired.
56
+ 5. **Print Status Overview:** Render complete workspace diagnostic overview card.
57
+
58
+ ---
59
+
60
+ ## Failure Recovery
61
+
62
+ - **Uninitialized Workspace:** If config is missing, prompt user to execute `/torusguard init`.
63
+ - **Zero Runs Found:** Display clean status card noting no historical audit runs exist yet.
64
+ - **Corrupt Config File:** Report parsing error and recommend re-running `/torusguard init`.
65
+ - **Halt Trigger:** Abort command if read access to `.torusguard/` is denied.
66
+
67
+ ---
68
+
69
+ ## Hallucination Guard
70
+
71
+ - ❌ Never display fabricated finding counts not substantiated by run manifests.
72
+ - ❌ Never execute modifying shell commands or edit source code during status inspection.
73
+ - ✅ Always report factual file counts from `.torusguard/rules/active/` and `.torusguard/runs/`.
74
+
75
+ ---
76
+
77
+ ## Output Card Format
78
+
79
+ ```markdown
80
+ ### 🛡️ TorusGuard Workspace Status
81
+ - **Version:** v0.9.2
82
+ - **Framework Detected:** [Stack or None]
83
+ - **Active Rules:** [Count] rules active in `.torusguard/rules/active/`
84
+ - **Total Runs:** [Count] historical runs recorded
85
+ - **Latest Run:** `run-YYYYMMDD-HHMMSS` ([Findings Count] findings)
86
+ - **Scope Status:** [Authorized (TTL Active) / Expired / Unconfigured]
87
+ - **Health Posture:** [GOOD / ACTION NEEDED]
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Next Steps
93
+
94
+ 1. Run `/torusguard audit` to scan codebase for security vulnerabilities.
95
+ 2. Run `/torusguard authorize` to configure or refresh live target scope.