torusguard 1.4.0 → 2.1.0

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 (160) hide show
  1. package/.torusguard/.manifest.json +50 -28
  2. package/.torusguard/auth.json +5 -0
  3. package/.torusguard/rules/container/TG-CONT-001-root-user-execution.md +50 -0
  4. package/.torusguard/rules/container/TG-CONT-002-docker-socket-mount.md +47 -0
  5. package/.torusguard/rules/container/TG-CONT-003-privileged-container-mode.md +53 -0
  6. package/.torusguard/rules/container/TG-CONT-004-build-arg-secret-exposure.md +43 -0
  7. package/.torusguard/rules/git/TG-GIT-001-historical-secret-in-git-commit.md +44 -0
  8. package/.torusguard/rules/git/TG-GIT-002-plaintext-credentials-in-git-config.md +41 -0
  9. package/.torusguard/rules/git/TG-GIT-003-sensitive-tracked-file-gitignore-breach.md +40 -0
  10. package/.torusguard/rules/rag/TG-RAG-001-untrusted-rag-context-injection.md +72 -0
  11. package/.torusguard/rules/rag/TG-RAG-002-autonomous-llm-tool-unsandboxed-call.md +51 -0
  12. package/.torusguard/rules/rag/TG-RAG-003-unpartitioned-vector-tenant-lookup.md +51 -0
  13. package/.torusguard/rules/redos/TG-REDOS-001-catastrophic-exponential-backtracking.md +46 -0
  14. package/.torusguard/rules/redos/TG-REDOS-002-unbounded-nested-quantifier.md +43 -0
  15. package/.torusguard/rules_catalog.json +338 -518
  16. package/.torusguard/scripts/__pycache__/apply_runner.cpython-314.pyc +0 -0
  17. package/.torusguard/scripts/__pycache__/audit_runner.cpython-314.pyc +0 -0
  18. package/.torusguard/scripts/__pycache__/harden_runner.cpython-314.pyc +0 -0
  19. package/.torusguard/scripts/__pycache__/html_reporter.cpython-314.pyc +0 -0
  20. package/.torusguard/scripts/__pycache__/manifest_builder.cpython-314.pyc +0 -0
  21. package/.torusguard/scripts/__pycache__/recipes_runner.cpython-314.pyc +0 -0
  22. package/.torusguard/scripts/__pycache__/report_sync.cpython-314.pyc +0 -0
  23. package/.torusguard/scripts/manifest_builder.py +1 -1
  24. package/.torusguard/skills/torusguard/SKILL.md +69 -24
  25. package/.torusguard/skills/torusguard/bootstrap.py +57 -24
  26. package/.torusguard/skills/torusguard-ai-guard/SKILL.md +95 -0
  27. package/.torusguard/skills/torusguard-apply/SKILL.md +60 -34
  28. package/.torusguard/skills/torusguard-audit/SKILL.md +73 -24
  29. package/.torusguard/skills/torusguard-authorize/SKILL.md +48 -6
  30. package/.torusguard/skills/torusguard-container/SKILL.md +94 -0
  31. package/.torusguard/skills/torusguard-exploit-check/SKILL.md +50 -6
  32. package/.torusguard/skills/torusguard-full/SKILL.md +62 -19
  33. package/.torusguard/skills/torusguard-git-mine/SKILL.md +92 -0
  34. package/.torusguard/skills/torusguard-harden/SKILL.md +81 -50
  35. package/.torusguard/skills/torusguard-init/SKILL.md +61 -14
  36. package/.torusguard/skills/torusguard-ocr-scan/SKILL.md +94 -0
  37. package/.torusguard/skills/torusguard-recheck/SKILL.md +71 -18
  38. package/.torusguard/skills/torusguard-redos/SKILL.md +91 -0
  39. package/.torusguard/skills/torusguard-report/SKILL.md +50 -9
  40. package/.torusguard/skills/torusguard-status/SKILL.md +63 -10
  41. package/.torusguard/skills/torusguard-verify/SKILL.md +52 -10
  42. package/.torusguard/skills/torusguard-web-validate/SKILL.md +53 -8
  43. package/.torusguard/snapshots/20260921-182638/go.mod.bak +11 -0
  44. package/.torusguard/snapshots/20260921-185213/file.go.bak +5 -0
  45. package/.torusguard/workflows/ai-guard.md +31 -0
  46. package/.torusguard/workflows/apply.md +32 -55
  47. package/.torusguard/workflows/audit.md +28 -46
  48. package/.torusguard/workflows/authorize.md +27 -50
  49. package/.torusguard/workflows/container.md +29 -0
  50. package/.torusguard/workflows/exploit-check.md +28 -50
  51. package/.torusguard/workflows/git-mine.md +25 -0
  52. package/.torusguard/workflows/harden.md +29 -48
  53. package/.torusguard/workflows/init.md +27 -50
  54. package/.torusguard/workflows/memory.md +18 -23
  55. package/.torusguard/workflows/ocr-scan.md +25 -0
  56. package/.torusguard/workflows/recheck.md +28 -46
  57. package/.torusguard/workflows/redos.md +27 -0
  58. package/.torusguard/workflows/report.md +33 -52
  59. package/.torusguard/workflows/status.md +31 -52
  60. package/.torusguard/workflows/verify.md +29 -49
  61. package/.torusguard/workflows/web-validate.md +22 -45
  62. package/README.md +336 -386
  63. package/package.json +1 -1
  64. package/skills/torusguard/SKILL.md +71 -24
  65. package/skills/torusguard/__pycache__/bootstrap.cpython-314.pyc +0 -0
  66. package/skills/torusguard/bootstrap.py +60 -71
  67. package/skills/torusguard/payload/.manifest.json +50 -28
  68. package/skills/torusguard/payload/TORUSGUARD.md +145 -145
  69. package/skills/torusguard/payload/agents/auditor.md +41 -41
  70. package/skills/torusguard/payload/agents/profiler.md +49 -49
  71. package/skills/torusguard/payload/agents/remediator.md +41 -41
  72. package/skills/torusguard/payload/agents/reviewer.md +39 -39
  73. package/skills/torusguard/payload/agents/validator.md +46 -46
  74. package/skills/torusguard/payload/config/scope.json +24 -24
  75. package/skills/torusguard/payload/references/csharp-security.md +41 -41
  76. package/skills/torusguard/payload/references/go-security.md +41 -41
  77. package/skills/torusguard/payload/references/java-security.md +40 -40
  78. package/skills/torusguard/payload/references/polyglot-security-matrix.md +25 -25
  79. package/skills/torusguard/payload/references/rust-security.md +40 -40
  80. package/skills/torusguard/payload/rules/container/TG-CONT-001-root-user-execution.md +50 -0
  81. package/skills/torusguard/payload/rules/container/TG-CONT-002-docker-socket-mount.md +47 -0
  82. package/skills/torusguard/payload/rules/container/TG-CONT-003-privileged-container-mode.md +53 -0
  83. package/skills/torusguard/payload/rules/container/TG-CONT-004-build-arg-secret-exposure.md +43 -0
  84. package/skills/torusguard/payload/rules/custom/.gitkeep +1 -1
  85. package/skills/torusguard/payload/rules/custom/README.md +30 -30
  86. package/skills/torusguard/payload/rules/git/TG-GIT-001-historical-secret-in-git-commit.md +44 -0
  87. package/skills/torusguard/payload/rules/git/TG-GIT-002-plaintext-credentials-in-git-config.md +41 -0
  88. package/skills/torusguard/payload/rules/git/TG-GIT-003-sensitive-tracked-file-gitignore-breach.md +40 -0
  89. package/skills/torusguard/payload/rules/rag/TG-RAG-001-untrusted-rag-context-injection.md +72 -0
  90. package/skills/torusguard/payload/rules/rag/TG-RAG-002-autonomous-llm-tool-unsandboxed-call.md +51 -0
  91. package/skills/torusguard/payload/rules/rag/TG-RAG-003-unpartitioned-vector-tenant-lookup.md +51 -0
  92. package/skills/torusguard/payload/rules/redos/TG-REDOS-001-catastrophic-exponential-backtracking.md +46 -0
  93. package/skills/torusguard/payload/rules/redos/TG-REDOS-002-unbounded-nested-quantifier.md +43 -0
  94. package/skills/torusguard/payload/rules_catalog.json +338 -518
  95. package/skills/torusguard/payload/scripts/__pycache__/term_ui.cpython-314.pyc +0 -0
  96. package/skills/torusguard/payload/scripts/manifest_builder.py +1 -1
  97. package/skills/torusguard/payload/scripts/rules_sync.py +321 -321
  98. package/skills/torusguard/payload/scripts/safety_gate.py +64 -64
  99. package/skills/torusguard/payload/skills/torusguard/SKILL.md +69 -24
  100. package/skills/torusguard/payload/skills/torusguard/bootstrap.py +57 -24
  101. package/skills/torusguard/payload/skills/torusguard-ai-guard/SKILL.md +95 -0
  102. package/skills/torusguard/payload/skills/torusguard-apply/SKILL.md +60 -34
  103. package/skills/torusguard/payload/skills/torusguard-audit/SKILL.md +73 -24
  104. package/skills/torusguard/payload/skills/torusguard-authorize/SKILL.md +48 -6
  105. package/skills/torusguard/payload/skills/torusguard-container/SKILL.md +94 -0
  106. package/skills/torusguard/payload/skills/torusguard-exploit-check/SKILL.md +50 -6
  107. package/skills/torusguard/payload/skills/torusguard-full/SKILL.md +62 -19
  108. package/skills/torusguard/payload/skills/torusguard-git-mine/SKILL.md +92 -0
  109. package/skills/torusguard/payload/skills/torusguard-harden/SKILL.md +81 -50
  110. package/skills/torusguard/payload/skills/torusguard-init/SKILL.md +61 -14
  111. package/skills/torusguard/payload/skills/torusguard-ocr-scan/SKILL.md +94 -0
  112. package/skills/torusguard/payload/skills/torusguard-recheck/SKILL.md +71 -18
  113. package/skills/torusguard/payload/skills/torusguard-redos/SKILL.md +91 -0
  114. package/skills/torusguard/payload/skills/torusguard-report/SKILL.md +50 -9
  115. package/skills/torusguard/payload/skills/torusguard-status/SKILL.md +63 -10
  116. package/skills/torusguard/payload/skills/torusguard-verify/SKILL.md +52 -10
  117. package/skills/torusguard/payload/skills/torusguard-web-validate/SKILL.md +53 -8
  118. package/skills/torusguard/payload/templates/audit-report.template.md +54 -54
  119. package/skills/torusguard/payload/templates/authorization.template.md +34 -34
  120. package/skills/torusguard/payload/templates/finding-card.template.md +32 -32
  121. package/skills/torusguard/payload/templates/remediation-bundle.template.md +35 -35
  122. package/skills/torusguard/payload/workflows/ai-guard.md +31 -0
  123. package/skills/torusguard/payload/workflows/apply.md +31 -62
  124. package/skills/torusguard/payload/workflows/audit.md +27 -51
  125. package/skills/torusguard/payload/workflows/authorize.md +27 -50
  126. package/skills/torusguard/payload/workflows/container.md +29 -0
  127. package/skills/torusguard/payload/workflows/exploit-check.md +28 -50
  128. package/skills/torusguard/payload/workflows/git-mine.md +25 -0
  129. package/skills/torusguard/payload/workflows/harden.md +28 -52
  130. package/skills/torusguard/payload/workflows/init.md +27 -56
  131. package/skills/torusguard/payload/workflows/memory.md +18 -23
  132. package/skills/torusguard/payload/workflows/ocr-scan.md +25 -0
  133. package/skills/torusguard/payload/workflows/recheck.md +28 -46
  134. package/skills/torusguard/payload/workflows/redos.md +27 -0
  135. package/skills/torusguard/payload/workflows/report.md +39 -62
  136. package/skills/torusguard/payload/workflows/status.md +31 -55
  137. package/skills/torusguard/payload/workflows/verify.md +29 -49
  138. package/skills/torusguard/payload/workflows/web-validate.md +22 -45
  139. package/skills/torusguard/references/csharp-security.md +41 -0
  140. package/skills/torusguard/references/go-security.md +41 -0
  141. package/skills/torusguard/references/java-security.md +40 -0
  142. package/skills/torusguard/references/polyglot-security-matrix.md +25 -0
  143. package/skills/torusguard/references/rust-security.md +40 -0
  144. package/skills/torusguard-ai-guard/SKILL.md +95 -0
  145. package/skills/torusguard-apply/SKILL.md +60 -34
  146. package/skills/torusguard-audit/SKILL.md +73 -24
  147. package/skills/torusguard-authorize/SKILL.md +48 -6
  148. package/skills/torusguard-container/SKILL.md +94 -0
  149. package/skills/torusguard-exploit-check/SKILL.md +50 -6
  150. package/skills/torusguard-full/SKILL.md +62 -19
  151. package/skills/torusguard-git-mine/SKILL.md +92 -0
  152. package/skills/torusguard-harden/SKILL.md +81 -50
  153. package/skills/torusguard-init/SKILL.md +61 -14
  154. package/skills/torusguard-ocr-scan/SKILL.md +94 -0
  155. package/skills/torusguard-recheck/SKILL.md +71 -18
  156. package/skills/torusguard-redos/SKILL.md +91 -0
  157. package/skills/torusguard-report/SKILL.md +50 -9
  158. package/skills/torusguard-status/SKILL.md +63 -10
  159. package/skills/torusguard-verify/SKILL.md +52 -10
  160. package/skills/torusguard-web-validate/SKILL.md +53 -8
