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,917 @@
1
+ {
2
+ "sinks": [
3
+ {
4
+ "method": "fromXML",
5
+ "class": "XStream",
6
+ "type": "command_injection",
7
+ "cwe": "CWE-078",
8
+ "severity": "critical",
9
+ "arg_positions": [
10
+ 0
11
+ ],
12
+ "note": "XStream deserialization RCE"
13
+ },
14
+ {
15
+ "method": "unmarshal",
16
+ "class": "XStream",
17
+ "type": "command_injection",
18
+ "cwe": "CWE-078",
19
+ "severity": "critical",
20
+ "arg_positions": [
21
+ 0
22
+ ]
23
+ },
24
+ {
25
+ "method": "realClass",
26
+ "class": "Mapper",
27
+ "type": "command_injection",
28
+ "cwe": "CWE-078",
29
+ "severity": "critical",
30
+ "arg_positions": [0],
31
+ "note": "XStream class resolution - can load arbitrary classes"
32
+ },
33
+ {
34
+ "method": "realClass",
35
+ "class": "CachingMapper",
36
+ "type": "command_injection",
37
+ "cwe": "CWE-078",
38
+ "severity": "critical",
39
+ "arg_positions": [0],
40
+ "note": "XStream cached class resolution"
41
+ },
42
+ {
43
+ "method": "realClass",
44
+ "class": "MapperWrapper",
45
+ "type": "command_injection",
46
+ "cwe": "CWE-078",
47
+ "severity": "critical",
48
+ "arg_positions": [0],
49
+ "note": "XStream mapper class resolution"
50
+ },
51
+ {
52
+ "method": "fromString",
53
+ "class": "FileConverter",
54
+ "type": "command_injection",
55
+ "cwe": "CWE-078",
56
+ "severity": "high",
57
+ "arg_positions": [0],
58
+ "note": "XStream File converter - creates File from untrusted input"
59
+ },
60
+ {
61
+ "method": "fromString",
62
+ "class": "AbstractSingleValueConverter",
63
+ "type": "command_injection",
64
+ "cwe": "CWE-078",
65
+ "severity": "high",
66
+ "arg_positions": [0],
67
+ "note": "XStream value converter - converts untrusted input"
68
+ },
69
+ {
70
+ "method": "fromString",
71
+ "class": "FileConverter",
72
+ "type": "command_injection",
73
+ "cwe": "CWE-078",
74
+ "severity": "high",
75
+ "arg_positions": [0],
76
+ "note": "XStream File converter - creates File from untrusted string"
77
+ },
78
+ {
79
+ "method": "flushCache",
80
+ "class": "CachingMapper",
81
+ "type": "command_injection",
82
+ "cwe": "CWE-078",
83
+ "severity": "high",
84
+ "note": "XStream cache flush - may be triggered by deserialization"
85
+ },
86
+ {
87
+ "method": "readObject",
88
+ "class": "ObjectInputStream",
89
+ "type": "command_injection",
90
+ "cwe": "CWE-078",
91
+ "severity": "critical",
92
+ "note": "Java deserialization RCE"
93
+ },
94
+ {
95
+ "method": "readUnshared",
96
+ "class": "ObjectInputStream",
97
+ "type": "command_injection",
98
+ "cwe": "CWE-078",
99
+ "severity": "critical"
100
+ },
101
+ {
102
+ "method": "File",
103
+ "type": "command_injection",
104
+ "cwe": "CWE-078",
105
+ "severity": "high",
106
+ "arg_positions": [
107
+ 0
108
+ ],
109
+ "note": "File constructor in deserialization can lead to path traversal + RCE"
110
+ },
111
+ {
112
+ "method": "exec",
113
+ "class": "Runtime",
114
+ "type": "command_injection",
115
+ "cwe": "CWE-078",
116
+ "severity": "critical",
117
+ "arg_positions": [
118
+ 0
119
+ ],
120
+ "note": "Especially dangerous with shell invocation (sh -c, cmd /c)"
121
+ },
122
+ {
123
+ "method": "exec",
124
+ "type": "command_injection",
125
+ "cwe": "CWE-078",
126
+ "severity": "critical",
127
+ "arg_positions": [
128
+ 0
129
+ ],
130
+ "note": "Generic exec() call - likely Runtime.getRuntime().exec()"
131
+ },
132
+ {
133
+ "method": "exit",
134
+ "class": "System",
135
+ "type": "command_injection",
136
+ "cwe": "CWE-078",
137
+ "severity": "critical",
138
+ "arg_positions": [
139
+ 0
140
+ ],
141
+ "note": "Controlled System.exit() can cause DoS or command execution"
142
+ },
143
+ {
144
+ "method": "getRuntime",
145
+ "class": "Runtime",
146
+ "type": "command_injection",
147
+ "cwe": "CWE-078",
148
+ "severity": "critical",
149
+ "note": "Check if followed by exec"
150
+ },
151
+ {
152
+ "method": "ProcessBuilder",
153
+ "type": "command_injection",
154
+ "cwe": "CWE-078",
155
+ "severity": "critical",
156
+ "arg_positions": [
157
+ 0
158
+ ],
159
+ "note": "Constructor with command array"
160
+ },
161
+ {
162
+ "method": "command",
163
+ "class": "ProcessBuilder",
164
+ "type": "command_injection",
165
+ "cwe": "CWE-078",
166
+ "severity": "critical",
167
+ "arg_positions": [
168
+ 0
169
+ ]
170
+ },
171
+ {
172
+ "method": "start",
173
+ "class": "ProcessBuilder",
174
+ "type": "command_injection",
175
+ "cwe": "CWE-078",
176
+ "severity": "critical",
177
+ "note": "Executes the command"
178
+ },
179
+ {
180
+ "method": "Process",
181
+ "type": "command_injection",
182
+ "cwe": "CWE-078",
183
+ "severity": "high"
184
+ },
185
+ {
186
+ "method": "execute",
187
+ "class": "Executor",
188
+ "type": "command_injection",
189
+ "cwe": "CWE-078",
190
+ "severity": "critical",
191
+ "arg_positions": [
192
+ 0
193
+ ]
194
+ },
195
+ {
196
+ "method": "execute",
197
+ "class": "DefaultExecutor",
198
+ "type": "command_injection",
199
+ "cwe": "CWE-078",
200
+ "severity": "critical",
201
+ "arg_positions": [
202
+ 0
203
+ ]
204
+ },
205
+ {
206
+ "method": "CommandLine",
207
+ "type": "command_injection",
208
+ "cwe": "CWE-078",
209
+ "severity": "high",
210
+ "arg_positions": [
211
+ 0
212
+ ],
213
+ "note": "Command line construction"
214
+ },
215
+ {
216
+ "method": "eval",
217
+ "class": "ScriptEngine",
218
+ "type": "command_injection",
219
+ "cwe": "CWE-078",
220
+ "severity": "critical",
221
+ "arg_positions": [
222
+ 0
223
+ ]
224
+ },
225
+ {
226
+ "method": "GroovyShell",
227
+ "type": "command_injection",
228
+ "cwe": "CWE-078",
229
+ "severity": "critical"
230
+ },
231
+ {
232
+ "method": "evaluate",
233
+ "class": "GroovyShell",
234
+ "type": "command_injection",
235
+ "cwe": "CWE-078",
236
+ "severity": "critical",
237
+ "arg_positions": [
238
+ 0
239
+ ]
240
+ },
241
+ {
242
+ "method": "parse",
243
+ "class": "GroovyShell",
244
+ "type": "command_injection",
245
+ "cwe": "CWE-078",
246
+ "severity": "critical",
247
+ "arg_positions": [
248
+ 0
249
+ ],
250
+ "note": "Groovy script parsing"
251
+ },
252
+ {
253
+ "method": "doCheckScript",
254
+ "type": "command_injection",
255
+ "cwe": "CWE-078",
256
+ "severity": "critical",
257
+ "note": "Jenkins script validation bypass"
258
+ },
259
+ {
260
+ "class": "ScriptApproval",
261
+ "type": "command_injection",
262
+ "cwe": "CWE-078",
263
+ "severity": "critical",
264
+ "note": "Jenkins script approval mechanism"
265
+ },
266
+ {
267
+ "method": "sandbox",
268
+ "class": "GroovySandbox",
269
+ "type": "command_injection",
270
+ "cwe": "CWE-078",
271
+ "severity": "critical",
272
+ "note": "Jenkins Groovy sandbox"
273
+ },
274
+ {
275
+ "method": "evaluate",
276
+ "class": "CpsScript",
277
+ "type": "command_injection",
278
+ "cwe": "CWE-078",
279
+ "severity": "critical",
280
+ "arg_positions": [
281
+ 0
282
+ ],
283
+ "note": "Jenkins Pipeline CPS script evaluation"
284
+ },
285
+ {
286
+ "method": "sh",
287
+ "type": "command_injection",
288
+ "cwe": "CWE-078",
289
+ "severity": "critical",
290
+ "arg_positions": [
291
+ 0
292
+ ],
293
+ "note": "Jenkins pipeline shell command"
294
+ },
295
+ {
296
+ "method": "bat",
297
+ "type": "command_injection",
298
+ "cwe": "CWE-078",
299
+ "severity": "critical",
300
+ "arg_positions": [
301
+ 0
302
+ ],
303
+ "note": "Jenkins pipeline Windows batch command"
304
+ },
305
+ {
306
+ "method": "powershell",
307
+ "type": "command_injection",
308
+ "cwe": "CWE-078",
309
+ "severity": "critical",
310
+ "arg_positions": [
311
+ 0
312
+ ],
313
+ "note": "Jenkins pipeline PowerShell command"
314
+ },
315
+ {
316
+ "method": "pwsh",
317
+ "type": "command_injection",
318
+ "cwe": "CWE-078",
319
+ "severity": "critical",
320
+ "arg_positions": [
321
+ 0
322
+ ],
323
+ "note": "Jenkins pipeline PowerShell Core command"
324
+ },
325
+ {
326
+ "method": "node",
327
+ "type": "command_injection",
328
+ "cwe": "CWE-078",
329
+ "severity": "critical",
330
+ "arg_positions": [
331
+ 0
332
+ ],
333
+ "note": "Jenkins pipeline node step - may execute shell"
334
+ },
335
+ {
336
+ "method": "library",
337
+ "type": "command_injection",
338
+ "cwe": "CWE-078",
339
+ "severity": "critical",
340
+ "arg_positions": [
341
+ 0
342
+ ],
343
+ "note": "Jenkins shared library loading with arbitrary code execution"
344
+ },
345
+ {
346
+ "method": "load",
347
+ "type": "command_injection",
348
+ "cwe": "CWE-078",
349
+ "severity": "critical",
350
+ "arg_positions": [
351
+ 0
352
+ ],
353
+ "note": "Jenkins pipeline load step - loads and executes Groovy scripts"
354
+ },
355
+ {
356
+ "method": "tool",
357
+ "type": "command_injection",
358
+ "cwe": "CWE-078",
359
+ "severity": "high",
360
+ "arg_positions": [
361
+ 0
362
+ ],
363
+ "note": "Jenkins pipeline tool step - may execute installers"
364
+ },
365
+ {
366
+ "method": "withEnv",
367
+ "type": "command_injection",
368
+ "cwe": "CWE-078",
369
+ "severity": "high",
370
+ "arg_positions": [
371
+ 0
372
+ ],
373
+ "note": "Jenkins pipeline withEnv - environment manipulation"
374
+ },
375
+ {
376
+ "method": "Exec",
377
+ "class": "org.apache.tools.ant.taskdefs",
378
+ "type": "command_injection",
379
+ "cwe": "CWE-078",
380
+ "severity": "critical"
381
+ },
382
+ {
383
+ "method": "setCommand",
384
+ "class": "Exec",
385
+ "type": "command_injection",
386
+ "cwe": "CWE-078",
387
+ "severity": "critical",
388
+ "arg_positions": [
389
+ 0
390
+ ]
391
+ },
392
+ {
393
+ "method": "File",
394
+ "class": "constructor",
395
+ "type": "command_injection",
396
+ "cwe": "CWE-78",
397
+ "severity": "critical",
398
+ "arg_positions": [
399
+ 0
400
+ ],
401
+ "note": "Auto-mined from CVE analysis"
402
+ },
403
+ {
404
+ "method": "println",
405
+ "class": "PrintWriter",
406
+ "type": "command_injection",
407
+ "cwe": "CWE-78",
408
+ "severity": "critical",
409
+ "arg_positions": [
410
+ 0
411
+ ],
412
+ "note": "Auto-mined from CVE analysis"
413
+ },
414
+ {
415
+ "method": "create",
416
+ "class": "CpsScmFlowDefinition",
417
+ "type": "command_injection",
418
+ "cwe": "CWE-078",
419
+ "severity": "critical",
420
+ "note": "Jenkins Pipeline SCM script loading"
421
+ },
422
+ {
423
+ "method": "getLibrary",
424
+ "class": "LibraryAdder",
425
+ "type": "command_injection",
426
+ "cwe": "CWE-078",
427
+ "severity": "critical",
428
+ "note": "Jenkins shared library loading"
429
+ },
430
+ {
431
+ "method": "checkout",
432
+ "class": "SCMCheckout",
433
+ "type": "command_injection",
434
+ "cwe": "CWE-078",
435
+ "severity": "critical",
436
+ "note": "Jenkins SCM checkout - may execute hooks"
437
+ },
438
+ {
439
+ "method": "imageName",
440
+ "class": "DockerRegistryEndpoint",
441
+ "type": "command_injection",
442
+ "cwe": "CWE-078",
443
+ "severity": "critical",
444
+ "note": "Jenkins Docker image name injection"
445
+ },
446
+ {
447
+ "method": "getShellArgs",
448
+ "class": "BourneShell",
449
+ "type": "command_injection",
450
+ "cwe": "CWE-078",
451
+ "severity": "critical",
452
+ "note": "Shell argument construction"
453
+ },
454
+ {
455
+ "method": "getRawCommandLine",
456
+ "class": "Shell",
457
+ "type": "command_injection",
458
+ "cwe": "CWE-078",
459
+ "severity": "critical",
460
+ "note": "Shell command line construction"
461
+ },
462
+ {
463
+ "method": "createProcess",
464
+ "class": "DefaultExecuteAsyncHandler",
465
+ "type": "command_injection",
466
+ "cwe": "CWE-078",
467
+ "severity": "critical",
468
+ "arg_positions": [0]
469
+ },
470
+ {
471
+ "method": "processControlCommand",
472
+ "class": "TransportConnection",
473
+ "type": "command_injection",
474
+ "cwe": "CWE-078",
475
+ "severity": "critical",
476
+ "note": "ActiveMQ control command processing"
477
+ },
478
+ {
479
+ "method": "run",
480
+ "class": "GroovyScript",
481
+ "type": "command_injection",
482
+ "cwe": "CWE-078",
483
+ "severity": "critical",
484
+ "note": "Groovy script execution"
485
+ },
486
+ {
487
+ "method": "parseClass",
488
+ "class": "GroovyClassLoader",
489
+ "type": "command_injection",
490
+ "cwe": "CWE-078",
491
+ "severity": "critical",
492
+ "arg_positions": [0],
493
+ "note": "Groovy class parsing with code execution"
494
+ },
495
+ {
496
+ "method": "newScript",
497
+ "class": "GroovyShell",
498
+ "type": "command_injection",
499
+ "cwe": "CWE-078",
500
+ "severity": "critical",
501
+ "arg_positions": [0],
502
+ "note": "Groovy script creation"
503
+ },
504
+ {
505
+ "method": "execute",
506
+ "class": "CommandLine",
507
+ "type": "command_injection",
508
+ "cwe": "CWE-078",
509
+ "severity": "critical",
510
+ "note": "Apache Commons Exec command execution"
511
+ },
512
+ {
513
+ "method": "addArgument",
514
+ "class": "CommandLine",
515
+ "type": "command_injection",
516
+ "cwe": "CWE-078",
517
+ "severity": "high",
518
+ "arg_positions": [0],
519
+ "note": "Adding potentially tainted argument to command"
520
+ },
521
+ {
522
+ "method": "addArguments",
523
+ "class": "CommandLine",
524
+ "type": "command_injection",
525
+ "cwe": "CWE-078",
526
+ "severity": "high",
527
+ "arg_positions": [0],
528
+ "note": "Adding potentially tainted arguments to command"
529
+ },
530
+ {
531
+ "method": "CpsFlowDefinition",
532
+ "class": "constructor",
533
+ "type": "command_injection",
534
+ "cwe": "CWE-078",
535
+ "severity": "critical",
536
+ "arg_positions": [0],
537
+ "note": "Jenkins CPS Flow Definition - executes Pipeline scripts"
538
+ },
539
+ {
540
+ "method": "CpsFlowExecution",
541
+ "class": "constructor",
542
+ "type": "command_injection",
543
+ "cwe": "CWE-078",
544
+ "severity": "critical",
545
+ "arg_positions": [0],
546
+ "note": "Jenkins CPS Flow Execution - executes Pipeline scripts"
547
+ },
548
+ {
549
+ "method": "FlowExecution",
550
+ "class": "constructor",
551
+ "type": "command_injection",
552
+ "cwe": "CWE-078",
553
+ "severity": "critical",
554
+ "arg_positions": [0],
555
+ "note": "Jenkins Flow Execution - executes Pipeline scripts"
556
+ },
557
+ {
558
+ "method": "FlowDefinition",
559
+ "class": "constructor",
560
+ "type": "command_injection",
561
+ "cwe": "CWE-078",
562
+ "severity": "critical",
563
+ "arg_positions": [0],
564
+ "note": "Jenkins Flow Definition - executes Pipeline scripts"
565
+ },
566
+ {
567
+ "method": "parseScript",
568
+ "class": "CpsGroovyShell",
569
+ "type": "command_injection",
570
+ "cwe": "CWE-078",
571
+ "severity": "critical",
572
+ "arg_positions": [0],
573
+ "note": "Jenkins CPS Groovy script parsing"
574
+ },
575
+ {
576
+ "method": "loadScript",
577
+ "type": "command_injection",
578
+ "cwe": "CWE-078",
579
+ "severity": "critical",
580
+ "arg_positions": [0],
581
+ "note": "Script loading with execution"
582
+ },
583
+ {
584
+ "method": "readTrusted",
585
+ "type": "command_injection",
586
+ "cwe": "CWE-078",
587
+ "severity": "critical",
588
+ "arg_positions": [0],
589
+ "note": "Jenkins trusted script reading"
590
+ },
591
+ {
592
+ "method": "retrieve",
593
+ "class": "LibraryAdder",
594
+ "type": "command_injection",
595
+ "cwe": "CWE-078",
596
+ "severity": "critical",
597
+ "note": "Jenkins shared library retrieval - CVE-2022-25174"
598
+ },
599
+ {
600
+ "method": "findResources",
601
+ "class": "LibraryAdder",
602
+ "type": "command_injection",
603
+ "cwe": "CWE-078",
604
+ "severity": "critical",
605
+ "note": "Jenkins shared library resource finding"
606
+ },
607
+ {
608
+ "method": "parse",
609
+ "class": "LibraryAdder",
610
+ "type": "command_injection",
611
+ "cwe": "CWE-078",
612
+ "severity": "critical",
613
+ "note": "Jenkins shared library parsing"
614
+ },
615
+ {
616
+ "method": "forGroup",
617
+ "class": "FolderLibraries",
618
+ "type": "command_injection",
619
+ "cwe": "CWE-078",
620
+ "severity": "critical",
621
+ "note": "Jenkins folder libraries - CVE-2022-25174"
622
+ },
623
+ {
624
+ "method": "BourneShell",
625
+ "class": "constructor",
626
+ "type": "command_injection",
627
+ "cwe": "CWE-078",
628
+ "severity": "critical",
629
+ "note": "Bourne shell constructor"
630
+ },
631
+ {
632
+ "method": "setQuotedArgumentsEnabled",
633
+ "class": "Shell",
634
+ "type": "command_injection",
635
+ "cwe": "CWE-078",
636
+ "severity": "high",
637
+ "note": "Shell quoting configuration"
638
+ },
639
+ {
640
+ "method": "getExecutionPreamble",
641
+ "class": "Shell",
642
+ "type": "command_injection",
643
+ "cwe": "CWE-078",
644
+ "severity": "high",
645
+ "note": "Shell preamble construction"
646
+ },
647
+ {
648
+ "method": "getEscapeChars",
649
+ "class": "Shell",
650
+ "type": "command_injection",
651
+ "cwe": "CWE-078",
652
+ "severity": "high",
653
+ "note": "Shell escape character handling"
654
+ },
655
+ {
656
+ "method": "quoteWorkingDirectoryAndExecutable",
657
+ "type": "command_injection",
658
+ "cwe": "CWE-078",
659
+ "severity": "high",
660
+ "note": "Shell path quoting"
661
+ },
662
+ {
663
+ "method": "escapeArgument",
664
+ "type": "command_injection",
665
+ "cwe": "CWE-078",
666
+ "severity": "high",
667
+ "note": "Shell argument escaping"
668
+ },
669
+ {
670
+ "method": "createExpression",
671
+ "class": "JexlEngine",
672
+ "type": "command_injection",
673
+ "cwe": "CWE-078",
674
+ "severity": "critical",
675
+ "arg_positions": [0],
676
+ "note": "Apache JEXL expression creation - can execute arbitrary code"
677
+ },
678
+ {
679
+ "method": "createScript",
680
+ "class": "JexlEngine",
681
+ "type": "command_injection",
682
+ "cwe": "CWE-078",
683
+ "severity": "critical",
684
+ "arg_positions": [0],
685
+ "note": "Apache JEXL script creation - can execute arbitrary code"
686
+ },
687
+ {
688
+ "method": "evaluate",
689
+ "class": "JexlExpression",
690
+ "type": "command_injection",
691
+ "cwe": "CWE-078",
692
+ "severity": "critical",
693
+ "note": "Apache JEXL expression evaluation"
694
+ },
695
+ {
696
+ "method": "execute",
697
+ "class": "JexlScript",
698
+ "type": "command_injection",
699
+ "cwe": "CWE-078",
700
+ "severity": "critical",
701
+ "note": "Apache JEXL script execution"
702
+ },
703
+ {
704
+ "method": "getValue",
705
+ "class": "ExpressionFactory",
706
+ "type": "command_injection",
707
+ "cwe": "CWE-078",
708
+ "severity": "critical",
709
+ "note": "EL expression evaluation - may lead to RCE"
710
+ },
711
+ {
712
+ "method": "createValueExpression",
713
+ "class": "ExpressionFactory",
714
+ "type": "command_injection",
715
+ "cwe": "CWE-078",
716
+ "severity": "critical",
717
+ "arg_positions": [1],
718
+ "note": "EL expression creation"
719
+ },
720
+ {
721
+ "method": "createMethodExpression",
722
+ "class": "ExpressionFactory",
723
+ "type": "command_injection",
724
+ "cwe": "CWE-078",
725
+ "severity": "critical",
726
+ "arg_positions": [1],
727
+ "note": "EL method expression creation"
728
+ },
729
+ {
730
+ "method": "parseExpression",
731
+ "class": "SpelExpressionParser",
732
+ "type": "command_injection",
733
+ "cwe": "CWE-078",
734
+ "severity": "critical",
735
+ "arg_positions": [0],
736
+ "note": "Spring SpEL expression parsing - CVE-2022-22963, CVE-2022-22947"
737
+ },
738
+ {
739
+ "method": "getValue",
740
+ "class": "SpelExpression",
741
+ "type": "command_injection",
742
+ "cwe": "CWE-078",
743
+ "severity": "critical",
744
+ "note": "Spring SpEL expression evaluation"
745
+ },
746
+ {
747
+ "method": "setValue",
748
+ "class": "SpelExpression",
749
+ "type": "command_injection",
750
+ "cwe": "CWE-078",
751
+ "severity": "critical",
752
+ "note": "Spring SpEL expression assignment"
753
+ },
754
+ {
755
+ "method": "getValue",
756
+ "class": "OgnlContext",
757
+ "type": "command_injection",
758
+ "cwe": "CWE-078",
759
+ "severity": "critical",
760
+ "note": "OGNL expression evaluation - CVE-2022-26134 (Confluence)"
761
+ },
762
+ {
763
+ "method": "parseExpression",
764
+ "class": "Ognl",
765
+ "type": "command_injection",
766
+ "cwe": "CWE-078",
767
+ "severity": "critical",
768
+ "arg_positions": [0],
769
+ "note": "OGNL expression parsing"
770
+ },
771
+ {
772
+ "method": "compileExpression",
773
+ "class": "Ognl",
774
+ "type": "command_injection",
775
+ "cwe": "CWE-078",
776
+ "severity": "critical",
777
+ "arg_positions": [0],
778
+ "note": "OGNL expression compilation"
779
+ },
780
+ {
781
+ "method": "evaluate",
782
+ "class": "Velocity",
783
+ "type": "command_injection",
784
+ "cwe": "CWE-078",
785
+ "severity": "critical",
786
+ "arg_positions": [1],
787
+ "note": "Apache Velocity template evaluation"
788
+ },
789
+ {
790
+ "method": "mergeTemplate",
791
+ "class": "VelocityEngine",
792
+ "type": "command_injection",
793
+ "cwe": "CWE-078",
794
+ "severity": "critical",
795
+ "arg_positions": [0, 2],
796
+ "note": "Apache Velocity template merging"
797
+ },
798
+ {
799
+ "method": "evaluate",
800
+ "class": "MvelEvaluator",
801
+ "type": "command_injection",
802
+ "cwe": "CWE-078",
803
+ "severity": "critical",
804
+ "arg_positions": [0],
805
+ "note": "MVEL expression evaluation"
806
+ },
807
+ {
808
+ "method": "eval",
809
+ "class": "MVEL",
810
+ "type": "command_injection",
811
+ "cwe": "CWE-078",
812
+ "severity": "critical",
813
+ "arg_positions": [0],
814
+ "note": "MVEL expression evaluation"
815
+ },
816
+ {
817
+ "method": "compileExpression",
818
+ "class": "MVEL",
819
+ "type": "command_injection",
820
+ "cwe": "CWE-078",
821
+ "severity": "critical",
822
+ "arg_positions": [0],
823
+ "note": "MVEL expression compilation"
824
+ },
825
+ {
826
+ "method": "executeScript",
827
+ "type": "command_injection",
828
+ "cwe": "CWE-078",
829
+ "severity": "critical",
830
+ "arg_positions": [0],
831
+ "note": "Generic script execution"
832
+ },
833
+ {
834
+ "method": "runScript",
835
+ "type": "command_injection",
836
+ "cwe": "CWE-078",
837
+ "severity": "critical",
838
+ "arg_positions": [0],
839
+ "note": "Generic script execution"
840
+ },
841
+ {
842
+ "method": "executeCommand",
843
+ "type": "command_injection",
844
+ "cwe": "CWE-078",
845
+ "severity": "critical",
846
+ "arg_positions": [0],
847
+ "note": "Generic command execution"
848
+ },
849
+ {
850
+ "method": "runCommand",
851
+ "type": "command_injection",
852
+ "cwe": "CWE-078",
853
+ "severity": "critical",
854
+ "arg_positions": [0],
855
+ "note": "Generic command execution"
856
+ },
857
+ {
858
+ "method": "system",
859
+ "type": "command_injection",
860
+ "cwe": "CWE-078",
861
+ "severity": "critical",
862
+ "arg_positions": [0],
863
+ "note": "System command execution"
864
+ },
865
+ {
866
+ "method": "shell",
867
+ "type": "command_injection",
868
+ "cwe": "CWE-078",
869
+ "severity": "critical",
870
+ "arg_positions": [0],
871
+ "note": "Shell command execution"
872
+ }
873
+ ],
874
+ "sanitizers": [
875
+ {
876
+ "method": "matches",
877
+ "class": "String",
878
+ "removes": [
879
+ "command_injection"
880
+ ],
881
+ "note": "Regex validation - check pattern is restrictive"
882
+ },
883
+ {
884
+ "method": "quote",
885
+ "class": "Pattern",
886
+ "removes": [
887
+ "command_injection"
888
+ ],
889
+ "note": "Shell escape - still risky"
890
+ }
891
+ ],
892
+ "dangerous_patterns": [
893
+ {
894
+ "pattern": "sh -c",
895
+ "risk": "critical",
896
+ "note": "Shell execution with command string"
897
+ },
898
+ {
899
+ "pattern": "bash -c",
900
+ "risk": "critical",
901
+ "note": "Bash execution with command string"
902
+ },
903
+ {
904
+ "pattern": "cmd /c",
905
+ "risk": "critical",
906
+ "note": "Windows command execution"
907
+ },
908
+ {
909
+ "pattern": "/bin/sh",
910
+ "risk": "critical"
911
+ },
912
+ {
913
+ "pattern": "/bin/bash",
914
+ "risk": "critical"
915
+ }
916
+ ]
917
+ }