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,672 @@
1
+ {
2
+ "sinks": [
3
+ {
4
+ "method": "eval",
5
+ "class": "ScriptEngine",
6
+ "type": "code_injection",
7
+ "cwe": "CWE-094",
8
+ "severity": "critical",
9
+ "arg_positions": [
10
+ 0
11
+ ],
12
+ "note": "Can execute arbitrary code via script engine"
13
+ },
14
+ {
15
+ "method": "getEngineByName",
16
+ "class": "ScriptEngineManager",
17
+ "type": "code_injection",
18
+ "cwe": "CWE-094",
19
+ "severity": "high",
20
+ "note": "Check if followed by eval()"
21
+ },
22
+ {
23
+ "method": "ScriptEngineManager",
24
+ "type": "code_injection",
25
+ "cwe": "CWE-094",
26
+ "severity": "medium",
27
+ "note": "Script engine initialization"
28
+ },
29
+ {
30
+ "method": "eval",
31
+ "class": "NashornScriptEngine",
32
+ "type": "code_injection",
33
+ "cwe": "CWE-094",
34
+ "severity": "critical",
35
+ "arg_positions": [
36
+ 0
37
+ ]
38
+ },
39
+ {
40
+ "method": "evaluateString",
41
+ "class": "Context",
42
+ "type": "code_injection",
43
+ "cwe": "CWE-094",
44
+ "severity": "critical",
45
+ "arg_positions": [
46
+ 1
47
+ ]
48
+ },
49
+ {
50
+ "method": "evaluate",
51
+ "class": "GroovyShell",
52
+ "type": "code_injection",
53
+ "cwe": "CWE-094",
54
+ "severity": "critical",
55
+ "arg_positions": [
56
+ 0
57
+ ]
58
+ },
59
+ {
60
+ "method": "GroovyShell",
61
+ "type": "code_injection",
62
+ "cwe": "CWE-094",
63
+ "severity": "high"
64
+ },
65
+ {
66
+ "method": "parse",
67
+ "class": "GroovyShell",
68
+ "type": "code_injection",
69
+ "cwe": "CWE-094",
70
+ "severity": "critical",
71
+ "arg_positions": [
72
+ 0
73
+ ]
74
+ },
75
+ {
76
+ "method": "getBeanInfo",
77
+ "class": "Introspector",
78
+ "type": "code_injection",
79
+ "cwe": "CWE-094",
80
+ "severity": "high",
81
+ "arg_positions": [
82
+ 0
83
+ ],
84
+ "note": "Java Bean introspection - Spring4Shell"
85
+ },
86
+ {
87
+ "method": "CachedIntrospectionResults",
88
+ "type": "code_injection",
89
+ "cwe": "CWE-094",
90
+ "severity": "high",
91
+ "arg_positions": [
92
+ 0
93
+ ],
94
+ "note": "Spring bean introspection"
95
+ },
96
+ {
97
+ "method": "getPropertyDescriptors",
98
+ "type": "code_injection",
99
+ "cwe": "CWE-094",
100
+ "severity": "medium",
101
+ "note": "Property descriptor access"
102
+ },
103
+ {
104
+ "method": "forName",
105
+ "class": "Class",
106
+ "type": "code_injection",
107
+ "cwe": "CWE-094",
108
+ "severity": "high",
109
+ "arg_positions": [
110
+ 0
111
+ ],
112
+ "note": "Can load arbitrary classes with user input"
113
+ },
114
+ {
115
+ "method": "newInstance",
116
+ "class": "Class",
117
+ "type": "code_injection",
118
+ "cwe": "CWE-094",
119
+ "severity": "high",
120
+ "note": "Instantiates loaded class"
121
+ },
122
+ {
123
+ "method": "newInstance",
124
+ "class": "Constructor",
125
+ "type": "code_injection",
126
+ "cwe": "CWE-094",
127
+ "severity": "high"
128
+ },
129
+ {
130
+ "method": "invoke",
131
+ "class": "Method",
132
+ "type": "code_injection",
133
+ "cwe": "CWE-094",
134
+ "severity": "high",
135
+ "arg_positions": [
136
+ 1
137
+ ],
138
+ "note": "Can invoke arbitrary methods via reflection"
139
+ },
140
+ {
141
+ "method": "getDeclaredMethod",
142
+ "class": "Class",
143
+ "type": "code_injection",
144
+ "cwe": "CWE-094",
145
+ "severity": "medium",
146
+ "arg_positions": [
147
+ 0
148
+ ]
149
+ },
150
+ {
151
+ "method": "getMethod",
152
+ "class": "Class",
153
+ "type": "code_injection",
154
+ "cwe": "CWE-094",
155
+ "severity": "medium",
156
+ "arg_positions": [
157
+ 0
158
+ ]
159
+ },
160
+ {
161
+ "method": "parseExpression",
162
+ "class": "ExpressionParser",
163
+ "type": "code_injection",
164
+ "cwe": "CWE-094",
165
+ "severity": "critical",
166
+ "arg_positions": [
167
+ 0
168
+ ],
169
+ "note": "SpEL expression parsing with user input"
170
+ },
171
+ {
172
+ "method": "parseExpression",
173
+ "class": "SpelExpressionParser",
174
+ "type": "code_injection",
175
+ "cwe": "CWE-094",
176
+ "severity": "critical",
177
+ "arg_positions": [
178
+ 0
179
+ ]
180
+ },
181
+ {
182
+ "method": "getValue",
183
+ "class": "Expression",
184
+ "type": "code_injection",
185
+ "cwe": "CWE-094",
186
+ "severity": "critical",
187
+ "note": "SpEL expression evaluation"
188
+ },
189
+ {
190
+ "method": "setValue",
191
+ "class": "Expression",
192
+ "type": "code_injection",
193
+ "cwe": "CWE-094",
194
+ "severity": "critical",
195
+ "arg_positions": [
196
+ 0
197
+ ]
198
+ },
199
+ {
200
+ "method": "createValueExpression",
201
+ "class": "ExpressionFactory",
202
+ "type": "code_injection",
203
+ "cwe": "CWE-094",
204
+ "severity": "critical",
205
+ "arg_positions": [
206
+ 1
207
+ ],
208
+ "note": "EL expression creation"
209
+ },
210
+ {
211
+ "method": "getValue",
212
+ "class": "ValueExpression",
213
+ "type": "code_injection",
214
+ "cwe": "CWE-094",
215
+ "severity": "critical"
216
+ },
217
+ {
218
+ "method": "createMethodExpression",
219
+ "class": "ExpressionFactory",
220
+ "type": "code_injection",
221
+ "cwe": "CWE-094",
222
+ "severity": "critical",
223
+ "arg_positions": [
224
+ 1
225
+ ]
226
+ },
227
+ {
228
+ "method": "invoke",
229
+ "class": "MethodExpression",
230
+ "type": "code_injection",
231
+ "cwe": "CWE-094",
232
+ "severity": "critical"
233
+ },
234
+ {
235
+ "method": "parseExpression",
236
+ "class": "Ognl",
237
+ "type": "code_injection",
238
+ "cwe": "CWE-094",
239
+ "severity": "critical",
240
+ "arg_positions": [
241
+ 0
242
+ ]
243
+ },
244
+ {
245
+ "method": "getValue",
246
+ "class": "Ognl",
247
+ "type": "code_injection",
248
+ "cwe": "CWE-094",
249
+ "severity": "critical",
250
+ "arg_positions": [
251
+ 0
252
+ ]
253
+ },
254
+ {
255
+ "method": "setValue",
256
+ "class": "Ognl",
257
+ "type": "code_injection",
258
+ "cwe": "CWE-094",
259
+ "severity": "critical",
260
+ "arg_positions": [
261
+ 0
262
+ ]
263
+ },
264
+ {
265
+ "method": "eval",
266
+ "class": "MVEL",
267
+ "type": "code_injection",
268
+ "cwe": "CWE-094",
269
+ "severity": "critical",
270
+ "arg_positions": [
271
+ 0
272
+ ]
273
+ },
274
+ {
275
+ "method": "compileExpression",
276
+ "class": "MVEL",
277
+ "type": "code_injection",
278
+ "cwe": "CWE-094",
279
+ "severity": "critical",
280
+ "arg_positions": [
281
+ 0
282
+ ]
283
+ },
284
+ {
285
+ "method": "createExpression",
286
+ "class": "JexlEngine",
287
+ "type": "code_injection",
288
+ "cwe": "CWE-094",
289
+ "severity": "critical",
290
+ "arg_positions": [
291
+ 0
292
+ ]
293
+ },
294
+ {
295
+ "method": "evaluate",
296
+ "class": "Expression",
297
+ "type": "code_injection",
298
+ "cwe": "CWE-094",
299
+ "severity": "critical"
300
+ },
301
+ {
302
+ "method": "eval",
303
+ "class": "Interpreter",
304
+ "type": "code_injection",
305
+ "cwe": "CWE-094",
306
+ "severity": "critical",
307
+ "arg_positions": [
308
+ 0
309
+ ]
310
+ },
311
+ {
312
+ "method": "source",
313
+ "class": "Interpreter",
314
+ "type": "code_injection",
315
+ "cwe": "CWE-094",
316
+ "severity": "critical",
317
+ "arg_positions": [
318
+ 0
319
+ ]
320
+ },
321
+ {
322
+ "method": "exec",
323
+ "class": "PythonInterpreter",
324
+ "type": "code_injection",
325
+ "cwe": "CWE-094",
326
+ "severity": "critical",
327
+ "arg_positions": [
328
+ 0
329
+ ]
330
+ },
331
+ {
332
+ "method": "eval",
333
+ "class": "PythonInterpreter",
334
+ "type": "code_injection",
335
+ "cwe": "CWE-094",
336
+ "severity": "critical",
337
+ "arg_positions": [
338
+ 0
339
+ ]
340
+ },
341
+ {
342
+ "method": "evalScriptlet",
343
+ "class": "ScriptingContainer",
344
+ "type": "code_injection",
345
+ "cwe": "CWE-094",
346
+ "severity": "critical",
347
+ "arg_positions": [
348
+ 0
349
+ ]
350
+ },
351
+ {
352
+ "method": "runScriptlet",
353
+ "class": "ScriptingContainer",
354
+ "type": "code_injection",
355
+ "cwe": "CWE-094",
356
+ "severity": "critical",
357
+ "arg_positions": [
358
+ 0
359
+ ]
360
+ },
361
+ {
362
+ "method": "evaluate",
363
+ "class": "Velocity",
364
+ "type": "code_injection",
365
+ "cwe": "CWE-094",
366
+ "severity": "high",
367
+ "arg_positions": [
368
+ 2
369
+ ],
370
+ "note": "Template injection can lead to code execution"
371
+ },
372
+ {
373
+ "method": "Template",
374
+ "type": "code_injection",
375
+ "cwe": "CWE-094",
376
+ "severity": "high",
377
+ "note": "Template with user-controlled content"
378
+ },
379
+ {
380
+ "method": "process",
381
+ "class": "Template",
382
+ "type": "code_injection",
383
+ "cwe": "CWE-094",
384
+ "severity": "high"
385
+ },
386
+ {
387
+ "method": "createTemplate",
388
+ "class": "Configuration",
389
+ "type": "code_injection",
390
+ "cwe": "CWE-094",
391
+ "severity": "high",
392
+ "arg_positions": [
393
+ 1
394
+ ],
395
+ "note": "FreeMarker template creation from string"
396
+ },
397
+ {
398
+ "method": "VelocityEngine",
399
+ "type": "code_injection",
400
+ "cwe": "CWE-094",
401
+ "severity": "high",
402
+ "note": "Velocity engine initialization"
403
+ },
404
+ {
405
+ "method": "process",
406
+ "class": "TemplateEngine",
407
+ "type": "code_injection",
408
+ "cwe": "CWE-094",
409
+ "severity": "high",
410
+ "arg_positions": [
411
+ 0
412
+ ],
413
+ "note": "Thymeleaf template processing"
414
+ },
415
+ {
416
+ "method": "createTemplate",
417
+ "class": "TemplateEngine",
418
+ "type": "code_injection",
419
+ "cwe": "CWE-094",
420
+ "severity": "high",
421
+ "arg_positions": [
422
+ 0
423
+ ]
424
+ },
425
+ {
426
+ "method": "compile",
427
+ "class": "PebbleEngine",
428
+ "type": "code_injection",
429
+ "cwe": "CWE-094",
430
+ "severity": "high",
431
+ "arg_positions": [
432
+ 0
433
+ ],
434
+ "note": "Pebble template compilation"
435
+ },
436
+ {
437
+ "method": "execute",
438
+ "class": "Renderer",
439
+ "type": "code_injection",
440
+ "cwe": "CWE-094",
441
+ "severity": "high",
442
+ "note": "JStachio template rendering"
443
+ },
444
+ {
445
+ "method": "lookup",
446
+ "class": "InitialContext",
447
+ "type": "code_injection",
448
+ "cwe": "CWE-094",
449
+ "severity": "critical",
450
+ "arg_positions": [
451
+ 0
452
+ ],
453
+ "note": "JNDI injection can lead to RCE"
454
+ },
455
+ {
456
+ "method": "lookup",
457
+ "class": "Context",
458
+ "type": "code_injection",
459
+ "cwe": "CWE-094",
460
+ "severity": "critical",
461
+ "arg_positions": [
462
+ 0
463
+ ]
464
+ },
465
+ {
466
+ "method": "getTask",
467
+ "class": "JavaCompiler",
468
+ "type": "code_injection",
469
+ "cwe": "CWE-094",
470
+ "severity": "critical"
471
+ },
472
+ {
473
+ "method": "URLClassLoader",
474
+ "type": "code_injection",
475
+ "cwe": "CWE-094",
476
+ "severity": "high",
477
+ "arg_positions": [
478
+ 0
479
+ ],
480
+ "note": "Can load classes from attacker-controlled URLs"
481
+ },
482
+ {
483
+ "method": "defineClass",
484
+ "class": "ClassLoader",
485
+ "type": "code_injection",
486
+ "cwe": "CWE-094",
487
+ "severity": "critical",
488
+ "arg_positions": [
489
+ 1
490
+ ],
491
+ "note": "Can define arbitrary classes from bytecode"
492
+ },
493
+ {
494
+ "method": "newInstance",
495
+ "type": "code_injection",
496
+ "cwe": "CWE-94",
497
+ "severity": "critical",
498
+ "arg_positions": [
499
+ 0
500
+ ],
501
+ "note": "Auto-mined from CVE analysis"
502
+ },
503
+ {
504
+ "method": "readObject",
505
+ "class": "ObjectInputStream",
506
+ "type": "code_injection",
507
+ "cwe": "CWE-94",
508
+ "severity": "critical",
509
+ "arg_positions": [
510
+ 0
511
+ ],
512
+ "note": "Auto-mined from CVE analysis"
513
+ },
514
+ {
515
+ "method": "compile",
516
+ "class": "XPath",
517
+ "type": "code_injection",
518
+ "cwe": "CWE-94",
519
+ "severity": "critical",
520
+ "arg_positions": [
521
+ 0
522
+ ],
523
+ "note": "Auto-mined from CVE analysis"
524
+ },
525
+ {
526
+ "method": "println",
527
+ "class": "PrintWriter",
528
+ "type": "code_injection",
529
+ "cwe": "CWE-94",
530
+ "severity": "critical",
531
+ "arg_positions": [
532
+ 0
533
+ ],
534
+ "note": "Auto-mined from CVE analysis"
535
+ },
536
+ {
537
+ "method": "onNewInstance",
538
+ "class": "SandboxInterceptor",
539
+ "type": "code_injection",
540
+ "cwe": "CWE-094",
541
+ "severity": "critical",
542
+ "note": "Jenkins Groovy sandbox interceptor - sandbox bypass"
543
+ },
544
+ {
545
+ "method": "onMethodCall",
546
+ "class": "SandboxInterceptor",
547
+ "type": "code_injection",
548
+ "cwe": "CWE-094",
549
+ "severity": "critical",
550
+ "note": "Jenkins Groovy sandbox method interception"
551
+ },
552
+ {
553
+ "method": "onStaticCall",
554
+ "class": "SandboxInterceptor",
555
+ "type": "code_injection",
556
+ "cwe": "CWE-094",
557
+ "severity": "critical",
558
+ "note": "Jenkins Groovy sandbox static call interception"
559
+ },
560
+ {
561
+ "method": "render",
562
+ "class": "XWikiRenderer",
563
+ "type": "code_injection",
564
+ "cwe": "CWE-094",
565
+ "severity": "high",
566
+ "note": "XWiki wiki content rendering"
567
+ },
568
+ {
569
+ "method": "render",
570
+ "class": "WikiRenderer",
571
+ "type": "code_injection",
572
+ "cwe": "CWE-094",
573
+ "severity": "high",
574
+ "note": "Wiki content rendering"
575
+ },
576
+ {
577
+ "method": "parseGroovyScript",
578
+ "type": "code_injection",
579
+ "cwe": "CWE-094",
580
+ "severity": "critical",
581
+ "arg_positions": [0],
582
+ "note": "Groovy script parsing"
583
+ },
584
+ {
585
+ "method": "run",
586
+ "class": "Script",
587
+ "type": "code_injection",
588
+ "cwe": "CWE-094",
589
+ "severity": "critical",
590
+ "note": "Groovy script execution"
591
+ },
592
+ {
593
+ "method": "invokeMethod",
594
+ "class": "GroovyObject",
595
+ "type": "code_injection",
596
+ "cwe": "CWE-094",
597
+ "severity": "high",
598
+ "note": "Dynamic Groovy method invocation"
599
+ },
600
+ {
601
+ "method": "getMetaClass",
602
+ "class": "GroovyObject",
603
+ "type": "code_injection",
604
+ "cwe": "CWE-094",
605
+ "severity": "high",
606
+ "note": "Groovy metaclass access - can lead to code execution"
607
+ },
608
+ {
609
+ "method": "execute",
610
+ "class": "WikiMacro",
611
+ "type": "code_injection",
612
+ "cwe": "CWE-094",
613
+ "severity": "high",
614
+ "note": "XWiki macro execution"
615
+ },
616
+ {
617
+ "method": "parseClass",
618
+ "class": "CompilerConfiguration",
619
+ "type": "code_injection",
620
+ "cwe": "CWE-094",
621
+ "severity": "critical",
622
+ "arg_positions": [0],
623
+ "note": "Groovy class compilation from string"
624
+ }
625
+ ],
626
+ "sanitizers": [
627
+ {
628
+ "method": "matches",
629
+ "class": "String",
630
+ "removes": [
631
+ "code_injection"
632
+ ],
633
+ "note": "Pattern validation - check pattern is restrictive (alphanumeric only)"
634
+ },
635
+ {
636
+ "class": "SimpleEvaluationContext",
637
+ "removes": [
638
+ "code_injection"
639
+ ],
640
+ "note": "Restricts SpEL to safe operations only"
641
+ },
642
+ {
643
+ "pattern": "allowedClasses.contains",
644
+ "removes": [
645
+ "code_injection"
646
+ ],
647
+ "note": "Whitelist validation for class names"
648
+ }
649
+ ],
650
+ "dangerous_spel_patterns": [
651
+ {
652
+ "pattern": "T(java.lang.Runtime)",
653
+ "risk": "critical",
654
+ "note": "Runtime access via SpEL"
655
+ },
656
+ {
657
+ "pattern": "T(java.lang.ProcessBuilder)",
658
+ "risk": "critical",
659
+ "note": "ProcessBuilder access via SpEL"
660
+ },
661
+ {
662
+ "pattern": ".getClass().forName",
663
+ "risk": "critical",
664
+ "note": "Reflection via SpEL"
665
+ },
666
+ {
667
+ "pattern": "getEngineByName",
668
+ "risk": "critical",
669
+ "note": "Script engine access via SpEL"
670
+ }
671
+ ]
672
+ }