circle-ir 3.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 (194) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +200 -0
  3. package/configs/sinks/code_injection.yaml +672 -0
  4. package/configs/sinks/command.yaml +917 -0
  5. package/configs/sinks/deserialization.yaml +105 -0
  6. package/configs/sinks/ldap.yaml +136 -0
  7. package/configs/sinks/nodejs.json +629 -0
  8. package/configs/sinks/path.yaml +715 -0
  9. package/configs/sinks/python.json +501 -0
  10. package/configs/sinks/rust.json +339 -0
  11. package/configs/sinks/sql.yaml +233 -0
  12. package/configs/sinks/ssrf.yaml +160 -0
  13. package/configs/sinks/xpath.yaml +121 -0
  14. package/configs/sinks/xss.yaml +727 -0
  15. package/configs/sources/db_sources.yaml +90 -0
  16. package/configs/sources/env_sources.yaml +94 -0
  17. package/configs/sources/express.json +197 -0
  18. package/configs/sources/file_sources.yaml +164 -0
  19. package/configs/sources/http_sources.yaml +379 -0
  20. package/configs/sources/io_sources.yaml +519 -0
  21. package/configs/sources/network_sources.yaml +99 -0
  22. package/configs/sources/python.json +230 -0
  23. package/configs/sources/rust.json +286 -0
  24. package/configs/sources/spring.yaml +70 -0
  25. package/dist/analysis/advisory-db.d.ts +86 -0
  26. package/dist/analysis/advisory-db.js +104 -0
  27. package/dist/analysis/advisory-db.js.map +1 -0
  28. package/dist/analysis/cargo-parser.d.ts +42 -0
  29. package/dist/analysis/cargo-parser.js +102 -0
  30. package/dist/analysis/cargo-parser.js.map +1 -0
  31. package/dist/analysis/config-loader.d.ts +37 -0
  32. package/dist/analysis/config-loader.js +1561 -0
  33. package/dist/analysis/config-loader.js.map +1 -0
  34. package/dist/analysis/constant-propagation/ast-utils.d.ts +25 -0
  35. package/dist/analysis/constant-propagation/ast-utils.js +34 -0
  36. package/dist/analysis/constant-propagation/ast-utils.js.map +1 -0
  37. package/dist/analysis/constant-propagation/evaluator.d.ts +32 -0
  38. package/dist/analysis/constant-propagation/evaluator.js +296 -0
  39. package/dist/analysis/constant-propagation/evaluator.js.map +1 -0
  40. package/dist/analysis/constant-propagation/index.d.ts +62 -0
  41. package/dist/analysis/constant-propagation/index.js +152 -0
  42. package/dist/analysis/constant-propagation/index.js.map +1 -0
  43. package/dist/analysis/constant-propagation/patterns.d.ts +8 -0
  44. package/dist/analysis/constant-propagation/patterns.js +126 -0
  45. package/dist/analysis/constant-propagation/patterns.js.map +1 -0
  46. package/dist/analysis/constant-propagation/propagator.d.ts +180 -0
  47. package/dist/analysis/constant-propagation/propagator.js +1985 -0
  48. package/dist/analysis/constant-propagation/propagator.js.map +1 -0
  49. package/dist/analysis/constant-propagation/types.d.ts +63 -0
  50. package/dist/analysis/constant-propagation/types.js +5 -0
  51. package/dist/analysis/constant-propagation/types.js.map +1 -0
  52. package/dist/analysis/constant-propagation.d.ts +9 -0
  53. package/dist/analysis/constant-propagation.js +18 -0
  54. package/dist/analysis/constant-propagation.js.map +1 -0
  55. package/dist/analysis/dependency-scanner.d.ts +79 -0
  56. package/dist/analysis/dependency-scanner.js +122 -0
  57. package/dist/analysis/dependency-scanner.js.map +1 -0
  58. package/dist/analysis/dfg-verifier.d.ts +116 -0
  59. package/dist/analysis/dfg-verifier.js +399 -0
  60. package/dist/analysis/dfg-verifier.js.map +1 -0
  61. package/dist/analysis/findings.d.ts +11 -0
  62. package/dist/analysis/findings.js +228 -0
  63. package/dist/analysis/findings.js.map +1 -0
  64. package/dist/analysis/index.d.ts +16 -0
  65. package/dist/analysis/index.js +18 -0
  66. package/dist/analysis/index.js.map +1 -0
  67. package/dist/analysis/interprocedural.d.ts +99 -0
  68. package/dist/analysis/interprocedural.js +526 -0
  69. package/dist/analysis/interprocedural.js.map +1 -0
  70. package/dist/analysis/path-finder.d.ts +133 -0
  71. package/dist/analysis/path-finder.js +354 -0
  72. package/dist/analysis/path-finder.js.map +1 -0
  73. package/dist/analysis/rules.d.ts +75 -0
  74. package/dist/analysis/rules.js +332 -0
  75. package/dist/analysis/rules.js.map +1 -0
  76. package/dist/analysis/semver.d.ts +27 -0
  77. package/dist/analysis/semver.js +127 -0
  78. package/dist/analysis/semver.js.map +1 -0
  79. package/dist/analysis/taint-matcher.d.ts +15 -0
  80. package/dist/analysis/taint-matcher.js +634 -0
  81. package/dist/analysis/taint-matcher.js.map +1 -0
  82. package/dist/analysis/taint-propagation.d.ts +67 -0
  83. package/dist/analysis/taint-propagation.js +298 -0
  84. package/dist/analysis/taint-propagation.js.map +1 -0
  85. package/dist/analysis/unresolved.d.ts +14 -0
  86. package/dist/analysis/unresolved.js +202 -0
  87. package/dist/analysis/unresolved.js.map +1 -0
  88. package/dist/analyzer.d.ts +43 -0
  89. package/dist/analyzer.js +1010 -0
  90. package/dist/analyzer.js.map +1 -0
  91. package/dist/browser/circle-ir.js +16576 -0
  92. package/dist/browser.d.ts +38 -0
  93. package/dist/browser.js +38 -0
  94. package/dist/browser.js.map +1 -0
  95. package/dist/core/circle-ir-core.cjs +13626 -0
  96. package/dist/core/circle-ir-core.d.ts +59 -0
  97. package/dist/core/circle-ir-core.js +13591 -0
  98. package/dist/core/extractors/calls.d.ts +13 -0
  99. package/dist/core/extractors/calls.js +1429 -0
  100. package/dist/core/extractors/calls.js.map +1 -0
  101. package/dist/core/extractors/cfg.d.ts +9 -0
  102. package/dist/core/extractors/cfg.js +519 -0
  103. package/dist/core/extractors/cfg.js.map +1 -0
  104. package/dist/core/extractors/dfg.d.ts +12 -0
  105. package/dist/core/extractors/dfg.js +1081 -0
  106. package/dist/core/extractors/dfg.js.map +1 -0
  107. package/dist/core/extractors/exports.d.ts +14 -0
  108. package/dist/core/extractors/exports.js +80 -0
  109. package/dist/core/extractors/exports.js.map +1 -0
  110. package/dist/core/extractors/imports.d.ts +9 -0
  111. package/dist/core/extractors/imports.js +739 -0
  112. package/dist/core/extractors/imports.js.map +1 -0
  113. package/dist/core/extractors/index.d.ts +10 -0
  114. package/dist/core/extractors/index.js +11 -0
  115. package/dist/core/extractors/index.js.map +1 -0
  116. package/dist/core/extractors/meta.d.ts +10 -0
  117. package/dist/core/extractors/meta.js +109 -0
  118. package/dist/core/extractors/meta.js.map +1 -0
  119. package/dist/core/extractors/types.d.ts +10 -0
  120. package/dist/core/extractors/types.js +1479 -0
  121. package/dist/core/extractors/types.js.map +1 -0
  122. package/dist/core/index.d.ts +5 -0
  123. package/dist/core/index.js +8 -0
  124. package/dist/core/index.js.map +1 -0
  125. package/dist/core/parser.d.ts +84 -0
  126. package/dist/core/parser.js +250 -0
  127. package/dist/core/parser.js.map +1 -0
  128. package/dist/core-lib.d.ts +59 -0
  129. package/dist/core-lib.js +62 -0
  130. package/dist/core-lib.js.map +1 -0
  131. package/dist/index.d.ts +15 -0
  132. package/dist/index.js +20 -0
  133. package/dist/index.js.map +1 -0
  134. package/dist/languages/index.d.ts +11 -0
  135. package/dist/languages/index.js +14 -0
  136. package/dist/languages/index.js.map +1 -0
  137. package/dist/languages/plugins/base.d.ts +44 -0
  138. package/dist/languages/plugins/base.js +82 -0
  139. package/dist/languages/plugins/base.js.map +1 -0
  140. package/dist/languages/plugins/index.d.ts +14 -0
  141. package/dist/languages/plugins/index.js +25 -0
  142. package/dist/languages/plugins/index.js.map +1 -0
  143. package/dist/languages/plugins/java.d.ts +49 -0
  144. package/dist/languages/plugins/java.js +402 -0
  145. package/dist/languages/plugins/java.js.map +1 -0
  146. package/dist/languages/plugins/javascript.d.ts +48 -0
  147. package/dist/languages/plugins/javascript.js +445 -0
  148. package/dist/languages/plugins/javascript.js.map +1 -0
  149. package/dist/languages/plugins/python.d.ts +47 -0
  150. package/dist/languages/plugins/python.js +480 -0
  151. package/dist/languages/plugins/python.js.map +1 -0
  152. package/dist/languages/plugins/rust.d.ts +47 -0
  153. package/dist/languages/plugins/rust.js +405 -0
  154. package/dist/languages/plugins/rust.js.map +1 -0
  155. package/dist/languages/registry.d.ts +30 -0
  156. package/dist/languages/registry.js +80 -0
  157. package/dist/languages/registry.js.map +1 -0
  158. package/dist/languages/types.d.ts +184 -0
  159. package/dist/languages/types.js +8 -0
  160. package/dist/languages/types.js.map +1 -0
  161. package/dist/resolution/cross-file.d.ts +146 -0
  162. package/dist/resolution/cross-file.js +439 -0
  163. package/dist/resolution/cross-file.js.map +1 -0
  164. package/dist/resolution/index.d.ts +12 -0
  165. package/dist/resolution/index.js +10 -0
  166. package/dist/resolution/index.js.map +1 -0
  167. package/dist/resolution/symbol-table.d.ts +136 -0
  168. package/dist/resolution/symbol-table.js +336 -0
  169. package/dist/resolution/symbol-table.js.map +1 -0
  170. package/dist/resolution/type-hierarchy.d.ts +124 -0
  171. package/dist/resolution/type-hierarchy.js +515 -0
  172. package/dist/resolution/type-hierarchy.js.map +1 -0
  173. package/dist/types/config.d.ts +45 -0
  174. package/dist/types/config.js +5 -0
  175. package/dist/types/config.js.map +1 -0
  176. package/dist/types/index.d.ts +392 -0
  177. package/dist/types/index.js +7 -0
  178. package/dist/types/index.js.map +1 -0
  179. package/dist/utils/logger.d.ts +85 -0
  180. package/dist/utils/logger.js +198 -0
  181. package/dist/utils/logger.js.map +1 -0
  182. package/dist/wasm/tree-sitter-java.wasm +0 -0
  183. package/dist/wasm/tree-sitter-javascript.wasm +0 -0
  184. package/dist/wasm/tree-sitter-python.wasm +0 -0
  185. package/dist/wasm/tree-sitter-rust.wasm +0 -0
  186. package/dist/wasm/web-tree-sitter.wasm +0 -0
  187. package/docs/SPEC.md +1021 -0
  188. package/examples/browser-example.html +610 -0
  189. package/examples/node-example.ts +215 -0
  190. package/package.json +107 -0
  191. package/wasm/tree-sitter-java.wasm +0 -0
  192. package/wasm/tree-sitter-javascript.wasm +0 -0
  193. package/wasm/tree-sitter-python.wasm +0 -0
  194. package/wasm/tree-sitter-rust.wasm +0 -0
