-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathvrt.schema.json
63 lines (63 loc) · 2.07 KB
/
vrt.schema.json
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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Vulnerability Rating Taxonomy",
"description": "A Taxonomy of potential vulnerabilities with suggested technical priority rating",
"definitions": {
"VRTmetadata": {
"type": "object",
"properties": {
"release_date": { "type": "string", "format": "date-time" }
}
},
"VRT": {
"type": "object",
"properties": {
"id": { "type": "string", "pattern": "^[a-z_]*$" },
"type": { "type": "string", "enum": [ "category", "subcategory", "variant" ] },
"name": { "type": "string", "pattern": "^[ a-zA-Z0-9-+()\/,.<]*$" },
"priority": {
"anyOf": [
{ "type": "number", "minimum": 1, "maximum": 5 },
{ "type": "null" }
]
}
},
"required": ["id", "name", "type", "priority"]
},
"VRTparent": {
"type": "object",
"properties": {
"id": { "type": "string", "pattern": "^[a-z_]*$" },
"name": { "type": "string", "pattern": "^[ a-zA-Z0-9-+()\/,.<]*$" },
"type": { "type": "string", "enum": [ "category", "subcategory" ] },
"children": {
"type": "array",
"items" : {
"anyOf": [
{ "$ref": "#/definitions/VRTparent" },
{ "$ref": "#/definitions/VRT" }
]
},
"minItems": 1
}
},
"required": ["id", "name", "type", "children"]
}
},
"type": "object",
"required": ["metadata", "content"],
"properties": {
"metadata": {
"$ref": "#/definitions/VRTmetadata"
},
"content": {
"type": "array",
"items" : {
"anyOf": [
{ "$ref": "#/definitions/VRTparent" },
{ "$ref": "#/definitions/VRT" }
]
}
}
}
}