-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsemgrep_output_v1_j.mli
3668 lines (2964 loc) · 115 KB
/
semgrep_output_v1_j.mli
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
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Auto-generated from "semgrep_output_v1.atd" *)
[@@@ocaml.warning "-27-32-33-35-39"]
type datetime = Semgrep_output_v1_t.datetime
type dependency_child = Semgrep_output_v1_t.dependency_child = {
package: string;
version: string
}
type ecosystem = Semgrep_output_v1_t.ecosystem [@@deriving show,eq]
type fpath = Semgrep_output_v1_t.fpath [@@deriving show, eq]
type match_severity = Semgrep_output_v1_t.match_severity
[@@deriving show, eq]
type matching_operation = Semgrep_output_v1_t.matching_operation =
And
| Or
| Inside
| Anywhere
| XPat of string
| Negation
| Filter of string
| Taint
| TaintSource
| TaintSink
| TaintSanitizer
| EllipsisAndStmts
| ClassHeaderAndElems
[@@deriving show { with_path = false}]
type position = Semgrep_output_v1_t.position = {
line: int;
col: int;
offset: int
}
[@@deriving show]
type location = Semgrep_output_v1_t.location = {
path: fpath;
start: position;
end_ (*atd end *): position
}
[@@deriving show]
type loc_and_content = Semgrep_output_v1_t.loc_and_content
type match_intermediate_var = Semgrep_output_v1_t.match_intermediate_var = {
location: location;
content: string
}
type pro_feature = Semgrep_output_v1_t.pro_feature = {
interproc_taint: bool;
interfile_taint: bool;
proprietary_language: bool
}
[@@deriving show]
type engine_of_finding = Semgrep_output_v1_t.engine_of_finding
[@@deriving show]
type raw_json = Yojson.Basic.t
type rule_id = Semgrep_output_v1_t.rule_id [@@deriving show]
type sca_pattern = Semgrep_output_v1_t.sca_pattern = {
ecosystem: ecosystem;
package: string;
semver_range: string
}
type sha1 = Semgrep_output_v1_t.sha1
type historical_info = Semgrep_output_v1_t.historical_info = {
git_commit: sha1;
git_blob: sha1 option;
git_commit_timestamp: datetime
}
type svalue_value = Semgrep_output_v1_t.svalue_value = {
svalue_start: position option;
svalue_end: position option;
svalue_abstract_content: string
}
type metavar_value = Semgrep_output_v1_t.metavar_value = {
start: position;
end_ (*atd end *): position;
abstract_content: string;
propagated_value: svalue_value option
}
type metavars = Semgrep_output_v1_t.metavars
type transitivity = Semgrep_output_v1_t.transitivity [@@deriving show,eq]
type found_dependency = Semgrep_output_v1_t.found_dependency = {
package: string;
version: string;
ecosystem: ecosystem;
allowed_hashes: (string * string list) list;
resolved_url: string option;
transitivity: transitivity;
manifest_path: fpath option;
lockfile_path: fpath option;
line_number: int option;
children: dependency_child list option;
git_ref: string option
}
type dependency_match = Semgrep_output_v1_t.dependency_match = {
dependency_pattern: sca_pattern;
found_dependency: found_dependency;
lockfile: fpath
}
type sca_match = Semgrep_output_v1_t.sca_match = {
reachable: bool;
reachability_rule: bool;
sca_finding_schema: int;
dependency_match: dependency_match
}
type validation_state = Semgrep_output_v1_t.validation_state
[@@deriving show, eq]
type match_call_trace = Semgrep_output_v1_t.match_call_trace =
CliLoc of loc_and_content
| CliCall
of (loc_and_content * match_intermediate_var list * match_call_trace)
type match_dataflow_trace = Semgrep_output_v1_t.match_dataflow_trace = {
taint_source: match_call_trace option;
intermediate_vars: match_intermediate_var list option;
taint_sink: match_call_trace option
}
type core_match_extra = Semgrep_output_v1_t.core_match_extra = {
metavars: metavars;
engine_kind: engine_of_finding;
is_ignored: bool;
message: string option;
metadata: raw_json option;
severity: match_severity option;
fix: string option;
dataflow_trace: match_dataflow_trace option;
sca_match: sca_match option;
validation_state: validation_state option;
historical_info: historical_info option;
extra_extra: raw_json option
}
type core_match = Semgrep_output_v1_t.core_match = {
check_id: rule_id;
path: fpath;
start: position;
end_ (*atd end *): position;
extra: core_match_extra
}
type matching_explanation_extra =
Semgrep_output_v1_t.matching_explanation_extra = {
before_negation_matches: core_match list option;
before_filter_matches: core_match list option
}
type matching_explanation = Semgrep_output_v1_t.matching_explanation = {
op: matching_operation;
children: matching_explanation list;
matches: core_match list;
loc: location;
extra: matching_explanation_extra option
}
type version = Semgrep_output_v1_t.version [@@deriving show]
type uuid = Semgrep_output_v1_t.uuid
type uri = Semgrep_output_v1_t.uri
type snippet = Semgrep_output_v1_t.snippet = { line: int; text: string }
type killing_parent_kind = Semgrep_output_v1_t.killing_parent_kind
type killing_parent = Semgrep_output_v1_t.killing_parent = {
killing_parent_kind: killing_parent_kind;
snippet: snippet
}
type unexpected_no_match_diagnosis_kind =
Semgrep_output_v1_t.unexpected_no_match_diagnosis_kind
type unexpected_no_match_diagnosis =
Semgrep_output_v1_t.unexpected_no_match_diagnosis = {
line: int;
kind: unexpected_no_match_diagnosis_kind
}
type originating_node_kind = Semgrep_output_v1_t.originating_node_kind
type unexpected_match_diagnosis =
Semgrep_output_v1_t.unexpected_match_diagnosis = {
matched_text: snippet;
originating_kind: originating_node_kind;
originating_text: snippet;
killing_parents: killing_parent list
}
type triage_ignored = Semgrep_output_v1_t.triage_ignored = {
triage_ignored_syntactic_ids: string list;
triage_ignored_match_based_ids: string list
}
type todo = Semgrep_output_v1_t.todo
type matching_diagnosis = Semgrep_output_v1_t.matching_diagnosis = {
target: fpath;
unexpected_match_diagnoses: unexpected_match_diagnosis list;
unexpected_no_match_diagnoses: unexpected_no_match_diagnosis list
}
type expected_reported = Semgrep_output_v1_t.expected_reported = {
expected_lines: int list;
reported_lines: int list
}
type rule_result = Semgrep_output_v1_t.rule_result = {
passed: bool;
matches: (string * expected_reported) list;
errors: todo list;
diagnosis: matching_diagnosis option
}
type fixtest_result = Semgrep_output_v1_t.fixtest_result = { passed: bool }
type config_error_reason = Semgrep_output_v1_t.config_error_reason =
UnparsableRule
type config_error = Semgrep_output_v1_t.config_error = {
file: fpath;
reason: config_error_reason
}
type checks = Semgrep_output_v1_t.checks = {
checks: (string * rule_result) list
}
type tests_result = Semgrep_output_v1_t.tests_result = {
results: (string * checks) list;
fixtest_results: (string * fixtest_result) list;
config_missing_tests: fpath list;
config_missing_fixtests: fpath list;
config_with_errors: config_error list
}
type product = Semgrep_output_v1_t.product [@@deriving show, eq]
type lockfile_kind = Semgrep_output_v1_t.lockfile_kind =
PipRequirementsTxt | PoetryLock | PipfileLock | UvLock
| NpmPackageLockJson | YarnLock | PnpmLock | GemfileLock | GoMod
| CargoLock | MavenDepTree | GradleLockfile | ComposerLock
| NugetPackagesLockJson | PubspecLock | SwiftPackageResolved | PodfileLock
| MixLock | ConanLock
[@@deriving show, eq, yojson]
type lockfile = Semgrep_output_v1_t.lockfile = {
kind: lockfile_kind;
path: fpath
}
[@@deriving show, eq]
type analyzer = Semgrep_output_v1_t.analyzer [@@deriving show]
type code_target = Semgrep_output_v1_t.code_target = {
path: fpath;
analyzer: analyzer;
products: product list;
lockfile_target: lockfile option
}
[@@deriving show]
type target = Semgrep_output_v1_t.target [@@deriving show]
type targets = Semgrep_output_v1_t.targets [@@deriving show]
type target_times = Semgrep_output_v1_t.target_times = {
path: fpath;
num_bytes: int;
match_times: float list;
parse_times: float list;
run_time: float
}
type tag = Semgrep_output_v1_t.tag
type resolution_method = Semgrep_output_v1_t.resolution_method
[@@deriving show]
type manifest_kind = Semgrep_output_v1_t.manifest_kind [@@deriving show, eq]
type dependency_source_file_kind =
Semgrep_output_v1_t.dependency_source_file_kind
[@@deriving show]
type dependency_source_file = Semgrep_output_v1_t.dependency_source_file = {
kind: dependency_source_file_kind;
path: fpath
}
type dependency_resolution_stats =
Semgrep_output_v1_t.dependency_resolution_stats = {
resolution_method: resolution_method;
dependency_count: int;
ecosystem: ecosystem
}
type subproject_stats = Semgrep_output_v1_t.subproject_stats = {
subproject_id: string;
dependency_sources: dependency_source_file list;
resolved_stats: dependency_resolution_stats option
}
type supply_chain_stats = Semgrep_output_v1_t.supply_chain_stats = {
subprojects_stats: subproject_stats list
}
type skip_reason = Semgrep_output_v1_t.skip_reason =
Always_skipped | Semgrepignore_patterns_match
| Cli_include_flags_do_not_match | Cli_exclude_flags_match
| Exceeded_size_limit | Analysis_failed_parser_or_internal_error
| Excluded_by_config | Wrong_language | Too_big | Minified | Binary
| Irrelevant_rule | Too_many_matches | Gitignore_patterns_match | Dotfile
| Nonexistent_file | Insufficient_permissions
[@@deriving show]
type skipped_target = Semgrep_output_v1_t.skipped_target = {
path: fpath;
reason: skip_reason;
details: string option;
rule_id: rule_id option
}
[@@deriving show]
type skipped_rule = Semgrep_output_v1_t.skipped_rule = {
rule_id: rule_id;
details: string;
position: position
}
type scanned_and_skipped = Semgrep_output_v1_t.scanned_and_skipped = {
scanned: fpath list;
skipped: skipped_target list option
}
type scan_info = Semgrep_output_v1_t.scan_info = {
id: int option;
enabled_products: product list;
deployment_id: int;
deployment_name: string
}
type scan_configuration = Semgrep_output_v1_t.scan_configuration = {
rules: raw_json;
triage_ignored_syntactic_ids: string list;
triage_ignored_match_based_ids: string list
}
type glob = Semgrep_output_v1_t.glob
type product_ignored_files = Semgrep_output_v1_t.product_ignored_files
type historical_configuration =
Semgrep_output_v1_t.historical_configuration = {
enabled: bool;
lookback_days: int option
}
type engine_configuration = Semgrep_output_v1_t.engine_configuration = {
autofix: bool;
deepsemgrep: bool;
dependency_query: bool;
path_to_transitivity: bool;
scan_all_deps_in_diff_scan: bool;
ignored_files: string list;
product_ignored_files: product_ignored_files option;
generic_slow_rollout: bool;
historical_config: historical_configuration option;
always_suppress_errors: bool
}
type scan_response = Semgrep_output_v1_t.scan_response = {
info: scan_info;
config: scan_configuration;
engine_params: engine_configuration
}
type scan_metadata = Semgrep_output_v1_t.scan_metadata = {
cli_version: version;
unique_id: uuid;
requested_products: product list;
dry_run: bool;
sms_scan_id: string option
}
type project_metadata = Semgrep_output_v1_t.project_metadata = {
scan_environment: string;
repository: string;
repo_url: uri option;
repo_id: string option;
org_id: string option;
repo_display_name: string option;
branch: string option;
commit: sha1 option;
commit_title: string option;
commit_timestamp: datetime option;
commit_author_email: string option;
commit_author_name: string option;
commit_author_username: string option;
commit_author_image_url: uri option;
ci_job_url: uri option;
on: string;
pull_request_author_username: string option;
pull_request_author_image_url: uri option;
pull_request_id: string option;
pull_request_title: string option;
base_sha: sha1 option;
start_sha: sha1 option;
is_full_scan: bool;
is_sca_scan: bool option;
is_code_scan: bool option;
is_secrets_scan: bool option
}
type ci_config_from_repo = Semgrep_output_v1_t.ci_config_from_repo = {
version: version;
tags: tag list option
}
type scan_request = Semgrep_output_v1_t.scan_request = {
project_metadata: project_metadata;
scan_metadata: scan_metadata;
project_config: ci_config_from_repo option
}
type ci_env = Semgrep_output_v1_t.ci_env
type ci_config = Semgrep_output_v1_t.ci_config = {
env: ci_env;
enabled_products: product list;
ignored_files: string list;
autofix: bool;
deepsemgrep: bool;
dependency_query: bool;
path_to_transitivity: bool;
scan_all_deps_in_diff_scan: bool
}
type action = Semgrep_output_v1_t.action
type ci_config_from_cloud = Semgrep_output_v1_t.ci_config_from_cloud = {
repo_config: ci_config;
org_config: ci_config option;
dirs_config: (fpath * ci_config) list option;
actions: action list
}
type scan_config = Semgrep_output_v1_t.scan_config = {
deployment_id: int;
deployment_name: string;
policy_names: string list;
rule_config: string;
autofix: bool;
deepsemgrep: bool;
dependency_query: bool;
path_to_transitivity: bool;
scan_all_deps_in_diff_scan: bool;
triage_ignored_syntactic_ids: string list;
triage_ignored_match_based_ids: string list;
ignored_files: string list;
enabled_products: product list option;
actions: action list;
ci_config_from_cloud: ci_config_from_cloud option
}
type sca_parser_name = Semgrep_output_v1_t.sca_parser_name
type sarif_format = Semgrep_output_v1_t.sarif_format = {
rules: fpath;
is_pro: bool;
show_dataflow_traces: bool
}
type engine_kind = Semgrep_output_v1_t.engine_kind [@@deriving show]
type rule_id_and_engine_kind = Semgrep_output_v1_t.rule_id_and_engine_kind
type resolution_cmd_failed = Semgrep_output_v1_t.resolution_cmd_failed = {
command: string;
message: string
}
[@@deriving show]
type resolution_error = Semgrep_output_v1_t.resolution_error
[@@deriving show]
type resolution_result = Semgrep_output_v1_t.resolution_result
type profile = Semgrep_output_v1_t.profile = {
rules: rule_id list;
rules_parse_time: float;
profiling_times: (string * float) list;
targets: target_times list;
total_bytes: int;
max_memory_bytes: int option
}
type parsing_stats = Semgrep_output_v1_t.parsing_stats = {
targets_parsed: int;
num_targets: int;
bytes_parsed: int;
num_bytes: int
}
type incompatible_rule = Semgrep_output_v1_t.incompatible_rule = {
rule_id: rule_id;
this_version: version;
min_version: version option;
max_version: version option
}
[@@deriving show]
type finding_hashes = Semgrep_output_v1_t.finding_hashes = {
start_line_hash: string;
end_line_hash: string;
code_hash: string;
pattern_hash: string
}
type finding = Semgrep_output_v1_t.finding = {
check_id: rule_id;
path: fpath;
line: int;
column: int;
end_line: int;
end_column: int;
message: string;
severity: Yojson.Safe.t;
index: int;
commit_date: string;
syntactic_id: string;
match_based_id: string option;
hashes: finding_hashes option;
metadata: raw_json;
is_blocking: bool;
fixed_lines: string list option;
sca_info: sca_match option;
dataflow_trace: match_dataflow_trace option;
validation_state: validation_state option;
historical_info: historical_info option;
engine_kind: engine_of_finding option
}
type error_type = Semgrep_output_v1_t.error_type =
LexicalError
| ParseError
| OtherParseError
| AstBuilderError
| RuleParseError
| SemgrepWarning
| SemgrepError
| InvalidRuleSchemaError
| UnknownLanguageError
| InvalidYaml
| MatchingError
| SemgrepMatchFound
| TooManyMatches
| FatalError
| Timeout
| OutOfMemory
| StackOverflow
| TimeoutDuringInterfile
| OutOfMemoryDuringInterfile
| MissingPlugin
| PatternParseError of string list
| PartialParsing of location list
| IncompatibleRule of incompatible_rule
| PatternParseError0
| IncompatibleRule0
| DependencyResolutionError of resolution_error
[@@deriving show]
type error_span = Semgrep_output_v1_t.error_span = {
file: fpath;
start: position;
end_ (*atd end *): position;
source_hash: string option;
config_start: position option option;
config_end: position option option;
config_path: string list option option;
context_start: position option option;
context_end: position option option
}
type error_severity = Semgrep_output_v1_t.error_severity
[@@deriving show, eq]
type dependency_parser_error = Semgrep_output_v1_t.dependency_parser_error = {
path: fpath;
parser: sca_parser_name;
reason: string;
line: int option;
col: int option;
text: string option
}
type contributor = Semgrep_output_v1_t.contributor = {
commit_author_name: string;
commit_author_email: string
}
type contribution = Semgrep_output_v1_t.contribution = {
commit_hash: string;
commit_timestamp: datetime;
contributor: contributor
}
type contributions = Semgrep_output_v1_t.contributions
type cli_error = Semgrep_output_v1_t.cli_error = {
code: int;
level: error_severity;
type_: error_type;
rule_id: rule_id option;
message: string option;
path: fpath option;
long_msg: string option;
short_msg: string option;
spans: error_span list option;
help: string option
}
type ci_scan_dependencies = Semgrep_output_v1_t.ci_scan_dependencies
type ci_scan_results = Semgrep_output_v1_t.ci_scan_results = {
findings: finding list;
ignores: finding list;
token: string option;
searched_paths: fpath list;
renamed_paths: fpath list;
rule_ids: rule_id list;
contributions: contributions option;
dependencies: ci_scan_dependencies option
}
type ci_scan_failure = Semgrep_output_v1_t.ci_scan_failure = {
exit_code: int;
stderr: string
}
type ci_scan_complete_stats = Semgrep_output_v1_t.ci_scan_complete_stats = {
findings: int;
errors: cli_error list;
total_time: float;
unsupported_exts: (string * int) list;
lockfile_scan_info: (string * int) list;
parse_rate: (string * parsing_stats) list;
engine_requested: string option;
findings_by_product: (string * int) list option;
supply_chain_stats: supply_chain_stats option
}
type ci_scan_complete = Semgrep_output_v1_t.ci_scan_complete = {
exit_code: int;
stats: ci_scan_complete_stats;
dependencies: ci_scan_dependencies option;
dependency_parser_errors: dependency_parser_error list option;
task_id: string option;
final_attempt: bool option
}
type partial_scan_result = Semgrep_output_v1_t.partial_scan_result
type output_format = Semgrep_output_v1_t.output_format =
Text | Json | Emacs | Vim | Sarif | Gitlab_sast | Gitlab_secrets
| Junit_xml | Files_with_matches | Incremental
[@@deriving show]
type match_based_id = Semgrep_output_v1_t.match_based_id
[@@deriving show, eq]
type manifest = Semgrep_output_v1_t.manifest = {
kind: manifest_kind;
path: fpath
}
[@@deriving show, eq]
type has_features = Semgrep_output_v1_t.has_features = {
has_autofix: bool;
has_deepsemgrep: bool;
has_triage_via_comment: bool;
has_dependency_query: bool
}
type dependency_source = Semgrep_output_v1_t.dependency_source =
ManifestOnlyDependencySource of manifest
| LockfileOnlyDependencySource of lockfile
| ManifestLockfileDependencySource of (manifest * lockfile)
[@@deriving show]
type apply_fixes_return = Semgrep_output_v1_t.apply_fixes_return = {
modified_file_count: int;
fixed_lines: (int * string list) list
}
type function_return = Semgrep_output_v1_t.function_return
type format_context = Semgrep_output_v1_t.format_context = {
is_ci_invocation: bool;
is_logged_in: bool;
is_using_registry: bool
}
[@@deriving show]
type edit = Semgrep_output_v1_t.edit = {
path: fpath;
start_offset: int;
end_offset: int;
replacement_text: string
}
type dump_rule_partitions_params =
Semgrep_output_v1_t.dump_rule_partitions_params = {
rules: raw_json;
n_partitions: int;
output_dir: fpath
}
type cli_match_extra = Semgrep_output_v1_t.cli_match_extra = {
metavars: metavars option;
message: string;
fix: string option;
fixed_lines: string list option;
metadata: raw_json;
severity: match_severity;
fingerprint: string;
lines: string;
is_ignored: bool option;
sca_info: sca_match option;
validation_state: validation_state option;
historical_info: historical_info option;
dataflow_trace: match_dataflow_trace option;
engine_kind: engine_of_finding option;
extra_extra: raw_json option
}
type cli_match = Semgrep_output_v1_t.cli_match = {
check_id: rule_id;
path: fpath;
start: position;
end_ (*atd end *): position;
extra: cli_match_extra
}
type cli_output = Semgrep_output_v1_t.cli_output = {
version: version option;
results: cli_match list;
errors: cli_error list;
paths: scanned_and_skipped;
time: profile option;
explanations: matching_explanation list option;
rules_by_engine: rule_id_and_engine_kind list option;
engine_requested: engine_kind option;
interfile_languages_used: string list option;
skipped_rules: skipped_rule list
}
type apply_fixes_params = Semgrep_output_v1_t.apply_fixes_params = {
dryrun: bool;
edits: edit list
}
type function_call = Semgrep_output_v1_t.function_call
type features = Semgrep_output_v1_t.features = {
autofix: bool;
deepsemgrep: bool;
dependency_query: bool;
path_to_transitivity: bool;
scan_all_deps_in_diff_scan: bool
}
type diff_file = Semgrep_output_v1_t.diff_file = {
filename: fpath;
diffs: string list;
url: string
}
[@@deriving show]
type diff_files = Semgrep_output_v1_t.diff_files = {
cve_diffs: diff_file list
}
[@@deriving show]
type deployment_config = Semgrep_output_v1_t.deployment_config = {
id: int;
name: string;
organization_id: int;
display_name: string;
scm_name: string;
slug: string;
source_type: string;
default_user_role: string;
has_autofix: bool;
has_deepsemgrep: bool;
has_triage_via_comment: bool;
has_dependency_query: bool
}
[@@deriving show]
type deployment_response = Semgrep_output_v1_t.deployment_response = {
deployment: deployment_config
}
type core_error = Semgrep_output_v1_t.core_error = {
error_type: error_type;
severity: error_severity;
message: string;
details: string option;
location: location option;
rule_id: rule_id option
}
type core_output = Semgrep_output_v1_t.core_output = {
version: version;
results: core_match list;
errors: core_error list;
paths: scanned_and_skipped;
time: profile option;
explanations: matching_explanation list option;
rules_by_engine: rule_id_and_engine_kind list option;
engine_requested: engine_kind option;
interfile_languages_used: string list option;
skipped_rules: skipped_rule list
}
type cli_output_extra = Semgrep_output_v1_t.cli_output_extra = {
paths: scanned_and_skipped;
time: profile option;
explanations: matching_explanation list option;
rules_by_engine: rule_id_and_engine_kind list option;
engine_requested: engine_kind option;
interfile_languages_used: string list option;
skipped_rules: skipped_rule list
}
type ci_scan_results_response_error =
Semgrep_output_v1_t.ci_scan_results_response_error = {
message: string
}
[@@deriving show]
type ci_scan_results_response =
Semgrep_output_v1_t.ci_scan_results_response = {
errors: ci_scan_results_response_error list;
task_id: string option
}
[@@deriving show]
type ci_scan_complete_response =
Semgrep_output_v1_t.ci_scan_complete_response = {
success: bool;
app_block_override: bool;
app_block_reason: string;
app_blocking_match_based_ids: match_based_id list
}
[@@deriving show]
val write_datetime :
Buffer.t -> datetime -> unit
(** Output a JSON value of type {!type:datetime}. *)
val string_of_datetime :
?len:int -> datetime -> string
(** Serialize a value of type {!type:datetime}
into a JSON string.
@param len specifies the initial length
of the buffer used internally.
Default: 1024. *)
val read_datetime :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> datetime
(** Input JSON data of type {!type:datetime}. *)
val datetime_of_string :
string -> datetime
(** Deserialize JSON data of type {!type:datetime}. *)
val write_dependency_child :
Buffer.t -> dependency_child -> unit
(** Output a JSON value of type {!type:dependency_child}. *)
val string_of_dependency_child :
?len:int -> dependency_child -> string
(** Serialize a value of type {!type:dependency_child}
into a JSON string.
@param len specifies the initial length
of the buffer used internally.
Default: 1024. *)
val read_dependency_child :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> dependency_child
(** Input JSON data of type {!type:dependency_child}. *)
val dependency_child_of_string :
string -> dependency_child
(** Deserialize JSON data of type {!type:dependency_child}. *)
val write_ecosystem :
Buffer.t -> ecosystem -> unit
(** Output a JSON value of type {!type:ecosystem}. *)
val string_of_ecosystem :
?len:int -> ecosystem -> string
(** Serialize a value of type {!type:ecosystem}
into a JSON string.
@param len specifies the initial length
of the buffer used internally.
Default: 1024. *)
val read_ecosystem :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> ecosystem
(** Input JSON data of type {!type:ecosystem}. *)
val ecosystem_of_string :
string -> ecosystem
(** Deserialize JSON data of type {!type:ecosystem}. *)
val write_fpath :
Buffer.t -> fpath -> unit
(** Output a JSON value of type {!type:fpath}. *)
val string_of_fpath :
?len:int -> fpath -> string
(** Serialize a value of type {!type:fpath}
into a JSON string.
@param len specifies the initial length
of the buffer used internally.
Default: 1024. *)
val read_fpath :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> fpath
(** Input JSON data of type {!type:fpath}. *)
val fpath_of_string :
string -> fpath
(** Deserialize JSON data of type {!type:fpath}. *)
val write_match_severity :
Buffer.t -> match_severity -> unit
(** Output a JSON value of type {!type:match_severity}. *)
val string_of_match_severity :
?len:int -> match_severity -> string
(** Serialize a value of type {!type:match_severity}
into a JSON string.
@param len specifies the initial length
of the buffer used internally.
Default: 1024. *)
val read_match_severity :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> match_severity
(** Input JSON data of type {!type:match_severity}. *)
val match_severity_of_string :
string -> match_severity
(** Deserialize JSON data of type {!type:match_severity}. *)
val write_matching_operation :
Buffer.t -> matching_operation -> unit
(** Output a JSON value of type {!type:matching_operation}. *)
val string_of_matching_operation :
?len:int -> matching_operation -> string
(** Serialize a value of type {!type:matching_operation}
into a JSON string.
@param len specifies the initial length
of the buffer used internally.
Default: 1024. *)