gitlab-security_report_schemas 0.1.0.min15.1.0.max15.1.0 → 0.1.1.min15.0.0.max15.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -9
  3. data/README.md +14 -10
  4. data/RUNBOOK.md +28 -0
  5. data/Rakefile +1 -1
  6. data/gem_version +1 -1
  7. data/gitlab-security_report_schemas.gemspec +1 -1
  8. data/lib/gitlab/security_report_schemas/configuration.rb +2 -2
  9. data/lib/gitlab/security_report_schemas/version.rb +1 -3
  10. data/schemas/15.0.0/cluster-image-scanning-report-format.json +946 -0
  11. data/schemas/15.0.0/container-scanning-report-format.json +880 -0
  12. data/schemas/15.0.0/coverage-fuzzing-report-format.json +836 -0
  13. data/schemas/15.0.0/dast-report-format.json +1241 -0
  14. data/schemas/15.0.0/dependency-scanning-report-format.json +944 -0
  15. data/schemas/15.0.0/sast-report-format.json +831 -0
  16. data/schemas/15.0.0/secret-detection-report-format.json +854 -0
  17. data/schemas/15.0.1/cluster-image-scanning-report-format.json +980 -0
  18. data/schemas/15.0.1/container-scanning-report-format.json +914 -0
  19. data/schemas/15.0.1/coverage-fuzzing-report-format.json +870 -0
  20. data/schemas/15.0.1/dast-report-format.json +1275 -0
  21. data/schemas/15.0.1/dependency-scanning-report-format.json +978 -0
  22. data/schemas/15.0.1/sast-report-format.json +865 -0
  23. data/schemas/15.0.1/secret-detection-report-format.json +888 -0
  24. data/schemas/15.0.2/cluster-image-scanning-report-format.json +980 -0
  25. data/schemas/15.0.2/container-scanning-report-format.json +912 -0
  26. data/schemas/15.0.2/coverage-fuzzing-report-format.json +870 -0
  27. data/schemas/15.0.2/dast-report-format.json +1275 -0
  28. data/schemas/15.0.2/dependency-scanning-report-format.json +978 -0
  29. data/schemas/15.0.2/sast-report-format.json +865 -0
  30. data/schemas/15.0.2/secret-detection-report-format.json +888 -0
  31. data/schemas/15.0.4/cluster-image-scanning-report-format.json +984 -0
  32. data/schemas/15.0.4/container-scanning-report-format.json +916 -0
  33. data/schemas/15.0.4/coverage-fuzzing-report-format.json +874 -0
  34. data/schemas/15.0.4/dast-report-format.json +1279 -0
  35. data/schemas/15.0.4/dependency-scanning-report-format.json +982 -0
  36. data/schemas/15.0.4/sast-report-format.json +869 -0
  37. data/schemas/15.0.4/secret-detection-report-format.json +893 -0
  38. data/schemas/15.0.5/cluster-image-scanning-report-format.json +1035 -0
  39. data/schemas/15.0.5/container-scanning-report-format.json +967 -0
  40. data/schemas/15.0.5/coverage-fuzzing-report-format.json +925 -0
  41. data/schemas/15.0.5/dast-report-format.json +1330 -0
  42. data/schemas/15.0.5/dependency-scanning-report-format.json +1033 -0
  43. data/schemas/15.0.5/sast-report-format.json +920 -0
  44. data/schemas/15.0.5/secret-detection-report-format.json +944 -0
  45. data/schemas/15.0.6/cluster-image-scanning-report-format.json +1035 -0
  46. data/schemas/15.0.6/container-scanning-report-format.json +967 -0
  47. data/schemas/15.0.6/coverage-fuzzing-report-format.json +925 -0
  48. data/schemas/15.0.6/dast-report-format.json +1330 -0
  49. data/schemas/15.0.6/dependency-scanning-report-format.json +1033 -0
  50. data/schemas/15.0.6/sast-report-format.json +920 -0
  51. data/schemas/15.0.6/secret-detection-report-format.json +944 -0
  52. data/schemas/15.0.7/cluster-image-scanning-report-format.json +1085 -0
  53. data/schemas/15.0.7/container-scanning-report-format.json +1017 -0
  54. data/schemas/15.0.7/coverage-fuzzing-report-format.json +975 -0
  55. data/schemas/15.0.7/dast-report-format.json +1380 -0
  56. data/schemas/15.0.7/dependency-scanning-report-format.json +1083 -0
  57. data/schemas/15.0.7/sast-report-format.json +970 -0
  58. data/schemas/15.0.7/secret-detection-report-format.json +994 -0
  59. data/schemas/15.1.1/cluster-image-scanning-report-format.json +1065 -0
  60. data/schemas/15.1.1/container-scanning-for-registry-report-format.json +0 -0
  61. data/schemas/15.1.1/container-scanning-report-format.json +998 -0
  62. data/schemas/15.1.1/coverage-fuzzing-report-format.json +975 -0
  63. data/schemas/15.1.1/dast-report-format.json +1380 -0
  64. data/schemas/15.1.1/dependency-scanning-report-format.json +986 -0
  65. data/schemas/15.1.1/sast-report-format.json +970 -0
  66. data/schemas/15.1.1/secret-detection-report-format.json +994 -0
  67. data/schemas/15.1.2/cluster-image-scanning-report-format.json +1190 -0
  68. data/schemas/15.1.2/container-scanning-report-format.json +1123 -0
  69. data/schemas/15.1.2/coverage-fuzzing-report-format.json +1100 -0
  70. data/schemas/15.1.2/dast-report-format.json +1505 -0
  71. data/schemas/15.1.2/dependency-scanning-report-format.json +1111 -0
  72. data/schemas/15.1.2/sast-report-format.json +1095 -0
  73. data/schemas/15.1.2/secret-detection-report-format.json +1119 -0
  74. data/schemas/15.1.3/cluster-image-scanning-report-format.json +1190 -0
  75. data/schemas/15.1.3/container-scanning-report-format.json +1123 -0
  76. data/schemas/15.1.3/coverage-fuzzing-report-format.json +1100 -0
  77. data/schemas/15.1.3/dast-report-format.json +1505 -0
  78. data/schemas/15.1.3/dependency-scanning-report-format.json +1111 -0
  79. data/schemas/15.1.3/sast-report-format.json +1095 -0
  80. data/schemas/15.1.3/secret-detection-report-format.json +1119 -0
  81. data/schemas/15.1.4/cluster-image-scanning-report-format.json +1190 -0
  82. data/schemas/15.1.4/container-scanning-report-format.json +1123 -0
  83. data/schemas/15.1.4/coverage-fuzzing-report-format.json +1100 -0
  84. data/schemas/15.1.4/dast-report-format.json +1505 -0
  85. data/schemas/15.1.4/dependency-scanning-report-format.json +1111 -0
  86. data/schemas/15.1.4/sast-report-format.json +1095 -0
  87. data/schemas/15.1.4/secret-detection-report-format.json +1119 -0
  88. data/supported_versions +11 -0
  89. metadata +83 -4
