torusguard 1.3.4 → 1.3.5

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 (239) hide show
  1. package/.torusguard/.manifest.json +66 -63
  2. package/.torusguard/rules/business-logic/TG-BIZ-001-client-controlled-sensitive-business-value.md +30 -14
  3. package/.torusguard/rules/business-logic/TG-BIZ-002-replayable-one-time-operation.md +33 -16
  4. package/.torusguard/rules/business-logic/TG-BIZ-003-missing-workflow-state-validation.md +31 -15
  5. package/.torusguard/rules/business-logic/TG-BIZ-004-unrestricted-sensitive-business-flow.md +26 -16
  6. package/.torusguard/rules/cache/TG-CACHE-001-sensitive-response-publicly-cacheable.md +24 -16
  7. package/.torusguard/rules/cache/TG-CACHE-002-missing-user-cache-isolation.md +32 -18
  8. package/.torusguard/rules/cache/TG-CACHE-003-sensitive-data-in-url.md +24 -17
  9. package/.torusguard/rules/csrf/TG-CSRF-001-missing-csrf-protection.md +31 -18
  10. package/.torusguard/rules/csrf/TG-CSRF-002-unsafe-credentialed-cross-origin-request.md +28 -17
  11. package/.torusguard/rules/graphql/TG-GQL-002-resolver-missing-authorization.md +33 -17
  12. package/.torusguard/rules/graphql/TG-GQL-003-unbounded-graphql-pagination-or-batching.md +31 -16
  13. package/.torusguard/rules/graphql/TG-GQL-004-unnecessary-production-introspection.md +25 -16
  14. package/.torusguard/rules/secrets/TG-SEC-005-secret-in-git-history.md +24 -19
  15. package/.torusguard/rules/secrets/TG-SEC-006-secret-in-build-artifact.md +36 -19
  16. package/.torusguard/rules/secrets/TG-SEC-007-secret-in-test-or-example-fixture.md +21 -16
  17. package/.torusguard/rules/ssrf/TG-SSRF-002-missing-internal-network-protection.md +45 -18
  18. package/.torusguard/rules/ssrf/TG-SSRF-003-unsafe-redirect-following.md +20 -16
  19. package/.torusguard/rules/ssrf/TG-SSRF-004-unbounded-outbound-request.md +28 -19
  20. package/.torusguard/rules/supply-chain/TG-SUPPLY-001-missing-or-ignored-dependency-lockfile.md +25 -18
  21. package/.torusguard/rules/supply-chain/TG-SUPPLY-003-unsafe-ci-cd-secret-exposure.md +29 -19
  22. package/.torusguard/rules/supply-chain/TG-SUPPLY-004-unpinned-ci-action.md +23 -18
  23. package/.torusguard/rules/supply-chain/TG-SUPPLY-005-unsafe-dependency-install-script.md +23 -18
  24. package/.torusguard/rules/webhook/TG-WEBHOOK-001-missing-webhook-signature-verification.md +36 -16
  25. package/.torusguard/rules/webhook/TG-WEBHOOK-002-replayable-webhook.md +26 -17
  26. package/.torusguard/rules/webhook/TG-WEBHOOK-003-missing-webhook-idempotency.md +30 -16
  27. package/.torusguard/rules/webhook/TG-WEBHOOK-004-unvalidated-webhook-event-type.md +25 -16
  28. package/.torusguard/rules/websocket/TG-WS-002-missing-channel-level-authorization.md +28 -17
  29. package/.torusguard/rules/websocket/TG-WS-003-unvalidated-websocket-message.md +31 -17
  30. package/.torusguard/rules/websocket/TG-WS-004-unbounded-websocket-connections.md +31 -17
  31. package/.torusguard/rules_catalog.json +520 -0
  32. package/.torusguard/runs/report-latest.html +93 -7
  33. package/.torusguard/runs/run-20260912-214110-audit/findings.json +1256 -0
  34. package/.torusguard/runs/run-20260912-214110-audit/findings.md +534 -0
  35. package/.torusguard/runs/run-20260912-214110-audit/manifest.json +12 -0
  36. package/.torusguard/runs/run-20260912-214110-audit/summary.md +5 -0
  37. package/.torusguard/runs/run-20260912-214813-audit/findings.json +992 -0
  38. package/.torusguard/runs/run-20260912-214813-audit/findings.md +422 -0
  39. package/.torusguard/runs/run-20260912-214813-audit/manifest.json +12 -0
  40. package/.torusguard/runs/run-20260912-214813-audit/summary.md +5 -0
  41. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-auth-003-49-7c96f3/metadata.json +17 -0
  42. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-auth-003-49-7c96f3/minimal_patch_plan.md +21 -0
  43. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-auth-003-49-7c96f3/patch.diff +9 -0
  44. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-input-003-53-d167b4/metadata.json +17 -0
  45. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-input-003-53-d167b4/minimal_patch_plan.md +21 -0
  46. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-input-003-53-d167b4/patch.diff +9 -0
  47. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-platform-001-12-cf8156/metadata.json +17 -0
  48. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-platform-001-12-cf8156/minimal_patch_plan.md +21 -0
  49. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-platform-001-12-cf8156/patch.diff +9 -0
  50. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-rate-001-26-affcfa/metadata.json +17 -0
  51. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-rate-001-26-affcfa/minimal_patch_plan.md +21 -0
  52. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-rate-001-26-affcfa/patch.diff +9 -0
  53. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-sec-001-9-e22e50/metadata.json +17 -0
  54. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-sec-001-9-e22e50/minimal_patch_plan.md +21 -0
  55. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-sec-001-9-e22e50/patch.diff +9 -0
  56. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-ssrf-004-9-9803ad/metadata.json +17 -0
  57. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-ssrf-004-9-9803ad/minimal_patch_plan.md +21 -0
  58. package/.torusguard/runs/run-20260912-215555-audit/bundles/bnd-tg-ssrf-004-9-9803ad/patch.diff +9 -0
  59. package/.torusguard/runs/run-20260912-215555-audit/findings.json +530 -0
  60. package/.torusguard/runs/run-20260912-215555-audit/findings.md +232 -0
  61. package/.torusguard/runs/run-20260912-215555-audit/manifest.json +13 -0
  62. package/.torusguard/runs/run-20260912-215555-audit/remediation.md +102 -0
  63. package/.torusguard/runs/run-20260912-215555-audit/summary.md +5 -0
  64. package/.torusguard/runs/run-20260912-215731-audit/apply_plan.md +6 -0
  65. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-client-001-7-587129/metadata.json +17 -0
  66. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-client-001-7-587129/minimal_patch_plan.md +21 -0
  67. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-client-001-7-587129/patch.diff +9 -0
  68. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-db-002-9-5f7850/metadata.json +17 -0
  69. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-db-002-9-5f7850/minimal_patch_plan.md +21 -0
  70. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-db-002-9-5f7850/patch.diff +9 -0
  71. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-001-27-2486f1/metadata.json +17 -0
  72. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-001-27-2486f1/minimal_patch_plan.md +22 -0
  73. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-001-27-2486f1/patch.diff +10 -0
  74. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-003-53-d167b4/metadata.json +17 -0
  75. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-003-53-d167b4/minimal_patch_plan.md +21 -0
  76. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-input-003-53-d167b4/patch.diff +9 -0
  77. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-001-12-cf8156/metadata.json +17 -0
  78. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-001-12-cf8156/minimal_patch_plan.md +21 -0
  79. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-001-12-cf8156/patch.diff +9 -0
  80. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-17-876973/metadata.json +17 -0
  81. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-17-876973/minimal_patch_plan.md +23 -0
  82. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-17-876973/patch.diff +11 -0
  83. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-5-40c794/metadata.json +17 -0
  84. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-5-40c794/minimal_patch_plan.md +23 -0
  85. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-platform-002-5-40c794/patch.diff +11 -0
  86. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-001-26-affcfa/metadata.json +17 -0
  87. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-001-26-affcfa/minimal_patch_plan.md +21 -0
  88. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-001-26-affcfa/patch.diff +9 -0
  89. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-002-54-0b38d2/metadata.json +17 -0
  90. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-002-54-0b38d2/minimal_patch_plan.md +21 -0
  91. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-rate-002-54-0b38d2/patch.diff +9 -0
  92. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-18-a3c1e8/metadata.json +17 -0
  93. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-18-a3c1e8/minimal_patch_plan.md +21 -0
  94. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-18-a3c1e8/patch.diff +9 -0
  95. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-9-e22e50/metadata.json +17 -0
  96. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-9-e22e50/minimal_patch_plan.md +21 -0
  97. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-001-9-e22e50/patch.diff +9 -0
  98. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-28-a1a0a1/metadata.json +17 -0
  99. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-28-a1a0a1/minimal_patch_plan.md +21 -0
  100. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-28-a1a0a1/patch.diff +9 -0
  101. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-30-00569e/metadata.json +17 -0
  102. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-30-00569e/minimal_patch_plan.md +21 -0
  103. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-sec-004-30-00569e/patch.diff +9 -0
  104. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-ssrf-004-9-9803ad/metadata.json +17 -0
  105. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-ssrf-004-9-9803ad/minimal_patch_plan.md +21 -0
  106. package/.torusguard/runs/run-20260912-215731-audit/bundles/bnd-tg-ssrf-004-9-9803ad/patch.diff +9 -0
  107. package/.torusguard/runs/run-20260912-215731-audit/diff_summary.md +186 -0
  108. package/.torusguard/runs/run-20260912-215731-audit/findings.json +497 -0
  109. package/.torusguard/runs/run-20260912-215731-audit/findings.md +218 -0
  110. package/.torusguard/runs/run-20260912-215731-audit/manifest.json +14 -0
  111. package/.torusguard/runs/run-20260912-215731-audit/recheck.md +76 -0
  112. package/.torusguard/runs/run-20260912-215731-audit/remediation.md +234 -0
  113. package/.torusguard/runs/run-20260912-215731-audit/summary.md +5 -0
  114. package/.torusguard/runs/run-20260912-220134-audit/findings.json +68 -0
  115. package/.torusguard/runs/run-20260912-220134-audit/findings.md +36 -0
  116. package/.torusguard/runs/run-20260912-220134-audit/manifest.json +12 -0
  117. package/.torusguard/runs/run-20260912-220134-audit/summary.md +5 -0
  118. package/.torusguard/runs/run-20260912-220200-audit/findings.json +1 -0
  119. package/.torusguard/runs/run-20260912-220200-audit/findings.md +8 -0
  120. package/.torusguard/runs/run-20260912-220200-audit/manifest.json +12 -0
  121. package/.torusguard/runs/run-20260912-220200-audit/recheck.md +6 -0
  122. package/.torusguard/runs/run-20260912-220200-audit/summary.md +5 -0
  123. package/.torusguard/runs/run-20260912-220227-audit/findings.json +1 -0
  124. package/.torusguard/runs/run-20260912-220227-audit/findings.md +8 -0
  125. package/.torusguard/runs/run-20260912-220227-audit/manifest.json +12 -0
  126. package/.torusguard/runs/run-20260912-220227-audit/recheck.md +6 -0
  127. package/.torusguard/runs/run-20260912-220227-audit/summary.md +5 -0
  128. package/.torusguard/scripts/__pycache__/audit_runner.cpython-311.pyc +0 -0
  129. package/.torusguard/scripts/__pycache__/finding_scorer.cpython-311.pyc +0 -0
  130. package/.torusguard/scripts/__pycache__/report_sync.cpython-311.pyc +0 -0
  131. package/.torusguard/scripts/__pycache__/term_ui.cpython-311.pyc +0 -0
  132. package/.torusguard/scripts/apply_runner.py +383 -377
  133. package/.torusguard/scripts/audit_runner.py +1306 -653
  134. package/.torusguard/scripts/finding_scorer.py +14 -2
  135. package/.torusguard/scripts/harden_runner.py +628 -455
  136. package/.torusguard/scripts/recheck_runner.py +248 -238
  137. package/.torusguard/scripts/recipes_runner.py +137 -137
  138. package/.torusguard/scripts/report_sync.py +423 -0
  139. package/.torusguard/scripts/sarif_exporter.py +116 -116
  140. package/.torusguard/scripts/term_ui.py +162 -162
  141. package/.torusguard/snapshots/run-20260912-215731-audit/demo/playground/vulnerable_nextjs/actions.ts.bak +24 -0
  142. package/.torusguard/snapshots/run-20260912-215731-audit/examples/hardened-react-express/server/index.js.bak +121 -0
  143. package/.torusguard/snapshots/run-20260912-215731-audit/examples/python/fastapi-vuln/main.py.bak +20 -0
  144. package/.torusguard/snapshots/run-20260912-215731-audit/examples/vulnerable-react-express/client/src/App.jsx.bak +63 -0
  145. package/.torusguard/snapshots/run-20260912-215731-audit/examples/vulnerable-react-express/client/vite.config.js.bak +12 -0
  146. package/.torusguard/snapshots/run-20260912-215731-audit/examples/vulnerable-react-express/server/index.js.bak +82 -0
  147. package/.torusguard/workflows/apply.md +11 -4
  148. package/.torusguard/workflows/audit.md +7 -1
  149. package/.torusguard/workflows/authorize.md +2 -1
  150. package/.torusguard/workflows/exploit-check.md +2 -1
  151. package/.torusguard/workflows/harden.md +7 -1
  152. package/.torusguard/workflows/init.md +6 -1
  153. package/.torusguard/workflows/memory.md +2 -1
  154. package/.torusguard/workflows/recheck.md +7 -1
  155. package/.torusguard/workflows/report.md +7 -1
  156. package/.torusguard/workflows/status.md +6 -1
  157. package/.torusguard/workflows/verify.md +6 -1
  158. package/.torusguard/workflows/web-validate.md +2 -1
  159. package/README.md +470 -345
  160. package/bin/torusguard.js +550 -545
  161. package/package.json +1 -1
  162. package/skills/torusguard/SKILL.md +73 -72
  163. package/skills/torusguard/payload/.manifest.json +66 -63
  164. package/skills/torusguard/payload/rules/business-logic/TG-BIZ-001-client-controlled-sensitive-business-value.md +30 -14
  165. package/skills/torusguard/payload/rules/business-logic/TG-BIZ-002-replayable-one-time-operation.md +33 -16
  166. package/skills/torusguard/payload/rules/business-logic/TG-BIZ-003-missing-workflow-state-validation.md +31 -15
  167. package/skills/torusguard/payload/rules/business-logic/TG-BIZ-004-unrestricted-sensitive-business-flow.md +26 -16
  168. package/skills/torusguard/payload/rules/cache/TG-CACHE-001-sensitive-response-publicly-cacheable.md +24 -16
  169. package/skills/torusguard/payload/rules/cache/TG-CACHE-002-missing-user-cache-isolation.md +32 -18
  170. package/skills/torusguard/payload/rules/cache/TG-CACHE-003-sensitive-data-in-url.md +24 -17
  171. package/skills/torusguard/payload/rules/csrf/TG-CSRF-001-missing-csrf-protection.md +31 -18
  172. package/skills/torusguard/payload/rules/csrf/TG-CSRF-002-unsafe-credentialed-cross-origin-request.md +28 -17
  173. package/skills/torusguard/payload/rules/graphql/TG-GQL-002-resolver-missing-authorization.md +33 -17
  174. package/skills/torusguard/payload/rules/graphql/TG-GQL-003-unbounded-graphql-pagination-or-batching.md +31 -16
  175. package/skills/torusguard/payload/rules/graphql/TG-GQL-004-unnecessary-production-introspection.md +25 -16
  176. package/skills/torusguard/payload/rules/secrets/TG-SEC-005-secret-in-git-history.md +24 -19
  177. package/skills/torusguard/payload/rules/secrets/TG-SEC-006-secret-in-build-artifact.md +36 -19
  178. package/skills/torusguard/payload/rules/secrets/TG-SEC-007-secret-in-test-or-example-fixture.md +21 -16
  179. package/skills/torusguard/payload/rules/ssrf/TG-SSRF-002-missing-internal-network-protection.md +45 -18
  180. package/skills/torusguard/payload/rules/ssrf/TG-SSRF-003-unsafe-redirect-following.md +20 -16
  181. package/skills/torusguard/payload/rules/ssrf/TG-SSRF-004-unbounded-outbound-request.md +28 -19
  182. package/skills/torusguard/payload/rules/supply-chain/TG-SUPPLY-001-missing-or-ignored-dependency-lockfile.md +25 -18
  183. package/skills/torusguard/payload/rules/supply-chain/TG-SUPPLY-003-unsafe-ci-cd-secret-exposure.md +29 -19
  184. package/skills/torusguard/payload/rules/supply-chain/TG-SUPPLY-004-unpinned-ci-action.md +23 -18
  185. package/skills/torusguard/payload/rules/supply-chain/TG-SUPPLY-005-unsafe-dependency-install-script.md +23 -18
  186. package/skills/torusguard/payload/rules/webhook/TG-WEBHOOK-001-missing-webhook-signature-verification.md +36 -16
  187. package/skills/torusguard/payload/rules/webhook/TG-WEBHOOK-002-replayable-webhook.md +26 -17
  188. package/skills/torusguard/payload/rules/webhook/TG-WEBHOOK-003-missing-webhook-idempotency.md +30 -16
  189. package/skills/torusguard/payload/rules/webhook/TG-WEBHOOK-004-unvalidated-webhook-event-type.md +25 -16
  190. package/skills/torusguard/payload/rules/websocket/TG-WS-002-missing-channel-level-authorization.md +28 -17
  191. package/skills/torusguard/payload/rules/websocket/TG-WS-003-unvalidated-websocket-message.md +31 -17
  192. package/skills/torusguard/payload/rules/websocket/TG-WS-004-unbounded-websocket-connections.md +31 -17
  193. package/skills/torusguard/payload/rules_catalog.json +520 -0
  194. package/skills/torusguard/payload/scripts/apply_runner.py +383 -377
  195. package/skills/torusguard/payload/scripts/audit_runner.py +1306 -653
  196. package/skills/torusguard/payload/scripts/finding_scorer.py +14 -2
  197. package/skills/torusguard/payload/scripts/harden_runner.py +628 -455
  198. package/skills/torusguard/payload/scripts/recheck_runner.py +248 -238
  199. package/skills/torusguard/payload/scripts/recipes_runner.py +137 -137
  200. package/skills/torusguard/payload/scripts/report_sync.py +423 -0
  201. package/skills/torusguard/payload/scripts/sarif_exporter.py +116 -116
  202. package/skills/torusguard/payload/scripts/term_ui.py +162 -162
  203. package/skills/torusguard/payload/skills/torusguard/SKILL.md +75 -72
  204. package/skills/torusguard/payload/skills/torusguard-apply/SKILL.md +84 -80
  205. package/skills/torusguard/payload/skills/torusguard-audit/SKILL.md +87 -83
  206. package/skills/torusguard/payload/skills/torusguard-authorize/SKILL.md +7 -2
  207. package/skills/torusguard/payload/skills/torusguard-exploit-check/SKILL.md +7 -2
  208. package/skills/torusguard/payload/skills/torusguard-full/SKILL.md +7 -2
  209. package/skills/torusguard/payload/skills/torusguard-harden/SKILL.md +98 -94
  210. package/skills/torusguard/payload/skills/torusguard-init/SKILL.md +68 -64
  211. package/skills/torusguard/payload/skills/torusguard-recheck/SKILL.md +81 -77
  212. package/skills/torusguard/payload/skills/torusguard-report/SKILL.md +76 -72
  213. package/skills/torusguard/payload/skills/torusguard-status/SKILL.md +62 -58
  214. package/skills/torusguard/payload/skills/torusguard-verify/SKILL.md +7 -2
  215. package/skills/torusguard/payload/skills/torusguard-web-validate/SKILL.md +7 -2
  216. package/skills/torusguard/payload/workflows/apply.md +11 -4
  217. package/skills/torusguard/payload/workflows/audit.md +7 -1
  218. package/skills/torusguard/payload/workflows/authorize.md +2 -1
  219. package/skills/torusguard/payload/workflows/exploit-check.md +2 -1
  220. package/skills/torusguard/payload/workflows/harden.md +7 -1
  221. package/skills/torusguard/payload/workflows/init.md +6 -1
  222. package/skills/torusguard/payload/workflows/memory.md +2 -1
  223. package/skills/torusguard/payload/workflows/recheck.md +7 -1
  224. package/skills/torusguard/payload/workflows/report.md +7 -1
  225. package/skills/torusguard/payload/workflows/status.md +6 -1
  226. package/skills/torusguard/payload/workflows/verify.md +6 -1
  227. package/skills/torusguard/payload/workflows/web-validate.md +2 -1
  228. package/skills/torusguard-apply/SKILL.md +84 -80
  229. package/skills/torusguard-audit/SKILL.md +87 -83
  230. package/skills/torusguard-authorize/SKILL.md +7 -2
  231. package/skills/torusguard-exploit-check/SKILL.md +7 -2
  232. package/skills/torusguard-full/SKILL.md +7 -2
  233. package/skills/torusguard-harden/SKILL.md +98 -94
  234. package/skills/torusguard-init/SKILL.md +68 -64
  235. package/skills/torusguard-recheck/SKILL.md +81 -77
  236. package/skills/torusguard-report/SKILL.md +76 -72
  237. package/skills/torusguard-status/SKILL.md +62 -58
  238. package/skills/torusguard-verify/SKILL.md +7 -2
  239. package/skills/torusguard-web-validate/SKILL.md +7 -2
