|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://cyclonedx.org/schema/2.0/model/cyclonedx-citation-2.0.schema.json", |
| 4 | + "type": "null", |
| 5 | + "title": "CycloneDX Citation Model", |
| 6 | + "$comment" : "OWASP CycloneDX is an Ecma International standard (ECMA-424) developed in collaboration between the OWASP Foundation and Ecma Technical Committee 54 (TC54). The standard is published under a royalty-free patent policy. This JSON schema is the reference implementation and is licensed under the Apache License 2.0.", |
| 7 | + "$defs": { |
| 8 | + "citations": { |
| 9 | + "type": "array", |
| 10 | + "items": {"$ref": "#/$defs/citation"}, |
| 11 | + "uniqueItems": true, |
| 12 | + "title": "Citations", |
| 13 | + "description": "A collection of attributions indicating which entity supplied information for specific fields within the BOM." |
| 14 | + }, |
| 15 | + "citation": { |
| 16 | + "type": "object", |
| 17 | + "title": "Citation", |
| 18 | + "description": "Details a specific attribution of data within the BOM to a contributing entity or process.", |
| 19 | + "additionalProperties": false, |
| 20 | + "properties": { |
| 21 | + "bom-ref": { |
| 22 | + "$ref": "cyclonedx-common-2.0.schema.json#/$defs/refType", |
| 23 | + "title": "BOM Reference" |
| 24 | + }, |
| 25 | + "pointers": { |
| 26 | + "type": "array", |
| 27 | + "items": { |
| 28 | + "type": "string", |
| 29 | + "title": "Field Reference", |
| 30 | + "description": "A [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) identifying the BOM field to which the attribution applies." |
| 31 | + }, |
| 32 | + "minItems": 1, |
| 33 | + "title": "Field References", |
| 34 | + "description": "One or more [JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901) identifying the BOM fields to which the attribution applies.\nExactly one of the \"pointers\" or \"expressions\" elements must be present." |
| 35 | + }, |
| 36 | + "expressions": { |
| 37 | + "type": "array", |
| 38 | + "items": { |
| 39 | + "type": "string", |
| 40 | + "title": "Path Expression", |
| 41 | + "description": "Specifies a [JSONPath](https://datatracker.ietf.org/doc/html/rfc9535) expression used to locate a value within a BOM." |
| 42 | + }, |
| 43 | + "minItems": 1, |
| 44 | + "title": "Path Expressions", |
| 45 | + "description": "One or more path expressions used to locate values within a BOM.\nExactly one of the \"pointers\" or \"expressions\" elements must be present." |
| 46 | + }, |
| 47 | + "timestamp": { |
| 48 | + "type": "string", |
| 49 | + "format": "date-time", |
| 50 | + "title": "Timestamp", |
| 51 | + "description": "The date and time when the attribution was made or the information was supplied." |
| 52 | + }, |
| 53 | + "attributedTo": { |
| 54 | + "$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType", |
| 55 | + "title": "Attributed To", |
| 56 | + "description": "The `bom-ref` of an object, such as a component, service, tool, organisational entity, or person that supplied the cited information.\nAt least one of the \"attributedTo\" or \"process\" elements must be present." |
| 57 | + }, |
| 58 | + "process": { |
| 59 | + "$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType", |
| 60 | + "title": "Process Reference", |
| 61 | + "description": "The `bom-ref` to a process (such as a formula, workflow, task, or step) defined in the `formulation` section that executed or generated the attributed data.\nAt least one of the \"attributedTo\" or \"process\" elements must be present." |
| 62 | + }, |
| 63 | + "note": { |
| 64 | + "type": "string", |
| 65 | + "title": "Note", |
| 66 | + "description": "A description or comment about the context or quality of the data attribution." |
| 67 | + }, |
| 68 | + "signature": { |
| 69 | + "$ref": "cyclonedx-common-2.0.schema.json#/$defs/signature", |
| 70 | + "title": "Signature", |
| 71 | + "description": "A digital signature verifying the authenticity or integrity of the attribution." |
| 72 | + } |
| 73 | + }, |
| 74 | + "required": ["timestamp"], |
| 75 | + "anyOf": [ |
| 76 | + { "required": ["attributedTo"] }, |
| 77 | + { "required": ["process"] } |
| 78 | + ], |
| 79 | + "oneOf": [ |
| 80 | + { "required": ["pointers"] }, |
| 81 | + { "required": ["expressions"] } |
| 82 | + ] |
| 83 | + } |
| 84 | + } |
| 85 | +} |
0 commit comments