@@ -0,0 +1,1083 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/raw/master/dist/dependency-scanning-report-format.json",
4
+ "title": "Report format for GitLab Dependency Scanning",
5
+ "description": "This schema provides the the report format for Dependency Scanning analyzers (https://docs.gitlab.com/ee/user/application_security/dependency_scanning).",
6
+ "definitions": {
7
+ "detail_type": {
8
+ "oneOf": [
9
+ {
10
+ "$ref": "#/definitions/named_list"
11
+ },
12
+ {
13
+ "$ref": "#/definitions/list"
14
+ },
15
+ {
16
+ "$ref": "#/definitions/table"
17
+ },
18
+ {
19
+ "$ref": "#/definitions/text"
20
+ },
21
+ {
22
+ "$ref": "#/definitions/url"
23
+ },
24
+ {
25
+ "$ref": "#/definitions/code"
26
+ },
27
+ {
28
+ "$ref": "#/definitions/value"
29
+ },
30
+ {
31
+ "$ref": "#/definitions/diff"
32
+ },
33
+ {
34
+ "$ref": "#/definitions/markdown"
35
+ },
36
+ {
37
+ "$ref": "#/definitions/commit"
38
+ },
39
+ {
40
+ "$ref": "#/definitions/file_location"
41
+ },
42
+ {
43
+ "$ref": "#/definitions/module_location"
44
+ }
45
+ ]
46
+ },
47
+ "text_value": {
48
+ "type": "string"
49
+ },
50
+ "named_field": {
51
+ "type": "object",
52
+ "required": [
53
+ "name"
54
+ ],
55
+ "properties": {
56
+ "name": {
57
+ "$ref": "#/definitions/text_value",
58
+ "type": "string",
59
+ "minLength": 1
60
+ },
61
+ "description": {
62
+ "$ref": "#/definitions/text_value"
63
+ }
64
+ }
65
+ },
66
+ "named_list": {
67
+ "type": "object",
68
+ "description": "An object with named and typed fields",
69
+ "required": [
70
+ "type",
71
+ "items"
72
+ ],
73
+ "properties": {
74
+ "type": {
75
+ "const": "named-list"
76
+ },
77
+ "items": {
78
+ "type": "object",
79
+ "patternProperties": {
80
+ "^.*$": {
81
+ "allOf": [
82
+ {
83
+ "$ref": "#/definitions/named_field"
84
+ },
85
+ {
86
+ "$ref": "#/definitions/detail_type"
87
+ }
88
+ ]
89
+ }
90
+ }
91
+ }
92
+ }
93
+ },
94
+ "list": {
95
+ "type": "object",
96
+ "description": "A list of typed fields",
97
+ "required": [
98
+ "type",
99
+ "items"
100
+ ],
101
+ "properties": {
102
+ "type": {
103
+ "const": "list"
104
+ },
105
+ "items": {
106
+ "type": "array",
107
+ "items": {
108
+ "$ref": "#/definitions/detail_type"
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "table": {
114
+ "type": "object",
115
+ "description": "A table of typed fields",
116
+ "required": [
117
+ "type",
118
+ "rows"
119
+ ],
120
+ "properties": {
121
+ "type": {
122
+ "const": "table"
123
+ },
124
+ "header": {
125
+ "type": "array",
126
+ "items": {
127
+ "$ref": "#/definitions/detail_type"
128
+ }
129
+ },
130
+ "rows": {
131
+ "type": "array",
132
+ "items": {
133
+ "type": "array",
134
+ "items": {
135
+ "$ref": "#/definitions/detail_type"
136
+ }
137
+ }
138
+ }
139
+ }
140
+ },
141
+ "text": {
142
+ "type": "object",
143
+ "description": "Raw text",
144
+ "required": [
145
+ "type",
146
+ "value"
147
+ ],
148
+ "properties": {
149
+ "type": {
150
+ "const": "text"
151
+ },
152
+ "value": {
153
+ "$ref": "#/definitions/text_value"
154
+ }
155
+ }
156
+ },
157
+ "url": {
158
+ "type": "object",
159
+ "description": "A single URL",
160
+ "required": [
161
+ "type",
162
+ "href"
163
+ ],
164
+ "properties": {
165
+ "type": {
166
+ "const": "url"
167
+ },
168
+ "text": {
169
+ "$ref": "#/definitions/text_value"
170
+ },
171
+ "href": {
172
+ "type": "string",
173
+ "minLength": 1,
174
+ "examples": [
175
+ "http://mysite.com"
176
+ ]
177
+ }
178
+ }
179
+ },
180
+ "code": {
181
+ "type": "object",
182
+ "description": "A codeblock",
183
+ "required": [
184
+ "type",
185
+ "value"
186
+ ],
187
+ "properties": {
188
+ "type": {
189
+ "const": "code"
190
+ },
191
+ "value": {
192
+ "type": "string"
193
+ },
194
+ "lang": {
195
+ "type": "string",
196
+ "description": "A programming language"
197
+ }
198
+ }
199
+ },
200
+ "value": {
201
+ "type": "object",
202
+ "description": "A field that can store a range of types of value",
203
+ "required": [
204
+ "type",
205
+ "value"
206
+ ],
207
+ "properties": {
208
+ "type": {
209
+ "const": "value"
210
+ },
211
+ "value": {
212
+ "type": [
213
+ "number",
214
+ "string",
215
+ "boolean"
216
+ ]
217
+ }
218
+ }
219
+ },
220
+ "diff": {
221
+ "type": "object",
222
+ "description": "A diff",
223
+ "required": [
224
+ "type",
225
+ "before",
226
+ "after"
227
+ ],
228
+ "properties": {
229
+ "type": {
230
+ "const": "diff"
231
+ },
232
+ "before": {
233
+ "type": "string"
234
+ },
235
+ "after": {
236
+ "type": "string"
237
+ }
238
+ }
239
+ },
240
+ "markdown": {
241
+ "type": "object",
242
+ "description": "GitLab flavoured markdown, see https://docs.gitlab.com/ee/user/markdown.html",
243
+ "required": [
244
+ "type",
245
+ "value"
246
+ ],
247
+ "properties": {
248
+ "type": {
249
+ "const": "markdown"
250
+ },
251
+ "value": {
252
+ "$ref": "#/definitions/text_value",
253
+ "examples": [
254
+ "Here is markdown `inline code` #1 [test](gitlab.com)\n\n![GitLab Logo](https://about.gitlab.com/images/press/logo/preview/gitlab-logo-white-preview.png)"
255
+ ]
256
+ }
257
+ }
258
+ },
259
+ "commit": {
260
+ "type": "object",
261
+ "description": "A commit/tag/branch within the GitLab project",
262
+ "required": [
263
+ "type",
264
+ "value"
265
+ ],
266
+ "properties": {
267
+ "type": {
268
+ "const": "commit"
269
+ },
270
+ "value": {
271
+ "type": "string",
272
+ "description": "The commit SHA",
273
+ "minLength": 1
274
+ }
275
+ }
276
+ },
277
+ "file_location": {
278
+ "type": "object",
279
+ "description": "A location within a file in the project",
280
+ "required": [
281
+ "type",
282
+ "file_name",
283
+ "line_start"
284
+ ],
285
+ "properties": {
286
+ "type": {
287
+ "const": "file-location"
288
+ },
289
+ "file_name": {
290
+ "type": "string",
291
+ "minLength": 1
292
+ },
293
+ "line_start": {
294
+ "type": "integer"
295
+ },
296
+ "line_end": {
297
+ "type": "integer"
298
+ }
299
+ }
300
+ },
301
+ "module_location": {
302
+ "type": "object",
303
+ "description": "A location within a binary module of the form module+relative_offset",
304
+ "required": [
305
+ "type",
306
+ "module_name",
307
+ "offset"
308
+ ],
309
+ "properties": {
310
+ "type": {
311
+ "const": "module-location"
312
+ },
313
+ "module_name": {
314
+ "type": "string",
315
+ "minLength": 1,
316
+ "examples": [
317
+ "compiled_binary"
318
+ ]
319
+ },
320
+ "offset": {
321
+ "type": "integer",
322
+ "examples": [
323
+ 100
324
+ ]
325
+ }
326
+ }
327
+ }
328
+ },
329
+ "self": {
330
+ "version": "15.0.7"
331
+ },
332
+ "type": "object",
333
+ "required": [
334
+ "dependency_files",
335
+ "scan",
336
+ "version",
337
+ "vulnerabilities"
338
+ ],
339
+ "additionalProperties": true,
340
+ "properties": {
341
+ "scan": {
342
+ "type": "object",
343
+ "required": [
344
+ "analyzer",
345
+ "end_time",
346
+ "scanner",
347
+ "start_time",
348
+ "status",
349
+ "type"
350
+ ],
351
+ "properties": {
352
+ "end_time": {
353
+ "type": "string",
354
+ "description": "ISO8601 UTC value with format yyyy-mm-ddThh:mm:ss, representing when the scan finished.",
355
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
356
+ "examples": [
357
+ "2020-01-28T03:26:02"
358
+ ]
359
+ },
360
+ "messages": {
361
+ "type": "array",
362
+ "items": {
363
+ "type": "object",
364
+ "description": "Communication intended for the initiator of a scan.",
365
+ "required": [
366
+ "level",
367
+ "value"
368
+ ],
369
+ "properties": {
370
+ "level": {
371
+ "type": "string",
372
+ "description": "Describes the severity of the communication. Use info to communicate normal scan behaviour; warn to communicate a potentially recoverable problem, or a partial error; fatal to communicate an issue that causes the scan to halt.",
373
+ "enum": [
374
+ "info",
375
+ "warn",
376
+ "fatal"
377
+ ],
378
+ "examples": [
379
+ "info"
380
+ ]
381
+ },
382
+ "value": {
383
+ "type": "string",
384
+ "description": "The message to communicate.",
385
+ "minLength": 1,
386
+ "examples": [
387
+ "Permission denied, scanning aborted"
388
+ ]
389
+ }
390
+ }
391
+ }
392
+ },
393
+ "options": {
394
+ "type": "array",
395
+ "items": {
396
+ "type": "object",
397
+ "description": "A configuration option used for this scan.",
398
+ "required": [
399
+ "name",
400
+ "value"
401
+ ],
402
+ "properties": {
403
+ "name": {
404
+ "type": "string",
405
+ "description": "The configuration option name.",
406
+ "maxLength": 255,
407
+ "minLength": 1,
408
+ "examples": [
409
+ "DAST_FF_ENABLE_BAS",
410
+ "DOCKER_TLS_CERTDIR",
411
+ "DS_MAX_DEPTH",
412
+ "SECURE_LOG_LEVEL"
413
+ ]
414
+ },
415
+ "source": {
416
+ "type": "string",
417
+ "description": "The source of this option.",
418
+ "enum": [
419
+ "argument",
420
+ "file",
421
+ "env_variable",
422
+ "other"
423
+ ]
424
+ },
425
+ "value": {
426
+ "type": [
427
+ "boolean",
428
+ "integer",
429
+ "null",
430
+ "string"
431
+ ],
432
+ "description": "The value used for this scan.",
433
+ "examples": [
434
+ true,
435
+ 2,
436
+ null,
437
+ "fatal",
438
+ ""
439
+ ]
440
+ }
441
+ }
442
+ }
443
+ },
444
+ "analyzer": {
445
+ "type": "object",
446
+ "description": "Object defining the analyzer used to perform the scan. Analyzers typically delegate to an underlying scanner to run the scan.",
447
+ "required": [
448
+ "id",
449
+ "name",
450
+ "version",
451
+ "vendor"
452
+ ],
453
+ "properties": {
454
+ "id": {
455
+ "type": "string",
456
+ "description": "Unique id that identifies the analyzer.",
457
+ "minLength": 1,
458
+ "examples": [
459
+ "gitlab-dast"
460
+ ]
461
+ },
462
+ "name": {
463
+ "type": "string",
464
+ "description": "A human readable value that identifies the analyzer, not required to be unique.",
465
+ "minLength": 1,
466
+ "examples": [
467
+ "GitLab DAST"
468
+ ]
469
+ },
470
+ "url": {
471
+ "type": "string",
472
+ "pattern": "^https?://.+",
473
+ "description": "A link to more information about the analyzer.",
474
+ "examples": [
475
+ "https://docs.gitlab.com/ee/user/application_security/dast"
476
+ ]
477
+ },
478
+ "vendor": {
479
+ "description": "The vendor/maintainer of the analyzer.",
480
+ "type": "object",
481
+ "required": [
482
+ "name"
483
+ ],
484
+ "properties": {
485
+ "name": {
486
+ "type": "string",
487
+ "description": "The name of the vendor.",
488
+ "minLength": 1,
489
+ "examples": [
490
+ "GitLab"
491
+ ]
492
+ }
493
+ }
494
+ },
495
+ "version": {
496
+ "type": "string",
497
+ "description": "The version of the analyzer.",
498
+ "minLength": 1,
499
+ "examples": [
500
+ "1.0.2"
501
+ ]
502
+ }
503
+ }
504
+ },
505
+ "scanner": {
506
+ "type": "object",
507
+ "description": "Object defining the scanner used to perform the scan.",
508
+ "required": [
509
+ "id",
510
+ "name",
511
+ "version",
512
+ "vendor"
513
+ ],
514
+ "properties": {
515
+ "id": {
516
+ "type": "string",
517
+ "description": "Unique id that identifies the scanner.",
518
+ "minLength": 1,
519
+ "examples": [
520
+ "my-sast-scanner"
521
+ ]
522
+ },
523
+ "name": {
524
+ "type": "string",
525
+ "description": "A human readable value that identifies the scanner, not required to be unique.",
526
+ "minLength": 1,
527
+ "examples": [
528
+ "My SAST Scanner"
529
+ ]
530
+ },
531
+ "url": {
532
+ "type": "string",
533
+ "description": "A link to more information about the scanner.",
534
+ "examples": [
535
+ "https://scanner.url"
536
+ ]
537
+ },
538
+ "version": {
539
+ "type": "string",
540
+ "description": "The version of the scanner.",
541
+ "minLength": 1,
542
+ "examples": [
543
+ "1.0.2"
544
+ ]
545
+ },
546
+ "vendor": {
547
+ "description": "The vendor/maintainer of the scanner.",
548
+ "type": "object",
549
+ "required": [
550
+ "name"
551
+ ],
552
+ "properties": {
553
+ "name": {
554
+ "type": "string",
555
+ "description": "The name of the vendor.",
556
+ "minLength": 1,
557
+ "examples": [
558
+ "GitLab"
559
+ ]
560
+ }
561
+ }
562
+ }
563
+ }
564
+ },
565
+ "start_time": {
566
+ "type": "string",
567
+ "description": "ISO8601 UTC value with format yyyy-mm-ddThh:mm:ss, representing when the scan started.",
568
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
569
+ "examples": [
570
+ "2020-02-14T16:01:59"
571
+ ]
572
+ },
573
+ "status": {
574
+ "type": "string",
575
+ "description": "Result of the scan.",
576
+ "enum": [
577
+ "success",
578
+ "failure"
579
+ ]
580
+ },
581
+ "type": {
582
+ "type": "string",
583
+ "description": "Type of the scan.",
584
+ "enum": [
585
+ "dependency_scanning"
586
+ ]
587
+ },
588
+ "primary_identifiers": {
589
+ "type": "array",
590
+ "description": "An unordered array containing an exhaustive list of primary identifiers for which the analyzer may return results",
591
+ "items": {
592
+ "type": "object",
593
+ "required": [
594
+ "type",
595
+ "name",
596
+ "value"
597
+ ],
598
+ "properties": {
599
+ "type": {
600
+ "type": "string",
601
+ "description": "for example, cve, cwe, osvdb, usn, or an analyzer-dependent type such as gemnasium).",
602
+ "minLength": 1
603
+ },
604
+ "name": {
605
+ "type": "string",
606
+ "description": "Human-readable name of the identifier.",
607
+ "minLength": 1
608
+ },
609
+ "url": {
610
+ "type": "string",
611
+ "description": "URL of the identifier's documentation.",
612
+ "pattern": "^(https?|ftp)://.+"
613
+ },
614
+ "value": {
615
+ "type": "string",
616
+ "description": "Value of the identifier, for matching purpose.",
617
+ "minLength": 1
618
+ }
619
+ }
620
+ }
621
+ }
622
+ }
623
+ },
624
+ "schema": {
625
+ "type": "string",
626
+ "description": "URI pointing to the validating security report schema.",
627
+ "pattern": "^https?://.+"
628
+ },
629
+ "version": {
630
+ "type": "string",
631
+ "description": "The version of the schema to which the JSON report conforms.",
632
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
633
+ },
634
+ "vulnerabilities": {
635
+ "type": "array",
636
+ "description": "Array of vulnerability objects.",
637
+ "items": {
638
+ "type": "object",
639
+ "description": "Describes the vulnerability using GitLab Flavored Markdown",
640
+ "required": [
641
+ "id",
642
+ "identifiers",
643
+ "location"
644
+ ],
645
+ "properties": {
646
+ "id": {
647
+ "type": "string",
648
+ "minLength": 1,
649
+ "description": "Unique identifier of the vulnerability. This is recommended to be a UUID.",
650
+ "examples": [
651
+ "642735a5-1425-428d-8d4e-3c854885a3c9"
652
+ ]
653
+ },
654
+ "name": {
655
+ "type": "string",
656
+ "maxLength": 255,
657
+ "description": "The name of the vulnerability. This must not include the finding's specific information."
658
+ },
659
+ "description": {
660
+ "type": "string",
661
+ "maxLength": 1048576,
662
+ "description": "A long text section describing the vulnerability more fully."
663
+ },
664
+ "severity": {
665
+ "type": "string",
666
+ "description": "How much the vulnerability impacts the software. Possible values are Info, Unknown, Low, Medium, High, or Critical. Note that some analyzers may not report all these possible values.",
667
+ "enum": [
668
+ "Info",
669
+ "Unknown",
670
+ "Low",
671
+ "Medium",
672
+ "High",
673
+ "Critical"
674
+ ]
675
+ },
676
+ "solution": {
677
+ "type": "string",
678
+ "maxLength": 7000,
679
+ "description": "Explanation of how to fix the vulnerability."
680
+ },
681
+ "identifiers": {
682
+ "type": "array",
683
+ "minItems": 1,
684
+ "description": "An ordered array of references that identify a vulnerability on internal or external databases. The first identifier is the Primary Identifier, which has special meaning.",
685
+ "items": {
686
+ "type": "object",
687
+ "required": [
688
+ "type",
689
+ "name",
690
+ "value"
691
+ ],
692
+ "properties": {
693
+ "type": {
694
+ "type": "string",
695
+ "description": "for example, cve, cwe, osvdb, usn, or an analyzer-dependent type such as gemnasium).",
696
+ "minLength": 1
697
+ },
698
+ "name": {
699
+ "type": "string",
700
+ "description": "Human-readable name of the identifier.",
701
+ "minLength": 1
702
+ },
703
+ "url": {
704
+ "type": "string",
705
+ "description": "URL of the identifier's documentation.",
706
+ "pattern": "^(https?|ftp)://.+"
707
+ },
708
+ "value": {
709
+ "type": "string",
710
+ "description": "Value of the identifier, for matching purpose.",
711
+ "minLength": 1
712
+ }
713
+ }
714
+ }
715
+ },
716
+ "cvss_vectors": {
717
+ "type": "array",
718
+ "minItems": 1,
719
+ "maxItems": 10,
720
+ "description": "An ordered array of CVSS vectors, each issued by a vendor to rate the vulnerability. The first item in the array is used as the primary CVSS vector, and is used to filter and sort the vulnerability.",
721
+ "items": {
722
+ "oneOf": [
723
+ {
724
+ "type": "object",
725
+ "properties": {
726
+ "vendor": {
727
+ "type": "string",
728
+ "minLength": 1,
729
+ "default": "unknown"
730
+ },
731
+ "vector": {
732
+ "type": "string",
733
+ "minLength": 16,
734
+ "maxLength": 128,
735
+ "pattern": "^((AV:[NAL]|AC:[LMH]|Au:[MSN]|[CIA]:[NPC]|E:(U|POC|F|H|ND)|RL:(OF|TF|W|U|ND)|RC:(UC|UR|C|ND)|CDP:(N|L|LM|MH|H|ND)|TD:(N|L|M|H|ND)|[CIA]R:(L|M|H|ND))/)*(AV:[NAL]|AC:[LMH]|Au:[MSN]|[CIA]:[NPC]|E:(U|POC|F|H|ND)|RL:(OF|TF|W|U|ND)|RC:(UC|UR|C|ND)|CDP:(N|L|LM|MH|H|ND)|TD:(N|L|M|H|ND)|[CIA]R:(L|M|H|ND))$"
736
+ }
737
+ },
738
+ "required": [
739
+ "vendor",
740
+ "vector"
741
+ ]
742
+ },
743
+ {
744
+ "type": "object",
745
+ "properties": {
746
+ "vendor": {
747
+ "type": "string",
748
+ "minLength": 1,
749
+ "default": "unknown"
750
+ },
751
+ "vector": {
752
+ "type": "string",
753
+ "minLength": 32,
754
+ "maxLength": 128,
755
+ "pattern": "^CVSS:3[.][01]/((AV:[NALP]|AC:[LH]|PR:[NLH]|UI:[NR]|S:[UC]|[CIA]:[NLH]|E:[XUPFH]|RL:[XOTWU]|RC:[XURC]|[CIA]R:[XLMH]|MAV:[XNALP]|MAC:[XLH]|MPR:[XNLH]|MUI:[XNR]|MS:[XUC]|M[CIA]:[XNLH])/)*(AV:[NALP]|AC:[LH]|PR:[NLH]|UI:[NR]|S:[UC]|[CIA]:[NLH]|E:[XUPFH]|RL:[XOTWU]|RC:[XURC]|[CIA]R:[XLMH]|MAV:[XNALP]|MAC:[XLH]|MPR:[XNLH]|MUI:[XNR]|MS:[XUC]|M[CIA]:[XNLH])$"
756
+ }
757
+ },
758
+ "required": [
759
+ "vendor",
760
+ "vector"
761
+ ]
762
+ }
763
+ ]
764
+ }
765
+ },
766
+ "links": {
767
+ "type": "array",
768
+ "description": "An array of references to external documentation or articles that describe the vulnerability.",
769
+ "items": {
770
+ "type": "object",
771
+ "required": [
772
+ "url"
773
+ ],
774
+ "properties": {
775
+ "name": {
776
+ "type": "string",
777
+ "description": "Name of the vulnerability details link."
778
+ },
779
+ "url": {
780
+ "type": "string",
781
+ "description": "URL of the vulnerability details document.",
782
+ "pattern": "^(https?|ftp)://.+"
783
+ }
784
+ }
785
+ }
786
+ },
787
+ "details": {
788
+ "$ref": "#/definitions/named_list/properties/items"
789
+ },
790
+ "tracking": {
791
+ "type": "object",
792
+ "description": "Describes how this vulnerability should be tracked as the project changes.",
793
+ "oneOf": [
794
+ {
795
+ "description": "Declares that a series of items should be tracked using source-specific tracking methods.",
796
+ "required": [
797
+ "items"
798
+ ],
799
+ "properties": {
800
+ "type": {
801
+ "const": "source"
802
+ },
803
+ "items": {
804
+ "type": "array",
805
+ "items": {
806
+ "description": "An item that should be tracked using source-specific tracking methods.",
807
+ "type": "object",
808
+ "required": [
809
+ "signatures"
810
+ ],
811
+ "properties": {
812
+ "file": {
813
+ "type": "string",
814
+ "description": "Path to the file where the vulnerability is located."
815
+ },
816
+ "start_line": {
817
+ "type": "number",
818
+ "description": "The first line of the file that includes the vulnerability."
819
+ },
820
+ "end_line": {
821
+ "type": "number",
822
+ "description": "The last line of the file that includes the vulnerability."
823
+ },
824
+ "signatures": {
825
+ "type": "array",
826
+ "description": "An array of calculated tracking signatures for this tracking item.",
827
+ "minItems": 1,
828
+ "items": {
829
+ "description": "A calculated tracking signature value and metadata.",
830
+ "type": "object",
831
+ "required": [
832
+ "algorithm",
833
+ "value"
834
+ ],
835
+ "properties": {
836
+ "algorithm": {
837
+ "type": "string",
838
+ "description": "The algorithm used to generate the signature."
839
+ },
840
+ "value": {
841
+ "type": "string",
842
+ "description": "The result of this signature algorithm."
843
+ }
844
+ }
845
+ }
846
+ }
847
+ }
848
+ }
849
+ }
850
+ }
851
+ }
852
+ ],
853
+ "properties": {
854
+ "type": {
855
+ "type": "string",
856
+ "description": "Each tracking type must declare its own type."
857
+ }
858
+ }
859
+ },
860
+ "flags": {
861
+ "description": "Flags that can be attached to vulnerabilities.",
862
+ "type": "array",
863
+ "items": {
864
+ "type": "object",
865
+ "description": "Informational flags identified and assigned to a vulnerability.",
866
+ "required": [
867
+ "type",
868
+ "origin",
869
+ "description"
870
+ ],
871
+ "properties": {
872
+ "type": {
873
+ "type": "string",
874
+ "minLength": 1,
875
+ "description": "Result of the scan.",
876
+ "enum": [
877
+ "flagged-as-likely-false-positive"
878
+ ]
879
+ },
880
+ "origin": {
881
+ "minLength": 1,
882
+ "description": "Tool that issued the flag.",
883
+ "type": "string"
884
+ },
885
+ "description": {
886
+ "minLength": 1,
887
+ "description": "What the flag is about.",
888
+ "type": "string"
889
+ }
890
+ }
891
+ }
892
+ },
893
+ "location": {
894
+ "type": "object",
895
+ "description": "Identifies the vulnerability's location.",
896
+ "required": [
897
+ "file",
898
+ "dependency"
899
+ ],
900
+ "properties": {
901
+ "file": {
902
+ "type": "string",
903
+ "minLength": 1,
904
+ "description": "Path to the manifest or lock file where the dependency is declared (such as yarn.lock)."
905
+ },
906
+ "dependency": {
907
+ "type": "object",
908
+ "description": "Describes the dependency of a project where the vulnerability is located.",
909
+ "required": [
910
+ "package",
911
+ "version"
912
+ ],
913
+ "properties": {
914
+ "package": {
915
+ "type": "object",
916
+ "description": "Provides information on the package where the vulnerability is located.",
917
+ "required": [
918
+ "name"
919
+ ],
920
+ "properties": {
921
+ "name": {
922
+ "type": "string",
923
+ "description": "Name of the package where the vulnerability is located."
924
+ }
925
+ }
926
+ },
927
+ "version": {
928
+ "type": "string",
929
+ "description": "Version of the vulnerable package."
930
+ },
931
+ "iid": {
932
+ "description": "ID that identifies the dependency in the scope of a dependency file.",
933
+ "type": "number"
934
+ },
935
+ "direct": {
936
+ "type": "boolean",
937
+ "description": "Tells whether this is a direct, top-level dependency of the scanned project."
938
+ },
939
+ "dependency_path": {
940
+ "type": "array",
941
+ "description": "Ancestors of the dependency, starting from a direct project dependency, and ending with an immediate parent of the dependency. The dependency itself is excluded from the path. Direct dependencies have no path.",
942
+ "items": {
943
+ "type": "object",
944
+ "required": [
945
+ "iid"
946
+ ],
947
+ "properties": {
948
+ "iid": {
949
+ "type": "number",
950
+ "description": "ID that is unique in the scope of a parent object, and specific to the resource type."
951
+ }
952
+ }
953
+ }
954
+ }
955
+ }
956
+ }
957
+ }
958
+ }
959
+ }
960
+ }
961
+ },
962
+ "remediations": {
963
+ "type": "array",
964
+ "description": "An array of objects containing information on available remediations, along with patch diffs to apply.",
965
+ "items": {
966
+ "type": "object",
967
+ "required": [
968
+ "fixes",
969
+ "summary",
970
+ "diff"
971
+ ],
972
+ "properties": {
973
+ "fixes": {
974
+ "type": "array",
975
+ "description": "An array of strings that represent references to vulnerabilities fixed by this remediation.",
976
+ "items": {
977
+ "type": "object",
978
+ "required": [
979
+ "id"
980
+ ],
981
+ "properties": {
982
+ "id": {
983
+ "type": "string",
984
+ "minLength": 1,
985
+ "description": "Unique identifier of the vulnerability. This is recommended to be a UUID.",
986
+ "examples": [
987
+ "642735a5-1425-428d-8d4e-3c854885a3c9"
988
+ ]
989
+ }
990
+ }
991
+ }
992
+ },
993
+ "summary": {
994
+ "type": "string",
995
+ "minLength": 1,
996
+ "description": "An overview of how the vulnerabilities were fixed."
997
+ },
998
+ "diff": {
999
+ "type": "string",
1000
+ "minLength": 1,
1001
+ "description": "A base64-encoded remediation code diff, compatible with git apply."
1002
+ }
1003
+ }
1004
+ }
1005
+ },
1006
+ "dependency_files": {
1007
+ "type": "array",
1008
+ "description": "List of dependency files identified in the project.",
1009
+ "items": {
1010
+ "type": "object",
1011
+ "required": [
1012
+ "path",
1013
+ "package_manager",
1014
+ "dependencies"
1015
+ ],
1016
+ "properties": {
1017
+ "path": {
1018
+ "type": "string",
1019
+ "minLength": 1
1020
+ },
1021
+ "package_manager": {
1022
+ "type": "string",
1023
+ "minLength": 1
1024
+ },
1025
+ "dependencies": {
1026
+ "type": "array",
1027
+ "items": {
1028
+ "type": "object",
1029
+ "description": "Describes the dependency of a project where the vulnerability is located.",
1030
+ "required": [
1031
+ "package",
1032
+ "version"
1033
+ ],
1034
+ "properties": {
1035
+ "package": {
1036
+ "type": "object",
1037
+ "description": "Provides information on the package where the vulnerability is located.",
1038
+ "required": [
1039
+ "name"
1040
+ ],
1041
+ "properties": {
1042
+ "name": {
1043
+ "type": "string",
1044
+ "description": "Name of the package where the vulnerability is located."
1045
+ }
1046
+ }
1047
+ },
1048
+ "version": {
1049
+ "type": "string",
1050
+ "description": "Version of the vulnerable package."
1051
+ },
1052
+ "iid": {
1053
+ "description": "ID that identifies the dependency in the scope of a dependency file.",
1054
+ "type": "number"
1055
+ },
1056
+ "direct": {
1057
+ "type": "boolean",
1058
+ "description": "Tells whether this is a direct, top-level dependency of the scanned project."
1059
+ },
1060
+ "dependency_path": {
1061
+ "type": "array",
1062
+ "description": "Ancestors of the dependency, starting from a direct project dependency, and ending with an immediate parent of the dependency. The dependency itself is excluded from the path. Direct dependencies have no path.",
1063
+ "items": {
1064
+ "type": "object",
1065
+ "required": [
1066
+ "iid"
1067
+ ],
1068
+ "properties": {
1069
+ "iid": {
1070
+ "type": "number",
1071
+ "description": "ID that is unique in the scope of a parent object, and specific to the resource type."
1072
+ }
1073
+ }
1074
+ }
1075
+ }
1076
+ }
1077
+ }
1078
+ }
1079
+ }
1080
+ }
1081
+ }
1082
+ }
1083
+ }