forked from semgrep/semgrep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdune-project
563 lines (529 loc) · 12.8 KB
/
dune-project
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
(lang dune 3.7)
;; This file is used both to configure 'dune' as usual, and
;; to autogenerate the semgrep.opam for 'opam'.
;; classic dune-project settings
(name semgrep)
(using menhir 2.1)
; disable mangling of workspace root, to preserve debugging information
; needed to support the earlybird debugger
; See https://dune.readthedocs.io/en/stable/dune-files.html#map-workspace-root
(map_workspace_root false)
;; Opam package declarations for public libraries and public executables
;; defined in various dune files.
;; See the documentation for declaring opam packages for more info:
;; https://dune.readthedocs.io/en/stable/opam.html#opam-generation
;;
;; Type 'make semgrep.opam' to regenerate semgrep.opam
;; TODO: add it as a pre-commit hook?
(generate_opam_files)
;; set here so the semgrep package below can use it and we can easily bump it
(version 1.76.0)
;; Default attributes of opam packages
(source (github semgrep/semgrep))
(homepage "https://semgrep.dev")
(maintainers "Semgrep authors")
(authors "Semgrep authors")
;; Opam packages (sorted alphabetically)
(package
(name aliengrep)
(synopsis "Generic Semgrep-like pattern search backed by PCRE")
(description "Generic Semgrep-like pattern search backed by PCRE")
)
(package
(name ast_generic)
(version 1.8.0)
(synopsis "Abstract Syntax Tree (AST) supporting 31 programming languages")
(description "\
This is a library defining a generic AST to factorize similar
analysis on different programming languages
(e.g., naming, semantic code highlighting, semgrep matching).
Right now this generic AST is mostly the factorized union of the ASTs of:
- Python, Ruby, Lua, Julia, Elixir
- Javascript, Typescript, Vue
- PHP, Hack
- Java, CSharp, Kotlin
- C, C++
- Go
- Swift
- OCaml, Scala, Rust
- Clojure, Lisp, Scheme
- R
- Solidity
- Bash, Docker
- JSON, YAML, HCL, Jsonnet
This is a core library used by Semgrep but which can be of use in other
projects. This AST is also specified using ATD and so can be leveraged
from other programming languages such as Typescript, Java, Scala, and
the other programming languages supported by atdgen."
)
(maintainers "Yoann Padioleau <[email protected]>")
(authors "Yoann Padioleau <[email protected]>")
(license "LGPL-2.1-only")
(depends
(ocaml (>= 4.13.0))
(dune (>= 3.2.0))
(commons (>= 1.8.0))
(lib_parsing (>= 1.5.5))
(profiling (>= 1.5.5))
(atdgen (>= 2.8.0))
)
)
(package
(name commons)
(version 1.8.0)
(synopsis "Yet another set of common utilities")
(description "\
This is a small library of utilities used by Semgrep and
a few other projects developed at r2c.
"
)
(maintainers "Yoann Padioleau <[email protected]>")
(authors "Yoann Padioleau <[email protected]>")
(license "LGPL-2.1-only")
(depends
(ocaml (>= "4.13.0"))
(dune (>= "3.2.0" ))
(ANSITerminal (>= "0.8.4"))
(alcotest (>= "1.5.0"))
(cmdliner (>= "1.1.1" ))
(logs (>= "0.7.0" ))
(yojson (>= "1.7.0"))
(re (>= "1.10.4"))
(pcre (>= "7.5.0" ))
; we're currently "vendoring" pcre2 in libs/pcre2
; so no need to get opam to install it
;(pcre2 (>= "7.5.3" ))
(ppxlib (>= "0.25.0"))
(ppx_deriving (>= "5.2.1"))
(ppx_hash (>= "v0.14.0" ))
(digestif (>= "1.0.0"))
uri
bos
)
)
(package (name commons2)
(synopsis "XXX")
(description "XXX")
)
(package (name concurrency)
(synopsis "XXX")
(description "XXX")
)
(package (name gitignore)
(synopsis "XXX")
(description "XXX")
)
(package (name git_wrapper)
(synopsis "Wrappers for the git CLI")
(description "Utility functions for interacting with git on the command-line.")
)
(package (name glob)
(synopsis "XXX")
(description "XXX")
)
(package (name networking)
(synopsis "XXX")
(description "XXX")
)
(package (name murmur3)
(synopsis "XXX")
(description "XXX")
)
(package (name lwt_platform)
(synopsis "XXX")
(description "XXX")
)
(package
(name lib_parsing)
(version 1.14.0)
(synopsis "Small library to help writing parsers")
(description "\
This is a small library of utilities used by Semgrep and
a few other projects developed at r2c to help writing
parsers, especially ocamlyacc/menhir based parsers.
"
)
(maintainers "Yoann Padioleau <[email protected]>")
(authors "Yoann Padioleau <[email protected]>")
(license "LGPL-2.1-only")
(depends
(ocaml (>= "4.13.0"))
(dune (>= "3.2.0" ))
(commons (>= "1.5.5"))
(profiling (>= "1.5.5"))
(fpath (>= "0.7.3"))
)
)
(package (name lib_parsing_tree_sitter)
(synopsis "XXX")
(description "XXX")
)
(package (name ograph)
(synopsis "XXX")
(description "XXX")
)
(package (name ojsonnet)
(synopsis "XXX")
(description "XXX")
)
(package (name otarzan)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_bash)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_cairo)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_c)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_cpp)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_csharp)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_dart)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_dockerfile)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_go)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_html)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_java)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_javascript)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_jsonnet)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_json)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_julia)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_kotlin)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_lisp)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_lua)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_ocaml)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_php)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_promql)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_protobuf)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_python)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_ql)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_regexp)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_r)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_ruby)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_rust)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_scala)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_solidity)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_swift)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_terraform)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_typescript)
(synopsis "XXX")
(description "XXX")
)
(package (name parser_yaml)
(synopsis "XXX")
(description "XXX")
)
(package (name pfff-lang_GENERIC-analyze)
(synopsis "XXX")
(description "XXX")
)
(package (name pfff-lang_GENERIC-naming)
(synopsis "XXX")
(description "XXX")
)
(package (name paths)
(synopsis "XXX")
(description "XXX")
)
(package
(name process_limits)
(version 1.5.5)
(synopsis "Setting time and memory limits for your program")
(description "\
This is a small library of utilities used by Semgrep and
a few other projects developed at r2c to control the
time and memory used by Semgrep.
"
)
(maintainers "Yoann Padioleau <[email protected]>")
(authors "Yoann Padioleau <[email protected]>")
(license "LGPL-2.1-only")
(depends
(ocaml (>= "4.13.0"))
(dune (>= "3.2.0" ))
(commons (>= "1.5.5"))
)
)
(package
(name profiling)
(version "1.5.5")
(synopsis "Small library to help profile code")
(description "\
This is a small library of utilities used by Semgrep and
a few other projects developed at r2c to monitor and profile
functions.
"
)
(maintainers "Yoann Padioleau <[email protected]>")
(authors "Yoann Padioleau <[email protected]>")
(license "LGPL-2.1-only")
(depends
(ocaml (>= "4.13.0"))
(dune (>= "3.2.0" ))
(commons (>= "1.5.5"))
(process_limits (>= "1.5.5"))
)
)
(package
(name tracing)
(version "1.5.5")
(synopsis "Small library to help trace code")
(description "\
This is a small library of utilities used by Semgrep to
trace functions for the purpose of reporting them in
metrics
"
)
(maintainers "Emma Jin <[email protected]>")
(authors "Emma Jin <[email protected]>")
(license "LGPL-2.1-only")
(depends
(ocaml (>= "4.13.0"))
(dune (>= "3.2.0" ))
(commons (>= "1.5.5"))
)
)
;; coupling: if you modify this package, type 'make semgrep.opam' to update
(package (name semgrep)
(synopsis "Like grep but for code: fast and syntax-aware semantic code pattern for many languages")
(description "\
Semgrep is like grep but for searching patterns at the AST level.
For more information see https://semgrep.dev
"
)
(maintainers "Yoann Padioleau <[email protected]>")
(authors "Yoann Padioleau <[email protected]>")
(license "LGPL-2.1")
; These are build dependencies.
; Development-only dependencies are in 'dev/dev.opam'.
;coupling: for semgrep CI to be fast, we try to pre-install these packages as
; part of of the base docker image. When you add a new package or change a
; version here, please also update the list of packages there:
;
; https://github.com/returntocorp/ocaml-layer/blob/master/common-config.sh
;
; or ask Martin to do so.
; You may also need to update the ocaml:alpine-xxx image used in ../Dockerfile.
;
;coupling: because of the way we need to statically link on macOS, if
; you add a library here, you'll probably need to update src/main/flags.sh
; if this library has some C stubs.
;
;TODO: restore "bisect_ppx" {>= "2.5.0"} once can use ppxlib 0.22.0
;
; Note that we don't include here as dependencies all the libraries
; that are "vendored" inside semgrep (e.g., commons, aliengrep, pcre2)
(depends
; core deps
(ocaml (>= 4.13.0))
(dune (>= 2.7.0 ))
; parser generators
(menhir (= 20230608))
; standard libraries
; We don't use Base directly. If it's being used indirectly
; (is it, though?), we need a version that doesn't register
; rogue exception printers.
; See https://github.com/janestreet/base/issues/146
(base (>= v0.15.1))
fpath
bos
fileutils
; unit testing (TODO? still need those alcotest-xx with testo?)
alcotest
alcotest-js
alcotest-lwt
calendar
; text and terminal formating
fmt
ocolor
ANSITerminal
terminal_size
; Unicode - used via python-str-repr
uucp
uutf
; logging
logs
; JSON/YAML/XML
atdgen
(yojson ( >= 2.0.0 ))
yaml
xmlm
(sarif ( >= 0.3.0 ))
; CLI
cmdliner
; PPX
ppxlib
ppx_deriving
ppx_deriving_yojson
ppx_hash
ppx_inline_test
(ppx_sexp_conv ( = v0.16.0))
ppx_expect
(visitors (= 20210608))
; regexps
re
pcre
; we're currently "vendoring" pcre2 in libs/pcre2
; so no need to get opam to install it
;(pcre2 (>= "7.5.3" ))
; misc
ocamlgraph
parmap
semver
(timedesc (>= 2.0.0)) ; used via git-wrapper
(lsp (= 1.15.1-5.0))
git
git-unix
; tracing
trace
ppx_trace
(opentelemetry (>= 0.9))
; needed by opentelemetry-client-ocurl but the latest, 0.9.2
; does not work under windows (see https://github.com/ygrek/ocurl/issues/77)
(ocurl (= 0.9.1))
opentelemetry-client-ocurl
ambient-context-lwt
(conf-libcurl (= 1)) ; force older version of conf-libcurl to make windows work
; web stuff
uri
uuidm
; cohttp >= 6.0.0 requires opam 2.1.0 (which isn't yet on Windows)
(cohttp (= 5.3.0))
cohttp-lwt-unix
cohttp-lwt-jsoo
tls-lwt ; needed for TLS support in the cohttp HTTP client (only TLS 1.3 seems to work)
emile
(digestif (>= 1.0.0))
(tls-mirage (= 0.17.3)) ; force older version of tls-mirage to make windows work
; concurrency
lwt
lwt_ppx
(conf-libev (<> :os win32)) ; for lwt, to get better FD perf
; jsoo
(js_of_ocaml (= 5.7.2))
(js_of_ocaml-compiler (= 5.7.2))
(js_of_ocaml-ppx (= 5.7.2))
(js_of_ocaml-lwt (= 5.7.2))
ctypes_stubs_js
integers_stubs_js
)
)
(package
(name spacegrep)
(synopsis "Universal program parser and matcher")
(description "\
Uses indentation and standard braces to determine a crude parse tree
"
)
(maintainers "[email protected]")
(authors "Semgrep authors")
(license "LGPL-2.1")
(depends
alcotest
atdgen
ANSITerminal
cmdliner
(dune (>= 2.1))
)
)
(package (name tree-sitter-lang)
(synopsis "XXX")
(description "XXX")
)
(package (name tree-sitter-to-generic)
(synopsis "XXX")
(description "XXX")
)
(package (name TCB)
(synopsis "XXX")
(description "XXX")
)