|
| 1 | +export default { |
| 2 | + $schema: 'https://json-schema.org/draft/2020-12/schema', |
| 3 | + title: 'Decision Point schema definition', |
| 4 | + $id: 'https://certcc.github.io/SSVC/data/schema/v1/Decision_Point-1-0-1.schema.json', |
| 5 | + description: |
| 6 | + 'Decision points are the basic building blocks of SSVC decision functions. Individual decision points describe a single aspect of the input to a decision function.', |
| 7 | + $defs: { |
| 8 | + schemaVersion: { |
| 9 | + description: 'Schema version used to represent this Decision Point.', |
| 10 | + type: 'string', |
| 11 | + enum: ['1-0-1'], |
| 12 | + }, |
| 13 | + decision_point_value: { |
| 14 | + type: 'object', |
| 15 | + additionalProperties: false, |
| 16 | + properties: { |
| 17 | + key: { |
| 18 | + type: 'string', |
| 19 | + description: |
| 20 | + 'A short, unique string (or key) used as a shorthand identifier for a Decision Point Value.', |
| 21 | + minLength: 1, |
| 22 | + examples: ['P', 'Y'], |
| 23 | + }, |
| 24 | + name: { |
| 25 | + type: 'string', |
| 26 | + description: 'A short label that identifies a Decision Point Value', |
| 27 | + minLength: 1, |
| 28 | + examples: ['Public PoC', 'Yes'], |
| 29 | + }, |
| 30 | + description: { |
| 31 | + type: 'string', |
| 32 | + description: 'A full description of the Decision Point Value.', |
| 33 | + minLength: 1, |
| 34 | + examples: [ |
| 35 | + 'One of the following is true: (1) Typical public PoC exists in sources such as Metasploit or websites like ExploitDB; or (2) the vulnerability has a well-known method of exploitation.', |
| 36 | + 'Attackers can reliably automate steps 1-4 of the kill chain.', |
| 37 | + ], |
| 38 | + }, |
| 39 | + }, |
| 40 | + required: ['key', 'name', 'description'], |
| 41 | + }, |
| 42 | + decision_point: { |
| 43 | + type: 'object', |
| 44 | + additionalProperties: false, |
| 45 | + properties: { |
| 46 | + schemaVersion: { |
| 47 | + $ref: '#/$defs/schemaVersion', |
| 48 | + }, |
| 49 | + namespace: { |
| 50 | + type: 'string', |
| 51 | + description: |
| 52 | + 'Namespace (a short, unique string): The value must be one of the official namespaces, currenlty "ssvc", "cvss" OR can start with \'x_\' for private namespaces. See SSVC Documentation for details.', |
| 53 | + pattern: '^(?=.{3,100}$)(x_)?[a-z0-9]{3}([/.-]?[a-z0-9]+){0,97}$', |
| 54 | + examples: ['ssvc', 'cvss', 'x_custom', 'x_custom/extension'], |
| 55 | + }, |
| 56 | + version: { |
| 57 | + type: 'string', |
| 58 | + description: |
| 59 | + 'Version (a semantic version string) that identifies the version of a Decision Point.', |
| 60 | + pattern: |
| 61 | + '^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$', |
| 62 | + examples: ['1.0.1', '1.0.1-alpha'], |
| 63 | + }, |
| 64 | + key: { |
| 65 | + type: 'string', |
| 66 | + description: |
| 67 | + 'A short, unique string (or key) used as a shorthand identifier for a Decision Point.', |
| 68 | + |
| 69 | + minLength: 1, |
| 70 | + examples: ['E', 'A'], |
| 71 | + }, |
| 72 | + name: { |
| 73 | + type: 'string', |
| 74 | + description: 'A short label that identifies a Decision Point.', |
| 75 | + minLength: 1, |
| 76 | + examples: ['Exploitation', 'Automatable'], |
| 77 | + }, |
| 78 | + description: { |
| 79 | + type: 'string', |
| 80 | + description: |
| 81 | + 'A full description of the Decision Point, explaining what it represents and how it is used in SSVC.', |
| 82 | + minLength: 1, |
| 83 | + }, |
| 84 | + values: { |
| 85 | + description: 'A set of possible answers for a given Decision Point', |
| 86 | + uniqueItems: true, |
| 87 | + type: 'array', |
| 88 | + minItems: 1, |
| 89 | + items: { |
| 90 | + $ref: '#/$defs/decision_point_value', |
| 91 | + }, |
| 92 | + }, |
| 93 | + }, |
| 94 | + required: [ |
| 95 | + 'namespace', |
| 96 | + 'version', |
| 97 | + 'key', |
| 98 | + 'name', |
| 99 | + 'description', |
| 100 | + 'values', |
| 101 | + 'schemaVersion', |
| 102 | + ], |
| 103 | + }, |
| 104 | + }, |
| 105 | + $ref: '#/$defs/decision_point', |
| 106 | +} |
0 commit comments