@@ -0,0 +1,1256 @@
1
+ [
2
+ {
3
+ "finding_id": "TG-SEC-001-bb5e4b77",
4
+ "rule_id": "TG-SEC-001",
5
+ "title": "Hardcoded Secret or API Key in Tracked Source",
6
+ "description": "Hardcoded JWT signing secret",
7
+ "severity": "Critical",
8
+ "category": "secrets",
9
+ "cluster": "cluster-credentials-exposure",
10
+ "file_path": "examples/vulnerable-react-express/server/index.js",
11
+ "line_number": 9,
12
+ "matched_text": "JWT_SECRET = 'FAKE_DEMO_JWT_SECRET_NOT_FOR_PRODUCTION'",
13
+ "snippet": "\n// TG-SEC-001: Hardcoded JWT secret\nconst JWT_SECRET = 'FAKE_DEMO_JWT_SECRET_NOT_FOR_PRODUCTION';\n\n// TG-PLATFORM-001: Wildcard CORS with credentials",
14
+ "is_test": false,
15
+ "target": {
16
+ "file_path": "examples/vulnerable-react-express/server/index.js",
17
+ "start_line": 9,
18
+ "end_line": 9
19
+ },
20
+ "confidence_score": 80,
21
+ "confidence_band": "High Confidence",
22
+ "confidence_factors": {
23
+ "evidence_quality": 35,
24
+ "reproduction_success": 0,
25
+ "independent_confirmations": 5,
26
+ "environmental_clarity": 15,
27
+ "manual_review_status": 0,
28
+ "memory_boost": 25,
29
+ "test_exemption": false,
30
+ "test_deduction": 0,
31
+ "total_score": 80,
32
+ "classification_band": "High Confidence"
33
+ }
34
+ },
35
+ {
36
+ "finding_id": "TG-SEC-001-c393d596",
37
+ "rule_id": "TG-SEC-001",
38
+ "title": "Hardcoded Secret or API Key in Tracked Source",
39
+ "description": "Hardcoded credential or API secret string",
40
+ "severity": "Critical",
41
+ "category": "secrets",
42
+ "cluster": "cluster-credentials-exposure",
43
+ "file_path": "examples/vulnerable-react-express/server/index.js",
44
+ "line_number": 18,
45
+ "matched_text": "password: 'password123'",
46
+ "snippet": "\nconst users = [\n { id: '1', email: 'alice@demo.local', password: 'password123', name: 'Alice' },\n { id: '2', email: 'bob@demo.local', password: 'secret456', name: 'Bob' },\n];",
47
+ "is_test": false,
48
+ "target": {
49
+ "file_path": "examples/vulnerable-react-express/server/index.js",
50
+ "start_line": 18,
51
+ "end_line": 18
52
+ },
53
+ "confidence_score": 80,
54
+ "confidence_band": "High Confidence",
55
+ "confidence_factors": {
56
+ "evidence_quality": 35,
57
+ "reproduction_success": 0,
58
+ "independent_confirmations": 5,
59
+ "environmental_clarity": 15,
60
+ "manual_review_status": 0,
61
+ "memory_boost": 25,
62
+ "test_exemption": false,
63
+ "test_deduction": 0,
64
+ "total_score": 80,
65
+ "classification_band": "High Confidence"
66
+ }
67
+ },
68
+ {
69
+ "finding_id": "TG-DB-002-d9bd69df",
70
+ "rule_id": "TG-DB-002",
71
+ "title": "Privileged Database Credential in Browser Context",
72
+ "description": "Service role key or raw database connection string reference in frontend code",
73
+ "severity": "Critical",
74
+ "category": "database",
75
+ "cluster": "cluster-client-leak",
76
+ "file_path": "demo/playground/vulnerable_nextjs/actions.ts",
77
+ "line_number": 9,
78
+ "matched_text": "SUPABASE_SERVICE_ROLE_KEY",
79
+ "snippet": "\n// Finding 1: TG-CLIENT-001 - Backend admin key exposed in client-accessible code\nexport const SUPABASE_SERVICE_ROLE_KEY = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.demo_secret_token_1234567890\";\n\ninterface UserRecord {",
80
+ "is_test": false,
81
+ "target": {
82
+ "file_path": "demo/playground/vulnerable_nextjs/actions.ts",
83
+ "start_line": 9,
84
+ "end_line": 9
85
+ },
86
+ "confidence_score": 70,
87
+ "confidence_band": "High Confidence",
88
+ "confidence_factors": {
89
+ "evidence_quality": 35,
90
+ "reproduction_success": 0,
91
+ "independent_confirmations": 5,
92
+ "environmental_clarity": 15,
93
+ "manual_review_status": 0,
94
+ "memory_boost": 15,
95
+ "test_exemption": false,
96
+ "test_deduction": 0,
97
+ "total_score": 70,
98
+ "classification_band": "High Confidence"
99
+ }
100
+ },
101
+ {
102
+ "finding_id": "TG-DIFF-001-671d3513",
103
+ "rule_id": "TG-DIFF-001",
104
+ "title": "Accidental Security Check Bypass in Patch Additions",
105
+ "description": "Disabled TLS certificate verification (verify=False)",
106
+ "severity": "Critical",
107
+ "category": "transport",
108
+ "cluster": "cluster-transport-security",
109
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
110
+ "line_number": 246,
111
+ "matched_text": "verify=False",
112
+ "snippet": " # Strategy 8: TLS Verification Bypass (TG-DIFF-001)\n elif rule_id == \"TG-DIFF-001\":\n if \"verify=False\" in target_line:\n fixed_line = target_line.replace(\"verify=False\", \"verify=True\")\n new_lines[line_number - 1] = fixed_line",
113
+ "is_test": false,
114
+ "target": {
115
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
116
+ "start_line": 246,
117
+ "end_line": 246
118
+ },
119
+ "confidence_score": 70,
120
+ "confidence_band": "High Confidence",
121
+ "confidence_factors": {
122
+ "evidence_quality": 35,
123
+ "reproduction_success": 0,
124
+ "independent_confirmations": 5,
125
+ "environmental_clarity": 15,
126
+ "manual_review_status": 0,
127
+ "memory_boost": 15,
128
+ "test_exemption": false,
129
+ "test_deduction": 0,
130
+ "total_score": 70,
131
+ "classification_band": "High Confidence"
132
+ }
133
+ },
134
+ {
135
+ "finding_id": "TG-DIFF-001-b6549484",
136
+ "rule_id": "TG-DIFF-001",
137
+ "title": "Accidental Security Check Bypass in Patch Additions",
138
+ "description": "Disabled Go TLS certificate verification (InsecureSkipVerify: true)",
139
+ "severity": "Critical",
140
+ "category": "transport",
141
+ "cluster": "cluster-transport-security",
142
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
143
+ "line_number": 256,
144
+ "matched_text": "InsecureSkipVerify: true",
145
+ "snippet": " applied_rule = True\n fix_explanation = \"Restored TLS certificate authority validation (rejectUnauthorized: true)\"\n elif \"InsecureSkipVerify: true\" in target_line:\n fixed_line = target_line.replace(\"InsecureSkipVerify: true\", \"InsecureSkipVerify: false\")\n new_lines[line_number - 1] = fixed_line",
146
+ "is_test": false,
147
+ "target": {
148
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
149
+ "start_line": 256,
150
+ "end_line": 256
151
+ },
152
+ "confidence_score": 70,
153
+ "confidence_band": "High Confidence",
154
+ "confidence_factors": {
155
+ "evidence_quality": 35,
156
+ "reproduction_success": 0,
157
+ "independent_confirmations": 5,
158
+ "environmental_clarity": 15,
159
+ "manual_review_status": 0,
160
+ "memory_boost": 15,
161
+ "test_exemption": false,
162
+ "test_deduction": 0,
163
+ "total_score": 70,
164
+ "classification_band": "High Confidence"
165
+ }
166
+ },
167
+ {
168
+ "finding_id": "TG-DIFF-001-c4cfaa8a",
169
+ "rule_id": "TG-DIFF-001",
170
+ "title": "Accidental Security Check Bypass in Patch Additions",
171
+ "description": "Disabled Node.js TLS rejectUnauthorized",
172
+ "severity": "Critical",
173
+ "category": "transport",
174
+ "cluster": "cluster-transport-security",
175
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
176
+ "line_number": 251,
177
+ "matched_text": "rejectUnauthorized: false",
178
+ "snippet": " applied_rule = True\n fix_explanation = \"Restored mandatory TLS certificate verification (verify=True)\"\n elif \"rejectUnauthorized: false\" in target_line:\n fixed_line = target_line.replace(\"rejectUnauthorized: false\", \"rejectUnauthorized: true\")\n new_lines[line_number - 1] = fixed_line",
179
+ "is_test": false,
180
+ "target": {
181
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
182
+ "start_line": 251,
183
+ "end_line": 251
184
+ },
185
+ "confidence_score": 70,
186
+ "confidence_band": "High Confidence",
187
+ "confidence_factors": {
188
+ "evidence_quality": 35,
189
+ "reproduction_success": 0,
190
+ "independent_confirmations": 5,
191
+ "environmental_clarity": 15,
192
+ "manual_review_status": 0,
193
+ "memory_boost": 15,
194
+ "test_exemption": false,
195
+ "test_deduction": 0,
196
+ "total_score": 70,
197
+ "classification_band": "High Confidence"
198
+ }
199
+ },
200
+ {
201
+ "finding_id": "TG-DIFF-001-7db54483",
202
+ "rule_id": "TG-DIFF-001",
203
+ "title": "Accidental Security Check Bypass in Patch Additions",
204
+ "description": "Disabled TLS certificate verification (verify=False)",
205
+ "severity": "Critical",
206
+ "category": "transport",
207
+ "cluster": "cluster-transport-security",
208
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
209
+ "line_number": 180,
210
+ "matched_text": "verify=False",
211
+ "snippet": "\n if not bypass_guards:\n bypass_rule = \"4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, `@csrf_exempt`, or `bypass_auth=True`.\"\n else:\n bypass_rule = f\"4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, or {', '.join(bypass_guards[:2])}.\"",
212
+ "is_test": false,
213
+ "target": {
214
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
215
+ "start_line": 180,
216
+ "end_line": 180
217
+ },
218
+ "confidence_score": 70,
219
+ "confidence_band": "High Confidence",
220
+ "confidence_factors": {
221
+ "evidence_quality": 35,
222
+ "reproduction_success": 0,
223
+ "independent_confirmations": 5,
224
+ "environmental_clarity": 15,
225
+ "manual_review_status": 0,
226
+ "memory_boost": 15,
227
+ "test_exemption": false,
228
+ "test_deduction": 0,
229
+ "total_score": 70,
230
+ "classification_band": "High Confidence"
231
+ }
232
+ },
233
+ {
234
+ "finding_id": "TG-DIFF-001-77bc2f9b",
235
+ "rule_id": "TG-DIFF-001",
236
+ "title": "Accidental Security Check Bypass in Patch Additions",
237
+ "description": "Disabled Go TLS certificate verification (InsecureSkipVerify: true)",
238
+ "severity": "Critical",
239
+ "category": "transport",
240
+ "cluster": "cluster-transport-security",
241
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
242
+ "line_number": 157,
243
+ "matched_text": "InsecureSkipVerify: true",
244
+ "snippet": " if \"go\" in stack_lower:\n sql_guards.append(\"`db.Query(..., args)` / GORM\")\n bypass_guards.append(\"`InsecureSkipVerify: true`\")\n if \"rust\" in stack_lower:\n sql_guards.append(\"`sqlx::query!` / Diesel\")",
245
+ "is_test": false,
246
+ "target": {
247
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
248
+ "start_line": 157,
249
+ "end_line": 157
250
+ },
251
+ "confidence_score": 70,
252
+ "confidence_band": "High Confidence",
253
+ "confidence_factors": {
254
+ "evidence_quality": 35,
255
+ "reproduction_success": 0,
256
+ "independent_confirmations": 5,
257
+ "environmental_clarity": 15,
258
+ "manual_review_status": 0,
259
+ "memory_boost": 15,
260
+ "test_exemption": false,
261
+ "test_deduction": 0,
262
+ "total_score": 70,
263
+ "classification_band": "High Confidence"
264
+ }
265
+ },
266
+ {
267
+ "finding_id": "TG-DIFF-001-cb5ae7e9",
268
+ "rule_id": "TG-DIFF-001",
269
+ "title": "Accidental Security Check Bypass in Patch Additions",
270
+ "description": "Disabled Node.js TLS rejectUnauthorized",
271
+ "severity": "Critical",
272
+ "category": "transport",
273
+ "cluster": "cluster-transport-security",
274
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
275
+ "line_number": 172,
276
+ "matched_text": "rejectUnauthorized: false",
277
+ "snippet": " if \"typescript\" in stack_lower or \"javascript\" in stack_lower or \"next\" in stack_lower or \"express\" in stack_lower:\n sql_guards.append(\"Prisma / Drizzle binders\")\n bypass_guards.append(\"`rejectUnauthorized: false`\")\n\n if not sql_guards:",
278
+ "is_test": false,
279
+ "target": {
280
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
281
+ "start_line": 172,
282
+ "end_line": 172
283
+ },
284
+ "confidence_score": 70,
285
+ "confidence_band": "High Confidence",
286
+ "confidence_factors": {
287
+ "evidence_quality": 35,
288
+ "reproduction_success": 0,
289
+ "independent_confirmations": 5,
290
+ "environmental_clarity": 15,
291
+ "manual_review_status": 0,
292
+ "memory_boost": 15,
293
+ "test_exemption": false,
294
+ "test_deduction": 0,
295
+ "total_score": 70,
296
+ "classification_band": "High Confidence"
297
+ }
298
+ },
299
+ {
300
+ "finding_id": "TG-DIFF-001-0e4204af",
301
+ "rule_id": "TG-DIFF-001",
302
+ "title": "Accidental Security Check Bypass in Patch Additions",
303
+ "description": "Disabled PHP curl SSL verification",
304
+ "severity": "Critical",
305
+ "category": "transport",
306
+ "cluster": "cluster-transport-security",
307
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
308
+ "line_number": 169,
309
+ "matched_text": "CURLOPT_SSL_VERIFYPEER => false",
310
+ "snippet": " if \"php\" in stack_lower:\n sql_guards.append(\"PDO prepared statements / Eloquent\")\n bypass_guards.append(\"`CURLOPT_SSL_VERIFYPEER => false`\")\n if \"typescript\" in stack_lower or \"javascript\" in stack_lower or \"next\" in stack_lower or \"express\" in stack_lower:\n sql_guards.append(\"Prisma / Drizzle binders\")",
311
+ "is_test": false,
312
+ "target": {
313
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
314
+ "start_line": 169,
315
+ "end_line": 169
316
+ },
317
+ "confidence_score": 70,
318
+ "confidence_band": "High Confidence",
319
+ "confidence_factors": {
320
+ "evidence_quality": 35,
321
+ "reproduction_success": 0,
322
+ "independent_confirmations": 5,
323
+ "environmental_clarity": 15,
324
+ "manual_review_status": 0,
325
+ "memory_boost": 15,
326
+ "test_exemption": false,
327
+ "test_deduction": 0,
328
+ "total_score": 70,
329
+ "classification_band": "High Confidence"
330
+ }
331
+ },
332
+ {
333
+ "finding_id": "TG-SSRF-002-8378a839",
334
+ "rule_id": "TG-SSRF-002",
335
+ "title": "Missing Internal Network Protection",
336
+ "description": "Hardcoded internal loopback or cloud metadata endpoint target",
337
+ "severity": "Critical",
338
+ "category": "ssrf",
339
+ "cluster": "cluster-ssrf",
340
+ "file_path": "core/clustering.py",
341
+ "line_number": 53,
342
+ "matched_text": "127.0.0.1",
343
+ "snippet": " \"cluster_id\": \"cluster-ssrf-network\",\n \"title\": \"Unvalidated Outbound HTTP Requests & Network Boundary Leakage\",\n \"shared_remediation_path\": \"Validate destination URLs against strict allowlists and block internal IP ranges (127.0.0.1, 169.254.169.254).\",\n \"shared_verification_plan\": \"Attempt outbound requests to loopback and link-local metadata endpoints.\"\n },",
344
+ "is_test": false,
345
+ "target": {
346
+ "file_path": "core/clustering.py",
347
+ "start_line": 53,
348
+ "end_line": 53
349
+ },
350
+ "confidence_score": 65,
351
+ "confidence_band": "Medium Confidence",
352
+ "confidence_factors": {
353
+ "evidence_quality": 35,
354
+ "reproduction_success": 0,
355
+ "independent_confirmations": 5,
356
+ "environmental_clarity": 15,
357
+ "manual_review_status": 0,
358
+ "memory_boost": 10,
359
+ "test_exemption": false,
360
+ "test_deduction": 0,
361
+ "total_score": 65,
362
+ "classification_band": "Medium Confidence"
363
+ }
364
+ },
365
+ {
366
+ "finding_id": "TG-SSRF-002-d08ed1ca",
367
+ "rule_id": "TG-SSRF-002",
368
+ "title": "Missing Internal Network Protection",
369
+ "description": "Hardcoded internal loopback or cloud metadata endpoint target",
370
+ "severity": "Critical",
371
+ "category": "ssrf",
372
+ "cluster": "cluster-ssrf",
373
+ "file_path": "examples/hardened-react-express/client/vite.config.js",
374
+ "line_number": 7,
375
+ "matched_text": "localhost",
376
+ "snippet": " plugins: [react()],\n build: { sourcemap: false },\n server: { port: 5173, proxy: { '/api': 'http://localhost:3001' } },\n});",
377
+ "is_test": false,
378
+ "target": {
379
+ "file_path": "examples/hardened-react-express/client/vite.config.js",
380
+ "start_line": 7,
381
+ "end_line": 7
382
+ },
383
+ "confidence_score": 65,
384
+ "confidence_band": "Medium Confidence",
385
+ "confidence_factors": {
386
+ "evidence_quality": 35,
387
+ "reproduction_success": 0,
388
+ "independent_confirmations": 5,
389
+ "environmental_clarity": 15,
390
+ "manual_review_status": 0,
391
+ "memory_boost": 10,
392
+ "test_exemption": false,
393
+ "test_deduction": 0,
394
+ "total_score": 65,
395
+ "classification_band": "Medium Confidence"
396
+ }
397
+ },
398
+ {
399
+ "finding_id": "TG-SSRF-002-a79cf464",
400
+ "rule_id": "TG-SSRF-002",
401
+ "title": "Missing Internal Network Protection",
402
+ "description": "Hardcoded internal loopback or cloud metadata endpoint target",
403
+ "severity": "Critical",
404
+ "category": "ssrf",
405
+ "cluster": "cluster-ssrf",
406
+ "file_path": "examples/hardened-react-express/server/index.js",
407
+ "line_number": 121,
408
+ "matched_text": "localhost",
409
+ "snippet": "});\n\nseed().then(() => app.listen(PORT, () => console.log(`Hardened demo http://localhost:${PORT}`)));",
410
+ "is_test": false,
411
+ "target": {
412
+ "file_path": "examples/hardened-react-express/server/index.js",
413
+ "start_line": 121,
414
+ "end_line": 121
415
+ },
416
+ "confidence_score": 65,
417
+ "confidence_band": "Medium Confidence",
418
+ "confidence_factors": {
419
+ "evidence_quality": 35,
420
+ "reproduction_success": 0,
421
+ "independent_confirmations": 5,
422
+ "environmental_clarity": 15,
423
+ "manual_review_status": 0,
424
+ "memory_boost": 10,
425
+ "test_exemption": false,
426
+ "test_deduction": 0,
427
+ "total_score": 65,
428
+ "classification_band": "Medium Confidence"
429
+ }
430
+ },
431
+ {
432
+ "finding_id": "TG-SSRF-002-3c5a7c3c",
433
+ "rule_id": "TG-SSRF-002",
434
+ "title": "Missing Internal Network Protection",
435
+ "description": "Hardcoded internal loopback or cloud metadata endpoint target",
436
+ "severity": "Critical",
437
+ "category": "ssrf",
438
+ "cluster": "cluster-ssrf",
439
+ "file_path": "examples/vulnerable-react-express/client/src/App.jsx",
440
+ "line_number": 42,
441
+ "matched_text": "localhost",
442
+ "snippet": " <div style={{ maxWidth: 560, margin: '2rem auto', fontFamily: 'sans-serif' }}>\n <h1>Vulnerable Demo</h1>\n <p style={{ color: 'crimson' }}>Intentionally insecure \u2014 localhost lab only</p>\n\n <form onSubmit={login}>",
443
+ "is_test": false,
444
+ "target": {
445
+ "file_path": "examples/vulnerable-react-express/client/src/App.jsx",
446
+ "start_line": 42,
447
+ "end_line": 42
448
+ },
449
+ "confidence_score": 65,
450
+ "confidence_band": "Medium Confidence",
451
+ "confidence_factors": {
452
+ "evidence_quality": 35,
453
+ "reproduction_success": 0,
454
+ "independent_confirmations": 5,
455
+ "environmental_clarity": 15,
456
+ "manual_review_status": 0,
457
+ "memory_boost": 10,
458
+ "test_exemption": false,
459
+ "test_deduction": 0,
460
+ "total_score": 65,
461
+ "classification_band": "Medium Confidence"
462
+ }
463
+ },
464
+ {
465
+ "finding_id": "TG-SSRF-002-13c81e3a",
466
+ "rule_id": "TG-SSRF-002",
467
+ "title": "Missing Internal Network Protection",
468
+ "description": "Hardcoded internal loopback or cloud metadata endpoint target",
469
+ "severity": "Critical",
470
+ "category": "ssrf",
471
+ "cluster": "cluster-ssrf",
472
+ "file_path": "examples/vulnerable-react-express/client/src/config.js",
473
+ "line_number": 5,
474
+ "matched_text": "localhost",
475
+ "snippet": " apiUrl: import.meta.env.VITE_API_URL,\n // FAKE DEMO ONLY \u2014 never put real database URLs in client code\n demoDbUrl: 'postgresql://demo:FAKE_PASSWORD@localhost:5432/demo',\n};",
476
+ "is_test": false,
477
+ "target": {
478
+ "file_path": "examples/vulnerable-react-express/client/src/config.js",
479
+ "start_line": 5,
480
+ "end_line": 5
481
+ },
482
+ "confidence_score": 65,
483
+ "confidence_band": "Medium Confidence",
484
+ "confidence_factors": {
485
+ "evidence_quality": 35,
486
+ "reproduction_success": 0,
487
+ "independent_confirmations": 5,
488
+ "environmental_clarity": 15,
489
+ "manual_review_status": 0,
490
+ "memory_boost": 10,
491
+ "test_exemption": false,
492
+ "test_deduction": 0,
493
+ "total_score": 65,
494
+ "classification_band": "Medium Confidence"
495
+ }
496
+ },
497
+ {
498
+ "finding_id": "TG-SSRF-002-b0f87c06",
499
+ "rule_id": "TG-SSRF-002",
500
+ "title": "Missing Internal Network Protection",
501
+ "description": "Hardcoded internal loopback or cloud metadata endpoint target",
502
+ "severity": "Critical",
503
+ "category": "ssrf",
504
+ "cluster": "cluster-ssrf",
505
+ "file_path": "examples/vulnerable-react-express/client/vite.config.js",
506
+ "line_number": 10,
507
+ "matched_text": "localhost",
508
+ "snippet": " server: {\n port: 5173,\n proxy: { '/api': 'http://localhost:3001' },\n },\n});",
509
+ "is_test": false,
510
+ "target": {
511
+ "file_path": "examples/vulnerable-react-express/client/vite.config.js",
512
+ "start_line": 10,
513
+ "end_line": 10
514
+ },
515
+ "confidence_score": 65,
516
+ "confidence_band": "Medium Confidence",
517
+ "confidence_factors": {
518
+ "evidence_quality": 35,
519
+ "reproduction_success": 0,
520
+ "independent_confirmations": 5,
521
+ "environmental_clarity": 15,
522
+ "manual_review_status": 0,
523
+ "memory_boost": 10,
524
+ "test_exemption": false,
525
+ "test_deduction": 0,
526
+ "total_score": 65,
527
+ "classification_band": "Medium Confidence"
528
+ }
529
+ },
530
+ {
531
+ "finding_id": "TG-SSRF-002-ee77c629",
532
+ "rule_id": "TG-SSRF-002",
533
+ "title": "Missing Internal Network Protection",
534
+ "description": "Hardcoded internal loopback or cloud metadata endpoint target",
535
+ "severity": "Critical",
536
+ "category": "ssrf",
537
+ "cluster": "cluster-ssrf",
538
+ "file_path": "examples/vulnerable-react-express/server/index.js",
539
+ "line_number": 82,
540
+ "matched_text": "localhost",
541
+ "snippet": "});\n\napp.listen(PORT, () => console.log(`Vulnerable demo server http://localhost:${PORT}`));",
542
+ "is_test": false,
543
+ "target": {
544
+ "file_path": "examples/vulnerable-react-express/server/index.js",
545
+ "start_line": 82,
546
+ "end_line": 82
547
+ },
548
+ "confidence_score": 65,
549
+ "confidence_band": "Medium Confidence",
550
+ "confidence_factors": {
551
+ "evidence_quality": 35,
552
+ "reproduction_success": 0,
553
+ "independent_confirmations": 5,
554
+ "environmental_clarity": 15,
555
+ "manual_review_status": 0,
556
+ "memory_boost": 10,
557
+ "test_exemption": false,
558
+ "test_deduction": 0,
559
+ "total_score": 65,
560
+ "classification_band": "Medium Confidence"
561
+ }
562
+ },
563
+ {
564
+ "finding_id": "TG-SSRF-002-a0d1eac8",
565
+ "rule_id": "TG-SSRF-002",
566
+ "title": "Missing Internal Network Protection",
567
+ "description": "Hardcoded internal loopback or cloud metadata endpoint target",
568
+ "severity": "Critical",
569
+ "category": "ssrf",
570
+ "cluster": "cluster-ssrf",
571
+ "file_path": "skills/torusguard/payload/config/scope.json",
572
+ "line_number": 4,
573
+ "matched_text": "localhost",
574
+ "snippet": " \"$schema\": \"../schemas/authorization.schema.json\",\n \"authorization\": {\n \"target\": \"localhost\",\n \"owner_confirmed\": false,\n \"scope_type\": \"source_code_only\",",
575
+ "is_test": false,
576
+ "target": {
577
+ "file_path": "skills/torusguard/payload/config/scope.json",
578
+ "start_line": 4,
579
+ "end_line": 4
580
+ },
581
+ "confidence_score": 65,
582
+ "confidence_band": "Medium Confidence",
583
+ "confidence_factors": {
584
+ "evidence_quality": 35,
585
+ "reproduction_success": 0,
586
+ "independent_confirmations": 5,
587
+ "environmental_clarity": 15,
588
+ "manual_review_status": 0,
589
+ "memory_boost": 10,
590
+ "test_exemption": false,
591
+ "test_deduction": 0,
592
+ "total_score": 65,
593
+ "classification_band": "Medium Confidence"
594
+ }
595
+ },
596
+ {
597
+ "finding_id": "TG-SSRF-002-3ead2e3d",
598
+ "rule_id": "TG-SSRF-002",
599
+ "title": "Missing Internal Network Protection",
600
+ "description": "Hardcoded internal loopback or cloud metadata endpoint target",
601
+ "severity": "Critical",
602
+ "category": "ssrf",
603
+ "cluster": "cluster-ssrf",
604
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
605
+ "line_number": 208,
606
+ "matched_text": "localhost",
607
+ "snippet": " fix_explanation = \"Replaced wildcard CORS configuration with strict origin whitelist environment variable\"\n elif \"cors(\" in target_line and (\"origin: '*'\" in target_line or 'origin: \"*\"' in target_line):\n fixed_line = target_line.replace(\"origin: '*'\", \"origin: process.env.ALLOWED_ORIGIN || 'http://localhost:5173'\")\n fixed_line = fixed_line.replace('origin: \"*\"', \"origin: process.env.ALLOWED_ORIGIN || 'http://localhost:5173'\")\n if fixed_line != target_line:",
608
+ "is_test": false,
609
+ "target": {
610
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
611
+ "start_line": 208,
612
+ "end_line": 208
613
+ },
614
+ "confidence_score": 65,
615
+ "confidence_band": "Medium Confidence",
616
+ "confidence_factors": {
617
+ "evidence_quality": 35,
618
+ "reproduction_success": 0,
619
+ "independent_confirmations": 5,
620
+ "environmental_clarity": 15,
621
+ "manual_review_status": 0,
622
+ "memory_boost": 10,
623
+ "test_exemption": false,
624
+ "test_deduction": 0,
625
+ "total_score": 65,
626
+ "classification_band": "Medium Confidence"
627
+ }
628
+ },
629
+ {
630
+ "finding_id": "TG-SSRF-004-dcf3f71e",
631
+ "rule_id": "TG-SSRF-004",
632
+ "title": "Unbounded Outbound Request Without Timeout",
633
+ "description": "Python requests call without explicit timeout parameter",
634
+ "severity": "Critical",
635
+ "category": "ssrf",
636
+ "cluster": "cluster-ssrf",
637
+ "file_path": "examples/python/fastapi-hardened/main.py",
638
+ "line_number": 30,
639
+ "matched_text": "requests.get(url, timeout=5)",
640
+ "snippet": " if not is_safe_url(url):\n raise HTTPException(status_code=400, detail=\"Invalid destination address\")\n response = requests.get(url, timeout=5)\n return {\"status\": response.status_code, \"content\": response.text}\n",
641
+ "is_test": false,
642
+ "target": {
643
+ "file_path": "examples/python/fastapi-hardened/main.py",
644
+ "start_line": 30,
645
+ "end_line": 30
646
+ },
647
+ "confidence_score": 55,
648
+ "confidence_band": "Medium Confidence",
649
+ "confidence_factors": {
650
+ "evidence_quality": 35,
651
+ "reproduction_success": 0,
652
+ "independent_confirmations": 5,
653
+ "environmental_clarity": 15,
654
+ "manual_review_status": 0,
655
+ "memory_boost": 0,
656
+ "test_exemption": false,
657
+ "test_deduction": 0,
658
+ "total_score": 55,
659
+ "classification_band": "Medium Confidence"
660
+ }
661
+ },
662
+ {
663
+ "finding_id": "TG-SSRF-004-d8472223",
664
+ "rule_id": "TG-SSRF-004",
665
+ "title": "Unbounded Outbound Request Without Timeout",
666
+ "description": "Python requests call without explicit timeout parameter",
667
+ "severity": "Critical",
668
+ "category": "ssrf",
669
+ "cluster": "cluster-ssrf",
670
+ "file_path": "examples/python/fastapi-vuln/main.py",
671
+ "line_number": 9,
672
+ "matched_text": "requests.get(url)",
673
+ "snippet": "@app.get(\"/fetch\")\ndef fetch_url(url: str):\n response = requests.get(url)\n return {\"status\": response.status_code, \"content\": response.text}\n",
674
+ "is_test": false,
675
+ "target": {
676
+ "file_path": "examples/python/fastapi-vuln/main.py",
677
+ "start_line": 9,
678
+ "end_line": 9
679
+ },
680
+ "confidence_score": 55,
681
+ "confidence_band": "Medium Confidence",
682
+ "confidence_factors": {
683
+ "evidence_quality": 35,
684
+ "reproduction_success": 0,
685
+ "independent_confirmations": 5,
686
+ "environmental_clarity": 15,
687
+ "manual_review_status": 0,
688
+ "memory_boost": 0,
689
+ "test_exemption": false,
690
+ "test_deduction": 0,
691
+ "total_score": 55,
692
+ "classification_band": "Medium Confidence"
693
+ }
694
+ },
695
+ {
696
+ "finding_id": "TG-SSRF-004-4ac97262",
697
+ "rule_id": "TG-SSRF-004",
698
+ "title": "Unbounded Outbound Request Without Timeout",
699
+ "description": "Python requests call without explicit timeout parameter",
700
+ "severity": "Critical",
701
+ "category": "ssrf",
702
+ "cluster": "cluster-ssrf",
703
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
704
+ "line_number": 341,
705
+ "matched_text": "requests.get(validate_safe_url(\\1)",
706
+ "snippet": " fix_explanation = \"Wrapped outbound URL in validateSafeUrl domain whitelist guard\"\n elif \"requests.get(\" in target_line and \"validate_url(\" not in target_line:\n fixed_line = re.sub(r'requests\\.get\\(\\s*([^,\\)]+)', r'requests.get(validate_safe_url(\\1)', target_line)\n if fixed_line != target_line:\n new_lines[line_number - 1] = fixed_line",
707
+ "is_test": false,
708
+ "target": {
709
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
710
+ "start_line": 341,
711
+ "end_line": 341
712
+ },
713
+ "confidence_score": 55,
714
+ "confidence_band": "Medium Confidence",
715
+ "confidence_factors": {
716
+ "evidence_quality": 35,
717
+ "reproduction_success": 0,
718
+ "independent_confirmations": 5,
719
+ "environmental_clarity": 15,
720
+ "manual_review_status": 0,
721
+ "memory_boost": 0,
722
+ "test_exemption": false,
723
+ "test_deduction": 0,
724
+ "total_score": 55,
725
+ "classification_band": "Medium Confidence"
726
+ }
727
+ },
728
+ {
729
+ "finding_id": "TG-GQL-004-a6ecb0bb",
730
+ "rule_id": "TG-GQL-004",
731
+ "title": "Unnecessary Production Introspection",
732
+ "description": "GraphQL schema introspection enabled in configuration",
733
+ "severity": "Critical",
734
+ "category": "gql",
735
+ "cluster": "cluster-graphql",
736
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
737
+ "line_number": 365,
738
+ "matched_text": "introspection: true",
739
+ "snippet": " # Strategy 18: Production Introspection Disablement (TG-GQL-004)\n elif rule_id == \"TG-GQL-004\":\n if \"introspection: true\" in target_line or \"introspection: True\" in target_line:\n fixed_line = re.sub(r'introspection\\s*:\\s*(?:true|True)', 'introspection: process.env.NODE_ENV !== \"production\"', target_line)\n new_lines[line_number - 1] = fixed_line",
740
+ "is_test": false,
741
+ "target": {
742
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
743
+ "start_line": 365,
744
+ "end_line": 365
745
+ },
746
+ "confidence_score": 55,
747
+ "confidence_band": "Medium Confidence",
748
+ "confidence_factors": {
749
+ "evidence_quality": 35,
750
+ "reproduction_success": 0,
751
+ "independent_confirmations": 5,
752
+ "environmental_clarity": 15,
753
+ "manual_review_status": 0,
754
+ "memory_boost": 0,
755
+ "test_exemption": false,
756
+ "test_deduction": 0,
757
+ "total_score": 55,
758
+ "classification_band": "Medium Confidence"
759
+ }
760
+ },
761
+ {
762
+ "finding_id": "TG-INPUT-003-fea9421e",
763
+ "rule_id": "TG-INPUT-003",
764
+ "title": "Unsafe Dynamic Code or HTML Execution",
765
+ "description": "React dangerouslySetInnerHTML rendering raw unescaped HTML",
766
+ "severity": "High",
767
+ "category": "injection",
768
+ "cluster": "cluster-injection",
769
+ "file_path": "examples/vulnerable-react-express/client/src/App.jsx",
770
+ "line_number": 53,
771
+ "matched_text": "dangerouslySetInnerHTML=",
772
+ "snippet": "\n {/* TG-INPUT-003: Unsafe HTML rendering */}\n <div dangerouslySetInnerHTML={{ __html: bio }} />\n\n <button onClick={fetchUser}>Fetch user (IDOR demo)</button>",
773
+ "is_test": false,
774
+ "target": {
775
+ "file_path": "examples/vulnerable-react-express/client/src/App.jsx",
776
+ "start_line": 53,
777
+ "end_line": 53
778
+ },
779
+ "confidence_score": 80,
780
+ "confidence_band": "High Confidence",
781
+ "confidence_factors": {
782
+ "evidence_quality": 35,
783
+ "reproduction_success": 0,
784
+ "independent_confirmations": 5,
785
+ "environmental_clarity": 15,
786
+ "manual_review_status": 0,
787
+ "memory_boost": 25,
788
+ "test_exemption": false,
789
+ "test_deduction": 0,
790
+ "total_score": 80,
791
+ "classification_band": "High Confidence"
792
+ }
793
+ },
794
+ {
795
+ "finding_id": "TG-PLATFORM-001-7dd35cb4",
796
+ "rule_id": "TG-PLATFORM-001",
797
+ "title": "Wildcard CORS With Credentials",
798
+ "description": "Wildcard CORS origin configured in Express middleware",
799
+ "severity": "High",
800
+ "category": "platform",
801
+ "cluster": "cluster-auth-bypass",
802
+ "file_path": "examples/vulnerable-react-express/server/index.js",
803
+ "line_number": 12,
804
+ "matched_text": "cors({ origin: '*'",
805
+ "snippet": "\n// TG-PLATFORM-001: Wildcard CORS with credentials\napp.use(cors({ origin: '*', credentials: true }));\n\n// TG-PLATFORM-004: No explicit JSON body size limit",
806
+ "is_test": false,
807
+ "target": {
808
+ "file_path": "examples/vulnerable-react-express/server/index.js",
809
+ "start_line": 12,
810
+ "end_line": 12
811
+ },
812
+ "confidence_score": 80,
813
+ "confidence_band": "High Confidence",
814
+ "confidence_factors": {
815
+ "evidence_quality": 35,
816
+ "reproduction_success": 0,
817
+ "independent_confirmations": 5,
818
+ "environmental_clarity": 15,
819
+ "manual_review_status": 0,
820
+ "memory_boost": 25,
821
+ "test_exemption": false,
822
+ "test_deduction": 0,
823
+ "total_score": 80,
824
+ "classification_band": "High Confidence"
825
+ }
826
+ },
827
+ {
828
+ "finding_id": "TG-PLATFORM-001-1a813dde",
829
+ "rule_id": "TG-PLATFORM-001",
830
+ "title": "Wildcard CORS With Credentials",
831
+ "description": "Wildcard CORS origin enabled across entire application",
832
+ "severity": "High",
833
+ "category": "platform",
834
+ "cluster": "cluster-auth-bypass",
835
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
836
+ "line_number": 202,
837
+ "matched_text": "CORS_ALLOW_ALL_ORIGINS = True",
838
+ "snippet": " # Strategy 5: Permissive CORS with Credentials (TG-PLATFORM-001)\n elif rule_id == \"TG-PLATFORM-001\":\n if \"CORS_ALLOW_ALL_ORIGINS = True\" in target_line:\n replacement = f'{indent}CORS_ALLOWED_ORIGINS = [os.environ.get(\"ALLOWED_ORIGIN\", \"https://app.example.com\")]'\n new_lines[line_number - 1] = replacement",
839
+ "is_test": false,
840
+ "target": {
841
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
842
+ "start_line": 202,
843
+ "end_line": 202
844
+ },
845
+ "confidence_score": 80,
846
+ "confidence_band": "High Confidence",
847
+ "confidence_factors": {
848
+ "evidence_quality": 35,
849
+ "reproduction_success": 0,
850
+ "independent_confirmations": 5,
851
+ "environmental_clarity": 15,
852
+ "manual_review_status": 0,
853
+ "memory_boost": 25,
854
+ "test_exemption": false,
855
+ "test_deduction": 0,
856
+ "total_score": 80,
857
+ "classification_band": "High Confidence"
858
+ }
859
+ },
860
+ {
861
+ "finding_id": "TG-AUTH-004-f60870ef",
862
+ "rule_id": "TG-AUTH-004",
863
+ "title": "Insecure Session Cookie Configuration",
864
+ "description": "Decorator disabling route-level authentication or CSRF protection",
865
+ "severity": "High",
866
+ "category": "auth",
867
+ "cluster": "cluster-auth-bypass",
868
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
869
+ "line_number": 180,
870
+ "matched_text": "@csrf_exempt",
871
+ "snippet": "\n if not bypass_guards:\n bypass_rule = \"4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, `@csrf_exempt`, or `bypass_auth=True`.\"\n else:\n bypass_rule = f\"4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, or {', '.join(bypass_guards[:2])}.\"",
872
+ "is_test": false,
873
+ "target": {
874
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
875
+ "start_line": 180,
876
+ "end_line": 180
877
+ },
878
+ "confidence_score": 70,
879
+ "confidence_band": "High Confidence",
880
+ "confidence_factors": {
881
+ "evidence_quality": 35,
882
+ "reproduction_success": 0,
883
+ "independent_confirmations": 5,
884
+ "environmental_clarity": 15,
885
+ "manual_review_status": 0,
886
+ "memory_boost": 15,
887
+ "test_exemption": false,
888
+ "test_deduction": 0,
889
+ "total_score": 70,
890
+ "classification_band": "High Confidence"
891
+ }
892
+ },
893
+ {
894
+ "finding_id": "TG-AUTH-004-6b0c7ebf",
895
+ "rule_id": "TG-AUTH-004",
896
+ "title": "Insecure Session Cookie Configuration",
897
+ "description": "Attribute disabling ASP.NET authentication",
898
+ "severity": "High",
899
+ "category": "auth",
900
+ "cluster": "cluster-auth-bypass",
901
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
902
+ "line_number": 166,
903
+ "matched_text": "[AllowAnonymous]",
904
+ "snippet": " if \"c#\" in stack_lower or \"dotnet\" in stack_lower:\n sql_guards.append(\"EF Core LINQ / `FromSqlInterpolated`\")\n bypass_guards.append(\"`[AllowAnonymous]`\")\n if \"php\" in stack_lower:\n sql_guards.append(\"PDO prepared statements / Eloquent\")",
905
+ "is_test": false,
906
+ "target": {
907
+ "file_path": "skills/torusguard/payload/scripts/rules_sync.py",
908
+ "start_line": 166,
909
+ "end_line": 166
910
+ },
911
+ "confidence_score": 70,
912
+ "confidence_band": "High Confidence",
913
+ "confidence_factors": {
914
+ "evidence_quality": 35,
915
+ "reproduction_success": 0,
916
+ "independent_confirmations": 5,
917
+ "environmental_clarity": 15,
918
+ "manual_review_status": 0,
919
+ "memory_boost": 15,
920
+ "test_exemption": false,
921
+ "test_deduction": 0,
922
+ "total_score": 70,
923
+ "classification_band": "High Confidence"
924
+ }
925
+ },
926
+ {
927
+ "finding_id": "TG-INPUT-001-c7457f38",
928
+ "rule_id": "TG-INPUT-001",
929
+ "title": "Missing Server-Side Request Validation",
930
+ "description": "Destructuring unvalidated req.body without schema validation",
931
+ "severity": "High",
932
+ "category": "injection",
933
+ "cluster": "cluster-injection",
934
+ "file_path": "examples/vulnerable-react-express/server/index.js",
935
+ "line_number": 27,
936
+ "matched_text": "const { email, password } = req.body;",
937
+ "snippet": "// TG-AUTH-004: Insecure cookie (no httpOnly/Secure/SameSite)\napp.post('/api/login', (req, res) => {\n const { email, password } = req.body;\n console.log('Login attempt:', { email, password }); // TG-SEC-004\n const user = users.find((u) => u.email === email && u.password === password);",
938
+ "is_test": false,
939
+ "target": {
940
+ "file_path": "examples/vulnerable-react-express/server/index.js",
941
+ "start_line": 27,
942
+ "end_line": 27
943
+ },
944
+ "confidence_score": 65,
945
+ "confidence_band": "Medium Confidence",
946
+ "confidence_factors": {
947
+ "evidence_quality": 35,
948
+ "reproduction_success": 0,
949
+ "independent_confirmations": 5,
950
+ "environmental_clarity": 15,
951
+ "manual_review_status": 0,
952
+ "memory_boost": 10,
953
+ "test_exemption": false,
954
+ "test_deduction": 0,
955
+ "total_score": 65,
956
+ "classification_band": "Medium Confidence"
957
+ }
958
+ },
959
+ {
960
+ "finding_id": "TG-RATE-001-dcd0a3c7",
961
+ "rule_id": "TG-RATE-001",
962
+ "title": "Unlimited Authentication Endpoint",
963
+ "description": "Authentication POST endpoint defined without rate-limiting middleware",
964
+ "severity": "High",
965
+ "category": "rate",
966
+ "cluster": "cluster-rate-limiting",
967
+ "file_path": "examples/vulnerable-react-express/server/index.js",
968
+ "line_number": 26,
969
+ "matched_text": "app.post('/api/login', (",
970
+ "snippet": "// TG-SEC-004: Logs sensitive data\n// TG-AUTH-004: Insecure cookie (no httpOnly/Secure/SameSite)\napp.post('/api/login', (req, res) => {\n const { email, password } = req.body;\n console.log('Login attempt:', { email, password }); // TG-SEC-004",
971
+ "is_test": false,
972
+ "target": {
973
+ "file_path": "examples/vulnerable-react-express/server/index.js",
974
+ "start_line": 26,
975
+ "end_line": 26
976
+ },
977
+ "confidence_score": 65,
978
+ "confidence_band": "Medium Confidence",
979
+ "confidence_factors": {
980
+ "evidence_quality": 35,
981
+ "reproduction_success": 0,
982
+ "independent_confirmations": 5,
983
+ "environmental_clarity": 15,
984
+ "manual_review_status": 0,
985
+ "memory_boost": 10,
986
+ "test_exemption": false,
987
+ "test_deduction": 0,
988
+ "total_score": 65,
989
+ "classification_band": "Medium Confidence"
990
+ }
991
+ },
992
+ {
993
+ "finding_id": "TG-AUTH-003-6a05e509",
994
+ "rule_id": "TG-AUTH-003",
995
+ "title": "Missing Object-Level Authorization (IDOR)",
996
+ "description": "JWT verification missing explicit algorithms restriction parameter",
997
+ "severity": "High",
998
+ "category": "auth",
999
+ "cluster": "cluster-auth-bypass",
1000
+ "file_path": "examples/hardened-react-express/server/index.js",
1001
+ "line_number": 49,
1002
+ "matched_text": "jwt.verify(token, process.env.JWT_SECRET)",
1003
+ "snippet": " if (!token) return res.status(401).json({ error: 'Unauthorized' });\n try {\n req.user = jwt.verify(token, process.env.JWT_SECRET);\n next();\n } catch {",
1004
+ "is_test": false,
1005
+ "target": {
1006
+ "file_path": "examples/hardened-react-express/server/index.js",
1007
+ "start_line": 49,
1008
+ "end_line": 49
1009
+ },
1010
+ "confidence_score": 55,
1011
+ "confidence_band": "Medium Confidence",
1012
+ "confidence_factors": {
1013
+ "evidence_quality": 35,
1014
+ "reproduction_success": 0,
1015
+ "independent_confirmations": 5,
1016
+ "environmental_clarity": 15,
1017
+ "manual_review_status": 0,
1018
+ "memory_boost": 0,
1019
+ "test_exemption": false,
1020
+ "test_deduction": 0,
1021
+ "total_score": 55,
1022
+ "classification_band": "Medium Confidence"
1023
+ }
1024
+ },
1025
+ {
1026
+ "finding_id": "TG-SEC-004-dbbc17f7",
1027
+ "rule_id": "TG-SEC-004",
1028
+ "title": "Sensitive Information in Logs",
1029
+ "description": "Plaintext credential or token logged to output sink",
1030
+ "severity": "Medium",
1031
+ "category": "secrets",
1032
+ "cluster": "cluster-credentials-exposure",
1033
+ "file_path": "examples/vulnerable-react-express/client/src/App.jsx",
1034
+ "line_number": 30,
1035
+ "matched_text": "console.log('Login token:', data.token, 'config:', clientConfig)",
1036
+ "snippet": " const data = await res.json();\n // TG-CLIENT-002: Sensitive console logging\n console.log('Login token:', data.token, 'config:', clientConfig);\n setMessage(JSON.stringify(data));\n }",
1037
+ "is_test": false,
1038
+ "target": {
1039
+ "file_path": "examples/vulnerable-react-express/client/src/App.jsx",
1040
+ "start_line": 30,
1041
+ "end_line": 30
1042
+ },
1043
+ "confidence_score": 70,
1044
+ "confidence_band": "High Confidence",
1045
+ "confidence_factors": {
1046
+ "evidence_quality": 35,
1047
+ "reproduction_success": 0,
1048
+ "independent_confirmations": 5,
1049
+ "environmental_clarity": 15,
1050
+ "manual_review_status": 0,
1051
+ "memory_boost": 15,
1052
+ "test_exemption": false,
1053
+ "test_deduction": 0,
1054
+ "total_score": 70,
1055
+ "classification_band": "High Confidence"
1056
+ }
1057
+ },
1058
+ {
1059
+ "finding_id": "TG-SEC-004-08753da5",
1060
+ "rule_id": "TG-SEC-004",
1061
+ "title": "Sensitive Information in Logs",
1062
+ "description": "Plaintext credential or token logged to output sink",
1063
+ "severity": "Medium",
1064
+ "category": "secrets",
1065
+ "cluster": "cluster-credentials-exposure",
1066
+ "file_path": "examples/vulnerable-react-express/server/index.js",
1067
+ "line_number": 28,
1068
+ "matched_text": "console.log('Login attempt:', { email, password })",
1069
+ "snippet": "app.post('/api/login', (req, res) => {\n const { email, password } = req.body;\n console.log('Login attempt:', { email, password }); // TG-SEC-004\n const user = users.find((u) => u.email === email && u.password === password);\n if (!user) return res.status(401).json({ error: 'User not found' }); // enumeration",
1070
+ "is_test": false,
1071
+ "target": {
1072
+ "file_path": "examples/vulnerable-react-express/server/index.js",
1073
+ "start_line": 28,
1074
+ "end_line": 28
1075
+ },
1076
+ "confidence_score": 70,
1077
+ "confidence_band": "High Confidence",
1078
+ "confidence_factors": {
1079
+ "evidence_quality": 35,
1080
+ "reproduction_success": 0,
1081
+ "independent_confirmations": 5,
1082
+ "environmental_clarity": 15,
1083
+ "manual_review_status": 0,
1084
+ "memory_boost": 15,
1085
+ "test_exemption": false,
1086
+ "test_deduction": 0,
1087
+ "total_score": 70,
1088
+ "classification_band": "High Confidence"
1089
+ }
1090
+ },
1091
+ {
1092
+ "finding_id": "TG-PLATFORM-002-1f383dcf",
1093
+ "rule_id": "TG-PLATFORM-002",
1094
+ "title": "Missing Security Headers",
1095
+ "description": "Express application initialized without helmet security headers middleware",
1096
+ "severity": "Medium",
1097
+ "category": "platform",
1098
+ "cluster": "cluster-platform",
1099
+ "file_path": "examples/hardened-react-express/server/index.js",
1100
+ "line_number": 17,
1101
+ "matched_text": "const app = express();",
1102
+ "snippet": "}\n\nconst app = express();\nconst PORT = 3001;\nconst isProd = process.env.NODE_ENV === 'production';",
1103
+ "is_test": false,
1104
+ "target": {
1105
+ "file_path": "examples/hardened-react-express/server/index.js",
1106
+ "start_line": 17,
1107
+ "end_line": 17
1108
+ },
1109
+ "confidence_score": 65,
1110
+ "confidence_band": "Medium Confidence",
1111
+ "confidence_factors": {
1112
+ "evidence_quality": 35,
1113
+ "reproduction_success": 0,
1114
+ "independent_confirmations": 5,
1115
+ "environmental_clarity": 15,
1116
+ "manual_review_status": 0,
1117
+ "memory_boost": 10,
1118
+ "test_exemption": false,
1119
+ "test_deduction": 0,
1120
+ "total_score": 65,
1121
+ "classification_band": "Medium Confidence"
1122
+ }
1123
+ },
1124
+ {
1125
+ "finding_id": "TG-CLIENT-001-1ba4789e",
1126
+ "rule_id": "TG-CLIENT-001",
1127
+ "title": "Public Production Source Maps",
1128
+ "description": "Build config emitting unminified source maps in production output",
1129
+ "severity": "Medium",
1130
+ "category": "client",
1131
+ "cluster": "cluster-client-leak",
1132
+ "file_path": "examples/vulnerable-react-express/client/vite.config.js",
1133
+ "line_number": 7,
1134
+ "matched_text": "sourcemap: true",
1135
+ "snippet": "export default defineConfig({\n plugins: [react()],\n build: { sourcemap: true },\n server: {\n port: 5173,",
1136
+ "is_test": false,
1137
+ "target": {
1138
+ "file_path": "examples/vulnerable-react-express/client/vite.config.js",
1139
+ "start_line": 7,
1140
+ "end_line": 7
1141
+ },
1142
+ "confidence_score": 65,
1143
+ "confidence_band": "Medium Confidence",
1144
+ "confidence_factors": {
1145
+ "evidence_quality": 35,
1146
+ "reproduction_success": 0,
1147
+ "independent_confirmations": 5,
1148
+ "environmental_clarity": 15,
1149
+ "manual_review_status": 0,
1150
+ "memory_boost": 10,
1151
+ "test_exemption": false,
1152
+ "test_deduction": 0,
1153
+ "total_score": 65,
1154
+ "classification_band": "Medium Confidence"
1155
+ }
1156
+ },
1157
+ {
1158
+ "finding_id": "TG-RATE-002-d67d7c98",
1159
+ "rule_id": "TG-RATE-002",
1160
+ "title": "Unlimited Public Write Endpoint",
1161
+ "description": "Public submission endpoint defined without rate-limiting or captcha defense",
1162
+ "severity": "Medium",
1163
+ "category": "rate",
1164
+ "cluster": "cluster-rate-limiting",
1165
+ "file_path": "examples/vulnerable-react-express/server/index.js",
1166
+ "line_number": 54,
1167
+ "matched_text": "app.post('/api/contact', (",
1168
+ "snippet": "// TG-INPUT-001: No validation\n// TG-RATE-002: Unlimited contact endpoint\napp.post('/api/contact', (req, res) => {\n res.json({ received: req.body });\n});",
1169
+ "is_test": false,
1170
+ "target": {
1171
+ "file_path": "examples/vulnerable-react-express/server/index.js",
1172
+ "start_line": 54,
1173
+ "end_line": 54
1174
+ },
1175
+ "confidence_score": 65,
1176
+ "confidence_band": "Medium Confidence",
1177
+ "confidence_factors": {
1178
+ "evidence_quality": 35,
1179
+ "reproduction_success": 0,
1180
+ "independent_confirmations": 5,
1181
+ "environmental_clarity": 15,
1182
+ "manual_review_status": 0,
1183
+ "memory_boost": 10,
1184
+ "test_exemption": false,
1185
+ "test_deduction": 0,
1186
+ "total_score": 65,
1187
+ "classification_band": "Medium Confidence"
1188
+ }
1189
+ },
1190
+ {
1191
+ "finding_id": "TG-PLATFORM-002-eef342ec",
1192
+ "rule_id": "TG-PLATFORM-002",
1193
+ "title": "Missing Security Headers",
1194
+ "description": "Express application initialized without helmet security headers middleware",
1195
+ "severity": "Medium",
1196
+ "category": "platform",
1197
+ "cluster": "cluster-platform",
1198
+ "file_path": "examples/vulnerable-react-express/server/index.js",
1199
+ "line_number": 5,
1200
+ "matched_text": "const app = express();",
1201
+ "snippet": "const jwt = require('jsonwebtoken');\n\nconst app = express();\nconst PORT = 3001;\n",
1202
+ "is_test": false,
1203
+ "target": {
1204
+ "file_path": "examples/vulnerable-react-express/server/index.js",
1205
+ "start_line": 5,
1206
+ "end_line": 5
1207
+ },
1208
+ "confidence_score": 65,
1209
+ "confidence_band": "Medium Confidence",
1210
+ "confidence_factors": {
1211
+ "evidence_quality": 35,
1212
+ "reproduction_success": 0,
1213
+ "independent_confirmations": 5,
1214
+ "environmental_clarity": 15,
1215
+ "manual_review_status": 0,
1216
+ "memory_boost": 10,
1217
+ "test_exemption": false,
1218
+ "test_deduction": 0,
1219
+ "total_score": 65,
1220
+ "classification_band": "Medium Confidence"
1221
+ }
1222
+ },
1223
+ {
1224
+ "finding_id": "TG-PLATFORM-003-f5fce823",
1225
+ "rule_id": "TG-PLATFORM-003",
1226
+ "title": "Production Stack Trace Exposure",
1227
+ "description": "Django DEBUG mode enabled in configuration",
1228
+ "severity": "Medium",
1229
+ "category": "platform",
1230
+ "cluster": "cluster-platform",
1231
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
1232
+ "line_number": 357,
1233
+ "matched_text": "DEBUG = True",
1234
+ "snippet": " # Strategy 17: Production Debug Mode Disablement (TG-PLATFORM-003)\n elif rule_id == \"TG-PLATFORM-003\":\n if \"DEBUG = True\" in target_line:\n fixed_line = f'{indent}DEBUG = os.environ.get(\"DJANGO_DEBUG\", \"False\").lower() in (\"true\", \"1\")'\n new_lines[line_number - 1] = fixed_line",
1235
+ "is_test": false,
1236
+ "target": {
1237
+ "file_path": "skills/torusguard/payload/scripts/harden_runner.py",
1238
+ "start_line": 357,
1239
+ "end_line": 357
1240
+ },
1241
+ "confidence_score": 55,
1242
+ "confidence_band": "Medium Confidence",
1243
+ "confidence_factors": {
1244
+ "evidence_quality": 35,
1245
+ "reproduction_success": 0,
1246
+ "independent_confirmations": 5,
1247
+ "environmental_clarity": 15,
1248
+ "manual_review_status": 0,
1249
+ "memory_boost": 0,
1250
+ "test_exemption": false,
1251
+ "test_deduction": 0,
1252
+ "total_score": 55,
1253
+ "classification_band": "Medium Confidence"
1254
+ }
1255
+ }
1256
+ ]