@@ -1,520 +1,340 @@
1
1
  {
2
- "TG-AUTH-001": {
3
- "id": "TG-AUTH-001",
4
- "title": "Weak Password Storage",
5
- "severity": "Critical",
6
- "category": "auth",
7
- "file": "TG-AUTH-001-weak-password-storage.md"
8
- },
9
- "TG-AUTH-002": {
10
- "id": "TG-AUTH-002",
11
- "title": "Client-Only Authorization",
12
- "severity": "High",
13
- "category": "auth",
14
- "file": "TG-AUTH-002-client-only-authorization.md"
15
- },
16
- "TG-AUTH-003": {
17
- "id": "TG-AUTH-003",
18
- "title": "Missing Object-Level Authorization (IDOR)",
19
- "severity": "High",
20
- "category": "auth",
21
- "file": "TG-AUTH-003-missing-object-authorization.md"
22
- },
23
- "TG-AUTH-004": {
24
- "id": "TG-AUTH-004",
25
- "title": "Insecure Session Cookie Configuration",
26
- "severity": "High",
27
- "category": "auth",
28
- "file": "TG-AUTH-004-insecure-session-cookie.md"
29
- },
30
- "TG-AUTH-005": {
31
- "id": "TG-AUTH-005",
32
- "title": "Unsafe Password Reset Flow",
33
- "severity": "High",
34
- "category": "auth",
35
- "file": "TG-AUTH-005-unsafe-password-reset.md"
36
- },
37
- "TG-CLIENT-001": {
38
- "id": "TG-CLIENT-001",
39
- "title": "Public Production Source Maps",
40
- "severity": "Medium",
41
- "category": "client",
42
- "file": "TG-CLIENT-001-public-production-source-maps.md"
43
- },
44
- "TG-CLIENT-002": {
45
- "id": "TG-CLIENT-002",
46
- "title": "Sensitive Client Bundle Content",
47
- "severity": "High",
48
- "category": "client",
49
- "file": "TG-CLIENT-002-sensitive-client-bundle-content.md"
50
- },
51
- "TG-DB-001": {
52
- "id": "TG-DB-001",
53
- "title": "Frontend Database Query Logic",
54
- "severity": "High",
55
- "category": "db",
56
- "file": "TG-DB-001-frontend-database-query.md"
57
- },
58
- "TG-DB-002": {
59
- "id": "TG-DB-002",
60
- "title": "Privileged Database Credential in Browser Context",
61
- "severity": "Critical",
62
- "category": "db",
63
- "file": "TG-DB-002-privileged-database-credential.md"
64
- },
65
- "TG-DB-003": {
66
- "id": "TG-DB-003",
67
- "title": "Frontend Use of Admin or Server-Only Database SDKs",
68
- "severity": "Critical",
69
- "category": "db",
70
- "file": "TG-DB-003-frontend-admin-sdk.md"
71
- },
72
- "TG-DB-004": {
73
- "id": "TG-DB-004",
74
- "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
75
- "severity": "Critical",
76
- "category": "db",
77
- "file": "TG-DB-004-missing-tenant-query-isolation.md"
78
- },
79
- "TG-DIFF-001": {
80
- "id": "TG-DIFF-001",
81
- "title": "Accidental Security Check Bypass in Patch Additions",
82
- "severity": "Critical",
83
- "category": "diff",
84
- "file": "TG-DIFF-001.md"
85
- },
86
- "TG-DIFF-002": {
87
- "id": "TG-DIFF-002",
88
- "title": "Secret and Token Ingestion in Patch Additions",
89
- "severity": "Critical",
90
- "category": "diff",
91
- "file": "TG-DIFF-002.md"
92
- },
93
- "TG-DIFF-003": {
94
- "id": "TG-DIFF-003",
95
- "title": "Unintentional Removal of Tenant Filter in Patch Deletions",
96
- "severity": "High",
97
- "category": "diff",
98
- "file": "TG-DIFF-003.md"
99
- },
100
- "TG-INPUT-001": {
101
- "id": "TG-INPUT-001",
102
- "title": "Missing Server-Side Validation",
103
- "severity": "High",
104
- "category": "input",
105
- "file": "TG-INPUT-001-missing-server-validation.md"
106
- },
107
- "TG-INPUT-002": {
108
- "id": "TG-INPUT-002",
109
- "title": "Raw SQL Concatenation",
110
- "severity": "Critical",
111
- "category": "input",
112
- "file": "TG-INPUT-002-raw-sql-concatenation.md"
113
- },
114
- "TG-INPUT-003": {
115
- "id": "TG-INPUT-003",
116
- "title": "Unsafe HTML Rendering or Code Execution",
117
- "severity": "High",
118
- "category": "input",
119
- "file": "TG-INPUT-003-unsafe-html-or-code-execution.md"
120
- },
121
- "TG-INPUT-004": {
122
- "id": "TG-INPUT-004",
123
- "title": "Unrestricted File Upload",
124
- "severity": "High",
125
- "category": "input",
126
- "file": "TG-INPUT-004-unrestricted-file-upload.md"
127
- },
128
- "TG-INPUT-005": {
129
- "id": "TG-INPUT-005",
130
- "title": "Unsafe Template Rendering & Disabled Autoescaping",
131
- "severity": "High",
132
- "category": "input",
133
- "file": "TG-INPUT-005-unsafe-template-rendering-and-escaping.md"
134
- },
135
- "TG-INPUT-006": {
136
- "id": "TG-INPUT-006",
137
- "title": "Path Traversal and Unsafe Upload Storage",
138
- "severity": "Critical",
139
- "category": "input",
140
- "file": "TG-INPUT-006-unsafe-file-path-traversal.md"
141
- },
142
- "TG-PLATFORM-001": {
143
- "id": "TG-PLATFORM-001",
144
- "title": "Wildcard CORS With Credentials",
145
- "severity": "High",
146
- "category": "platform",
147
- "file": "TG-PLATFORM-001-wildcard-cors-with-credentials.md"
148
- },
149
- "TG-PLATFORM-002": {
150
- "id": "TG-PLATFORM-002",
151
- "title": "Missing Security Headers",
152
- "severity": "Medium",
153
- "category": "platform",
154
- "file": "TG-PLATFORM-002-missing-security-headers.md"
155
- },
156
- "TG-PLATFORM-003": {
157
- "id": "TG-PLATFORM-003",
158
- "title": "Production Stack Trace Exposure",
159
- "severity": "Medium",
160
- "category": "platform",
161
- "file": "TG-PLATFORM-003-production-stack-trace-exposure.md"
162
- },
163
- "TG-PLATFORM-004": {
164
- "id": "TG-PLATFORM-004",
165
- "title": "Missing Request Size Limits",
166
- "severity": "Medium",
167
- "category": "platform",
168
- "file": "TG-PLATFORM-004-missing-request-size-limits.md"
169
- },
170
- "TG-RATE-001": {
171
- "id": "TG-RATE-001",
172
- "title": "Unlimited Authentication Endpoint",
173
- "severity": "High",
174
- "category": "rate",
175
- "file": "TG-RATE-001-unlimited-auth-endpoint.md"
176
- },
177
- "TG-RATE-002": {
178
- "id": "TG-RATE-002",
179
- "title": "Unlimited Public Write Endpoint",
180
- "severity": "Medium",
181
- "category": "rate",
182
- "file": "TG-RATE-002-unlimited-public-write-endpoint.md"
183
- },
184
- "TG-RATE-003": {
185
- "id": "TG-RATE-003",
186
- "title": "Unbounded Resource Consumption",
187
- "severity": "High",
188
- "category": "rate",
189
- "file": "TG-RATE-003-unbounded-resource-consumption.md"
190
- },
191
- "TG-SEC-001": {
192
- "id": "TG-SEC-001",
193
- "title": "Hardcoded Secrets in Tracked Source",
194
- "severity": "Critical",
195
- "category": "sec",
196
- "file": "TG-SEC-001-hardcoded-secrets.md"
197
- },
198
- "TG-SEC-002": {
199
- "id": "TG-SEC-002",
200
- "title": "Secrets in Public Environment Variables",
201
- "severity": "Critical",
202
- "category": "sec",
203
- "file": "TG-SEC-002-public-environment-secrets.md"
204
- },
205
- "TG-SEC-003": {
206
- "id": "TG-SEC-003",
207
- "title": "Tracked Environment File",
208
- "severity": "High",
209
- "category": "sec",
210
- "file": "TG-SEC-003-tracked-env-file.md"
211
- },
212
- "TG-SEC-004": {
213
- "id": "TG-SEC-004",
214
- "title": "Sensitive Information in Logs",
215
- "severity": "Medium",
216
- "category": "sec",
217
- "file": "TG-SEC-004-sensitive-logging.md"
218
- },
219
- "TG-AGENT-001": {
220
- "id": "TG-AGENT-001",
221
- "title": "Prompt Injection in System Context Files",
222
- "severity": "Critical",
223
- "category": "agent",
224
- "file": "TG-AGENT-001-prompt-injection-system-context.md"
225
- },
226
- "TG-AGENT-002": {
227
- "id": "TG-AGENT-002",
228
- "title": "Unsafe Tool Dispatch & Shell Execution without Sandboxing",
229
- "severity": "Critical",
230
- "category": "agent",
231
- "file": "TG-AGENT-002-unsafe-tool-dispatch-unsandboxed-execution.md"
232
- },
233
- "TG-AGENT-003": {
234
- "id": "TG-AGENT-003",
235
- "title": "Overly Broad MCP Tool Scoping & Credential Access",
236
- "severity": "High",
237
- "category": "agent",
238
- "file": "TG-AGENT-003-broad-mcp-tool-scoping.md"
239
- },
240
- "TG-AGENT-004": {
241
- "id": "TG-AGENT-004",
242
- "title": "Persistent Memory & Cross-Session Information Leakage",
243
- "severity": "High",
244
- "category": "agent",
245
- "file": "TG-AGENT-004-persistent-memory-cross-session-leakage.md"
246
- },
247
- "TG-AUTH-006": {
248
- "id": "TG-AUTH-006",
249
- "title": "Mass Assignment & Privilege Escalation via Payloads",
250
- "severity": "Critical",
251
- "category": "auth",
252
- "file": "TG-AUTH-006-mass-assignment.md"
253
- },
254
- "TG-AUTH-007": {
255
- "id": "TG-AUTH-007",
256
- "title": "Missing Object-Level and Property-Level Authorization (IDOR)",
257
- "severity": "Critical",
258
- "category": "auth",
259
- "file": "TG-AUTH-007-missing-property-level-authorization.md"
260
- },
261
- "TG-AUTH-008": {
262
- "id": "TG-AUTH-008",
263
- "title": "Untrusted Role or Tenant Header Injection",
264
- "severity": "Critical",
265
- "category": "auth",
266
- "file": "TG-AUTH-008-untrusted-role-header-injection.md"
267
- },
268
- "TG-BIZ-001": {
269
- "id": "TG-BIZ-001",
270
- "title": "Client-Controlled Sensitive Business Value",
271
- "severity": "Critical",
272
- "category": "biz",
273
- "file": "TG-BIZ-001-client-controlled-sensitive-business-value.md"
274
- },
275
- "TG-BIZ-002": {
276
- "id": "TG-BIZ-002",
277
- "title": "Replayable One-Time Operation",
278
- "severity": "Critical",
279
- "category": "biz",
280
- "file": "TG-BIZ-002-replayable-one-time-operation.md"
281
- },
282
- "TG-BIZ-003": {
283
- "id": "TG-BIZ-003",
284
- "title": "Missing Workflow-State Validation",
285
- "severity": "Critical",
286
- "category": "biz",
287
- "file": "TG-BIZ-003-missing-workflow-state-validation.md"
288
- },
289
- "TG-BIZ-004": {
290
- "id": "TG-BIZ-004",
291
- "title": "Unrestricted Sensitive Business Flow",
292
- "severity": "Critical",
293
- "category": "biz",
294
- "file": "TG-BIZ-004-unrestricted-sensitive-business-flow.md"
295
- },
296
- "TG-CACHE-001": {
297
- "id": "TG-CACHE-001",
298
- "title": "Sensitive Response Publicly Cacheable",
299
- "severity": "Critical",
300
- "category": "cache",
301
- "file": "TG-CACHE-001-sensitive-response-publicly-cacheable.md"
302
- },
303
- "TG-CACHE-002": {
304
- "id": "TG-CACHE-002",
305
- "title": "Missing User Cache Isolation",
306
- "severity": "Critical",
307
- "category": "cache",
308
- "file": "TG-CACHE-002-missing-user-cache-isolation.md"
309
- },
310
- "TG-CACHE-003": {
311
- "id": "TG-CACHE-003",
312
- "title": "Sensitive Data in URL",
313
- "severity": "Critical",
314
- "category": "cache",
315
- "file": "TG-CACHE-003-sensitive-data-in-url.md"
316
- },
317
- "TG-CSRF-001": {
318
- "id": "TG-CSRF-001",
319
- "title": "Missing CSRF Protection",
320
- "severity": "Critical",
321
- "category": "csrf",
322
- "file": "TG-CSRF-001-missing-csrf-protection.md"
323
- },
324
- "TG-CSRF-002": {
325
- "id": "TG-CSRF-002",
326
- "title": "Unsafe Credentialed Cross-Origin Request",
327
- "severity": "Critical",
328
- "category": "csrf",
329
- "file": "TG-CSRF-002-unsafe-credentialed-cross-origin-request.md"
330
- },
331
- "TG-EDGE-001": {
332
- "id": "TG-EDGE-001",
333
- "title": "Serverless & Edge Global State Memory Leakage",
334
- "severity": "High",
335
- "category": "edge",
336
- "file": "TG-EDGE-001-serverless-global-state-leak.md"
337
- },
338
- "TG-EDGE-003": {
339
- "id": "TG-EDGE-003",
340
- "title": "AWS Lambda Ephemeral Execution & Cold Start Security",
341
- "severity": "High",
342
- "category": "edge",
343
- "file": "TG-EDGE-003-aws-lambda-ephemeral-cold-start.md"
344
- },
345
- "TG-GQL-001": {
346
- "id": "TG-GQL-001",
347
- "title": "Missing Query Depth or Complexity Limits",
348
- "severity": "High",
349
- "category": "gql",
350
- "file": "TG-GQL-001-missing-query-depth-or-complexity-limits.md"
351
- },
352
- "TG-GQL-002": {
353
- "id": "TG-GQL-002",
354
- "title": "Resolver Missing Authorization",
355
- "severity": "Critical",
356
- "category": "gql",
357
- "file": "TG-GQL-002-resolver-missing-authorization.md"
358
- },
359
- "TG-GQL-003": {
360
- "id": "TG-GQL-003",
361
- "title": "Unbounded GraphQL Pagination or Batching",
362
- "severity": "Critical",
363
- "category": "gql",
364
- "file": "TG-GQL-003-unbounded-graphql-pagination-or-batching.md"
365
- },
366
- "TG-GQL-004": {
367
- "id": "TG-GQL-004",
368
- "title": "Unnecessary Production Introspection",
369
- "severity": "Critical",
370
- "category": "gql",
371
- "file": "TG-GQL-004-unnecessary-production-introspection.md"
372
- },
373
- "TG-SEC-005": {
374
- "id": "TG-SEC-005",
375
- "title": "Secret in Git History",
376
- "severity": "Critical",
377
- "category": "sec",
378
- "file": "TG-SEC-005-secret-in-git-history.md"
379
- },
380
- "TG-SEC-006": {
381
- "id": "TG-SEC-006",
382
- "title": "Secret in Build Artifact",
383
- "severity": "Critical",
384
- "category": "sec",
385
- "file": "TG-SEC-006-secret-in-build-artifact.md"
386
- },
387
- "TG-SEC-007": {
388
- "id": "TG-SEC-007",
389
- "title": "Secret in Test or Example Fixture",
390
- "severity": "Critical",
391
- "category": "sec",
392
- "file": "TG-SEC-007-secret-in-test-or-example-fixture.md"
393
- },
394
- "TG-SSRF-001": {
395
- "id": "TG-SSRF-001",
396
- "title": "User-Controlled Server-Side URL Fetch",
397
- "severity": "Critical",
398
- "category": "ssrf",
399
- "file": "TG-SSRF-001-user-controlled-server-side-url-fetch.md"
400
- },
401
- "TG-SSRF-002": {
402
- "id": "TG-SSRF-002",
403
- "title": "Missing Internal Network Protection",
404
- "severity": "Critical",
405
- "category": "ssrf",
406
- "file": "TG-SSRF-002-missing-internal-network-protection.md"
407
- },
408
- "TG-SSRF-003": {
409
- "id": "TG-SSRF-003",
410
- "title": "Unsafe Redirect Following",
411
- "severity": "Critical",
412
- "category": "ssrf",
413
- "file": "TG-SSRF-003-unsafe-redirect-following.md"
414
- },
415
- "TG-SSRF-004": {
416
- "id": "TG-SSRF-004",
417
- "title": "Unbounded Outbound Request",
418
- "severity": "Critical",
419
- "category": "ssrf",
420
- "file": "TG-SSRF-004-unbounded-outbound-request.md"
421
- },
422
- "TG-SUPPLY-001": {
423
- "id": "TG-SUPPLY-001",
424
- "title": "Missing or Ignored Dependency Lockfile",
425
- "severity": "Critical",
426
- "category": "supply",
427
- "file": "TG-SUPPLY-001-missing-or-ignored-dependency-lockfile.md"
428
- },
429
- "TG-SUPPLY-002": {
430
- "id": "TG-SUPPLY-002",
431
- "title": "Vulnerable Dependency Review Missing",
432
- "severity": "Critical",
433
- "category": "supply",
434
- "file": "TG-SUPPLY-002-vulnerable-dependency-review-missing.md"
435
- },
436
- "TG-SUPPLY-003": {
437
- "id": "TG-SUPPLY-003",
438
- "title": "Unsafe CI/CD Secret Exposure",
439
- "severity": "Critical",
440
- "category": "supply",
441
- "file": "TG-SUPPLY-003-unsafe-ci-cd-secret-exposure.md"
442
- },
443
- "TG-SUPPLY-004": {
444
- "id": "TG-SUPPLY-004",
445
- "title": "Unpinned CI Action",
446
- "severity": "Critical",
447
- "category": "supply",
448
- "file": "TG-SUPPLY-004-unpinned-ci-action.md"
449
- },
450
- "TG-SUPPLY-005": {
451
- "id": "TG-SUPPLY-005",
452
- "title": "Unsafe Dependency Install Script",
453
- "severity": "Critical",
454
- "category": "supply",
455
- "file": "TG-SUPPLY-005-unsafe-dependency-install-script.md"
456
- },
457
- "TG-SUPPLY-006": {
458
- "id": "TG-SUPPLY-006",
459
- "title": "Container Build Secret Persistence",
460
- "severity": "High",
461
- "category": "supply",
462
- "file": "TG-SUPPLY-006-container-build-secret-persistence.md"
463
- },
464
- "TG-WEBHOOK-001": {
465
- "id": "TG-WEBHOOK-001",
466
- "title": "Missing Webhook Signature Verification",
467
- "severity": "Critical",
468
- "category": "webhook",
469
- "file": "TG-WEBHOOK-001-missing-webhook-signature-verification.md"
470
- },
471
- "TG-WEBHOOK-002": {
472
- "id": "TG-WEBHOOK-002",
473
- "title": "Replayable Webhook",
474
- "severity": "Critical",
475
- "category": "webhook",
476
- "file": "TG-WEBHOOK-002-replayable-webhook.md"
477
- },
478
- "TG-WEBHOOK-003": {
479
- "id": "TG-WEBHOOK-003",
480
- "title": "Missing Webhook Idempotency",
481
- "severity": "Critical",
482
- "category": "webhook",
483
- "file": "TG-WEBHOOK-003-missing-webhook-idempotency.md"
484
- },
485
- "TG-WEBHOOK-004": {
486
- "id": "TG-WEBHOOK-004",
487
- "title": "Unvalidated Webhook Event Type",
488
- "severity": "Critical",
489
- "category": "webhook",
490
- "file": "TG-WEBHOOK-004-unvalidated-webhook-event-type.md"
491
- },
492
- "TG-WS-001": {
493
- "id": "TG-WS-001",
494
- "title": "Unauthenticated WebSocket Handshake",
495
- "severity": "High",
496
- "category": "ws",
497
- "file": "TG-WS-001-unauthenticated-websocket-handshake.md"
498
- },
499
- "TG-WS-002": {
500
- "id": "TG-WS-002",
501
- "title": "Missing Channel-Level Authorization",
502
- "severity": "Critical",
503
- "category": "ws",
504
- "file": "TG-WS-002-missing-channel-level-authorization.md"
505
- },
506
- "TG-WS-003": {
507
- "id": "TG-WS-003",
508
- "title": "Unvalidated WebSocket Message",
509
- "severity": "Critical",
510
- "category": "ws",
511
- "file": "TG-WS-003-unvalidated-websocket-message.md"
512
- },
513
- "TG-WS-004": {
514
- "id": "TG-WS-004",
515
- "title": "Unbounded WebSocket Connections",
516
- "severity": "Critical",
517
- "category": "ws",
518
- "file": "TG-WS-004-unbounded-websocket-connections.md"
519
- }
2
+ "rules": [
3
+ {
4
+ "id": "README",
5
+ "description": "Security Rule",
6
+ "severity": "High",
7
+ "patterns": [
8
+ "(?i)(vulnerable_function\\(\\))"
9
+ ]
10
+ },
11
+ {
12
+ "id": "TG-AUTH-001",
13
+ "description": "Weak Password Storage",
14
+ "severity": "Critical",
15
+ "patterns": [
16
+ "(?i)(jwt\\.sign|md5|sha1|verify.*false)"
17
+ ]
18
+ },
19
+ {
20
+ "id": "TG-AUTH-002",
21
+ "description": "Client-Only Authorization",
22
+ "severity": "High",
23
+ "patterns": [
24
+ "(?i)(jwt\\.sign|md5|sha1|verify.*false)"
25
+ ]
26
+ },
27
+ {
28
+ "id": "TG-AUTH-003",
29
+ "description": "Missing Object-Level Authorization (IDOR)",
30
+ "severity": "High",
31
+ "patterns": [
32
+ "(?i)(jwt\\.sign|md5|sha1|verify.*false)"
33
+ ]
34
+ },
35
+ {
36
+ "id": "TG-AUTH-004",
37
+ "description": "Insecure Session Cookie Configuration",
38
+ "severity": "High",
39
+ "patterns": [
40
+ "(?i)(jwt\\.sign|md5|sha1|verify.*false)"
41
+ ]
42
+ },
43
+ {
44
+ "id": "TG-AUTH-005",
45
+ "description": "Unsafe Password Reset Flow",
46
+ "severity": "High",
47
+ "patterns": [
48
+ "(?i)(jwt\\.sign|md5|sha1|verify.*false)"
49
+ ]
50
+ },
51
+ {
52
+ "id": "TG-CLIENT-001",
53
+ "description": "Public Production Source Maps",
54
+ "severity": "Medium",
55
+ "patterns": [
56
+ "(?i)(vulnerable_function\\(\\))"
57
+ ]
58
+ },
59
+ {
60
+ "id": "TG-CLIENT-002",
61
+ "description": "Sensitive Client Bundle Content",
62
+ "severity": "High",
63
+ "patterns": [
64
+ "(?i)(vulnerable_function\\(\\))"
65
+ ]
66
+ },
67
+ {
68
+ "id": "TG-DB-001",
69
+ "description": "Frontend Database Query Logic",
70
+ "severity": "High",
71
+ "patterns": [
72
+ "(?i)(select\\s+\\*|exec\\s+|execute\\s+|raw\\s*\\(|query\\s*\\()"
73
+ ]
74
+ },
75
+ {
76
+ "id": "TG-DB-002",
77
+ "description": "Privileged Database Credential in Browser Context",
78
+ "severity": "Critical",
79
+ "patterns": [
80
+ "(?i)(select\\s+\\*|exec\\s+|execute\\s+|raw\\s*\\(|query\\s*\\()"
81
+ ]
82
+ },
83
+ {
84
+ "id": "TG-DB-003",
85
+ "description": "Frontend Use of Admin or Server-Only Database SDKs",
86
+ "severity": "Critical",
87
+ "patterns": [
88
+ "(?i)(select\\s+\\*|exec\\s+|execute\\s+|raw\\s*\\(|query\\s*\\()"
89
+ ]
90
+ },
91
+ {
92
+ "id": "TG-DB-004",
93
+ "description": "Missing Tenant Query Isolation in Multi-Tenant Models",
94
+ "severity": "High",
95
+ "patterns": [
96
+ "(?i)(select\\s+\\*|exec\\s+|execute\\s+|raw\\s*\\(|query\\s*\\()"
97
+ ]
98
+ },
99
+ {
100
+ "id": "TG-INPUT-001",
101
+ "description": "Missing Server-Side Validation",
102
+ "severity": "High",
103
+ "patterns": [
104
+ "(?i)(eval\\s*\\(|exec\\s*\\(|system\\s*\\(|child_process|innerHTML)"
105
+ ]
106
+ },
107
+ {
108
+ "id": "TG-INPUT-002",
109
+ "description": "Raw SQL Concatenation",
110
+ "severity": "Critical",
111
+ "patterns": [
112
+ "(?i)(eval\\s*\\(|exec\\s*\\(|system\\s*\\(|child_process|innerHTML)"
113
+ ]
114
+ },
115
+ {
116
+ "id": "TG-INPUT-003",
117
+ "description": "Unsafe HTML Rendering or Code Execution",
118
+ "severity": "High",
119
+ "patterns": [
120
+ "(?i)(eval\\s*\\(|exec\\s*\\(|system\\s*\\(|child_process|innerHTML)"
121
+ ]
122
+ },
123
+ {
124
+ "id": "TG-INPUT-004",
125
+ "description": "Unrestricted File Upload",
126
+ "severity": "High",
127
+ "patterns": [
128
+ "(?i)(eval\\s*\\(|exec\\s*\\(|system\\s*\\(|child_process|innerHTML)"
129
+ ]
130
+ },
131
+ {
132
+ "id": "TG-INPUT-005",
133
+ "description": "Unsafe Template Rendering & Disabled Autoescaping",
134
+ "severity": "High",
135
+ "patterns": [
136
+ "(?i)(eval\\s*\\(|exec\\s*\\(|system\\s*\\(|child_process|innerHTML)"
137
+ ]
138
+ },
139
+ {
140
+ "id": "TG-INPUT-006",
141
+ "description": "Path Traversal and Unsafe Upload Storage",
142
+ "severity": "High",
143
+ "patterns": [
144
+ "(?i)(eval\\s*\\(|exec\\s*\\(|system\\s*\\(|child_process|innerHTML)"
145
+ ]
146
+ },
147
+ {
148
+ "id": "TG-PLATFORM-001",
149
+ "description": "Wildcard CORS With Credentials",
150
+ "severity": "High",
151
+ "patterns": [
152
+ "(?i)(cors.*\\*|app\\.disable\\('x-powered-by'\\))"
153
+ ]
154
+ },
155
+ {
156
+ "id": "TG-PLATFORM-002",
157
+ "description": "Missing Security Headers",
158
+ "severity": "Medium",
159
+ "patterns": [
160
+ "(?i)(cors.*\\*|app\\.disable\\('x-powered-by'\\))"
161
+ ]
162
+ },
163
+ {
164
+ "id": "TG-PLATFORM-003",
165
+ "description": "Production Stack Trace Exposure",
166
+ "severity": "Medium",
167
+ "patterns": [
168
+ "(?i)(cors.*\\*|app\\.disable\\('x-powered-by'\\))"
169
+ ]
170
+ },
171
+ {
172
+ "id": "TG-PLATFORM-004",
173
+ "description": "Missing Request Size Limits",
174
+ "severity": "Medium",
175
+ "patterns": [
176
+ "(?i)(cors.*\\*|app\\.disable\\('x-powered-by'\\))"
177
+ ]
178
+ },
179
+ {
180
+ "id": "TG-RATE-001",
181
+ "description": "Unlimited Authentication Endpoint",
182
+ "severity": "High",
183
+ "patterns": [
184
+ "(?i)(vulnerable_function\\(\\))"
185
+ ]
186
+ },
187
+ {
188
+ "id": "TG-RATE-002",
189
+ "description": "Unlimited Public Write Endpoint",
190
+ "severity": "Medium",
191
+ "patterns": [
192
+ "(?i)(vulnerable_function\\(\\))"
193
+ ]
194
+ },
195
+ {
196
+ "id": "TG-RATE-003",
197
+ "description": "Unbounded Resource Consumption",
198
+ "severity": "High",
199
+ "patterns": [
200
+ "(?i)(vulnerable_function\\(\\))"
201
+ ]
202
+ },
203
+ {
204
+ "id": "TG-SEC-001",
205
+ "description": "Hardcoded Secrets in Tracked Source",
206
+ "severity": "Critical",
207
+ "patterns": [
208
+ "(?i)(password|secret|api[_-]?key|token)\\s*=\\s*['\\\"][a-zA-Z0-9_\\-]{8,}['\\\"]"
209
+ ]
210
+ },
211
+ {
212
+ "id": "TG-SEC-002",
213
+ "description": "Secrets in Public Environment Variables",
214
+ "severity": "Critical",
215
+ "patterns": [
216
+ "(?i)(password|secret|api[_-]?key|token)\\s*=\\s*['\\\"][a-zA-Z0-9_\\-]{8,}['\\\"]"
217
+ ]
218
+ },
219
+ {
220
+ "id": "TG-SEC-003",
221
+ "description": "Tracked Environment File",
222
+ "severity": "High",
223
+ "patterns": [
224
+ "(?i)(password|secret|api[_-]?key|token)\\s*=\\s*['\\\"][a-zA-Z0-9_\\-]{8,}['\\\"]"
225
+ ]
226
+ },
227
+ {
228
+ "id": "TG-SEC-004",
229
+ "description": "Sensitive Information in Logs",
230
+ "severity": "Medium",
231
+ "patterns": [
232
+ "(?i)(password|secret|api[_-]?key|token)\\s*=\\s*['\\\"][a-zA-Z0-9_\\-]{8,}['\\\"]"
233
+ ]
234
+ },
235
+ {
236
+ "id": "TORUSGUARD",
237
+ "description": "Security Rule",
238
+ "severity": "High",
239
+ "patterns": [
240
+ "(?i)(vulnerable_function\\(\\))"
241
+ ]
242
+ },
243
+ {
244
+ "id": "TG-CONT-001",
245
+ "description": "Root User Execution in Container",
246
+ "severity": "High",
247
+ "patterns": [
248
+ "(?i)(USER\\s+(root|0))"
249
+ ]
250
+ },
251
+ {
252
+ "id": "TG-CONT-002",
253
+ "description": "Dangerous Docker Socket Mount",
254
+ "severity": "Critical",
255
+ "patterns": [
256
+ "(?i)(/var/run/docker\\.sock)"
257
+ ]
258
+ },
259
+ {
260
+ "id": "TG-CONT-003",
261
+ "description": "Privileged Container Mode or Disabled Security Profile",
262
+ "severity": "Critical",
263
+ "patterns": [
264
+ "(?i)(privileged:\\s*true|seccomp:unconfined|cap_add:.*SYS_ADMIN)"
265
+ ]
266
+ },
267
+ {
268
+ "id": "TG-CONT-004",
269
+ "description": "Sensitive Credentials in Container Build ARG or ENV",
270
+ "severity": "High",
271
+ "patterns": [
272
+ "(?i)(ARG|ENV)\\s+.*(password|secret|api_key|token)="
273
+ ]
274
+ },
275
+ {
276
+ "id": "TG-GIT-001",
277
+ "description": "Historical Secret Leaked in Git Commit History",
278
+ "severity": "Critical",
279
+ "patterns": [
280
+ "(?i)(sk-[a-zA-Z0-9]{20,}|AKIA[0-9A-Z]{16}|ghp_[a-zA-Z0-9]{36})"
281
+ ]
282
+ },
283
+ {
284
+ "id": "TG-GIT-002",
285
+ "description": "Plaintext Credentials in Git Config",
286
+ "severity": "High",
287
+ "patterns": [
288
+ "(?i)(https?://[^:]+:[^@]+@)"
289
+ ]
290
+ },
291
+ {
292
+ "id": "TG-GIT-003",
293
+ "description": "Sensitive Tracked File in .gitignore Violation",
294
+ "severity": "High",
295
+ "patterns": [
296
+ "(?i)(\\.env|id_rsa|.*\\.pem)"
297
+ ]
298
+ },
299
+ {
300
+ "id": "TG-REDOS-001",
301
+ "description": "Catastrophic Exponential Backtracking in Regular Expression",
302
+ "severity": "High",
303
+ "patterns": [
304
+ "(\\([^)]+[+*]\\)[+*])"
305
+ ]
306
+ },
307
+ {
308
+ "id": "TG-REDOS-002",
309
+ "description": "Unbounded Nested Quantifier in Input Validation",
310
+ "severity": "Medium",
311
+ "patterns": [
312
+ "(\\([^)]+\\+?\\)[+*]\\$)"
313
+ ]
314
+ },
315
+ {
316
+ "id": "TG-RAG-001",
317
+ "description": "Untrusted RAG Context Concatenation into System Prompt",
318
+ "severity": "Critical",
319
+ "patterns": [
320
+ "(?i)(system.*content.*(docs|context|retrieved)|f[\"'].*system.*\\{.*(docs|context|chunk))"
321
+ ]
322
+ },
323
+ {
324
+ "id": "TG-RAG-002",
325
+ "description": "Autonomous LLM Tool Unsandboxed Call",
326
+ "severity": "Critical",
327
+ "patterns": [
328
+ "(?i)(os\\.system|subprocess\\.run.*shell=True|child_process\\.exec)\\(.*(tool_call|arguments)"
329
+ ]
330
+ },
331
+ {
332
+ "id": "TG-RAG-003",
333
+ "description": "Unpartitioned Vector Database Tenant Lookup",
334
+ "severity": "High",
335
+ "patterns": [
336
+ "(?i)(similaritySearch|similarity_search|query)\\(.*(vector|query)(?![^)]*tenant)"
337
+ ]
338
+ }
339
+ ]
520
340
  }