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,379 @@
1
+ {
2
+ "sources": [
3
+ {
4
+ "method": "getParameter",
5
+ "class": "HttpServletRequest",
6
+ "type": "http_param",
7
+ "severity": "high",
8
+ "return_tainted": true,
9
+ "note": "Single parameter value from query string or POST body"
10
+ },
11
+ {
12
+ "method": "getParameterValues",
13
+ "class": "HttpServletRequest",
14
+ "type": "http_param",
15
+ "severity": "high",
16
+ "return_tainted": true,
17
+ "note": "Array of parameter values"
18
+ },
19
+ {
20
+ "method": "getParameterMap",
21
+ "class": "HttpServletRequest",
22
+ "type": "http_param",
23
+ "severity": "high",
24
+ "return_tainted": true,
25
+ "note": "Map of all parameters"
26
+ },
27
+ {
28
+ "method": "getHeader",
29
+ "class": "HttpServletRequest",
30
+ "type": "http_header",
31
+ "severity": "high",
32
+ "return_tainted": true,
33
+ "note": "HTTP header value - can be attacker-controlled"
34
+ },
35
+ {
36
+ "method": "getHeaders",
37
+ "class": "HttpServletRequest",
38
+ "type": "http_header",
39
+ "severity": "high",
40
+ "return_tainted": true,
41
+ "note": "Enumeration of header values"
42
+ },
43
+ {
44
+ "method": "getQueryString",
45
+ "class": "HttpServletRequest",
46
+ "type": "http_query",
47
+ "severity": "high",
48
+ "return_tainted": true,
49
+ "note": "Full query string - highly tainted"
50
+ },
51
+ {
52
+ "method": "getRequestURI",
53
+ "class": "HttpServletRequest",
54
+ "type": "http_path",
55
+ "severity": "medium",
56
+ "return_tainted": true,
57
+ "note": "Request URI - can contain path traversal"
58
+ },
59
+ {
60
+ "method": "getPathInfo",
61
+ "class": "HttpServletRequest",
62
+ "type": "http_path",
63
+ "severity": "medium",
64
+ "return_tainted": true,
65
+ "note": "Extra path information"
66
+ },
67
+ {
68
+ "method": "getCookies",
69
+ "class": "HttpServletRequest",
70
+ "type": "http_cookie",
71
+ "severity": "high",
72
+ "return_tainted": true,
73
+ "note": "Array of Cookie objects"
74
+ },
75
+ {
76
+ "method": "getValue",
77
+ "class": "Cookie",
78
+ "type": "http_cookie",
79
+ "severity": "high",
80
+ "return_tainted": true,
81
+ "note": "Cookie value - attacker-controlled"
82
+ },
83
+ {
84
+ "method": "getInputStream",
85
+ "class": "HttpServletRequest",
86
+ "type": "http_body",
87
+ "severity": "high",
88
+ "return_tainted": true,
89
+ "note": "Raw request body input stream"
90
+ },
91
+ {
92
+ "method": "getReader",
93
+ "class": "HttpServletRequest",
94
+ "type": "http_body",
95
+ "severity": "high",
96
+ "return_tainted": true,
97
+ "note": "BufferedReader for request body"
98
+ },
99
+ {
100
+ "annotation": "@RequestParam",
101
+ "type": "http_param",
102
+ "severity": "high",
103
+ "param_tainted": true,
104
+ "note": "Spring request parameter binding"
105
+ },
106
+ {
107
+ "annotation": "@RequestBody",
108
+ "type": "http_body",
109
+ "severity": "high",
110
+ "param_tainted": true,
111
+ "note": "Spring request body (JSON/XML)"
112
+ },
113
+ {
114
+ "annotation": "@PathVariable",
115
+ "type": "http_path",
116
+ "severity": "medium",
117
+ "param_tainted": true,
118
+ "note": "Spring path variable from URL"
119
+ },
120
+ {
121
+ "annotation": "@RequestHeader",
122
+ "type": "http_header",
123
+ "severity": "high",
124
+ "param_tainted": true,
125
+ "note": "Spring request header binding"
126
+ },
127
+ {
128
+ "annotation": "@CookieValue",
129
+ "type": "http_cookie",
130
+ "severity": "high",
131
+ "param_tainted": true,
132
+ "note": "Spring cookie value binding"
133
+ },
134
+ {
135
+ "annotation": "@MatrixVariable",
136
+ "type": "http_param",
137
+ "severity": "medium",
138
+ "param_tainted": true,
139
+ "note": "Spring matrix variable from URL"
140
+ },
141
+ {
142
+ "annotation": "@QueryParam",
143
+ "type": "http_param",
144
+ "severity": "high",
145
+ "param_tainted": true,
146
+ "note": "JAX-RS query parameter"
147
+ },
148
+ {
149
+ "annotation": "@FormParam",
150
+ "type": "http_param",
151
+ "severity": "high",
152
+ "param_tainted": true,
153
+ "note": "JAX-RS form parameter"
154
+ },
155
+ {
156
+ "annotation": "@PathParam",
157
+ "type": "http_path",
158
+ "severity": "medium",
159
+ "param_tainted": true,
160
+ "note": "JAX-RS path parameter"
161
+ },
162
+ {
163
+ "annotation": "@HeaderParam",
164
+ "type": "http_header",
165
+ "severity": "high",
166
+ "param_tainted": true,
167
+ "note": "JAX-RS header parameter"
168
+ },
169
+ {
170
+ "annotation": "@CookieParam",
171
+ "type": "http_cookie",
172
+ "severity": "high",
173
+ "param_tainted": true,
174
+ "note": "JAX-RS cookie parameter"
175
+ },
176
+ {
177
+ "annotation": "@MatrixParam",
178
+ "type": "http_param",
179
+ "severity": "medium",
180
+ "param_tainted": true,
181
+ "note": "JAX-RS matrix parameter"
182
+ },
183
+ {
184
+ "method": "queryParam",
185
+ "class": "ServerRequest",
186
+ "type": "http_param",
187
+ "severity": "high",
188
+ "return_tainted": true,
189
+ "note": "WebFlux query parameter"
190
+ },
191
+ {
192
+ "method": "pathVariable",
193
+ "class": "ServerRequest",
194
+ "type": "http_path",
195
+ "severity": "medium",
196
+ "return_tainted": true,
197
+ "note": "WebFlux path variable"
198
+ },
199
+ {
200
+ "method": "header",
201
+ "class": "ServerRequest",
202
+ "type": "http_header",
203
+ "severity": "high",
204
+ "return_tainted": true,
205
+ "note": "WebFlux request header"
206
+ },
207
+ {
208
+ "method": "bodyToMono",
209
+ "class": "ServerRequest",
210
+ "type": "http_body",
211
+ "severity": "high",
212
+ "return_tainted": true,
213
+ "note": "WebFlux request body as Mono"
214
+ },
215
+ {
216
+ "method": "bodyToFlux",
217
+ "class": "ServerRequest",
218
+ "type": "http_body",
219
+ "severity": "high",
220
+ "return_tainted": true,
221
+ "note": "WebFlux request body as Flux"
222
+ },
223
+ {
224
+ "method": "getTheParameter",
225
+ "class": "SeparateClassRequest",
226
+ "type": "http_param",
227
+ "severity": "high",
228
+ "return_tainted": true,
229
+ "note": "OWASP Benchmark wrapper for getParameter"
230
+ },
231
+ {
232
+ "method": "getTheHeaders",
233
+ "class": "SeparateClassRequest",
234
+ "type": "http_header",
235
+ "severity": "high",
236
+ "return_tainted": true,
237
+ "note": "OWASP Benchmark wrapper for getHeaders"
238
+ },
239
+ {
240
+ "method": "getTheCookies",
241
+ "class": "SeparateClassRequest",
242
+ "type": "http_cookie",
243
+ "severity": "high",
244
+ "return_tainted": true,
245
+ "note": "OWASP Benchmark wrapper for getCookies"
246
+ },
247
+ {
248
+ "method": "nextElement",
249
+ "class": "Enumeration",
250
+ "type": "http_header",
251
+ "severity": "high",
252
+ "return_tainted": true,
253
+ "note": "Value from header/cookie enumeration"
254
+ },
255
+ {
256
+ "method": "getInitParameter",
257
+ "class": "ServletConfig",
258
+ "type": "config_param",
259
+ "severity": "medium",
260
+ "return_tainted": true,
261
+ "note": "Servlet init parameter - may be attacker-influenced"
262
+ },
263
+ {
264
+ "method": "getInitParameter",
265
+ "class": "ServletContext",
266
+ "type": "config_param",
267
+ "severity": "medium",
268
+ "return_tainted": true,
269
+ "note": "Context init parameter - may be attacker-influenced"
270
+ },
271
+ {
272
+ "method": "getInitParameter",
273
+ "class": "FilterConfig",
274
+ "type": "config_param",
275
+ "severity": "medium",
276
+ "return_tainted": true,
277
+ "note": "Filter init parameter"
278
+ },
279
+ {
280
+ "method": "getServletConfig",
281
+ "class": "GenericServlet",
282
+ "type": "config_param",
283
+ "severity": "medium",
284
+ "return_tainted": true,
285
+ "note": "Returns servlet config which has init parameters"
286
+ },
287
+ {
288
+ "annotation": "@ModelAttribute",
289
+ "type": "http_model",
290
+ "severity": "high",
291
+ "param_tainted": true,
292
+ "note": "Spring model attribute from request binding"
293
+ },
294
+ {
295
+ "annotation": "@SessionAttribute",
296
+ "type": "session_data",
297
+ "severity": "high",
298
+ "param_tainted": true,
299
+ "note": "Spring session attribute"
300
+ },
301
+ {
302
+ "annotation": "@RequestAttribute",
303
+ "type": "request_data",
304
+ "severity": "high",
305
+ "param_tainted": true,
306
+ "note": "Spring request attribute"
307
+ },
308
+ {
309
+ "method": "getAppname",
310
+ "type": "model_field",
311
+ "severity": "high",
312
+ "return_tainted": true,
313
+ "note": "Model object getter - may contain HTTP request data"
314
+ },
315
+ {
316
+ "method": "getTitle",
317
+ "type": "model_field",
318
+ "severity": "high",
319
+ "return_tainted": true,
320
+ "note": "Model object getter - may contain HTTP request data"
321
+ },
322
+ {
323
+ "method": "getAddressList",
324
+ "type": "model_field",
325
+ "severity": "high",
326
+ "return_tainted": true,
327
+ "note": "Model object getter - may contain HTTP request data"
328
+ },
329
+ {
330
+ "method": "getDescription",
331
+ "type": "model_field",
332
+ "severity": "high",
333
+ "return_tainted": true,
334
+ "note": "Model object getter - may contain HTTP request data"
335
+ },
336
+ {
337
+ "method": "getName",
338
+ "type": "model_field",
339
+ "severity": "high",
340
+ "return_tainted": true,
341
+ "note": "Model object getter - may contain HTTP request data"
342
+ },
343
+ {
344
+ "method": "getContent",
345
+ "type": "model_field",
346
+ "severity": "high",
347
+ "return_tainted": true,
348
+ "note": "Model object getter - may contain HTTP request data"
349
+ },
350
+ {
351
+ "method": "getMessage",
352
+ "type": "model_field",
353
+ "severity": "high",
354
+ "return_tainted": true,
355
+ "note": "Model object getter - may contain HTTP request data"
356
+ },
357
+ {
358
+ "method": "getUrl",
359
+ "type": "model_field",
360
+ "severity": "high",
361
+ "return_tainted": true,
362
+ "note": "Model object getter - may contain HTTP request data"
363
+ },
364
+ {
365
+ "method": "getPath",
366
+ "type": "model_field",
367
+ "severity": "high",
368
+ "return_tainted": true,
369
+ "note": "Model object getter - may contain HTTP request data"
370
+ },
371
+ {
372
+ "method": "getBody",
373
+ "type": "model_field",
374
+ "severity": "high",
375
+ "return_tainted": true,
376
+ "note": "Model object getter - may contain HTTP request data"
377
+ }
378
+ ]
379
+ }