torusguard 1.3.2 → 1.3.4

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 (131) hide show
  1. package/.torusguard/runs/report-latest.html +3 -3
  2. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-115-9a059e/metadata.json +15 -0
  3. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-115-9a059e/minimal_patch_plan.md +21 -0
  4. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-115-9a059e/patch.diff +9 -0
  5. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-119-61557c/metadata.json +15 -0
  6. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-119-61557c/minimal_patch_plan.md +21 -0
  7. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-119-61557c/patch.diff +9 -0
  8. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-265-996ca3/metadata.json +15 -0
  9. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-265-996ca3/minimal_patch_plan.md +21 -0
  10. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-265-996ca3/patch.diff +9 -0
  11. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-503-d11cf8/metadata.json +15 -0
  12. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-503-d11cf8/minimal_patch_plan.md +21 -0
  13. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-503-d11cf8/patch.diff +9 -0
  14. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-79-91f41f/metadata.json +15 -0
  15. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-79-91f41f/minimal_patch_plan.md +21 -0
  16. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-79-91f41f/patch.diff +9 -0
  17. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-107-516a40/metadata.json +15 -0
  18. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-107-516a40/minimal_patch_plan.md +21 -0
  19. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-107-516a40/patch.diff +9 -0
  20. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-128-7809a1/metadata.json +15 -0
  21. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-128-7809a1/minimal_patch_plan.md +21 -0
  22. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-128-7809a1/patch.diff +9 -0
  23. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-256-c8a22e/metadata.json +15 -0
  24. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-256-c8a22e/minimal_patch_plan.md +21 -0
  25. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-256-c8a22e/patch.diff +9 -0
  26. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-003-53-d167b4/metadata.json +15 -0
  27. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-003-53-d167b4/minimal_patch_plan.md +21 -0
  28. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-003-53-d167b4/patch.diff +9 -0
  29. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-platform-001-183-47fd5e/metadata.json +15 -0
  30. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-platform-001-183-47fd5e/minimal_patch_plan.md +21 -0
  31. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-platform-001-183-47fd5e/patch.diff +9 -0
  32. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-209-4f6424/metadata.json +15 -0
  33. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-209-4f6424/minimal_patch_plan.md +21 -0
  34. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-209-4f6424/patch.diff +9 -0
  35. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-257-89bf34/metadata.json +15 -0
  36. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-257-89bf34/minimal_patch_plan.md +21 -0
  37. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-257-89bf34/patch.diff +9 -0
  38. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-341-ce228c/metadata.json +15 -0
  39. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-341-ce228c/minimal_patch_plan.md +21 -0
  40. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-341-ce228c/patch.diff +9 -0
  41. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-355-7b190b/metadata.json +15 -0
  42. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-355-7b190b/minimal_patch_plan.md +21 -0
  43. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-355-7b190b/patch.diff +9 -0
  44. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-64-5af31a/metadata.json +15 -0
  45. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-64-5af31a/minimal_patch_plan.md +21 -0
  46. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-64-5af31a/patch.diff +9 -0
  47. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-9-f51467/metadata.json +15 -0
  48. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-9-f51467/minimal_patch_plan.md +21 -0
  49. package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-9-f51467/patch.diff +9 -0
  50. package/.torusguard/runs/run-20260910-120238-audit/findings.json +1520 -0
  51. package/.torusguard/runs/run-20260910-120238-audit/findings.md +560 -0
  52. package/.torusguard/runs/run-20260910-120238-audit/manifest.json +13 -0
  53. package/.torusguard/runs/run-20260910-120238-audit/recheck.md +86 -0
  54. package/.torusguard/runs/run-20260910-120238-audit/remediation.md +262 -0
  55. package/.torusguard/runs/run-20260910-120238-audit/summary.md +5 -0
  56. package/.torusguard/runs/run-20260910-121238-audit/findings.json +794 -0
  57. package/.torusguard/runs/run-20260910-121238-audit/findings.md +344 -0
  58. package/.torusguard/runs/run-20260910-121238-audit/manifest.json +12 -0
  59. package/.torusguard/runs/run-20260910-121238-audit/summary.md +5 -0
  60. package/.torusguard/runs/run-20260910-130454-audit/findings.json +893 -0
  61. package/.torusguard/runs/run-20260910-130454-audit/findings.md +386 -0
  62. package/.torusguard/runs/run-20260910-130454-audit/manifest.json +12 -0
  63. package/.torusguard/runs/run-20260910-130454-audit/summary.md +5 -0
  64. package/.torusguard/runs/run-20260910-130519-audit/findings.json +563 -0
  65. package/.torusguard/runs/run-20260910-130519-audit/findings.md +246 -0
  66. package/.torusguard/runs/run-20260910-130519-audit/manifest.json +12 -0
  67. package/.torusguard/runs/run-20260910-130519-audit/summary.md +5 -0
  68. package/.torusguard/scripts/__pycache__/audit_runner.cpython-311.pyc +0 -0
  69. package/.torusguard/scripts/__pycache__/diff_guard.cpython-311.pyc +0 -0
  70. package/.torusguard/scripts/__pycache__/html_reporter.cpython-311.pyc +0 -0
  71. package/.torusguard/scripts/__pycache__/rules_sync.cpython-311.pyc +0 -0
  72. package/.torusguard/scripts/__pycache__/stack_detect.cpython-311.pyc +0 -0
  73. package/.torusguard/scripts/__pycache__/term_ui.cpython-311.pyc +0 -0
  74. package/.torusguard/scripts/apply_runner.py +138 -100
  75. package/.torusguard/scripts/audit_runner.py +219 -116
  76. package/.torusguard/scripts/harden_runner.py +144 -64
  77. package/.torusguard/scripts/html_reporter.py +8 -3
  78. package/.torusguard/scripts/recheck_runner.py +80 -63
  79. package/.torusguard/scripts/recipes_runner.py +38 -31
  80. package/.torusguard/scripts/stack_detect.py +608 -584
  81. package/.torusguard/scripts/term_ui.py +162 -0
  82. package/.torusguard/skills/torusguard/SKILL.md +61 -31
  83. package/.torusguard/skills/torusguard-apply/SKILL.md +80 -46
  84. package/.torusguard/skills/torusguard-audit/SKILL.md +83 -70
  85. package/.torusguard/skills/torusguard-authorize/SKILL.md +5 -4
  86. package/.torusguard/skills/torusguard-exploit-check/SKILL.md +6 -5
  87. package/.torusguard/skills/torusguard-full/SKILL.md +1 -1
  88. package/.torusguard/skills/torusguard-harden/SKILL.md +94 -63
  89. package/.torusguard/skills/torusguard-init/SKILL.md +64 -52
  90. package/.torusguard/skills/torusguard-recheck/SKILL.md +77 -53
  91. package/.torusguard/skills/torusguard-report/SKILL.md +72 -54
  92. package/.torusguard/skills/torusguard-status/SKILL.md +58 -42
  93. package/.torusguard/skills/torusguard-verify/SKILL.md +8 -7
  94. package/.torusguard/skills/torusguard-web-validate/SKILL.md +8 -7
  95. package/README.md +4 -3
  96. package/bin/torusguard.js +544 -437
  97. package/package.json +1 -1
  98. package/skills/torusguard/SKILL.md +61 -31
  99. package/skills/torusguard/payload/scripts/apply_runner.py +138 -100
  100. package/skills/torusguard/payload/scripts/audit_runner.py +219 -116
  101. package/skills/torusguard/payload/scripts/harden_runner.py +144 -64
  102. package/skills/torusguard/payload/scripts/html_reporter.py +8 -3
  103. package/skills/torusguard/payload/scripts/recheck_runner.py +80 -63
  104. package/skills/torusguard/payload/scripts/recipes_runner.py +38 -31
  105. package/skills/torusguard/payload/scripts/stack_detect.py +608 -584
  106. package/skills/torusguard/payload/scripts/term_ui.py +162 -0
  107. package/skills/torusguard/payload/skills/torusguard/SKILL.md +61 -31
  108. package/skills/torusguard/payload/skills/torusguard-apply/SKILL.md +80 -46
  109. package/skills/torusguard/payload/skills/torusguard-audit/SKILL.md +83 -70
  110. package/skills/torusguard/payload/skills/torusguard-authorize/SKILL.md +5 -4
  111. package/skills/torusguard/payload/skills/torusguard-exploit-check/SKILL.md +6 -5
  112. package/skills/torusguard/payload/skills/torusguard-full/SKILL.md +1 -1
  113. package/skills/torusguard/payload/skills/torusguard-harden/SKILL.md +94 -63
  114. package/skills/torusguard/payload/skills/torusguard-init/SKILL.md +64 -52
  115. package/skills/torusguard/payload/skills/torusguard-recheck/SKILL.md +77 -53
  116. package/skills/torusguard/payload/skills/torusguard-report/SKILL.md +72 -54
  117. package/skills/torusguard/payload/skills/torusguard-status/SKILL.md +58 -42
  118. package/skills/torusguard/payload/skills/torusguard-verify/SKILL.md +8 -7
  119. package/skills/torusguard/payload/skills/torusguard-web-validate/SKILL.md +8 -7
  120. package/skills/torusguard-apply/SKILL.md +80 -46
  121. package/skills/torusguard-audit/SKILL.md +83 -70
  122. package/skills/torusguard-authorize/SKILL.md +5 -4
  123. package/skills/torusguard-exploit-check/SKILL.md +6 -5
  124. package/skills/torusguard-full/SKILL.md +1 -1
  125. package/skills/torusguard-harden/SKILL.md +94 -63
  126. package/skills/torusguard-init/SKILL.md +64 -52
  127. package/skills/torusguard-recheck/SKILL.md +77 -53
  128. package/skills/torusguard-report/SKILL.md +72 -54
  129. package/skills/torusguard-status/SKILL.md +58 -42
  130. package/skills/torusguard-verify/SKILL.md +8 -7
  131. package/skills/torusguard-web-validate/SKILL.md +8 -7
