-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsemgrep_output_v1.proto
690 lines (598 loc) · 18.3 KB
/
semgrep_output_v1.proto
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
// Generated by jsonschema2protobuf. DO NOT EDIT!
// Source file: semgrep_output_v1.jsonschema
// Source file sha256 digest: 33230ba7073d518857d03976371d245036c6cdee44238f2224fd57beb5262890
syntax = "proto3";
import "google/protobuf/any.proto";
package semgrep_output_v1;
message CliOutput {
string version = 508888787;
repeated CliMatch results = 260545850;
repeated CliError errors = 179828283;
ScannedAndSkipped paths = 109417774;
Profile time = 3117011;
repeated MatchingExplanation explanations = 406800568;
repeated google.protobuf.Any rules_by_engine = 209830003;
google.protobuf.Any engine_requested = 513422373;
repeated string interfile_languages_used = 314311072;
repeated SkippedRule skipped_rules = 55568936;
}
message Position {
int64 line = 3117964;
int64 col = 107328;
int64 offset = 196558931;
}
message Location {
string path = 3212859;
Position start = 110621538;
Position end = 99611;
}
message ProFeature {
bool interproc_taint = 401637410;
bool interfile_taint = 464345032;
bool proprietary_language = 344690440;
}
message CliMatch {
string check_id = 244492357;
string path = 3212859;
Position start = 110621538;
Position end = 99611;
CliMatchExtra extra = 93093008;
}
message CliMatchExtra {
map<string, MetavarValue> metavars = 81814710;
string message = 337998899;
string fix = 118677;
repeated string fixed_lines = 405597072;
google.protobuf.Any metadata = 534382816;
google.protobuf.Any severity = 191113633;
string fingerprint = 426561151;
string lines = 109322879;
bool is_ignored = 531173073;
ScaMatch sca_info = 493451;
google.protobuf.Any validation_state = 332615966;
HistoricalInfo historical_info = 358982721;
MatchDataflowTrace dataflow_trace = 359307815;
google.protobuf.Any engine_kind = 428564670;
google.protobuf.Any extra_extra = 60155542;
}
message MetavarValue {
Position start = 110621538;
Position end = 99611;
string abstract_content = 75232495;
SvalueValue propagated_value = 269991092;
}
message SvalueValue {
Position svalue_start = 430292789;
Position svalue_end = 313081881;
string svalue_abstract_content = 526101672;
}
message MatchingExplanation {
google.protobuf.Any op = 3583;
repeated MatchingExplanation children = 164828051;
repeated CoreMatch matches = 363750006;
Location loc = 98688;
MatchingExplanationExtra extra = 93093008;
}
message MatchingExplanationExtra {
google.protobuf.Any before_negation_matches = 6545834;
google.protobuf.Any before_filter_matches = 316285359;
}
message MatchDataflowTrace {
google.protobuf.Any taint_source = 109601574;
repeated MatchIntermediateVar intermediate_vars = 308706979;
google.protobuf.Any taint_sink = 401066254;
}
message MatchIntermediateVar {
Location location = 206711021;
string content = 432904766;
}
message ScaMatch {
bool reachable = 496110486;
bool reachability_rule = 397050732;
int64 sca_finding_schema = 176474186;
DependencyMatch dependency_match = 346591595;
}
message DependencyMatch {
ScaPattern dependency_pattern = 345131372;
FoundDependency found_dependency = 28307609;
string lockfile = 99886121;
}
message ScaPattern {
google.protobuf.Any ecosystem = 7072103;
string package = 337745074;
string semver_range = 154778121;
}
message FoundDependency {
string package = 337745074;
string version = 508888787;
google.protobuf.Any ecosystem = 7072103;
map<string, google.protobuf.Any> allowed_hashes = 24443075;
string resolved_url = 359565789;
google.protobuf.Any transitivity = 299525532;
string manifest_path = 277099501;
string lockfile_path = 249238697;
int64 line_number = 82464417;
repeated DependencyChild children = 164828051;
string git_ref = 109607572;
}
message DependencyChild {
string package = 337745074;
string version = 508888787;
}
message HistoricalInfo {
string git_commit = 94625844;
string git_blob = 300172593;
string git_commit_timestamp = 499714429;
}
message IncompatibleRule {
string rule_id = 42354089;
string this_version = 452718495;
string min_version = 205101600;
string max_version = 205110962;
}
message CliError {
int64 code = 3108531;
google.protobuf.Any level = 102865796;
google.protobuf.Any type = 3120390;
string rule_id = 42354089;
string message = 337998899;
string path = 3212859;
string long_msg = 242299620;
string short_msg = 7220394;
repeated ErrorSpan spans = 109578729;
string help = 3443615;
}
message ErrorSpan {
string file = 3116036;
Position start = 110621538;
Position end = 99611;
string source_hash = 412117553;
Position config_start = 476302353;
Position config_end = 359091445;
repeated string config_path = 261927867;
Position context_start = 424938157;
Position context_end = 12625475;
}
message SkippedTarget {
string path = 3212859;
google.protobuf.Any reason = 34014402;
string details = 28147206;
string rule_id = 42354089;
}
message ScannedAndSkipped {
repeated string scanned = 478818202;
repeated SkippedTarget skipped = 480732762;
}
message SkippedRule {
string rule_id = 42354089;
string details = 28147206;
Position position = 206964729;
}
message Profile {
repeated string rules = 109321335;
float rules_parse_time = 367689164;
map<string, float> profiling_times = 190109087;
repeated TargetTimes targets = 253663046;
int64 total_bytes = 525010859;
int64 max_memory_bytes = 179011569;
}
message TargetTimes {
string path = 3212859;
int64 num_bytes = 49709845;
repeated float match_times = 189904321;
repeated float parse_times = 187608495;
float run_time = 463101456;
}
message CliOutputExtra {
ScannedAndSkipped paths = 109417774;
Profile time = 3117011;
repeated MatchingExplanation explanations = 406800568;
repeated google.protobuf.Any rules_by_engine = 209830003;
google.protobuf.Any engine_requested = 513422373;
repeated string interfile_languages_used = 314311072;
repeated SkippedRule skipped_rules = 55568936;
}
message ConfigError {
string file = 3116036;
google.protobuf.Any reason = 34014402;
}
message TestsResult {
map<string, Checks> results = 260545850;
map<string, FixtestResult> fixtest_results = 370327112;
repeated string config_missing_tests = 33854174;
repeated string config_missing_fixtests = 4414682;
repeated ConfigError config_with_errors = 299906664;
}
message Checks {
map<string, RuleResult> checks = 172993339;
}
message RuleResult {
bool passed = 275375765;
map<string, ExpectedReported> matches = 363750006;
repeated int64 errors = 179828283;
MatchingDiagnosis diagnosis = 489755742;
}
message ExpectedReported {
repeated int64 expected_lines = 205672918;
repeated int64 reported_lines = 219823067;
}
message FixtestResult {
bool passed = 275375765;
}
message MatchingDiagnosis {
string target = 196212821;
repeated UnexpectedMatchDiagnosis unexpected_match_diagnoses = 26764990;
repeated UnexpectedNoMatchDiagnosis unexpected_no_match_diagnoses = 179104248;
}
message UnexpectedMatchDiagnosis {
Snippet matched_text = 316873200;
google.protobuf.Any originating_kind = 305139273;
Snippet originating_text = 264619463;
repeated KillingParent killing_parents = 319756597;
}
message UnexpectedNoMatchDiagnosis {
int64 line = 3117964;
google.protobuf.Any kind = 3088172;
}
message Snippet {
int64 line = 3117964;
string text = 3574323;
}
message KillingParent {
google.protobuf.Any killing_parent_kind = 367710694;
Snippet snippet = 185277154;
}
message Features {
bool autofix = 82457874;
bool deepsemgrep = 444846865;
bool dependency_query = 471197362;
bool path_to_transitivity = 52910370;
bool scan_all_deps_in_diff_scan = 261708029;
}
message TriageIgnored {
repeated string triage_ignored_syntactic_ids = 211590151;
repeated string triage_ignored_match_based_ids = 327942260;
}
message ScanResponse {
ScanInfo info = 3408338;
ScanConfiguration config = 364565635;
EngineConfiguration engine_params = 411399043;
}
message ScanInfo {
int64 id = 3205;
repeated google.protobuf.Any enabled_products = 447415338;
int64 deployment_id = 188822146;
string deployment_name = 129624728;
}
message ScanConfiguration {
google.protobuf.Any rules = 109321335;
repeated string triage_ignored_syntactic_ids = 211590151;
repeated string triage_ignored_match_based_ids = 327942260;
}
message EngineConfiguration {
bool autofix = 82457874;
bool deepsemgrep = 444846865;
bool dependency_query = 471197362;
bool path_to_transitivity = 52910370;
bool scan_all_deps_in_diff_scan = 261708029;
repeated string ignored_files = 482076310;
repeated google.protobuf.Any product_ignored_files = 298217262;
bool generic_slow_rollout = 78139686;
HistoricalConfiguration historical_config = 66628402;
bool always_suppress_errors = 432871568;
}
message HistoricalConfiguration {
bool enabled = 476613995;
int64 lookback_days = 382926518;
}
message ScanRequest {
ProjectMetadata project_metadata = 24255885;
ScanMetadata scan_metadata = 76122041;
CiConfigFromRepo project_config = 317758767;
}
message ProjectMetadata {
string scan_environment = 288669428;
string repository = 439913047;
string repo_url = 245057343;
string repo_id = 42655347;
string org_id = 278463023;
string repo_display_name = 340226562;
string branch = 387879587;
string commit = 200081263;
string commit_title = 23517072;
string commit_timestamp = 43592767;
string commit_author_email = 458576327;
string commit_author_name = 534568416;
string commit_author_username = 247483738;
string commit_author_image_url = 314681517;
string ci_job_url = 514550082;
string on = 3521;
string pull_request_author_username = 51694226;
string pull_request_author_image_url = 111812919;
string pull_request_id = 68641510;
string pull_request_title = 262859048;
string base_sha = 58840223;
string start_sha = 227257877;
bool is_full_scan = 137078333;
bool is_sca_scan = 27492159;
bool is_code_scan = 132339791;
bool is_secrets_scan = 41780370;
}
message ScanMetadata {
string cli_version = 205096878;
string unique_id = 445148607;
repeated google.protobuf.Any requested_products = 6989766;
bool dry_run = 151515763;
string sms_scan_id = 129251445;
}
message CiConfigFromRepo {
string version = 508888787;
repeated string tags = 3528071;
}
message Finding {
string check_id = 244492357;
string path = 3212859;
int64 line = 3117964;
int64 column = 32237808;
int64 end_line = 269465307;
int64 end_column = 119242219;
string message = 337998899;
google.protobuf.Any severity = 191113633;
int64 index = 113931026;
string commit_date = 139249355;
string syntactic_id = 386155329;
string match_based_id = 394189736;
FindingHashes hashes = 167614410;
google.protobuf.Any metadata = 534382816;
bool is_blocking = 487146492;
repeated string fixed_lines = 405597072;
ScaMatch sca_info = 493451;
MatchDataflowTrace dataflow_trace = 359307815;
google.protobuf.Any validation_state = 332615966;
HistoricalInfo historical_info = 358982721;
google.protobuf.Any engine_kind = 428564670;
}
message FindingHashes {
string start_line_hash = 166523834;
string end_line_hash = 203509511;
string code_hash = 135625069;
string pattern_hash = 242617803;
}
message CiScanResults {
repeated Finding findings = 343207531;
repeated Finding ignores = 373337124;
string token = 104702585;
repeated string searched_paths = 302953681;
repeated string renamed_paths = 204829593;
repeated string rule_ids = 212698331;
repeated Contribution contributions = 7572534;
map<string, google.protobuf.Any> dependencies = 469817480;
}
message Contributor {
string commit_author_name = 534568416;
string commit_author_email = 458576327;
}
message Contribution {
string commit_hash = 310068374;
string commit_timestamp = 43592767;
Contributor contributor = 119395250;
}
message CiScanResultsResponse {
repeated CiScanResultsResponseError errors = 179828283;
string task_id = 42538944;
}
message CiScanResultsResponseError {
string message = 337998899;
}
message CiScanComplete {
int64 exit_code = 288120243;
CiScanCompleteStats stats = 109757599;
map<string, google.protobuf.Any> dependencies = 469817480;
repeated DependencyParserError dependency_parser_errors = 379401816;
string task_id = 42538944;
bool final_attempt = 303764100;
}
message CiScanCompleteStats {
int64 findings = 343207531;
repeated CliError errors = 179828283;
float total_time = 508947525;
map<string, int64> unsupported_exts = 533004295;
map<string, int64> lockfile_scan_info = 229438996;
map<string, ParsingStats> parse_rate = 50643605;
string engine_requested = 513422373;
map<string, int64> findings_by_product = 499456012;
SupplyChainStats supply_chain_stats = 329027804;
}
message ParsingStats {
int64 targets_parsed = 16414165;
int64 num_targets = 67699658;
int64 bytes_parsed = 275003857;
int64 num_bytes = 49709845;
}
message CiScanCompleteResponse {
bool success = 224900935;
bool app_block_override = 45266970;
string app_block_reason = 276965897;
repeated string app_blocking_match_based_ids = 482968425;
}
message DependencyParserError {
string path = 3212859;
google.protobuf.Any parser = 139312007;
string reason = 34014402;
int64 line = 3117964;
int64 col = 107328;
string text = 3574323;
}
message SupplyChainStats {
repeated SubprojectStats subprojects_stats = 28460775;
}
message SubprojectStats {
string subproject_id = 481879717;
repeated DependencySourceFile dependency_sources = 4836694;
DependencyResolutionStats resolved_stats = 364874699;
}
message DependencySourceFile {
google.protobuf.Any kind = 3088172;
string path = 3212859;
}
message DependencyResolutionStats {
google.protobuf.Any resolution_method = 495111318;
int64 dependency_count = 507475109;
google.protobuf.Any ecosystem = 7072103;
}
message CiScanFailure {
int64 exit_code = 288120243;
string stderr = 150887844;
}
message DeploymentConfig {
int64 id = 3205;
string name = 3116757;
int64 organization_id = 406301483;
string display_name = 333474672;
string scm_name = 228525604;
string slug = 3184373;
string source_type = 28767383;
string default_user_role = 341961986;
bool has_autofix = 200569152;
bool has_deepsemgrep = 529169105;
bool has_triage_via_comment = 438443412;
bool has_dependency_query = 481855234;
}
message HasFeatures {
bool has_autofix = 200569152;
bool has_deepsemgrep = 529169105;
bool has_triage_via_comment = 438443412;
bool has_dependency_query = 481855234;
}
message DeploymentResponse {
DeploymentConfig deployment = 498084672;
}
message ScanConfig {
int64 deployment_id = 188822146;
string deployment_name = 129624728;
repeated string policy_names = 175625923;
string rule_config = 403140712;
bool autofix = 82457874;
bool deepsemgrep = 444846865;
bool dependency_query = 471197362;
bool path_to_transitivity = 52910370;
bool scan_all_deps_in_diff_scan = 261708029;
repeated string triage_ignored_syntactic_ids = 211590151;
repeated string triage_ignored_match_based_ids = 327942260;
repeated string ignored_files = 482076310;
repeated google.protobuf.Any enabled_products = 447415338;
repeated google.protobuf.Any actions = 91184897;
CiConfigFromCloud ci_config_from_cloud = 120268883;
}
message CiConfigFromCloud {
CiConfig repo_config = 403441970;
CiConfig org_config = 463285466;
repeated google.protobuf.Any dirs_config = 403563166;
repeated google.protobuf.Any actions = 91184897;
}
message CiConfig {
map<string, string> env = 116909;
repeated google.protobuf.Any enabled_products = 447415338;
repeated string ignored_files = 482076310;
bool autofix = 82457874;
bool deepsemgrep = 444846865;
bool dependency_query = 471197362;
bool path_to_transitivity = 52910370;
bool scan_all_deps_in_diff_scan = 261708029;
}
message CoreOutput {
string version = 508888787;
repeated CoreMatch results = 260545850;
repeated CoreError errors = 179828283;
ScannedAndSkipped paths = 109417774;
Profile time = 3117011;
repeated MatchingExplanation explanations = 406800568;
repeated google.protobuf.Any rules_by_engine = 209830003;
google.protobuf.Any engine_requested = 513422373;
repeated string interfile_languages_used = 314311072;
repeated SkippedRule skipped_rules = 55568936;
}
message CoreMatch {
string check_id = 244492357;
string path = 3212859;
Position start = 110621538;
Position end = 99611;
CoreMatchExtra extra = 93093008;
}
message CoreMatchExtra {
map<string, MetavarValue> metavars = 81814710;
google.protobuf.Any engine_kind = 428564670;
bool is_ignored = 531173073;
string message = 337998899;
google.protobuf.Any metadata = 534382816;
google.protobuf.Any severity = 191113633;
string fix = 118677;
MatchDataflowTrace dataflow_trace = 359307815;
ScaMatch sca_match = 199861263;
google.protobuf.Any validation_state = 332615966;
HistoricalInfo historical_info = 358982721;
google.protobuf.Any extra_extra = 60155542;
}
message CoreError {
google.protobuf.Any error_type = 428933134;
google.protobuf.Any severity = 191113633;
string message = 337998899;
string details = 28147206;
Location location = 206711021;
string rule_id = 42354089;
}
message CodeTarget {
string path = 3212859;
string analyzer = 405167385;
repeated google.protobuf.Any products = 302629094;
Lockfile lockfile_target = 293108416;
}
message Edit {
string path = 3212859;
int64 start_offset = 402579410;
int64 end_offset = 47889398;
string replacement_text = 415031433;
}
message ApplyFixesParams {
bool dryrun = 39549190;
repeated Edit edits = 109764777;
}
message ApplyFixesReturn {
int64 modified_file_count = 221435657;
repeated google.protobuf.Any fixed_lines = 405597072;
}
message SarifFormat {
string rules = 109321335;
bool is_pro = 65323246;
bool show_dataflow_traces = 310197169;
}
message FormatContext {
bool is_ci_invocation = 208091716;
bool is_logged_in = 214813956;
bool is_using_registry = 133534925;
}
message DumpRulePartitionsParams {
google.protobuf.Any rules = 109321335;
int64 n_partitions = 177783558;
string output_dir = 454772709;
}
message Manifest {
google.protobuf.Any kind = 3088172;
string path = 3212859;
}
message Lockfile {
google.protobuf.Any kind = 3088172;
string path = 3212859;
}
message ResolutionCmdFailed {
string command = 187585974;
string message = 337998899;
}
message DiffFile {
string filename = 228703562;
repeated string diffs = 109344974;
string url = 107439;
}
message DiffFiles {
repeated DiffFile cve_diffs = 185530783;
}