@@ -0,0 +1,501 @@
1
+ {
2
+ "sinks": [
3
+ {
4
+ "method": "system",
5
+ "class": "os",
6
+ "type": "command_injection",
7
+ "cwe": "CWE-78",
8
+ "severity": "critical",
9
+ "arg_positions": [0],
10
+ "note": "os.system() - shell command execution"
11
+ },
12
+ {
13
+ "method": "popen",
14
+ "class": "os",
15
+ "type": "command_injection",
16
+ "cwe": "CWE-78",
17
+ "severity": "critical",
18
+ "arg_positions": [0],
19
+ "note": "os.popen() - shell command execution"
20
+ },
21
+ {
22
+ "method": "spawn",
23
+ "class": "os",
24
+ "type": "command_injection",
25
+ "cwe": "CWE-78",
26
+ "severity": "critical",
27
+ "arg_positions": [1],
28
+ "note": "os.spawn*() - process execution"
29
+ },
30
+ {
31
+ "method": "exec",
32
+ "class": "os",
33
+ "type": "command_injection",
34
+ "cwe": "CWE-78",
35
+ "severity": "critical",
36
+ "arg_positions": [0],
37
+ "note": "os.exec*() - process execution"
38
+ },
39
+ {
40
+ "method": "run",
41
+ "class": "subprocess",
42
+ "type": "command_injection",
43
+ "cwe": "CWE-78",
44
+ "severity": "critical",
45
+ "arg_positions": [0],
46
+ "note": "subprocess.run() - command execution"
47
+ },
48
+ {
49
+ "method": "call",
50
+ "class": "subprocess",
51
+ "type": "command_injection",
52
+ "cwe": "CWE-78",
53
+ "severity": "critical",
54
+ "arg_positions": [0],
55
+ "note": "subprocess.call() - command execution"
56
+ },
57
+ {
58
+ "method": "check_output",
59
+ "class": "subprocess",
60
+ "type": "command_injection",
61
+ "cwe": "CWE-78",
62
+ "severity": "critical",
63
+ "arg_positions": [0],
64
+ "note": "subprocess.check_output() - command execution"
65
+ },
66
+ {
67
+ "method": "check_call",
68
+ "class": "subprocess",
69
+ "type": "command_injection",
70
+ "cwe": "CWE-78",
71
+ "severity": "critical",
72
+ "arg_positions": [0],
73
+ "note": "subprocess.check_call() - command execution"
74
+ },
75
+ {
76
+ "method": "Popen",
77
+ "class": "subprocess",
78
+ "type": "command_injection",
79
+ "cwe": "CWE-78",
80
+ "severity": "critical",
81
+ "arg_positions": [0],
82
+ "note": "subprocess.Popen() - command execution"
83
+ },
84
+ {
85
+ "method": "eval",
86
+ "class": null,
87
+ "type": "code_injection",
88
+ "cwe": "CWE-94",
89
+ "severity": "critical",
90
+ "arg_positions": [0],
91
+ "note": "eval() - arbitrary code execution"
92
+ },
93
+ {
94
+ "method": "exec",
95
+ "class": null,
96
+ "type": "code_injection",
97
+ "cwe": "CWE-94",
98
+ "severity": "critical",
99
+ "arg_positions": [0],
100
+ "note": "exec() - arbitrary code execution"
101
+ },
102
+ {
103
+ "method": "compile",
104
+ "class": null,
105
+ "type": "code_injection",
106
+ "cwe": "CWE-94",
107
+ "severity": "high",
108
+ "arg_positions": [0],
109
+ "note": "compile() - code compilation from string"
110
+ },
111
+ {
112
+ "method": "__import__",
113
+ "class": null,
114
+ "type": "code_injection",
115
+ "cwe": "CWE-94",
116
+ "severity": "high",
117
+ "arg_positions": [0],
118
+ "note": "__import__() - dynamic import"
119
+ },
120
+ {
121
+ "method": "loads",
122
+ "class": "pickle",
123
+ "type": "deserialization",
124
+ "cwe": "CWE-502",
125
+ "severity": "critical",
126
+ "arg_positions": [0],
127
+ "note": "pickle.loads() - unsafe deserialization"
128
+ },
129
+ {
130
+ "method": "load",
131
+ "class": "pickle",
132
+ "type": "deserialization",
133
+ "cwe": "CWE-502",
134
+ "severity": "critical",
135
+ "arg_positions": [0],
136
+ "note": "pickle.load() - unsafe deserialization from file"
137
+ },
138
+ {
139
+ "method": "loads",
140
+ "class": "marshal",
141
+ "type": "deserialization",
142
+ "cwe": "CWE-502",
143
+ "severity": "critical",
144
+ "arg_positions": [0],
145
+ "note": "marshal.loads() - unsafe deserialization"
146
+ },
147
+ {
148
+ "method": "loads",
149
+ "class": "yaml",
150
+ "type": "deserialization",
151
+ "cwe": "CWE-502",
152
+ "severity": "critical",
153
+ "arg_positions": [0],
154
+ "note": "yaml.loads() - unsafe YAML deserialization (use safe_load)"
155
+ },
156
+ {
157
+ "method": "load",
158
+ "class": "yaml",
159
+ "type": "deserialization",
160
+ "cwe": "CWE-502",
161
+ "severity": "critical",
162
+ "arg_positions": [0],
163
+ "note": "yaml.load() - unsafe YAML deserialization (use safe_load)"
164
+ },
165
+ {
166
+ "method": "execute",
167
+ "class": null,
168
+ "type": "sql_injection",
169
+ "cwe": "CWE-89",
170
+ "severity": "critical",
171
+ "arg_positions": [0],
172
+ "note": "cursor.execute() - SQL query execution"
173
+ },
174
+ {
175
+ "method": "executemany",
176
+ "class": null,
177
+ "type": "sql_injection",
178
+ "cwe": "CWE-89",
179
+ "severity": "critical",
180
+ "arg_positions": [0],
181
+ "note": "cursor.executemany() - batch SQL execution"
182
+ },
183
+ {
184
+ "method": "raw",
185
+ "class": null,
186
+ "type": "sql_injection",
187
+ "cwe": "CWE-89",
188
+ "severity": "critical",
189
+ "arg_positions": [0],
190
+ "note": "Django QuerySet.raw() - raw SQL query"
191
+ },
192
+ {
193
+ "method": "extra",
194
+ "class": null,
195
+ "type": "sql_injection",
196
+ "cwe": "CWE-89",
197
+ "severity": "high",
198
+ "arg_positions": [0],
199
+ "note": "Django QuerySet.extra() - raw SQL fragments"
200
+ },
201
+ {
202
+ "method": "open",
203
+ "class": null,
204
+ "type": "path_traversal",
205
+ "cwe": "CWE-22",
206
+ "severity": "high",
207
+ "arg_positions": [0],
208
+ "note": "open() - file path traversal risk"
209
+ },
210
+ {
211
+ "method": "read",
212
+ "class": "Path",
213
+ "type": "path_traversal",
214
+ "cwe": "CWE-22",
215
+ "severity": "high",
216
+ "arg_positions": [],
217
+ "note": "pathlib.Path().read_text/read_bytes() - file path traversal"
218
+ },
219
+ {
220
+ "method": "join",
221
+ "class": "os.path",
222
+ "type": "path_traversal",
223
+ "cwe": "CWE-22",
224
+ "severity": "medium",
225
+ "arg_positions": [0, 1],
226
+ "note": "os.path.join() - path construction with user input"
227
+ },
228
+ {
229
+ "method": "remove",
230
+ "class": "os",
231
+ "type": "path_traversal",
232
+ "cwe": "CWE-22",
233
+ "severity": "high",
234
+ "arg_positions": [0],
235
+ "note": "os.remove() - file deletion"
236
+ },
237
+ {
238
+ "method": "unlink",
239
+ "class": "os",
240
+ "type": "path_traversal",
241
+ "cwe": "CWE-22",
242
+ "severity": "high",
243
+ "arg_positions": [0],
244
+ "note": "os.unlink() - file deletion"
245
+ },
246
+ {
247
+ "method": "rmdir",
248
+ "class": "os",
249
+ "type": "path_traversal",
250
+ "cwe": "CWE-22",
251
+ "severity": "high",
252
+ "arg_positions": [0],
253
+ "note": "os.rmdir() - directory deletion"
254
+ },
255
+ {
256
+ "method": "rmtree",
257
+ "class": "shutil",
258
+ "type": "path_traversal",
259
+ "cwe": "CWE-22",
260
+ "severity": "critical",
261
+ "arg_positions": [0],
262
+ "note": "shutil.rmtree() - recursive directory deletion"
263
+ },
264
+ {
265
+ "method": "send_file",
266
+ "class": null,
267
+ "type": "path_traversal",
268
+ "cwe": "CWE-22",
269
+ "severity": "high",
270
+ "arg_positions": [0],
271
+ "note": "Flask send_file() - file serving path traversal"
272
+ },
273
+ {
274
+ "method": "render_template_string",
275
+ "class": null,
276
+ "type": "xss",
277
+ "cwe": "CWE-79",
278
+ "severity": "high",
279
+ "arg_positions": [0],
280
+ "note": "Flask render_template_string() - SSTI/XSS"
281
+ },
282
+ {
283
+ "method": "Markup",
284
+ "class": null,
285
+ "type": "xss",
286
+ "cwe": "CWE-79",
287
+ "severity": "high",
288
+ "arg_positions": [0],
289
+ "note": "Markup() - marks string as safe HTML"
290
+ },
291
+ {
292
+ "method": "mark_safe",
293
+ "class": null,
294
+ "type": "xss",
295
+ "cwe": "CWE-79",
296
+ "severity": "high",
297
+ "arg_positions": [0],
298
+ "note": "Django mark_safe() - marks string as safe HTML"
299
+ },
300
+ {
301
+ "method": "format_html",
302
+ "class": null,
303
+ "type": "xss",
304
+ "cwe": "CWE-79",
305
+ "severity": "medium",
306
+ "arg_positions": [0],
307
+ "note": "Django format_html() - HTML formatting with user input"
308
+ },
309
+ {
310
+ "method": "get",
311
+ "class": "requests",
312
+ "type": "ssrf",
313
+ "cwe": "CWE-918",
314
+ "severity": "high",
315
+ "arg_positions": [0],
316
+ "note": "requests.get() - SSRF via user-controlled URL"
317
+ },
318
+ {
319
+ "method": "post",
320
+ "class": "requests",
321
+ "type": "ssrf",
322
+ "cwe": "CWE-918",
323
+ "severity": "high",
324
+ "arg_positions": [0],
325
+ "note": "requests.post() - SSRF via user-controlled URL"
326
+ },
327
+ {
328
+ "method": "urlopen",
329
+ "class": "urllib.request",
330
+ "type": "ssrf",
331
+ "cwe": "CWE-918",
332
+ "severity": "high",
333
+ "arg_positions": [0],
334
+ "note": "urllib.request.urlopen() - SSRF via user-controlled URL"
335
+ },
336
+ {
337
+ "method": "redirect",
338
+ "class": null,
339
+ "type": "open_redirect",
340
+ "cwe": "CWE-601",
341
+ "severity": "medium",
342
+ "arg_positions": [0],
343
+ "note": "Flask/Django redirect() - open redirect"
344
+ },
345
+ {
346
+ "method": "xpath",
347
+ "class": null,
348
+ "type": "xpath_injection",
349
+ "cwe": "CWE-643",
350
+ "severity": "high",
351
+ "arg_positions": [0],
352
+ "note": "lxml/etree xpath() - XPath injection"
353
+ },
354
+ {
355
+ "method": "find",
356
+ "class": "etree",
357
+ "type": "xpath_injection",
358
+ "cwe": "CWE-643",
359
+ "severity": "high",
360
+ "arg_positions": [0],
361
+ "note": "etree.find() with XPath expression"
362
+ },
363
+ {
364
+ "method": "findall",
365
+ "class": "etree",
366
+ "type": "xpath_injection",
367
+ "cwe": "CWE-643",
368
+ "severity": "high",
369
+ "arg_positions": [0],
370
+ "note": "etree.findall() with XPath expression"
371
+ },
372
+ {
373
+ "method": "iterfind",
374
+ "class": "etree",
375
+ "type": "xpath_injection",
376
+ "cwe": "CWE-643",
377
+ "severity": "high",
378
+ "arg_positions": [0],
379
+ "note": "etree.iterfind() with XPath expression"
380
+ },
381
+ {
382
+ "method": "parse",
383
+ "class": "etree",
384
+ "type": "xxe",
385
+ "cwe": "CWE-611",
386
+ "severity": "high",
387
+ "arg_positions": [0],
388
+ "note": "etree.parse() - XXE if external entities enabled"
389
+ },
390
+ {
391
+ "method": "fromstring",
392
+ "class": "etree",
393
+ "type": "xxe",
394
+ "cwe": "CWE-611",
395
+ "severity": "high",
396
+ "arg_positions": [0],
397
+ "note": "etree.fromstring() - XXE if external entities enabled"
398
+ },
399
+ {
400
+ "method": "XML",
401
+ "class": "etree",
402
+ "type": "xxe",
403
+ "cwe": "CWE-611",
404
+ "severity": "high",
405
+ "arg_positions": [0],
406
+ "note": "etree.XML() - XXE if external entities enabled"
407
+ },
408
+ {
409
+ "method": "parseString",
410
+ "class": "minidom",
411
+ "type": "xxe",
412
+ "cwe": "CWE-611",
413
+ "severity": "high",
414
+ "arg_positions": [0],
415
+ "note": "minidom.parseString() - XXE if external entities enabled"
416
+ },
417
+ {
418
+ "method": "parse",
419
+ "class": "sax",
420
+ "type": "xxe",
421
+ "cwe": "CWE-611",
422
+ "severity": "high",
423
+ "arg_positions": [0],
424
+ "note": "sax.parse() - XXE if external entities enabled"
425
+ },
426
+ {
427
+ "method": "search",
428
+ "class": "ldap",
429
+ "type": "ldap_injection",
430
+ "cwe": "CWE-90",
431
+ "severity": "high",
432
+ "arg_positions": [0, 2],
433
+ "note": "ldap.search() - LDAP injection via filter"
434
+ },
435
+ {
436
+ "method": "search_s",
437
+ "class": "ldap",
438
+ "type": "ldap_injection",
439
+ "cwe": "CWE-90",
440
+ "severity": "high",
441
+ "arg_positions": [0, 2],
442
+ "note": "ldap.search_s() - LDAP injection via filter"
443
+ },
444
+ {
445
+ "method": "search_ext",
446
+ "class": "ldap",
447
+ "type": "ldap_injection",
448
+ "cwe": "CWE-90",
449
+ "severity": "high",
450
+ "arg_positions": [0, 2],
451
+ "note": "ldap.search_ext() - LDAP injection via filter"
452
+ },
453
+ {
454
+ "method": "__setitem__",
455
+ "class": "session",
456
+ "type": "trust_boundary",
457
+ "cwe": "CWE-501",
458
+ "severity": "medium",
459
+ "arg_positions": [1],
460
+ "note": "session[key] = value - trust boundary violation"
461
+ }
462
+ ],
463
+ "sanitizers": [
464
+ {
465
+ "method": "escape",
466
+ "class": "markupsafe",
467
+ "sanitizes": ["xss"],
468
+ "note": "MarkupSafe escape() - HTML escaping"
469
+ },
470
+ {
471
+ "method": "escape",
472
+ "class": "html",
473
+ "sanitizes": ["xss"],
474
+ "note": "html.escape() - HTML escaping"
475
+ },
476
+ {
477
+ "method": "quote",
478
+ "class": "shlex",
479
+ "sanitizes": ["command_injection"],
480
+ "note": "shlex.quote() - shell escaping"
481
+ },
482
+ {
483
+ "method": "safe_load",
484
+ "class": "yaml",
485
+ "sanitizes": ["deserialization"],
486
+ "note": "yaml.safe_load() - safe YAML loading"
487
+ },
488
+ {
489
+ "method": "parameterized",
490
+ "class": null,
491
+ "sanitizes": ["sql_injection"],
492
+ "note": "Parameterized query (cursor.execute with params)"
493
+ },
494
+ {
495
+ "method": "secure_filename",
496
+ "class": "werkzeug.utils",
497
+ "sanitizes": ["path_traversal"],
498
+ "note": "werkzeug secure_filename() - filename sanitization"
499
+ }
500
+ ]
501
+ }