diff --git a/schema/2.0/modules/cyclonedx-ai-modelcard-2.0.schema.json b/schema/2.0/modules/cyclonedx-ai-modelcard-2.0.schema.json index df877229f..ef79ee3b0 100644 --- a/schema/2.0/modules/cyclonedx-ai-modelcard-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-ai-modelcard-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-ai-modelcard-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX AI Model Card Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-annotation-2.0.schema.json b/schema/2.0/modules/cyclonedx-annotation-2.0.schema.json index 1b69ebe82..31f11a1c0 100644 --- a/schema/2.0/modules/cyclonedx-annotation-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-annotation-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-annotation-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Annotation Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-behavior-2.0.schema.json b/schema/2.0/modules/cyclonedx-behavior-2.0.schema.json index 0724e8e40..f65daa141 100644 --- a/schema/2.0/modules/cyclonedx-behavior-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-behavior-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-behavior-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Behavior Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-blueprint-2.0.schema.json b/schema/2.0/modules/cyclonedx-blueprint-2.0.schema.json index 49d241545..2efa5412a 100644 --- a/schema/2.0/modules/cyclonedx-blueprint-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-blueprint-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-blueprint-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Blueprint Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-business-objective-2.0.schema.json b/schema/2.0/modules/cyclonedx-business-objective-2.0.schema.json index 14014b568..13f226c82 100644 --- a/schema/2.0/modules/cyclonedx-business-objective-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-business-objective-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-business-objective-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Business Objective Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-certification-2.0.schema.json b/schema/2.0/modules/cyclonedx-certification-2.0.schema.json index 628a96af1..bf5837492 100644 --- a/schema/2.0/modules/cyclonedx-certification-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-certification-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-certification-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Certification Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-citation-2.0.schema.json b/schema/2.0/modules/cyclonedx-citation-2.0.schema.json index 7c95aca46..48761fae2 100644 --- a/schema/2.0/modules/cyclonedx-citation-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-citation-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-citation-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Citation Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-common-2.0.schema.json b/schema/2.0/modules/cyclonedx-common-2.0.schema.json index 07e52f578..0a0c7cd08 100644 --- a/schema/2.0/modules/cyclonedx-common-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-common-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-common-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Common Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-component-2.0.schema.json b/schema/2.0/modules/cyclonedx-component-2.0.schema.json index 236b485a2..1e6f4f8b9 100644 --- a/schema/2.0/modules/cyclonedx-component-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-component-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-component-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Component Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-composition-2.0.schema.json b/schema/2.0/modules/cyclonedx-composition-2.0.schema.json index 087ae521f..893056238 100644 --- a/schema/2.0/modules/cyclonedx-composition-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-composition-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-composition-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Composition Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-control-2.0.schema.json b/schema/2.0/modules/cyclonedx-control-2.0.schema.json index 1110dcb0c..ee9a670e6 100644 --- a/schema/2.0/modules/cyclonedx-control-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-control-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-control-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Control Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-cryptography-2.0.schema.json b/schema/2.0/modules/cyclonedx-cryptography-2.0.schema.json index 67ae7de73..efa2150cc 100644 --- a/schema/2.0/modules/cyclonedx-cryptography-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-cryptography-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-cryptography-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Cryptography Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-data-2.0.schema.json b/schema/2.0/modules/cyclonedx-data-2.0.schema.json index 862dbe935..f83af7926 100644 --- a/schema/2.0/modules/cyclonedx-data-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-data-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-data-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Data Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-declaration-2.0.schema.json b/schema/2.0/modules/cyclonedx-declaration-2.0.schema.json index 25f4ff655..4b8e782e5 100644 --- a/schema/2.0/modules/cyclonedx-declaration-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-declaration-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-declaration-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Declaration Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-definition-2.0.schema.json b/schema/2.0/modules/cyclonedx-definition-2.0.schema.json index 81f9570db..c5dcf44c2 100644 --- a/schema/2.0/modules/cyclonedx-definition-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-definition-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-definition-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Definition Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-dependency-2.0.schema.json b/schema/2.0/modules/cyclonedx-dependency-2.0.schema.json index 579c4f900..1482a437f 100644 --- a/schema/2.0/modules/cyclonedx-dependency-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-dependency-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-dependency-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Dependency Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-evidence-2.0.schema.json b/schema/2.0/modules/cyclonedx-evidence-2.0.schema.json index 4a7da915d..f38fed97e 100644 --- a/schema/2.0/modules/cyclonedx-evidence-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-evidence-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-evidence-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Evidence Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-formulation-2.0.schema.json b/schema/2.0/modules/cyclonedx-formulation-2.0.schema.json index dd488b656..581364f62 100644 --- a/schema/2.0/modules/cyclonedx-formulation-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-formulation-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-formulation-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Formulation Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-jss_X590_2023_10-2.0.schema.json b/schema/2.0/modules/cyclonedx-jss_X590_2023_10-2.0.schema.json index 845e00f1e..a08d20f6c 100644 --- a/schema/2.0/modules/cyclonedx-jss_X590_2023_10-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-jss_X590_2023_10-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-jss_X590_2023_10-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Module for JSON Signature Scheme (JSS)", "$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.", "description": "JSON Schema implementing ITU-T X.590 (10/2023) – JSON Signature Scheme (JSS). Defines the structure for digitally signing JSON objects while keeping the payload in JSON format. Supports single signatures, multiple independent signatures, and chained counter-signatures. Intended for use as a $defs import in CycloneDX 2.0.", diff --git a/schema/2.0/modules/cyclonedx-license-2.0.schema.json b/schema/2.0/modules/cyclonedx-license-2.0.schema.json index adf4aa18d..91763ca9f 100644 --- a/schema/2.0/modules/cyclonedx-license-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-license-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-license-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX License Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-metadata-2.0.schema.json b/schema/2.0/modules/cyclonedx-metadata-2.0.schema.json index 27fdb71f5..484d4e809 100644 --- a/schema/2.0/modules/cyclonedx-metadata-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-metadata-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-metadata-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Metadata Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-party-2.0.schema.json b/schema/2.0/modules/cyclonedx-party-2.0.schema.json index ded994c7b..f23052e11 100644 --- a/schema/2.0/modules/cyclonedx-party-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-party-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-party-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Party Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-patent-2.0.schema.json b/schema/2.0/modules/cyclonedx-patent-2.0.schema.json index ae317f624..438ee06dc 100644 --- a/schema/2.0/modules/cyclonedx-patent-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-patent-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-patent-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Patent Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-perspective-2.0.schema.json b/schema/2.0/modules/cyclonedx-perspective-2.0.schema.json index 36d9a0faa..401cf24a9 100644 --- a/schema/2.0/modules/cyclonedx-perspective-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-perspective-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-perspective-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Perspective Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-physical-2.0.schema.json b/schema/2.0/modules/cyclonedx-physical-2.0.schema.json index df084f329..10b09b8ec 100644 --- a/schema/2.0/modules/cyclonedx-physical-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-physical-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-physical-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Physical Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-profile-2.0.schema.json b/schema/2.0/modules/cyclonedx-profile-2.0.schema.json index 3adf53bfe..9c38cb318 100644 --- a/schema/2.0/modules/cyclonedx-profile-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-profile-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-profile-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Profile Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-release-notes-2.0.schema.json b/schema/2.0/modules/cyclonedx-release-notes-2.0.schema.json index 916f4d2cc..4aba81324 100644 --- a/schema/2.0/modules/cyclonedx-release-notes-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-release-notes-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-release-notes-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Release Notes Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-requirement-2.0.schema.json b/schema/2.0/modules/cyclonedx-requirement-2.0.schema.json index 8fd140afa..6e7e6afc3 100644 --- a/schema/2.0/modules/cyclonedx-requirement-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-requirement-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-requirement-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Engineering Requirement Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-risk-2.0.schema.json b/schema/2.0/modules/cyclonedx-risk-2.0.schema.json index 30eda315d..9969a52d1 100644 --- a/schema/2.0/modules/cyclonedx-risk-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-risk-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-risk-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Risk Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-standard-2.0.schema.json b/schema/2.0/modules/cyclonedx-standard-2.0.schema.json index 659a129c4..f50eaee3c 100644 --- a/schema/2.0/modules/cyclonedx-standard-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-standard-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-standard-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Standard Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-threat-2.0.schema.json b/schema/2.0/modules/cyclonedx-threat-2.0.schema.json index 345170c6c..2208cacf5 100644 --- a/schema/2.0/modules/cyclonedx-threat-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-threat-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-threat-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Threat Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-usecase-2.0.schema.json b/schema/2.0/modules/cyclonedx-usecase-2.0.schema.json index 085748eb7..1e171a292 100644 --- a/schema/2.0/modules/cyclonedx-usecase-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-usecase-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-usecase-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Use Case Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-vulnerability-2.0.schema.json b/schema/2.0/modules/cyclonedx-vulnerability-2.0.schema.json index d67385ee1..6a7464c3e 100644 --- a/schema/2.0/modules/cyclonedx-vulnerability-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-vulnerability-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-vulnerability-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Vulnerability Module", "$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.", "$defs": { diff --git a/schema/2.0/modules/cyclonedx-weakness-2.0.schema.json b/schema/2.0/modules/cyclonedx-weakness-2.0.schema.json index de8f81325..22568ada3 100644 --- a/schema/2.0/modules/cyclonedx-weakness-2.0.schema.json +++ b/schema/2.0/modules/cyclonedx-weakness-2.0.schema.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/2.0/modules/cyclonedx-weakness-2.0.schema.json", - "type": "null", + "not": { "$comment": "This schema provides definitions only and is not intended for direct validation or instantiation." }, "title": "CycloneDX Weakness Module", "$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.", "$defs": { diff --git a/tools/src/main/js/linter/checks/module-property-order.check.js b/tools/src/main/js/linter/checks/module-property-order.check.js index c942a5275..65f36819d 100644 --- a/tools/src/main/js/linter/checks/module-property-order.check.js +++ b/tools/src/main/js/linter/checks/module-property-order.check.js @@ -15,7 +15,7 @@ import { LintCheck, registerCheck, Severity } from '../index.js'; /** * Property order for module schemas */ -const ORDER = ['$schema', '$id', 'type', 'title', '$comment', 'description', '$defs']; +const ORDER = ['$schema', '$id', 'not', 'title', '$comment', 'description', '$defs']; /** * Which of the ordered properties are optional. */ diff --git a/tools/src/main/js/linter/checks/module-structure.check.js b/tools/src/main/js/linter/checks/module-structure.check.js index c1cc7b69a..16fc9a021 100644 --- a/tools/src/main/js/linter/checks/module-structure.check.js +++ b/tools/src/main/js/linter/checks/module-structure.check.js @@ -13,6 +13,16 @@ import { LintCheck, registerCheck, Severity } from '../index.js'; +function isEmptySchema(value) { + if (typeof value !== 'object' || value === null || Array.isArray(value)) { + // not a schema + return false; + } + const keys = new Set(Object.keys(value)); + keys.delete('$comment'); // delete keys that don't define a schema + return keys.size === 0; +} + /** * Check that validates module schema structure */ @@ -21,7 +31,7 @@ class ModuleStructureCheck extends LintCheck { super( 'module-structure', 'Module Structure', - 'Validates that module schemas have type "null", $defs, and no properties.', + 'Validates that module schemas have "not:{}", $defs, and no type nor properties.', Severity.ERROR ); } @@ -35,18 +45,20 @@ class ModuleStructureCheck extends LintCheck { return issues; // Not a module schema, skip } - // Check type must be "null" - if (!('type' in schema)) { + // Check root is not usable + // `not: {}` rejects every instance, so the container is unusable on its own; + // unlike `false` it can still hold `$defs`, and unlike `not: true` it is valid in draft-04. + if (!('not' in schema)) { issues.push(this.createIssue( - 'Module schema is missing required "type" property.', - '$.type', - { expected: 'null' } + 'Module schema is missing required "not" property.', + '$.not', + { expected: {} } )); - } else if (schema.type !== 'null') { + } else if (!isEmptySchema(schema.not)) { issues.push(this.createIssue( - `Module schema "type" must be "null", found "${schema.type}".`, - '$.type', - { actual: schema.type, expected: 'null' } + `Module schema "not" must be an empty schema, found ${JSON.stringify(schema.not)}".`, + '$.not', + { actual: schema.not, expected: {} } )); } @@ -59,6 +71,14 @@ class ModuleStructureCheck extends LintCheck { )); } + // Check properties must not exist at root level + if ('type' in schema) { + issues.push(this.createIssue( + 'Module schema must not have "type" at root level.', + '$.type' + )); + } + // Check properties must not exist at root level if ('properties' in schema) { issues.push(this.createIssue(