@@ -0,0 +1,344 @@
1
+ # TorusGuard Security Audit Findings: run-20260910-121238-audit
2
+ - Target Root: `C:\Users\Admin\Desktop\TorusGuard`
3
+ - Total Scored Findings: `24`
4
+ - Identified Clusters: `5`
5
+ - Generated At: `2026-09-10 12:12:38 IST`
6
+
7
+ ---
8
+ ## Summary of Findings
9
+
10
+ ### [Critical] TG-SEC-001 - Hardcoded Secret or API Key in Tracked Source
11
+ - **Finding ID:** `TG-SEC-001-bb5e4b77`
12
+ - **Location:** `examples/vulnerable-react-express/server/index.js:9`
13
+ - **Confidence Score:** `80/100` (High Confidence)
14
+ - **Cluster:** `cluster-credentials-exposure`
15
+ - **Description:** Hardcoded JWT signing secret
16
+ ```
17
+
18
+ // TG-SEC-001: Hardcoded JWT secret
19
+ const JWT_SECRET = 'FAKE_DEMO_JWT_SECRET_NOT_FOR_PRODUCTION';
20
+
21
+ // TG-PLATFORM-001: Wildcard CORS with credentials
22
+ ```
23
+
24
+ ### [Critical] TG-SEC-001 - Hardcoded Secret or API Key in Tracked Source
25
+ - **Finding ID:** `TG-SEC-001-c393d596`
26
+ - **Location:** `examples/vulnerable-react-express/server/index.js:18`
27
+ - **Confidence Score:** `80/100` (High Confidence)
28
+ - **Cluster:** `cluster-credentials-exposure`
29
+ - **Description:** Hardcoded credential or API secret string
30
+ ```
31
+
32
+ const users = [
33
+ { id: '1', email: 'alice@demo.local', password: 'password123', name: 'Alice' },
34
+ { id: '2', email: 'bob@demo.local', password: 'secret456', name: 'Bob' },
35
+ ];
36
+ ```
37
+
38
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
39
+ - **Finding ID:** `TG-DIFF-001-c87ad73a`
40
+ - **Location:** `skills/torusguard/payload/scripts/audit_runner.py:284`
41
+ - **Confidence Score:** `70/100` (High Confidence)
42
+ - **Cluster:** `cluster-transport-security`
43
+ - **Description:** Disabled TLS certificate verification (verify=False)
44
+ ```
45
+ "cluster": "cluster-transport-security",
46
+ "patterns": [
47
+ (re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
48
+ (re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
49
+ (re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
50
+ ```
51
+
52
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
53
+ - **Finding ID:** `TG-DIFF-001-3c58bc29`
54
+ - **Location:** `skills/torusguard/payload/scripts/audit_runner.py:285`
55
+ - **Confidence Score:** `70/100` (High Confidence)
56
+ - **Cluster:** `cluster-transport-security`
57
+ - **Description:** Disabled Go TLS certificate verification (InsecureSkipVerify: true)
58
+ ```
59
+ "patterns": [
60
+ (re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
61
+ (re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
62
+ (re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
63
+ (re.compile(r'\brejectUnauthorized\s*:\s*false\b'), "Disabled Node.js TLS rejectUnauthorized"),
64
+ ```
65
+
66
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
67
+ - **Finding ID:** `TG-DIFF-001-8ed55f94`
68
+ - **Location:** `skills/torusguard/payload/scripts/audit_runner.py:286`
69
+ - **Confidence Score:** `70/100` (High Confidence)
70
+ - **Cluster:** `cluster-transport-security`
71
+ - **Description:** Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)
72
+ ```
73
+ (re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
74
+ (re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
75
+ (re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
76
+ (re.compile(r'\brejectUnauthorized\s*:\s*false\b'), "Disabled Node.js TLS rejectUnauthorized"),
77
+ (re.compile(r'\bCURLOPT_SSL_VERIFYPEER\s*(?:=>|,)\s*(?:false|0)\b', re.IGNORECASE), "Disabled PHP curl SSL verification")
78
+ ```
79
+
80
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
81
+ - **Finding ID:** `TG-DIFF-001-5447a47c`
82
+ - **Location:** `skills/torusguard/payload/scripts/diff_guard.py:20`
83
+ - **Confidence Score:** `70/100` (High Confidence)
84
+ - **Cluster:** `cluster-transport-security`
85
+ - **Description:** Disabled TLS certificate verification (verify=False)
86
+ ```
87
+ (re.compile(r'(?:#|//|/\*)\s*(?:TODO\s*:?\s*)?(?:bypass|skip|disable)[_\s]*(?:auth|security|check|guard|filter|csrf|tenant)', re.IGNORECASE), "Suspicious authentication or security check bypass comment"),
88
+ # TLS / Certificate validation bypasses across Python, Go, Node, Java, C#, PHP, Rust
89
+ (re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
90
+ (re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
91
+ (re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
92
+ ```
93
+
94
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
95
+ - **Finding ID:** `TG-DIFF-001-7afc81ff`
96
+ - **Location:** `skills/torusguard/payload/scripts/diff_guard.py:21`
97
+ - **Confidence Score:** `70/100` (High Confidence)
98
+ - **Cluster:** `cluster-transport-security`
99
+ - **Description:** Disabled Go TLS certificate verification (InsecureSkipVerify: true)
100
+ ```
101
+ # TLS / Certificate validation bypasses across Python, Go, Node, Java, C#, PHP, Rust
102
+ (re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
103
+ (re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
104
+ (re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
105
+ (re.compile(r'\brejectUnauthorized\s*:\s*false\b'), "Disabled Node.js TLS rejectUnauthorized"),
106
+ ```
107
+
108
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
109
+ - **Finding ID:** `TG-DIFF-001-7b466146`
110
+ - **Location:** `skills/torusguard/payload/scripts/diff_guard.py:22`
111
+ - **Confidence Score:** `70/100` (High Confidence)
112
+ - **Cluster:** `cluster-transport-security`
113
+ - **Description:** Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)
114
+ ```
115
+ (re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
116
+ (re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
117
+ (re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
118
+ (re.compile(r'\brejectUnauthorized\s*:\s*false\b'), "Disabled Node.js TLS rejectUnauthorized"),
119
+ (re.compile(r'\b(?:TrustAllStrategy|NoopHostnameVerifier|DangerousAcceptAnyServerCertificateValidator)\b'), "Disabled Java / C# TLS certificate validation"),
120
+ ```
121
+
122
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
123
+ - **Finding ID:** `TG-DIFF-001-59a123c6`
124
+ - **Location:** `skills/torusguard/payload/scripts/diff_guard.py:26`
125
+ - **Confidence Score:** `70/100` (High Confidence)
126
+ - **Cluster:** `cluster-transport-security`
127
+ - **Description:** Disabled PHP curl SSL verification
128
+ ```
129
+ (re.compile(r'\b(?:TrustAllStrategy|NoopHostnameVerifier|DangerousAcceptAnyServerCertificateValidator)\b'), "Disabled Java / C# TLS certificate validation"),
130
+ (re.compile(r'\bServerCertificateCustomValidationCallback\s*=\s*(?:\([^)]*\)\s*=>\s*true|HttpClientHandler\.DangerousAcceptAnyServerCertificateValidator)'), "Disabled C# TLS certificate callback"),
131
+ (re.compile(r'\bCURLOPT_SSL_VERIFYPEER\s*(?:=>|,)\s*(?:false|0)\b', re.IGNORECASE), "Disabled PHP curl SSL verification (CURLOPT_SSL_VERIFYPEER => false)"),
132
+ (re.compile(r'\bdanger_accept_invalid_certs\s*\(\s*true\s*\)'), "Disabled Rust reqwest TLS certificate validation"),
133
+ # Auth & CSRF bypasses
134
+ ```
135
+
136
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
137
+ - **Finding ID:** `TG-DIFF-001-7db54483`
138
+ - **Location:** `skills/torusguard/payload/scripts/rules_sync.py:180`
139
+ - **Confidence Score:** `70/100` (High Confidence)
140
+ - **Cluster:** `cluster-transport-security`
141
+ - **Description:** Disabled TLS certificate verification (verify=False)
142
+ ```
143
+
144
+ if not bypass_guards:
145
+ bypass_rule = "4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, `@csrf_exempt`, or `bypass_auth=True`."
146
+ else:
147
+ bypass_rule = f"4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, or {', '.join(bypass_guards[:2])}."
148
+ ```
149
+
150
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
151
+ - **Finding ID:** `TG-DIFF-001-77bc2f9b`
152
+ - **Location:** `skills/torusguard/payload/scripts/rules_sync.py:157`
153
+ - **Confidence Score:** `70/100` (High Confidence)
154
+ - **Cluster:** `cluster-transport-security`
155
+ - **Description:** Disabled Go TLS certificate verification (InsecureSkipVerify: true)
156
+ ```
157
+ if "go" in stack_lower:
158
+ sql_guards.append("`db.Query(..., args)` / GORM")
159
+ bypass_guards.append("`InsecureSkipVerify: true`")
160
+ if "rust" in stack_lower:
161
+ sql_guards.append("`sqlx::query!` / Diesel")
162
+ ```
163
+
164
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
165
+ - **Finding ID:** `TG-DIFF-001-cb5ae7e9`
166
+ - **Location:** `skills/torusguard/payload/scripts/rules_sync.py:172`
167
+ - **Confidence Score:** `70/100` (High Confidence)
168
+ - **Cluster:** `cluster-transport-security`
169
+ - **Description:** Disabled Node.js TLS rejectUnauthorized
170
+ ```
171
+ if "typescript" in stack_lower or "javascript" in stack_lower or "next" in stack_lower or "express" in stack_lower:
172
+ sql_guards.append("Prisma / Drizzle binders")
173
+ bypass_guards.append("`rejectUnauthorized: false`")
174
+
175
+ if not sql_guards:
176
+ ```
177
+
178
+ ### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
179
+ - **Finding ID:** `TG-DIFF-001-0e4204af`
180
+ - **Location:** `skills/torusguard/payload/scripts/rules_sync.py:169`
181
+ - **Confidence Score:** `70/100` (High Confidence)
182
+ - **Cluster:** `cluster-transport-security`
183
+ - **Description:** Disabled PHP curl SSL verification
184
+ ```
185
+ if "php" in stack_lower:
186
+ sql_guards.append("PDO prepared statements / Eloquent")
187
+ bypass_guards.append("`CURLOPT_SSL_VERIFYPEER => false`")
188
+ if "typescript" in stack_lower or "javascript" in stack_lower or "next" in stack_lower or "express" in stack_lower:
189
+ sql_guards.append("Prisma / Drizzle binders")
190
+ ```
191
+
192
+ ### [Critical] TG-DB-002 - Privileged Database Secret or Master Role Key in Client Code
193
+ - **Finding ID:** `TG-DB-002-d9bd69df`
194
+ - **Location:** `demo/playground/vulnerable_nextjs/actions.ts:9`
195
+ - **Confidence Score:** `55/100` (Medium Confidence)
196
+ - **Cluster:** `cluster-client-leak`
197
+ - **Description:** Service role key or raw database connection string reference in frontend code
198
+ ```
199
+
200
+ // Finding 1: TG-CLIENT-001 - Backend admin key exposed in client-accessible code
201
+ export const SUPABASE_SERVICE_ROLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.demo_secret_token_1234567890";
202
+
203
+ interface UserRecord {
204
+ ```
205
+
206
+ ### [Critical] TG-DB-002 - Privileged Database Secret or Master Role Key in Client Code
207
+ - **Finding ID:** `TG-DB-002-d5bb277d`
208
+ - **Location:** `skills/torusguard/payload/scripts/audit_runner.py:209`
209
+ - **Confidence Score:** `55/100` (Medium Confidence)
210
+ - **Cluster:** `cluster-client-leak`
211
+ - **Description:** Service role key or raw database connection string reference in frontend code
212
+ ```
213
+ "cluster": "cluster-client-leak",
214
+ "patterns": [
215
+ (re.compile(r'\b(?:SUPABASE_SERVICE_ROLE_KEY|DATABASE_URL)\b'), "Service role key or raw database connection string reference in frontend code")
216
+ ]
217
+ },
218
+ ```
219
+
220
+ ### [High] TG-INPUT-003 - Unsafe Dynamic Code or HTML Execution
221
+ - **Finding ID:** `TG-INPUT-003-fea9421e`
222
+ - **Location:** `examples/vulnerable-react-express/client/src/App.jsx:53`
223
+ - **Confidence Score:** `80/100` (High Confidence)
224
+ - **Cluster:** `cluster-injection`
225
+ - **Description:** React dangerouslySetInnerHTML rendering raw unescaped HTML
226
+ ```
227
+
228
+ {/* TG-INPUT-003: Unsafe HTML rendering */}
229
+ <div dangerouslySetInnerHTML={{ __html: bio }} />
230
+
231
+ <button onClick={fetchUser}>Fetch user (IDOR demo)</button>
232
+ ```
233
+
234
+ ### [High] TG-INPUT-003 - Unsafe Dynamic Code or HTML Execution
235
+ - **Finding ID:** `TG-INPUT-003-258e642e`
236
+ - **Location:** `skills/torusguard/payload/scripts/audit_runner.py:232`
237
+ - **Confidence Score:** `80/100` (High Confidence)
238
+ - **Cluster:** `cluster-injection`
239
+ - **Description:** Direct eval() execution on untrusted input
240
+ ```
241
+ "cluster": "cluster-injection",
242
+ "patterns": [
243
+ (re.compile(r'\beval\s*\('), "Direct eval() execution on untrusted input"),
244
+ (re.compile(r'\bexec\s*\('), "Direct exec() execution on untrusted input"),
245
+ (re.compile(r'\bdangerouslySetInnerHTML\s*='), "React dangerouslySetInnerHTML rendering raw unescaped HTML"),
246
+ ```
247
+
248
+ ### [High] TG-INPUT-003 - Unsafe Dynamic Code or HTML Execution
249
+ - **Finding ID:** `TG-INPUT-003-3e9363a4`
250
+ - **Location:** `skills/torusguard/payload/scripts/audit_runner.py:233`
251
+ - **Confidence Score:** `80/100` (High Confidence)
252
+ - **Cluster:** `cluster-injection`
253
+ - **Description:** Direct exec() execution on untrusted input
254
+ ```
255
+ "patterns": [
256
+ (re.compile(r'\beval\s*\('), "Direct eval() execution on untrusted input"),
257
+ (re.compile(r'\bexec\s*\('), "Direct exec() execution on untrusted input"),
258
+ (re.compile(r'\bdangerouslySetInnerHTML\s*='), "React dangerouslySetInnerHTML rendering raw unescaped HTML"),
259
+ (re.compile(r'\.innerHTML\s*='), "Direct DOM innerHTML assignment vulnerable to XSS")
260
+ ```
261
+
262
+ ### [High] TG-PLATFORM-001 - Wildcard Permissive CORS Configuration with Credentials
263
+ - **Finding ID:** `TG-PLATFORM-001-66aabe2d`
264
+ - **Location:** `skills/torusguard/payload/scripts/harden_runner.py:168`
265
+ - **Confidence Score:** `80/100` (High Confidence)
266
+ - **Cluster:** `cluster-auth-bypass`
267
+ - **Description:** Wildcard CORS origin enabled across entire application
268
+ ```
269
+ # Strategy 5: Permissive CORS with Credentials (TG-PLATFORM-001)
270
+ elif rule_id == "TG-PLATFORM-001":
271
+ if "CORS_ALLOW_ALL_ORIGINS = True" in target_line:
272
+ replacement = f'{indent}CORS_ALLOWED_ORIGINS = [os.environ.get("ALLOWED_ORIGIN", "https://app.example.com")]'
273
+ new_lines[line_number - 1] = replacement
274
+ ```
275
+
276
+ ### [High] TG-PLATFORM-001 - Wildcard Permissive CORS Configuration with Credentials
277
+ - **Finding ID:** `TG-PLATFORM-001-7dd35cb4`
278
+ - **Location:** `examples/vulnerable-react-express/server/index.js:12`
279
+ - **Confidence Score:** `75/100` (High Confidence)
280
+ - **Cluster:** `cluster-auth-bypass`
281
+ - **Description:** Wildcard CORS origin configured in Express middleware
282
+ ```
283
+
284
+ // TG-PLATFORM-001: Wildcard CORS with credentials
285
+ app.use(cors({ origin: '*', credentials: true }));
286
+
287
+ // TG-PLATFORM-004: No explicit JSON body size limit
288
+ ```
289
+
290
+ ### [High] TG-AUTH-004 - Insecure Session Cookie or Disabled CSRF Protection
291
+ - **Finding ID:** `TG-AUTH-004-f60870ef`
292
+ - **Location:** `skills/torusguard/payload/scripts/rules_sync.py:180`
293
+ - **Confidence Score:** `70/100` (High Confidence)
294
+ - **Cluster:** `cluster-auth-bypass`
295
+ - **Description:** Decorator disabling route-level authentication or CSRF protection
296
+ ```
297
+
298
+ if not bypass_guards:
299
+ bypass_rule = "4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, `@csrf_exempt`, or `bypass_auth=True`."
300
+ else:
301
+ bypass_rule = f"4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, or {', '.join(bypass_guards[:2])}."
302
+ ```
303
+
304
+ ### [High] TG-AUTH-004 - Insecure Session Cookie or Disabled CSRF Protection
305
+ - **Finding ID:** `TG-AUTH-004-6b0c7ebf`
306
+ - **Location:** `skills/torusguard/payload/scripts/rules_sync.py:166`
307
+ - **Confidence Score:** `70/100` (High Confidence)
308
+ - **Cluster:** `cluster-auth-bypass`
309
+ - **Description:** Attribute disabling ASP.NET authentication
310
+ ```
311
+ if "c#" in stack_lower or "dotnet" in stack_lower:
312
+ sql_guards.append("EF Core LINQ / `FromSqlInterpolated`")
313
+ bypass_guards.append("`[AllowAnonymous]`")
314
+ if "php" in stack_lower:
315
+ sql_guards.append("PDO prepared statements / Eloquent")
316
+ ```
317
+
318
+ ### [Medium] TG-SEC-004 - Sensitive Credential or Token Logging
319
+ - **Finding ID:** `TG-SEC-004-dbbc17f7`
320
+ - **Location:** `examples/vulnerable-react-express/client/src/App.jsx:30`
321
+ - **Confidence Score:** `55/100` (Medium Confidence)
322
+ - **Cluster:** `cluster-credentials-exposure`
323
+ - **Description:** Plaintext credential or token logged to standard output
324
+ ```
325
+ const data = await res.json();
326
+ // TG-CLIENT-002: Sensitive console logging
327
+ console.log('Login token:', data.token, 'config:', clientConfig);
328
+ setMessage(JSON.stringify(data));
329
+ }
330
+ ```
331
+
332
+ ### [Medium] TG-SEC-004 - Sensitive Credential or Token Logging
333
+ - **Finding ID:** `TG-SEC-004-08753da5`
334
+ - **Location:** `examples/vulnerable-react-express/server/index.js:28`
335
+ - **Confidence Score:** `55/100` (Medium Confidence)
336
+ - **Cluster:** `cluster-credentials-exposure`
337
+ - **Description:** Plaintext credential or token logged to standard output
338
+ ```
339
+ app.post('/api/login', (req, res) => {
340
+ const { email, password } = req.body;
341
+ console.log('Login attempt:', { email, password }); // TG-SEC-004
342
+ const user = users.find((u) => u.email === email && u.password === password);
343
+ if (!user) return res.status(401).json({ error: 'User not found' }); // enumeration
344
+ ```
@@ -0,0 +1,12 @@
1
+ {
2
+ "run_id": "run-20260910-121238-audit",
3
+ "command": "audit",
4
+ "target_name": "TorusGuard",
5
+ "created_at": "2026-09-10 12:12:38 IST",
6
+ "created_at_iso": "2026-09-10T12:12:38.285839+05:30",
7
+ "status": "completed",
8
+ "torusguard_version": "1.3.0",
9
+ "findings_count": 24,
10
+ "confirmed_fixed_count": 0,
11
+ "regressed_count": 0
12
+ }
@@ -0,0 +1,5 @@
1
+ # TorusGuard Audit Summary: run-20260910-121238-audit
2
+ - Scanned Scope: C:\Users\Admin\Desktop\TorusGuard
3
+ - Total Findings: 24
4
+ - Root-Cause Clusters: 5
5
+ - Generated: 2026-09-10 12:12:38 IST