diff --git a/csaf_2.1/json_schema/csaf_json_schema.json b/csaf_2.1/json_schema/csaf_json_schema.json index 1c518685..1c42ccb5 100644 --- a/csaf_2.1/json_schema/csaf_json_schema.json +++ b/csaf_2.1/json_schema/csaf_json_schema.json @@ -1350,6 +1350,9 @@ } ] }, + "cvss_v4": { + "$ref": "https://www.first.org/cvss/cvss-v4.0.json" + }, "products": { "$ref": "#/$defs/products_t" } diff --git a/csaf_2.1/prose/edit/etc/example-global-to-local.json b/csaf_2.1/prose/edit/etc/example-global-to-local.json index c9f4ed4f..0e1b3adf 100644 --- a/csaf_2.1/prose/edit/etc/example-global-to-local.json +++ b/csaf_2.1/prose/edit/etc/example-global-to-local.json @@ -123,24 +123,25 @@ "121": "branch-categories-eg-1", "122": "usage-of-product-version-range-eg-1", "123": "usage-of-v-as-version-indicator-eg-1", - "124": "requirement-7-provider-metadata-json-eg-1", - "125": "requirement-8-security-txt-eg-1", - "126": "requirement-9-well-known-url-for-provider-metadata-json-eg-1", - "127": "requirement-11-one-folder-per-year-eg-1", - "128": "requirement-12-index-txt-eg-1", - "129": "requirement-13-changes-csv-eg-1", - "130": "requirement-15-rolie-feed-eg-1", - "131": "requirement-16-rolie-service-document-eg-1", - "132": "requirement-17-rolie-category-document-eg-1", - "133": "requirement-17-rolie-category-document-eg-2", - "134": "requirement-17-rolie-category-document-eg-3", - "135": "requirement-18-integrity-eg-1", - "136": "requirement-18-integrity-eg-2", - "137": "requirement-19-signatures-eg-1", - "138": "requirement-21-list-of-csaf-providers-eg-1", - "139": "requirement-23-mirror-eg-1", - "140": "conformance-clause-5-cvrf-csaf-converter-eg-1", - "141": "conformance-clause-5-cvrf-csaf-converter-eg-2", - "142": "conformance-clause-5-cvrf-csaf-converter-eg-3", - "143": "conformance-clause-5-cvrf-csaf-converter-eg-4" + "124": "missing-cvss-v4-0-eg-1", + "126": "requirement-7-provider-metadata-json-eg-1", + "127": "requirement-8-security-txt-eg-1", + "128": "requirement-9-well-known-url-for-provider-metadata-json-eg-1", + "129": "requirement-11-one-folder-per-year-eg-1", + "120": "requirement-12-index-txt-eg-1", + "130": "requirement-13-changes-csv-eg-1", + "131": "requirement-15-rolie-feed-eg-1", + "132": "requirement-16-rolie-service-document-eg-1", + "133": "requirement-17-rolie-category-document-eg-1", + "134": "requirement-17-rolie-category-document-eg-2", + "135": "requirement-17-rolie-category-document-eg-3", + "136": "requirement-18-integrity-eg-1", + "137": "requirement-18-integrity-eg-2", + "138": "requirement-19-signatures-eg-1", + "139": "requirement-21-list-of-csaf-providers-eg-1", + "140": "requirement-23-mirror-eg-1", + "141": "conformance-clause-5-cvrf-csaf-converter-eg-1", + "142": "conformance-clause-5-cvrf-csaf-converter-eg-2", + "143": "conformance-clause-5-cvrf-csaf-converter-eg-3", + "144": "conformance-clause-5-cvrf-csaf-converter-eg-4" } diff --git a/csaf_2.1/prose/edit/etc/example-local-to-global.json b/csaf_2.1/prose/edit/etc/example-local-to-global.json index 4e958008..14a23850 100644 --- a/csaf_2.1/prose/edit/etc/example-local-to-global.json +++ b/csaf_2.1/prose/edit/etc/example-local-to-global.json @@ -13,10 +13,10 @@ "branches-type-name-under-product-version-range-eg-2": "9", "build-metadata-in-revision-history-eg-1": "96", "circular-definition-of-product-id-eg-1": "51", - "conformance-clause-5-cvrf-csaf-converter-eg-1": "140", - "conformance-clause-5-cvrf-csaf-converter-eg-2": "141", - "conformance-clause-5-cvrf-csaf-converter-eg-3": "142", - "conformance-clause-5-cvrf-csaf-converter-eg-4": "143", + "conformance-clause-5-cvrf-csaf-converter-eg-1": "141", + "conformance-clause-5-cvrf-csaf-converter-eg-2": "142", + "conformance-clause-5-cvrf-csaf-converter-eg-3": "143", + "conformance-clause-5-cvrf-csaf-converter-eg-4": "144", "contradicting-product-status-eg-1": "54", "cve-in-field-ids-eg-1": "109", "cvss-for-fixed-products-eg-1": "111", @@ -56,6 +56,7 @@ "latest-document-version-eg-1": "64", "missing-canonical-url-eg-1": "103", "missing-cve-eg-1": "115", + "missing-cvss-v4-0-eg-1": "124", "missing-cwe-eg-1": "116", "missing-date-in-involvements-eg-1": "99", "missing-definition-of-product-group-id-eg-1": "52", @@ -93,22 +94,22 @@ "purl-eg-1": "61", "released-revision-history-eg-1": "66", "remediation-without-product-reference-eg-1": "88", - "requirement-11-one-folder-per-year-eg-1": "127", - "requirement-12-index-txt-eg-1": "128", - "requirement-13-changes-csv-eg-1": "129", - "requirement-15-rolie-feed-eg-1": "130", - "requirement-16-rolie-service-document-eg-1": "131", - "requirement-17-rolie-category-document-eg-1": "132", - "requirement-17-rolie-category-document-eg-2": "133", - "requirement-17-rolie-category-document-eg-3": "134", - "requirement-18-integrity-eg-1": "135", - "requirement-18-integrity-eg-2": "136", - "requirement-19-signatures-eg-1": "137", - "requirement-21-list-of-csaf-providers-eg-1": "138", - "requirement-23-mirror-eg-1": "139", - "requirement-7-provider-metadata-json-eg-1": "124", - "requirement-8-security-txt-eg-1": "125", - "requirement-9-well-known-url-for-provider-metadata-json-eg-1": "126", + "requirement-11-one-folder-per-year-eg-1": "128", + "requirement-12-index-txt-eg-1": "129", + "requirement-13-changes-csv-eg-1": "130", + "requirement-15-rolie-feed-eg-1": "131", + "requirement-16-rolie-service-document-eg-1": "132", + "requirement-17-rolie-category-document-eg-1": "133", + "requirement-17-rolie-category-document-eg-2": "134", + "requirement-17-rolie-category-document-eg-3": "135", + "requirement-18-integrity-eg-1": "136", + "requirement-18-integrity-eg-2": "137", + "requirement-19-signatures-eg-1": "138", + "requirement-21-list-of-csaf-providers-eg-1": "139", + "requirement-23-mirror-eg-1": "140", + "requirement-7-provider-metadata-json-eg-1": "125", + "requirement-8-security-txt-eg-1": "126", + "requirement-9-well-known-url-for-provider-metadata-json-eg-1": "127", "revision-history-entries-for-pre-release-versions-eg-1": "67", "sorted-revision-history-eg-1": "62", "spell-check-eg-1": "120", diff --git a/csaf_2.1/prose/edit/etc/section-display-to-label.json b/csaf_2.1/prose/edit/etc/section-display-to-label.json index d8de853d..5e77fc09 100644 --- a/csaf_2.1/prose/edit/etc/section-display-to-label.json +++ b/csaf_2.1/prose/edit/etc/section-display-to-label.json @@ -191,6 +191,7 @@ "6.3.9": "branch-categories", "6.3.10": "usage-of-product-version-range", "6.3.11": "usage-of-v-as-version-indicator", + "6.3.12": "missing-cvss-v4-0", "7": "distributing-csaf-documents", "7.1": "requirements", "7.1.1": "requirement-1-valid-csaf-document", diff --git a/csaf_2.1/prose/edit/etc/section-label-to-display.json b/csaf_2.1/prose/edit/etc/section-label-to-display.json index 6b34e181..e4cad037 100644 --- a/csaf_2.1/prose/edit/etc/section-label-to-display.json +++ b/csaf_2.1/prose/edit/etc/section-label-to-display.json @@ -112,6 +112,7 @@ "mandatory-tests": "6.1", "missing-canonical-url": "6.2.11", "missing-cve": "6.3.3", + "missing-cvss-v4-0": "6.3.12", "missing-cwe": "6.3.4", "missing-date-in-involvements": "6.2.7", "missing-definition-of-product-group-id": "6.1.4", diff --git a/csaf_2.1/prose/edit/src/additional-conventions.md b/csaf_2.1/prose/edit/src/additional-conventions.md index ce960de5..0eebf2f7 100644 --- a/csaf_2.1/prose/edit/src/additional-conventions.md +++ b/csaf_2.1/prose/edit/src/additional-conventions.md @@ -47,4 +47,28 @@ they MUST be separated by the Record Separator in accordance with [cite](#RFC746 The keys within a CSAF document SHOULD be sorted alphabetically. +## Usage of Markdown + +The use of GitHub-flavoured Markdown is permitted in the following fields: + +``` + /document/acknowledgments[]/summary + /document/distribution/text + /document/notes[]/text + /document/publisher/issuing_authority + /document/references[]/summary + /document/tracking/revision_history[]/summary + /product_tree/product_groups[]/summary + /vulnerabilities[]/acknowledgments[]/summary + /vulnerabilities[]/involvements[]/summary + /vulnerabilities[]/notes[]/text + /vulnerabilities[]/references[]/summary + /vulnerabilities[]/remediations[]/details + /vulnerabilities[]/remediations[]/entitlements[] + /vulnerabilities[]/remediations[]/restart_required/details + /vulnerabilities[]/threats[]/details +``` + +Other fields MUST NOT contain Markdown. + ------- diff --git a/csaf_2.1/prose/edit/src/conformance.md b/csaf_2.1/prose/edit/src/conformance.md index 98f77c34..38d6e639 100644 --- a/csaf_2.1/prose/edit/src/conformance.md +++ b/csaf_2.1/prose/edit/src/conformance.md @@ -50,6 +50,7 @@ The entities ("conformance targets") for which this document defines requirement * **CSAF full validator**: A CSAF extended validator that additionally performs informative tests. * **CSAF SBOM matching system**: A program that connects to or is an SBOM database and is able to manage CSAF documents as required by CSAF management system as well as matching them to SBOM components of the SBOM database. +* **CSAF 2.0 to CSAF 2.1 converter**: A CSAF producer which takes a CSAF 2.0 document as input and converts it into a valid CSAF 2.1 document. ### Conformance Clause 1: CSAF document @@ -135,6 +136,8 @@ Secondly, the program fulfills the following for all items of: `first_affected` and `last_affected` into `product_ids`. If none of these arrays exist, the CVRF CSAF converter outputs an error that no matching Product ID was found for this remediation element. * `/vulnerabilities[]/scores[]`: + * For any CVSS v4 element, the CVRF CSAF converter MUST compute the `baseSeverity` from the `baseScore` according to + the rules of the applicable CVSS standard. (CSAF CVRF v1.2 predates CVSS v4.0.) * For any CVSS v3 element, the CVRF CSAF converter MUST compute the `baseSeverity` from the `baseScore` according to the rules of the applicable CVSS standard. * If no `product_id` is given, the CVRF CSAF converter appends all Product IDs which are listed under `../product_status` in @@ -145,7 +148,8 @@ Secondly, the program fulfills the following for all items of: A CVRF CSAF converter MAY offer a configuration option to delete such elements. * If there are CVSS v3.0 and CVSS v3.1 Vectors available for the same product, the CVRF CSAF converter discards the CVSS v3.0 information and provide in CSAF only the CVSS v3.1 information. - * To determine, which minor version of CVSS v3 is used, the CVRF CSAF converter uses the following steps: + * To determine, which minor version of CVSS v3 is used and to evaluate a CVSS v4 that was wrongly inserted in a CVSS v3 element, + the CVRF CSAF converter uses the following steps: 1. Retrieve the CVSS version from the CVSS vector, if present. *Example 1:* @@ -486,4 +490,19 @@ A CSAF SBOM matching system satisfies the "CSAF SBOM matching system" conformanc * matching that CSAF document at all * marked with a given status +### Conformance Clause 18: CSAF 2.0 to CSAF 2.1 converter + +A program satisfies the "CSAF 2.0 to CSAF 2.1 converter" conformance profile if the program fulfills the following two groups of requirements: + +Firstly, the program: + +* satisfies the "CSAF producer" conformance profile. +* takes only CSAF 2.0 documents as input. +* additionally satisfies the normative requirements given below. + +Secondly, the program fulfills the following for all items of: + + +> A tool MAY implement options to convert other Markdown formats to GitHub-flavoured Markdown. + ------- diff --git a/csaf_2.1/prose/edit/src/design-considerations-01-construction-principles.md b/csaf_2.1/prose/edit/src/design-considerations-01-construction-principles.md index bdf6c051..71edbb65 100644 --- a/csaf_2.1/prose/edit/src/design-considerations-01-construction-principles.md +++ b/csaf_2.1/prose/edit/src/design-considerations-01-construction-principles.md @@ -37,6 +37,8 @@ Delegation to industry best practices technologies is used in referencing schema * Platform Data: * Common Platform Enumeration (CPE) Version 2.3 [cite](#CPE23-N) * Vulnerability Scoring: + * Common Vulnerability Scoring System (CVSS) Version 4.0 [cite](#CVSS40) + * JSON Schema Reference https://www.first.org/cvss/cvss-v4.0.json * Common Vulnerability Scoring System (CVSS) Version 3.1 [cite](#CVSS31) * JSON Schema Reference https://www.first.org/cvss/cvss-v3.1.json * Common Vulnerability Scoring System (CVSS) Version 3.0 [cite](#CVSS30) diff --git a/csaf_2.1/prose/edit/src/distributing.md b/csaf_2.1/prose/edit/src/distributing.md index 38d946a7..58a900a0 100644 --- a/csaf_2.1/prose/edit/src/distributing.md +++ b/csaf_2.1/prose/edit/src/distributing.md @@ -171,8 +171,8 @@ value of `/document/tracking/initial_release_date`. *Examples 1:* ``` -2021 -2020 +2024 +2023 ``` ### Requirement 12: index.txt @@ -182,9 +182,10 @@ The index.txt file within MUST provide a list of all filenames of CSAF documents *Example 1:* ``` -2020/example_company_-_2020-yh4711.json -2019/example_company_-_2019-yh3234.json -2018/example_company_-_2018-yh2312.json +2023/esa-2023-09953.json +2022/esa-2022-02723.json +2021/esa-2021-31916.json +2021/esa-2021-03676.json ``` > This can be used to download all CSAF documents. @@ -197,10 +198,10 @@ CSAF document in the sub-directories without a heading; lines MUST be sorted by *Example 1:* ``` -"2020/example_company_-_2020-yh4711.json","2020-07-01T10:09:07Z" -"2018/example_company_-_2018-yh2312.json","2020-07-01T10:09:01Z" -"2019/example_company_-_2019-yh3234.json","2019-04-17T15:08:41Z" -"2018/example_company_-_2018-yh2312.json","2019-03-01T06:01:00Z" +"2023/esa-2023-09953.json","2023-07-01T10:09:07Z" +"2021/esa-2021-03676.json","2023-07-01T10:09:01Z" +"2022/esa-2022-02723.json","2022-04-17T15:08:41Z" +"2021/esa-2021-31916.json","2022-03-01T06:01:00Z" ``` ### Requirement 14: Directory listings @@ -388,9 +389,9 @@ MD5 and SHA1 SHOULD NOT be used. *Example 1:* ``` -File name of CSAF document: example_company_-_2019-yh3234.json -File name of SHA-256 hash file: example_company_-_2019-yh3234.json.sha256 -File name of SHA-512 hash file: example_company_-_2019-yh3234.json.sha512 +File name of CSAF document: esa-2022-02723.json +File name of SHA-256 hash file: esa-2022-02723.json.sha256 +File name of SHA-512 hash file: esa-2022-02723.json.sha512 ``` The file content SHALL start with the first byte of the hexadecimal hash value. @@ -399,7 +400,7 @@ Any subsequent data (like a filename) which is optional SHALL be separated by at *Example 2:* ``` -ea6a209dba30a958a78d82309d6cdcc6929fcb81673b3dc4d6b16fac18b6ff38 example_company_-_2019-yh3234.json +ea6a209dba30a958a78d82309d6cdcc6929fcb81673b3dc4d6b16fac18b6ff38 esa-2022-02723.json ``` If a ROLIE feed exists, each hash file MUST be listed in it as described in requirement 15. @@ -412,8 +413,8 @@ extended by the appropriate extension. See [cite](#RFC4880) for more details. *Example 1:* ``` -File name of CSAF document: example_company_-_2019-yh3234.json -File name of signature file: example_company_-_2019-yh3234.json.asc +File name of CSAF document: esa-2022-02723.json +File name of signature file: esa-2022-02723.json.asc ``` If a ROLIE feed exists, each signature file MUST be listed in it as described in requirement 15. diff --git a/csaf_2.1/prose/edit/src/frontmatter.md b/csaf_2.1/prose/edit/src/frontmatter.md index 710e19d6..dd54682d 100644 --- a/csaf_2.1/prose/edit/src/frontmatter.md +++ b/csaf_2.1/prose/edit/src/frontmatter.md @@ -7,7 +7,7 @@ ## Committee Specification Draft 01 -## ?? Month 2024 +## 28 February 2024 #### This stage: https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.md (Authoritative) \ @@ -71,7 +71,7 @@ When referencing this specification the following citation format should be used **[csaf-v2.1]** -_Common Security Advisory Framework Version 2.1_. Edited by Stefan Hagen, and Thomas Schmidt. ?? Month 2024. OASIS Standard. https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.html. Latest stage: https://docs.oasis-open.org/csaf/csaf/v2.1/csaf-v2.1.html. +_Common Security Advisory Framework Version 2.1_. Edited by Stefan Hagen, and Thomas Schmidt. 28 February 2024. OASIS Committee Specification Draft 01. https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.html. Latest stage: https://docs.oasis-open.org/csaf/csaf/v2.1/csaf-v2.1.html. ------- diff --git a/csaf_2.1/prose/edit/src/guidance-on-size.md b/csaf_2.1/prose/edit/src/guidance-on-size.md index f654fb3a..4d8f2620 100644 --- a/csaf_2.1/prose/edit/src/guidance-on-size.md +++ b/csaf_2.1/prose/edit/src/guidance-on-size.md @@ -36,8 +36,9 @@ All _CSAF producers_ SHOULD NOT produce CSAF documents which exceed those limits ## File size A CSAF document in the specified JSON format encoded in UTF-8 SHOULD conform to known size limits of current technologies parsing JSON content, -e.g.: 15 MB. +e.g.: 50 MiB. +> The CSAF documents observed in the wild expose strongly varying sizes as per the use cases they serve. > At least one database technology in wide use for storing CSAF documents rejects insert attempts when > the transformed BSON size exceeds 16 megabytes. > The BSON format optimizes for accessibility and not size. @@ -211,6 +212,7 @@ A string SHOULD NOT have a length greater than: * `/vulnerabilities[]/remediations[]/product_ids[]` * `/vulnerabilities[]/scores[]/cvss_v2/vectorString` * `/vulnerabilities[]/scores[]/cvss_v3/vectorString` + * `/vulnerabilities[]/scores[]/cvss_v4/vectorString` * `/vulnerabilities[]/scores[]/products[]` * `/vulnerabilities[]/threats[]/group_ids[]` * `/vulnerabilities[]/threats[]/product_ids[]` @@ -337,6 +339,42 @@ It seems to be safe to assume that the length of each value is not greater than * `/vulnerabilities[]/scores[]/cvss_v3/modifiedIntegrityImpact` (11) * `/vulnerabilities[]/scores[]/cvss_v3/modifiedAvailabilityImpact` (11) * `/vulnerabilities[]/scores[]/cvss_v3/environmentalSeverity` (8) +* `/vulnerabilities[]/scores[]/cvss_v4/version` (3) +* `/vulnerabilities[]/scores[]/cvss_v4/attackVector` (8) +* `/vulnerabilities[]/scores[]/cvss_v4/attackComplexity` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/attackRequirements` (7) +* `/vulnerabilities[]/scores[]/cvss_v4/privilegesRequired` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/userInteraction` (7) +* `/vulnerabilities[]/scores[]/cvss_v4/vulnConfidentialityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/vulnIntegrityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/vulnAvailabilityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/subConfidentialityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/subIntegrityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/subAvailabilityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/exploitMaturity` (16) +* `/vulnerabilities[]/scores[]/cvss_v4/confidentialityRequirement` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/integrityRequirement` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/availabilityRequirement` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedAttackVector` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedAttackComplexity` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedAttackRequirements` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedPrivilegesRequired` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedUserInteraction` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedVulnConfidentialityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedVulnIntegrityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedVulnAvailabilityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedSubConfidentialityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedSubIntegrityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedSubAvailabilityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/Safety` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/Automatable` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/Recovery` (13) +* `/vulnerabilities[]/scores[]/cvss_v4/valueDensity` (12) +* `/vulnerabilities[]/scores[]/cvss_v4/vulnerabilityResponseEffort` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/providerUrgency` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/baseSeverity` (8) +* `/vulnerabilities[]/scores[]/cvss_v4/threatSeverity` (8) +* `/vulnerabilities[]/scores[]/cvss_v4/environmentalSeverity` (8) * `/vulnerabilities[]/threats[]/category` (14) ## Date diff --git a/csaf_2.1/prose/edit/src/introduction-02-terminology-glossary.md b/csaf_2.1/prose/edit/src/introduction-02-terminology-glossary.md index 1e9a7e00..4c927419 100644 --- a/csaf_2.1/prose/edit/src/introduction-02-terminology-glossary.md +++ b/csaf_2.1/prose/edit/src/introduction-02-terminology-glossary.md @@ -20,6 +20,9 @@ _Examples_: A physical file in a file system such as a source file, an object fi a specific version of a file in a version control system; a database table accessed via an HTTP request; an arbitrary stream of bytes returned from an HTTP request, a product URL, a common product enumeration value. +CSAF 2.0 to CSAF 2.1 converter +: A CSAF producer which takes a CSAF 2.0 document as input and converts it into a valid CSAF 2.1 document. + CSAF asset matching system : program that connects to or is an asset database and is able to manage CSAF documents as required by CSAF management system diff --git a/csaf_2.1/prose/edit/src/introduction-04-informative-references.md b/csaf_2.1/prose/edit/src/introduction-04-informative-references.md index 5fb3bb5a..3a450f3b 100644 --- a/csaf_2.1/prose/edit/src/introduction-04-informative-references.md +++ b/csaf_2.1/prose/edit/src/introduction-04-informative-references.md @@ -36,6 +36,9 @@ CVSS30 CVSS31 : _Common Vulnerability Scoring System v3.1: Specification Document_, FIRST.Org, Inc., June 2019, https://www.first.org/cvss/v3-1/cvss-v31-specification_r1.pdf. +CVSS40 +: _Common Vulnerability Scoring System v4.0: Specification Document_, FIRST.Org, Inc., 09 November 2023, https://www.first.org/cvss/v4-0/cvss-v40-specification.pdf. + CWE : _Common Weakness Enumeration (CWE) – A Community-Developed List of Software Weakness Types_, MITRE, 2005, http://cwe.mitre.org/about/. @@ -88,6 +91,10 @@ RFC7464 : N. Williams., "JavaScript Object Notation (JSON) Text Sequences", RFC 7464, DOI 10.17487/RFC7464, February 2015, https://www.rfc-editor.org/info/rfc7464. +RFC8322 +: Field, J., Banghart, S., and D. Waltermire, "Resource-Oriented Lightweight Information Exchange (ROLIE)", RFC 8322, DOI 10.17487/RFC8322, February 2018, +https://www.rfc-editor.org/info/rfc8322. + RFC8615 : Nottingham, M., "Well-Known Uniform Resource Identifiers (URIs)", RFC 8615, DOI 10.17487/RFC8615, May 2019, https://www.rfc-editor.org/info/rfc8615. @@ -120,7 +127,7 @@ VEX VEX-Justification : _Vulnerability Exploitability eXchange (VEX) - Status Justifications_, VEX sub-group of the Framing Working Group in the CISA SBOM initiative, -XX May 2022, https://www.cisa.gov/sites/default/files/publications/VEX_Status_Justification_Jun22.pdf. +June 2022, https://www.cisa.gov/sites/default/files/publications/VEX_Status_Justification_Jun22.pdf. XML : _Extensible Markup Language (XML) 1.0 (Fifth Edition)_, T. Bray, J. Paoli, M. Sperberg-McQueen, E. Maler, F. Yergeau, Editors, diff --git a/csaf_2.1/prose/edit/src/revision-history.md b/csaf_2.1/prose/edit/src/revision-history.md index c692ae69..842479aa 100644 --- a/csaf_2.1/prose/edit/src/revision-history.md +++ b/csaf_2.1/prose/edit/src/revision-history.md @@ -11,5 +11,5 @@ toc: | Revision | Date | Editor | Changes Made | |:-------------------------|:-----------|:--------------------------------|:--------------------------------------------------------------------------------------| | csaf-v2.0-wd20240124-dev | 2024-01-24 | Stefan Hagen and Thomas Schmidt | Preparing initial Editor Revision | - +| csaf-v2.0-wd20240228-dev | 2024-02-28 | Stefan Hagen and Thomas Schmidt | Next Editor Revision | ------- diff --git a/csaf_2.1/prose/edit/src/safety-security-and-data-protection.md b/csaf_2.1/prose/edit/src/safety-security-and-data-protection.md index 31f1b15c..60d936d3 100644 --- a/csaf_2.1/prose/edit/src/safety-security-and-data-protection.md +++ b/csaf_2.1/prose/edit/src/safety-security-and-data-protection.md @@ -12,7 +12,7 @@ CSAF documents are based on JSON, thus the security considerations of [cite](#RF In addition, CSAF documents may be rendered by consumers in various human-readable formats like HTML or PDF. Thus, for security reasons, CSAF producers and consumers SHALL adhere to the following: -* CSAF producers SHOULD NOT emit messages that contain HTML, even though all variants of Markdown permit it. +* CSAF producers SHOULD NOT emit messages that contain HTML, even though GitHub-flavoured Markdown is permitted. To include HTML, source code, or any other content that may be interpreted or executed by a CSAF consumer, e.g. to provide a proof-of-concept, the issuing party SHALL use Markdown's fenced code blocks or inline code option. * Deeply nested markup can cause a stack overflow in the Markdown processor [cite](#GFMENG). diff --git a/csaf_2.1/prose/edit/src/schema-elements-01-defs-03-full-product-name.md b/csaf_2.1/prose/edit/src/schema-elements-01-defs-03-full-product-name.md index 3e105e97..59690c97 100644 --- a/csaf_2.1/prose/edit/src/schema-elements-01-defs-03-full-product-name.md +++ b/csaf_2.1/prose/edit/src/schema-elements-01-defs-03-full-product-name.md @@ -311,7 +311,7 @@ abbreviated (partial) stock keeping units. A list of stock keeping units SHOULD only be used if the list of relationships is used to decouple e.g. hardware from the software, or the stock keeping units change during update. -In the latter case the remediations SHALL include the new stock keeping units is or a description how it can be obtained. +In the latter case the remediations SHALL include the new stock keeping units or a description how it can be obtained. > The use of the list of relationships in the first case is important. > Otherwise, the end user is unable to identify which version (the affected or the not affected / fixed one) is used. @@ -385,7 +385,7 @@ The URI (`uri`) of value type `string` with format `uri` contains the identifier ``` "x_generic_uris": [ { - "namespace": "https://spdx.github.io/spdx-spec/document-creation-information/#65-spdx-document-namespace-field", + "namespace": "https://spdx.github.io/spdx-spec/latest/document-creation-information/#65-spdx-document-namespace-field", "uri": "https://swinslow.net/spdx-examples/example4/main-bin-v2#SPDXRef-libc" } ] diff --git a/csaf_2.1/prose/edit/src/schema-elements-02-props-01-document.md b/csaf_2.1/prose/edit/src/schema-elements-02-props-01-document.md index ba00e4b0..60905522 100644 --- a/csaf_2.1/prose/edit/src/schema-elements-02-props-01-document.md +++ b/csaf_2.1/prose/edit/src/schema-elements-02-props-01-document.md @@ -207,7 +207,7 @@ The default value is the URL to the definition by FIRST: ``` https://www.us-cert.gov/tlp - https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf + https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/TLP/merkblatt-tlp.pdf ``` #### Document Property - Language diff --git a/csaf_2.1/prose/edit/src/schema-elements-02-props-03-vulnerabilities.md b/csaf_2.1/prose/edit/src/schema-elements-02-props-03-vulnerabilities.md index ee0889a7..5cecf147 100644 --- a/csaf_2.1/prose/edit/src/schema-elements-02-props-03-vulnerabilities.md +++ b/csaf_2.1/prose/edit/src/schema-elements-02-props-03-vulnerabilities.md @@ -662,8 +662,8 @@ List of scores (`scores`) of value type `array` with 1 or more items of type sco }, ``` -Value type of every such Score item is `object` with the mandatory property `products` and the optional properties `cvss_v2` and -`cvss_v3` specifies information about (at least one) score of the vulnerability and for which products the given value applies. +Value type of every such Score item is `object` with the mandatory property `products` and the optional properties `cvss_v2`, +`cvss_v3` and `cvss_v4` specifies information about (at least one) score of the vulnerability and for which products the given value applies. Each Score item has at least 2 properties. ``` @@ -675,7 +675,10 @@ Each Score item has at least 2 properties. "oneOf": [ // ... ] - } + }, + "cvss_v4": { + // ... + }, "products": { // ... } @@ -689,6 +692,8 @@ The property CVSS v3 (`cvss_v3`) holding a CVSS v3.x value abiding by one of the [https://www.first.org/cvss/cvss-v3.0.json](https://www.first.org/cvss/cvss-v3.0.json) or [https://www.first.org/cvss/cvss-v3.1.json](https://www.first.org/cvss/cvss-v3.1.json). +The property CVSS v4 (`cvss_v4`) holding a CVSS v4.0 value abiding by the schema at [https://www.first.org/cvss/cvss-v4.0.json](https://www.first.org/cvss/cvss-v4.0.json). + Product IDs (`products`) of value type `products_t` with 1 or more items indicates for which products the given scores apply. A score object SHOULD reflect the associated product's status (for example, a fixed product no longer contains a vulnerability and should have a CVSS score of 0, or simply no score listed; diff --git a/csaf_2.1/prose/edit/src/tests-01-mndtr-08-invalid-cvss.md b/csaf_2.1/prose/edit/src/tests-01-mndtr-08-invalid-cvss.md index 9551190b..e5751ec7 100644 --- a/csaf_2.1/prose/edit/src/tests-01-mndtr-08-invalid-cvss.md +++ b/csaf_2.1/prose/edit/src/tests-01-mndtr-08-invalid-cvss.md @@ -7,6 +7,7 @@ The relevant paths for this test are: ``` /vulnerabilities[]/scores[]/cvss_v2 /vulnerabilities[]/scores[]/cvss_v3 + /vulnerabilities[]/scores[]/cvss_v4 ``` *Example 1 (which fails the test):* diff --git a/csaf_2.1/prose/edit/src/tests-01-mndtr-09-invalid-cvss-computation.md b/csaf_2.1/prose/edit/src/tests-01-mndtr-09-invalid-cvss-computation.md index 3b4a5d05..4b2b7254 100644 --- a/csaf_2.1/prose/edit/src/tests-01-mndtr-09-invalid-cvss-computation.md +++ b/csaf_2.1/prose/edit/src/tests-01-mndtr-09-invalid-cvss-computation.md @@ -16,6 +16,12 @@ The relevant paths for this test are: /vulnerabilities[]/scores[]/cvss_v3/temporalSeverity /vulnerabilities[]/scores[]/cvss_v3/environmentalScore /vulnerabilities[]/scores[]/cvss_v3/environmentalSeverity + /vulnerabilities[]/scores[]/cvss_v4/baseScore + /vulnerabilities[]/scores[]/cvss_v4/baseSeverity + /vulnerabilities[]/scores[]/cvss_v4/threatScore + /vulnerabilities[]/scores[]/cvss_v4/threatSeverity + /vulnerabilities[]/scores[]/cvss_v4/environmentalScore + /vulnerabilities[]/scores[]/cvss_v4/environmentalSeverity ``` *Example 1 (which fails the test):* diff --git a/csaf_2.1/prose/edit/src/tests-01-mndtr-10-inconsistent-cvss.md b/csaf_2.1/prose/edit/src/tests-01-mndtr-10-inconsistent-cvss.md index cb9b16d6..c3882610 100644 --- a/csaf_2.1/prose/edit/src/tests-01-mndtr-10-inconsistent-cvss.md +++ b/csaf_2.1/prose/edit/src/tests-01-mndtr-10-inconsistent-cvss.md @@ -7,6 +7,7 @@ The relevant paths for this test are: ``` /vulnerabilities[]/scores[]/cvss_v2 /vulnerabilities[]/scores[]/cvss_v3 + /vulnerabilities[]/scores[]/cvss_v4 ``` *Example 1 (which fails the test):* diff --git a/csaf_2.1/prose/edit/src/tests-02-optional.md b/csaf_2.1/prose/edit/src/tests-02-optional.md index 24d9ac66..90ae847e 100644 --- a/csaf_2.1/prose/edit/src/tests-02-optional.md +++ b/csaf_2.1/prose/edit/src/tests-02-optional.md @@ -610,8 +610,8 @@ The relevant path for this test is: > Neither the `environmentalScore` nor the properties `modifiedIntegrityImpact`, `modifiedAvailabilityImpact`, `modifiedConfidentialityImpact` nor > the corresponding attributes in the `vectorString` have been set. -> A tool MAY set the properties `modifiedIntegrityImpact`, `modifiedAvailabilityImpact`, `modifiedConfidentialityImpact` accordingly and -> compute the `environmentalScore` as quick fix. +> A tool MAY set the properties `modifiedIntegrityImpact`, `modifiedAvailabilityImpact`, `modifiedConfidentialityImpact` (respectively their +> equivalents according to the CVSS version used) accordingly and compute the `environmentalScore` as quick fix. ### Additional Properties diff --git a/csaf_2.1/prose/edit/src/tests-03-informative.md b/csaf_2.1/prose/edit/src/tests-03-informative.md index d5f9c1a5..a9c49572 100644 --- a/csaf_2.1/prose/edit/src/tests-03-informative.md +++ b/csaf_2.1/prose/edit/src/tests-03-informative.md @@ -50,7 +50,7 @@ The relevant path for this test is: Recommendation: -It is recommended to (also) use the CVSS v3.1. +It is recommended to (also) use the CVSS v4.0. ### Use of CVSS v3.0 @@ -413,3 +413,45 @@ The relevant paths for this test are: > The product version starts with a `v`. ------- + +### Missing CVSS v4.0 + +For each item in the list of scores it MUST be tested that a `cvss_v4` object is present. + +The relevant path for this test is: + +``` + /vulnerabilities[]/scores +``` + +*Example 1 (which fails the test):* + +``` + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +``` + +> There is no CVSS v4.0 score given for `CSAFPID-9080700`. diff --git a/csaf_2.1/prose/share/csaf-v2.1-draft.html b/csaf_2.1/prose/share/csaf-v2.1-draft.html index 8c441bfa..8baf0dec 100644 --- a/csaf_2.1/prose/share/csaf-v2.1-draft.html +++ b/csaf_2.1/prose/share/csaf-v2.1-draft.html @@ -1,7 +1,7 @@ - + @@ -326,8 +326,8 @@

Committee Specification Draft 01

-

- ?? Month 2024 +

+ 28 February 2024

This stage: @@ -403,14 +403,11 @@

Declared JSON namespaces:

@@ -448,7 +445,7 @@

[csaf-v2.1]

- Common Security Advisory Framework Version 2.1. Edited by Stefan Hagen, and Thomas Schmidt. ?? Month 2024. OASIS Standard. https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.html. Latest stage: Common Security Advisory Framework Version 2.1. Edited by Stefan Hagen, and Thomas Schmidt. 28 February 2024. OASIS Committee Specification Draft 01. https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.html. Latest stage: https://docs.oasis-open.org/csaf/csaf/v2.1/csaf-v2.1.html.


@@ -620,7 +617,8 @@

Additional Conventions
5.1 Filename
5.2 Separation in Data Stream
- 5.3 Sorting + 5.3 Sorting
+ 5.4 Usage of Markdown
  • Tests
    @@ -701,7 +699,8 @@

    6.3.8 Spell check
    6.3.9 Branch Categories
    6.3.10 Usage of Product Version Range
    - 6.3.11 Usage of V as Version Indicator + 6.3.11 Usage of V as Version Indicator
    + 6.3.12 Missing CVSS v4.0

  • Distributing CSAF documents
    @@ -761,7 +760,8 @@

    9.1.14 Conformance Clause 14: CSAF basic validator
    9.1.15 Conformance Clause 15: CSAF extended validator
    9.1.16 Conformance Clause 16: CSAF full validator
    - 9.1.17 Conformance Clause 17: CSAF SBOM matching system + 9.1.17 Conformance Clause 17: CSAF SBOM matching system
    + 9.1.18 Conformance Clause 18: CSAF 2.0 to CSAF 2.1 converter

  • @@ -783,7 +783,8 @@

    This specification is provided under the Non-Assertion Mode of the OASIS IPR Policy, the mode chosen when the Technical Committee was established. For information on whether any patents - have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-open.org/committees/csaf/ipr.php). + have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page ([https://www.oasis-open.org/committees/csaf/ipr.php](https://www.oasis-open.org/committees/csaf/ipr.php)).

    1.2 Terminology @@ -828,6 +829,12 @@

    sequence of bytes addressable via a URI. Examples: A physical file in a file system such as a source file, an object file, a configuration file or a data file; a specific version of a file in a version control system; a database table accessed via an HTTP request; an arbitrary stream of bytes returned from an HTTP request, a product URL, a common product enumeration value. +
    + CSAF 2.0 to CSAF 2.1 converter +
    +
    + A CSAF producer which takes a CSAF 2.0 document as input and converts it into a valid CSAF 2.1 document. +
    CSAF asset matching system
    @@ -1312,6 +1319,9 @@

    [CVSS31] Common Vulnerability Scoring System v3.1: Specification Document, FIRST.Org, Inc., June 2019, https://www.first.org/cvss/v3-1/cvss-v31-specification_r1.pdf.

    +

    + [CVSS40] Common Vulnerability Scoring System v4.0: Specification Document, FIRST.Org, Inc., 09 November 2023, https://www.first.org/cvss/v4-0/cvss-v40-specification.pdf. +

    [CWE] Common Weakness Enumeration (CWE) – A Community-Developed List of Software Weakness Types, MITRE, 2005, http://cwe.mitre.org/about/.

    @@ -1360,6 +1370,9 @@

    [https://www.rfc-editor.org/info/rfc7464.]

    +

    + [https://www.rfc-editor.org/info/rfc8322.] +

    [https://www.rfc-editor.org/info/rfc8615.]

    @@ -1387,7 +1400,7 @@

    [27 September 2021, https://ntia.gov/files/ntia/publications/vex_one-page_summary.pdf.]

    - [XX May 2022, [June 2022, https://www.cisa.gov/sites/default/files/publications/VEX_Status_Justification_Jun22.pdf.]

    @@ -1496,6 +1509,12 @@

  • Vulnerability Scoring:

    - Example 3: + Example 3:

      {
         "categories": {
    @@ -7823,18 +7925,18 @@ 

    MD5 and SHA1 SHOULD NOT be used.

    - Example 1: + Example 1:

    -
    File name of CSAF document: example_company_-_2019-yh3234.json
    -File name of SHA-256 hash file: example_company_-_2019-yh3234.json.sha256
    -File name of SHA-512 hash file: example_company_-_2019-yh3234.json.sha512
    +
    File name of CSAF document: esa-2022-02723.json
    +File name of SHA-256 hash file: esa-2022-02723.json.sha256
    +File name of SHA-512 hash file: esa-2022-02723.json.sha512

    The file content SHALL start with the first byte of the hexadecimal hash value. Any subsequent data (like a filename) which is optional SHALL be separated by at least one space.

    - Example 2: + Example 2:

    -
    ea6a209dba30a958a78d82309d6cdcc6929fcb81673b3dc4d6b16fac18b6ff38  example_company_-_2019-yh3234.json
    +
    ea6a209dba30a958a78d82309d6cdcc6929fcb81673b3dc4d6b16fac18b6ff38  esa-2022-02723.json

    If a ROLIE feed exists, each hash file MUST be listed in it as described in requirement 15.

    @@ -7845,10 +7947,10 @@

    All CSAF documents SHALL have at least one OpenPGP signature file which is provided under the same filename which is extended by the appropriate extension. See [RFC4880] for more details.

    - Example 1: + Example 1:

    -
    File name of CSAF document: example_company_-_2019-yh3234.json
    -File name of signature file: example_company_-_2019-yh3234.json.asc
    +
    File name of CSAF document: esa-2022-02723.json
    +File name of signature file: esa-2022-02723.json.asc

    If a ROLIE feed exists, each signature file MUST be listed in it as described in requirement 15.

    @@ -7900,7 +8002,7 @@

    The file aggregator.json SHOULD only list the latest version of the metadata of a CSAF provider.

    - Example 1: + Example 1:

      {
         "aggregator": {
    @@ -7957,7 +8059,7 @@ 

  • - Example 1: + Example 1:

      {
         "aggregator": {
    @@ -8205,7 +8307,7 @@ 

    In addition, CSAF documents may be rendered by consumers in various human-readable formats like HTML or PDF. Thus, for security reasons, CSAF producers and consumers SHALL adhere to the following:

      -
    • CSAF producers SHOULD NOT emit messages that contain HTML, even though all variants of Markdown permit it. To include HTML, source code, or any other content that may be interpreted or executed by a CSAF consumer, e.g. to provide a proof-of-concept, the issuing party SHALL use Markdown's fenced code blocks or inline code option. +
    • CSAF producers SHOULD NOT emit messages that contain HTML, even though GitHub-flavoured Markdown is permitted. To include HTML, source code, or any other content that may be interpreted or executed by a CSAF consumer, e.g. to provide a proof-of-concept, the issuing party SHALL use Markdown's fenced code blocks or inline code option.
    • Deeply nested markup can cause a stack overflow in the Markdown processor [GFMENG]. To reduce this risk, CSAF consumers SHALL use a Markdown processor that is hardened against such attacks. Note: One example is the GitHub fork of the cmark Markdown processor [GFMCMARK]. @@ -8309,6 +8411,9 @@

    • CSAF SBOM matching system: A program that connects to or is an SBOM database and is able to manage CSAF documents as required by CSAF management system as well as matching them to SBOM components of the SBOM database.
    • +
    • + CSAF 2.0 to CSAF 2.1 converter: A CSAF producer which takes a CSAF 2.0 document as input and converts it into a valid CSAF 2.1 document. +

    9.1.1 Conformance Clause 1: CSAF document @@ -8422,6 +8527,8 @@

  • /vulnerabilities[]/scores[]:
      +
    • For any CVSS v4 element, the CVRF CSAF converter MUST compute the baseSeverity from the baseScore according to the rules of the applicable CVSS standard. (CSAF CVRF v1.2 predates CVSS v4.0.) +
    • For any CVSS v3 element, the CVRF CSAF converter MUST compute the baseSeverity from the baseScore according to the rules of the applicable CVSS standard.
    • If no product_id is given, the CVRF CSAF converter appends all Product IDs which are listed under ../product_status in the arrays known_affected, first_affected and last_affected. If none of these arrays exist, the CVRF CSAF converter outputs an error that no @@ -8431,14 +8538,14 @@

    • If there are CVSS v3.0 and CVSS v3.1 Vectors available for the same product, the CVRF CSAF converter discards the CVSS v3.0 information and provide in CSAF only the CVSS v3.1 information.
    • -
    • To determine, which minor version of CVSS v3 is used, the CVRF CSAF converter uses the following steps: +
    • To determine, which minor version of CVSS v3 is used and to evaluate a CVSS v4 that was wrongly inserted in a CVSS v3 element, the CVRF CSAF converter uses the following steps:
      1. Retrieve the CVSS version from the CVSS vector, if present.

        - Example 1: + Example 1:

          CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H => 3.1
      2. @@ -8447,7 +8554,7 @@

        Retrieve the CVSS version from the CVSS element's namespace, if present. The CVRF CSAF converter outputs a warning that this value was guessed from the element's namespace.

        - Example 2: + Example 2:

          xmlns:cvssv31="https://www.first.org/cvss/cvss-v3.1.xsd"
           <!-- -->
        @@ -8456,7 +8563,7 @@ 

        is handled the same as

        - Example 3: + Example 3:

          <ScoreSetV3 xmlns="https://www.first.org/cvss/cvss-v3.1.xsd">
        @@ -8466,7 +8573,7 @@

        decision.

        - Example 4: + Example 4:

          xmlns:cvssv3="https://www.first.org/cvss/cvss-v3.0.xsd" => 3.0
        @@ -9151,6 +9258,31 @@

  • +

    + 9.1.18 Conformance Clause 18: CSAF 2.0 to CSAF 2.1 converter +

    +

    + A program satisfies the "CSAF 2.0 to CSAF 2.1 converter" conformance profile if the program fulfills the following two groups of requirements: +

    +

    + Firstly, the program: +

    +
      +
    • satisfies the "CSAF producer" conformance profile. +
    • +
    • takes only CSAF 2.0 documents as input. +
    • +
    • additionally satisfies the normative requirements given below. +
    • +
    +

    + Secondly, the program fulfills the following for all items of: +

    +
    +

    + A tool MAY implement options to convert other Markdown formats to GitHub-flavoured Markdown. +

    +

    Appendix A. Acknowledgments @@ -10425,6 +10557,20 @@

    Preparing initial Editor Revision + + + csaf-v2.0-wd20240228-dev + + + 2024-02-28 + + + Stefan Hagen and Thomas Schmidt + + + Next Editor Revision + +
    @@ -10450,12 +10596,12 @@

    C.1 File size

    - A CSAF document in the specified JSON format encoded in UTF-8 SHOULD conform to known size limits of current technologies parsing JSON content, e.g.: 15 MB. + A CSAF document in the specified JSON format encoded in UTF-8 SHOULD conform to known size limits of current technologies parsing JSON content, e.g.: 50 MiB.

    - At least one database technology in wide use for storing CSAF documents rejects insert attempts when the transformed BSON size exceeds 16 megabytes. The BSON format optimizes for accessibility and not size. So, small integers and small strings may incur more overhead in the BSON format than in JSON. In addition, the BSON format adds - length information for the entries inside the document, which adds to the size when storing CSAF document content in a BSON format. + The CSAF documents observed in the wild expose strongly varying sizes as per the use cases they serve. At least one database technology in wide use for storing CSAF documents rejects insert attempts when the transformed BSON size exceeds 16 megabytes. The BSON format optimizes for accessibility and not size. So, small integers and + small strings may incur more overhead in the BSON format than in JSON. In addition, the BSON format adds length information for the entries inside the document, which adds to the size when storing CSAF document content in a BSON format.

    @@ -10954,6 +11100,9 @@

  • /vulnerabilities[]/scores[]/cvss_v3/vectorString
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/vectorString +
  • /vulnerabilities[]/scores[]/products[]
  • @@ -11274,4 +11423,159 @@

  • /vulnerabilities[]/scores[]/cvss_v3/remediationLevel (13)
  • - \ No newline at end of file +
  • + /vulnerabilities[]/scores[]/cvss_v3/reportConfidence (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/temporalSeverity (8) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/confidentialityRequirement (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/integrityRequirement (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/availabilityRequirement (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/modifiedAttackVector (16) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/modifiedAttackComplexity (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/modifiedPrivilegesRequired (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/modifiedUserInteraction (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/modifiedScope (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/modifiedConfidentialityImpact (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/modifiedIntegrityImpact (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/modifiedAvailabilityImpact (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v3/environmentalSeverity (8) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/version (3) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/attackVector (8) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/attackComplexity (4) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/attackRequirements (7) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/privilegesRequired (4) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/userInteraction (7) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/vulnConfidentialityImpact (4) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/vulnIntegrityImpact (4) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/vulnAvailabilityImpact (4) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/subConfidentialityImpact (4) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/subIntegrityImpact (4) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/subAvailabilityImpact (4) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/exploitMaturity (16) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/confidentialityRequirement (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/integrityRequirement (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/availabilityRequirement (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedAttackVector (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedAttackComplexity (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedAttackRequirements (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedPrivilegesRequired (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedUserInteraction (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedVulnConfidentialityImpact (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedVulnIntegrityImpact (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedVulnAvailabilityImpact (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedSubConfidentialityImpact (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedSubIntegrityImpact (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/modifiedSubAvailabilityImpact (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/Safety (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/Automatable (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/Recovery (13) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/valueDensity (12) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/vulnerabilityResponseEffort (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/providerUrgency (11) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/baseSeverity (8) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/threatSeverity (8) +
  • +
  • + /vulnerabilities[]/scores[]/cvss_v4/environmentalSeverity (8) +
  • +
  • + /vulnerabilities[]/threats[]/category (14) +
  • + +

    + C.6 Date \ No newline at end of file diff --git a/csaf_2.1/prose/share/csaf-v2.1-draft.md b/csaf_2.1/prose/share/csaf-v2.1-draft.md index 6ba8ae7c..9945448c 100644 --- a/csaf_2.1/prose/share/csaf-v2.1-draft.md +++ b/csaf_2.1/prose/share/csaf-v2.1-draft.md @@ -7,7 +7,7 @@ ## Committee Specification Draft 01 -## ?? Month 2024 +## 28 February 2024 #### This stage: https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.md (Authoritative) \ @@ -71,7 +71,7 @@ When referencing this specification the following citation format should be used **[csaf-v2.1]** -_Common Security Advisory Framework Version 2.1_. Edited by Stefan Hagen, and Thomas Schmidt. ?? Month 2024. OASIS Standard. https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.html. Latest stage: https://docs.oasis-open.org/csaf/csaf/v2.1/csaf-v2.1.html. +_Common Security Advisory Framework Version 2.1_. Edited by Stefan Hagen, and Thomas Schmidt. 28 February 2024. OASIS Committee Specification Draft 01. https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.html. Latest stage: https://docs.oasis-open.org/csaf/csaf/v2.1/csaf-v2.1.html. ------- @@ -215,6 +215,7 @@ The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), the own 5.1 [Filename](#filename) 5.2 [Separation in Data Stream](#separation-in-data-stream) 5.3 [Sorting](#additional-conventions--sorting) + 5.4 [Usage of Markdown](#usage-of-markdown) 6. [Tests](#tests) 6.1 [Mandatory Tests](#mandatory-tests) 6.1.1 [Missing Definition of Product ID](#missing-definition-of-product-id) @@ -294,6 +295,7 @@ The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), the own 6.3.9 [Branch Categories](#branch-categories) 6.3.10 [Usage of Product Version Range](#usage-of-product-version-range) 6.3.11 [Usage of V as Version Indicator](#usage-of-v-as-version-indicator) + 6.3.12 [Missing CVSS v4.0](#missing-cvss-v4-0) 7. [Distributing CSAF documents](#distributing-csaf-documents) 7.1 [Requirements](#requirements) 7.1.1 [Requirement 1: Valid CSAF document](#requirement-1-valid-csaf-document) @@ -348,6 +350,7 @@ The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), the own 9.1.15 [Conformance Clause 15: CSAF extended validator](#conformance-clause-15-csaf-extended-validator) 9.1.16 [Conformance Clause 16: CSAF full validator](#conformance-clause-16-csaf-full-validator) 9.1.17 [Conformance Clause 17: CSAF SBOM matching system](#conformance-clause-17-csaf-sbom-matching-system) + 9.1.18 [Conformance Clause 18: CSAF 2.0 to CSAF 2.1 converter](#conformance-clause-18-csaf-2-0-to-csaf-2-1-converter) Appendix A. [Acknowledgments](#acknowledgments) Appendix B. [Revision History](#revision-history) @@ -396,6 +399,8 @@ For purposes of this document, the following terms and definitions apply: Examples: A physical file in a file system such as a source file, an object file, a configuration file or a data file; a specific version of a file in a version control system; a database table accessed via an HTTP request; an arbitrary stream of bytes returned from an HTTP request, a product URL, a common product enumeration value. +
    CSAF 2.0 to CSAF 2.1 converter
    +
    A CSAF producer which takes a CSAF 2.0 document as input and converts it into a valid CSAF 2.1 document.
    CSAF asset matching system
    program that connects to or is an asset database and is able to manage CSAF documents as required by CSAF management system @@ -605,6 +610,8 @@ For purposes of this document, the following terms and definitions apply: **\[****CVSS31\]** _Common Vulnerability Scoring System v3.1: Specification Document_, FIRST.Org, Inc., June 2019, https://www.first.org/cvss/v3-1/cvss-v31-specification_r1.pdf. +**\[****CVSS40\]** _Common Vulnerability Scoring System v4.0: Specification Document_, FIRST.Org, Inc., 09 November 2023, https://www.first.org/cvss/v4-0/cvss-v40-specification.pdf. + **\[****CWE\]** _Common Weakness Enumeration (CWE) – A Community-Developed List of Software Weakness Types_, MITRE, 2005, http://cwe.mitre.org/about/. **\[****CYCLONEDX13\]** _CycloneDX Software Bill-of-Material Specification JSON schema version 1.3_, cyclonedx.org, May 2021, https://github.com/CycloneDX/specification/blob/1.3/schema/bom-1.3.schema.json. @@ -635,6 +642,8 @@ For purposes of this document, the following terms and definitions apply: **\[****https://www.rfc-editor.org/info/rfc7464.\]** +**\[****https://www.rfc-editor.org/info/rfc8322.\]** + **\[****https://www.rfc-editor.org/info/rfc8615.\]** **\[****https://www.rfc-editor.org/info/rfc9116.\]** @@ -651,7 +660,7 @@ For purposes of this document, the following terms and definitions apply: **\[****27 September 2021, .\]** -**\[****XX May 2022, https://www.cisa.gov/sites/default/files/publications/VEX_Status_Justification_Jun22.pdf.\]** +**\[****June 2022, https://www.cisa.gov/sites/default/files/publications/VEX_Status_Justification_Jun22.pdf.\]** **\[****W3C Recommendation, November 26, 2008, https://www.w3.org/TR/2008/REC-xml-20081126/. Latest version available at .\]** @@ -749,6 +758,8 @@ Delegation to industry best practices technologies is used in referencing schema * Platform Data: * Common Platform Enumeration (CPE) Version 2.3 \[[CPE23-N](#CPE23-N)\] * Vulnerability Scoring: + * Common Vulnerability Scoring System (CVSS) Version 4.0 \[[CVSS40](#CVSS40)\] + * JSON Schema Reference https://www.first.org/cvss/cvss-v4.0.json * Common Vulnerability Scoring System (CVSS) Version 3.1 \[[CVSS31](#CVSS31)\] * JSON Schema Reference https://www.first.org/cvss/cvss-v3.1.json * Common Vulnerability Scoring System (CVSS) Version 3.0 \[[CVSS30](#CVSS30)\] @@ -1472,7 +1483,7 @@ abbreviated (partial) stock keeping units. A list of stock keeping units SHOULD only be used if the list of relationships is used to decouple e.g. hardware from the software, or the stock keeping units change during update. -In the latter case the remediations SHALL include the new stock keeping units is or a description how it can be obtained. +In the latter case the remediations SHALL include the new stock keeping units or a description how it can be obtained. > The use of the list of relationships in the first case is important. > Otherwise, the end user is unable to identify which version (the affected or the not affected / fixed one) is used. @@ -1546,7 +1557,7 @@ The URI (`uri`) of value type `string` with format `uri` contains the identifier ``` "x_generic_uris": [ { - "namespace": "https://spdx.github.io/spdx-spec/document-creation-information/#65-spdx-document-namespace-field", + "namespace": "https://spdx.github.io/spdx-spec/latest/document-creation-information/#65-spdx-document-namespace-field", "uri": "https://swinslow.net/spdx-examples/example4/main-bin-v2#SPDXRef-libc" } ] @@ -2177,7 +2188,7 @@ The default value is the URL to the definition by FIRST: ``` https://www.us-cert.gov/tlp - https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf + https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/TLP/merkblatt-tlp.pdf ``` #### 3.2.1.6 Document Property - Language @@ -3448,8 +3459,8 @@ List of scores (`scores`) of value type `array` with 1 or more items of type sco }, ``` -Value type of every such Score item is `object` with the mandatory property `products` and the optional properties `cvss_v2` and -`cvss_v3` specifies information about (at least one) score of the vulnerability and for which products the given value applies. +Value type of every such Score item is `object` with the mandatory property `products` and the optional properties `cvss_v2`, +`cvss_v3` and `cvss_v4` specifies information about (at least one) score of the vulnerability and for which products the given value applies. Each Score item has at least 2 properties. ``` @@ -3461,7 +3472,10 @@ Each Score item has at least 2 properties. "oneOf": [ // ... ] - } + }, + "cvss_v4": { + // ... + }, "products": { // ... } @@ -3475,6 +3489,8 @@ The property CVSS v3 (`cvss_v3`) holding a CVSS v3.x value abiding by one of the [https://www.first.org/cvss/cvss-v3.0.json](https://www.first.org/cvss/cvss-v3.0.json) or [https://www.first.org/cvss/cvss-v3.1.json](https://www.first.org/cvss/cvss-v3.1.json). +The property CVSS v4 (`cvss_v4`) holding a CVSS v4.0 value abiding by the schema at [https://www.first.org/cvss/cvss-v4.0.json](https://www.first.org/cvss/cvss-v4.0.json). + Product IDs (`products`) of value type `products_t` with 1 or more items indicates for which products the given scores apply. A score object SHOULD reflect the associated product's status (for example, a fixed product no longer contains a vulnerability and should have a CVSS score of 0, or simply no score listed; @@ -3763,6 +3779,30 @@ they MUST be separated by the Record Separator in accordance with \[[RFC7464](#R The keys within a CSAF document SHOULD be sorted alphabetically. +## 5.4 Usage of Markdown + +The use of GitHub-flavoured Markdown is permitted in the following fields: + +``` + /document/acknowledgments[]/summary + /document/distribution/text + /document/notes[]/text + /document/publisher/issuing_authority + /document/references[]/summary + /document/tracking/revision_history[]/summary + /product_tree/product_groups[]/summary + /vulnerabilities[]/acknowledgments[]/summary + /vulnerabilities[]/involvements[]/summary + /vulnerabilities[]/notes[]/text + /vulnerabilities[]/references[]/summary + /vulnerabilities[]/remediations[]/details + /vulnerabilities[]/remediations[]/entitlements[] + /vulnerabilities[]/remediations[]/restart_required/details + /vulnerabilities[]/threats[]/details +``` + +Other fields MUST NOT contain Markdown. + ------- # 6. Tests @@ -4107,6 +4147,7 @@ The relevant paths for this test are: ``` /vulnerabilities[]/scores[]/cvss_v2 /vulnerabilities[]/scores[]/cvss_v3 + /vulnerabilities[]/scores[]/cvss_v4 ``` *Example 1 (which fails the test):* @@ -4142,6 +4183,12 @@ The relevant paths for this test are: /vulnerabilities[]/scores[]/cvss_v3/temporalSeverity /vulnerabilities[]/scores[]/cvss_v3/environmentalScore /vulnerabilities[]/scores[]/cvss_v3/environmentalSeverity + /vulnerabilities[]/scores[]/cvss_v4/baseScore + /vulnerabilities[]/scores[]/cvss_v4/baseSeverity + /vulnerabilities[]/scores[]/cvss_v4/threatScore + /vulnerabilities[]/scores[]/cvss_v4/threatSeverity + /vulnerabilities[]/scores[]/cvss_v4/environmentalScore + /vulnerabilities[]/scores[]/cvss_v4/environmentalSeverity ``` *Example 1 (which fails the test):* @@ -4168,6 +4215,7 @@ The relevant paths for this test are: ``` /vulnerabilities[]/scores[]/cvss_v2 /vulnerabilities[]/scores[]/cvss_v3 + /vulnerabilities[]/scores[]/cvss_v4 ``` *Example 1 (which fails the test):* @@ -5946,8 +5994,8 @@ The relevant path for this test is: > Neither the `environmentalScore` nor the properties `modifiedIntegrityImpact`, `modifiedAvailabilityImpact`, `modifiedConfidentialityImpact` nor > the corresponding attributes in the `vectorString` have been set. -> A tool MAY set the properties `modifiedIntegrityImpact`, `modifiedAvailabilityImpact`, `modifiedConfidentialityImpact` accordingly and -> compute the `environmentalScore` as quick fix. +> A tool MAY set the properties `modifiedIntegrityImpact`, `modifiedAvailabilityImpact`, `modifiedConfidentialityImpact` (respectively their +> equivalents according to the CVSS version used) accordingly and compute the `environmentalScore` as quick fix. ### 6.2.20 Additional Properties @@ -6029,7 +6077,7 @@ The relevant path for this test is: Recommendation: -It is recommended to (also) use the CVSS v3.1. +It is recommended to (also) use the CVSS v4.0. ### 6.3.2 Use of CVSS v3.0 @@ -6393,6 +6441,48 @@ The relevant paths for this test are: ------- +### 6.3.12 Missing CVSS v4.0 + +For each item in the list of scores it MUST be tested that a `cvss_v4` object is present. + +The relevant path for this test is: + +``` + /vulnerabilities[]/scores +``` + +*Example 1 (which fails the test):* + +``` + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +``` + +> There is no CVSS v4.0 score given for `CSAFPID-9080700`. + # 7. Distributing CSAF documents This section lists requirements and roles defined for distributing CSAF documents. @@ -6465,7 +6555,7 @@ CSAF aggregator SHOULD display over any individual `publisher` values in the CSA > * https://psirt.domain.tld/advisories/csaf/provider-metadata.json > * https://domain.tld/security/csaf/provider-metadata.json -*Example 1 (minimal with ROLIE document):* +*Example 1 (minimal with ROLIE document):* ``` { @@ -6526,7 +6616,7 @@ See \[[SECURITY-TXT](#SECURITY-TXT)\] for more details. > The security.txt was published as \[[RFC9116](#RFC9116)\] in April 2022. At the time of this writing, > the `CSAF` field is in the process of being officially added. -*Examples 1:* +*Examples 1:* ``` CSAF: https://domain.tld/security/data/csaf/provider-metadata.json @@ -6546,7 +6636,7 @@ The URL path `/.well-known/csaf/provider-metadata.json` under the main domain of the `provider-metadata.json` according to requirement 7. The use of the scheme "HTTPS" is required. See \[[RFC8615](#RFC8615)\] for more details. -*Example 1:* +*Example 1:* ``` https://www.example.com/.well-known/csaf/provider-metadata.json @@ -6563,23 +6653,24 @@ The use of the scheme "HTTPS" is required. The CSAF documents MUST be located within folders named `` where `` is the year given in the value of `/document/tracking/initial_release_date`. -*Examples 1:* +*Examples 1:* ``` -2021 -2020 +2024 +2023 ``` ### 7.1.12 Requirement 12: index.txt The index.txt file within MUST provide a list of all filenames of CSAF documents which are located in the sub-directories with their filenames. -*Example 1:* +*Example 1:* ``` -2020/example_company_-_2020-yh4711.json -2019/example_company_-_2019-yh3234.json -2018/example_company_-_2018-yh2312.json +2023/esa-2023-09953.json +2022/esa-2022-02723.json +2021/esa-2021-31916.json +2021/esa-2021-03676.json ``` > This can be used to download all CSAF documents. @@ -6589,13 +6680,13 @@ The index.txt file within MUST provide a list of all filenames of CSAF documents The file changes.csv MUST contain the filename as well as the value of `/document/tracking/current_release_date` for each CSAF document in the sub-directories without a heading; lines MUST be sorted by the `current_release_date` timestamp with the latest one first. -*Example 1:* +*Example 1:* ``` -"2020/example_company_-_2020-yh4711.json","2020-07-01T10:09:07Z" -"2018/example_company_-_2018-yh2312.json","2020-07-01T10:09:01Z" -"2019/example_company_-_2019-yh3234.json","2019-04-17T15:08:41Z" -"2018/example_company_-_2018-yh2312.json","2019-03-01T06:01:00Z" +"2023/esa-2023-09953.json","2023-07-01T10:09:07Z" +"2021/esa-2021-03676.json","2023-07-01T10:09:01Z" +"2022/esa-2022-02723.json","2022-04-17T15:08:41Z" +"2021/esa-2021-31916.json","2022-03-01T06:01:00Z" ``` ### 7.1.14 Requirement 14: Directory listings @@ -6616,7 +6707,7 @@ At least one of the feeds MUST exist. Each ROLIE feed document MUST be a JSON file that conforms with \[[RFC8322](#RFC8322)\]. -*Example 1:* +*Example 1:* ``` { @@ -6683,7 +6774,7 @@ having the `rel` value of `signature`. The use and therefore the existence of ROLIE service document is optional. If it is used, each ROLIE service document MUST be a JSON file that conforms with \[[RFC8322](#RFC8322)\] and lists the ROLIE feed documents. -*Example 1:* +*Example 1:* ``` { @@ -6726,7 +6817,7 @@ ROLIE categories SHOULD be used for to further dissect CSAF documents by one or * `product_version` * type of product - *Examples 1:* + *Examples 1:* ``` CPU @@ -6741,7 +6832,7 @@ ROLIE categories SHOULD be used for to further dissect CSAF documents by one or * areas or sectors, the products are used in - *Examples 2:* + *Examples 2:* ``` Chemical @@ -6756,7 +6847,7 @@ ROLIE categories SHOULD be used for to further dissect CSAF documents by one or * any other categorization useful to the consumers -*Example 3:* +*Example 3:* ``` { @@ -6780,21 +6871,21 @@ to ensure their integrity. The filename is constructed by appending the file ext MD5 and SHA1 SHOULD NOT be used. -*Example 1:* +*Example 1:* ``` -File name of CSAF document: example_company_-_2019-yh3234.json -File name of SHA-256 hash file: example_company_-_2019-yh3234.json.sha256 -File name of SHA-512 hash file: example_company_-_2019-yh3234.json.sha512 +File name of CSAF document: esa-2022-02723.json +File name of SHA-256 hash file: esa-2022-02723.json.sha256 +File name of SHA-512 hash file: esa-2022-02723.json.sha512 ``` The file content SHALL start with the first byte of the hexadecimal hash value. Any subsequent data (like a filename) which is optional SHALL be separated by at least one space. -*Example 2:* +*Example 2:* ``` -ea6a209dba30a958a78d82309d6cdcc6929fcb81673b3dc4d6b16fac18b6ff38 example_company_-_2019-yh3234.json +ea6a209dba30a958a78d82309d6cdcc6929fcb81673b3dc4d6b16fac18b6ff38 esa-2022-02723.json ``` If a ROLIE feed exists, each hash file MUST be listed in it as described in requirement 15. @@ -6804,11 +6895,11 @@ If a ROLIE feed exists, each hash file MUST be listed in it as described in requ All CSAF documents SHALL have at least one OpenPGP signature file which is provided under the same filename which is extended by the appropriate extension. See \[[RFC4880](#RFC4880)\] for more details. -*Example 1:* +*Example 1:* ``` -File name of CSAF document: example_company_-_2019-yh3234.json -File name of signature file: example_company_-_2019-yh3234.json.asc +File name of CSAF document: esa-2022-02723.json +File name of signature file: esa-2022-02723.json.asc ``` If a ROLIE feed exists, each signature file MUST be listed in it as described in requirement 15. @@ -6839,7 +6930,7 @@ It MUST NOT be stored adjacent to a `provider-metadata.json`. The file `aggregator.json` SHOULD only list the latest version of the metadata of a CSAF provider. -*Example 1:* +*Example 1:* ``` { @@ -6895,7 +6986,7 @@ Each such folder MUST at least: * provide a `provider-metadata.json` for the current issuing party. * provide the ROLIE feed document according to requirement 15 which links to the local copy of the CSAF document. -*Example 1:* +*Example 1:* ``` { @@ -7104,7 +7195,7 @@ CSAF documents are based on JSON, thus the security considerations of \[[RFC8259 In addition, CSAF documents may be rendered by consumers in various human-readable formats like HTML or PDF. Thus, for security reasons, CSAF producers and consumers SHALL adhere to the following: -* CSAF producers SHOULD NOT emit messages that contain HTML, even though all variants of Markdown permit it. +* CSAF producers SHOULD NOT emit messages that contain HTML, even though GitHub-flavoured Markdown is permitted. To include HTML, source code, or any other content that may be interpreted or executed by a CSAF consumer, e.g. to provide a proof-of-concept, the issuing party SHALL use Markdown's fenced code blocks or inline code option. * Deeply nested markup can cause a stack overflow in the Markdown processor \[[GFMENG](#GFMENG)\]. @@ -7174,6 +7265,7 @@ The entities ("conformance targets") for which this document defines requirement * **CSAF full validator**: A CSAF extended validator that additionally performs informative tests. * **CSAF SBOM matching system**: A program that connects to or is an SBOM database and is able to manage CSAF documents as required by CSAF management system as well as matching them to SBOM components of the SBOM database. +* **CSAF 2.0 to CSAF 2.1 converter**: A CSAF producer which takes a CSAF 2.0 document as input and converts it into a valid CSAF 2.1 document. ### 9.1.1 Conformance Clause 1: CSAF document @@ -7259,6 +7351,8 @@ Secondly, the program fulfills the following for all items of: `first_affected` and `last_affected` into `product_ids`. If none of these arrays exist, the CVRF CSAF converter outputs an error that no matching Product ID was found for this remediation element. * `/vulnerabilities[]/scores[]`: + * For any CVSS v4 element, the CVRF CSAF converter MUST compute the `baseSeverity` from the `baseScore` according to + the rules of the applicable CVSS standard. (CSAF CVRF v1.2 predates CVSS v4.0.) * For any CVSS v3 element, the CVRF CSAF converter MUST compute the `baseSeverity` from the `baseScore` according to the rules of the applicable CVSS standard. * If no `product_id` is given, the CVRF CSAF converter appends all Product IDs which are listed under `../product_status` in @@ -7269,10 +7363,11 @@ Secondly, the program fulfills the following for all items of: A CVRF CSAF converter MAY offer a configuration option to delete such elements. * If there are CVSS v3.0 and CVSS v3.1 Vectors available for the same product, the CVRF CSAF converter discards the CVSS v3.0 information and provide in CSAF only the CVSS v3.1 information. - * To determine, which minor version of CVSS v3 is used, the CVRF CSAF converter uses the following steps: + * To determine, which minor version of CVSS v3 is used and to evaluate a CVSS v4 that was wrongly inserted in a CVSS v3 element, + the CVRF CSAF converter uses the following steps: 1. Retrieve the CVSS version from the CVSS vector, if present. - *Example 1:* + *Example 1:* ``` CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H => 3.1 @@ -7281,7 +7376,7 @@ Secondly, the program fulfills the following for all items of: 2. Retrieve the CVSS version from the CVSS element's namespace, if present. The CVRF CSAF converter outputs a warning that this value was guessed from the element's namespace. - *Example 2:* + *Example 2:* ``` xmlns:cvssv31="https://www.first.org/cvss/cvss-v3.1.xsd" @@ -7291,7 +7386,7 @@ Secondly, the program fulfills the following for all items of: is handled the same as - *Example 3:* + *Example 3:* ``` @@ -7302,7 +7397,7 @@ Secondly, the program fulfills the following for all items of: If more than one CVSS namespace is present and the element is not clearly defined via the namespace, this step MUST be skipped without a decision. - *Example 4:* + *Example 4:* ``` xmlns:cvssv3="https://www.first.org/cvss/cvss-v3.0.xsd" => 3.0 @@ -7610,6 +7705,21 @@ A CSAF SBOM matching system satisfies the "CSAF SBOM matching system" conformanc * matching that CSAF document at all * marked with a given status +### 9.1.18 Conformance Clause 18: CSAF 2.0 to CSAF 2.1 converter + +A program satisfies the "CSAF 2.0 to CSAF 2.1 converter" conformance profile if the program fulfills the following two groups of requirements: + +Firstly, the program: + +* satisfies the "CSAF producer" conformance profile. +* takes only CSAF 2.0 documents as input. +* additionally satisfies the normative requirements given below. + +Secondly, the program fulfills the following for all items of: + + +> A tool MAY implement options to convert other Markdown formats to GitHub-flavoured Markdown. + ------- # Appendix A. Acknowledgments @@ -7743,7 +7853,7 @@ The following individuals were members of the OASIS CSAF Technical Committee dur | Revision | Date | Editor | Changes Made | |:-------------------------|:-----------|:--------------------------------|:--------------------------------------------------------------------------------------| | csaf-v2.0-wd20240124-dev | 2024-01-24 | Stefan Hagen and Thomas Schmidt | Preparing initial Editor Revision | - +| csaf-v2.0-wd20240228-dev | 2024-02-28 | Stefan Hagen and Thomas Schmidt | Next Editor Revision | ------- # Appendix C. Guidance on the Size of CSAF Documents @@ -7763,8 +7873,9 @@ All _CSAF producers_ SHOULD NOT produce CSAF documents which exceed those limits ## C.1 File size A CSAF document in the specified JSON format encoded in UTF-8 SHOULD conform to known size limits of current technologies parsing JSON content, -e.g.: 15 MB. +e.g.: 50 MiB. +> The CSAF documents observed in the wild expose strongly varying sizes as per the use cases they serve. > At least one database technology in wide use for storing CSAF documents rejects insert attempts when > the transformed BSON size exceeds 16 megabytes. > The BSON format optimizes for accessibility and not size. @@ -7938,6 +8049,7 @@ A string SHOULD NOT have a length greater than: * `/vulnerabilities[]/remediations[]/product_ids[]` * `/vulnerabilities[]/scores[]/cvss_v2/vectorString` * `/vulnerabilities[]/scores[]/cvss_v3/vectorString` + * `/vulnerabilities[]/scores[]/cvss_v4/vectorString` * `/vulnerabilities[]/scores[]/products[]` * `/vulnerabilities[]/threats[]/group_ids[]` * `/vulnerabilities[]/threats[]/product_ids[]` @@ -8064,6 +8176,42 @@ It seems to be safe to assume that the length of each value is not greater than * `/vulnerabilities[]/scores[]/cvss_v3/modifiedIntegrityImpact` (11) * `/vulnerabilities[]/scores[]/cvss_v3/modifiedAvailabilityImpact` (11) * `/vulnerabilities[]/scores[]/cvss_v3/environmentalSeverity` (8) +* `/vulnerabilities[]/scores[]/cvss_v4/version` (3) +* `/vulnerabilities[]/scores[]/cvss_v4/attackVector` (8) +* `/vulnerabilities[]/scores[]/cvss_v4/attackComplexity` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/attackRequirements` (7) +* `/vulnerabilities[]/scores[]/cvss_v4/privilegesRequired` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/userInteraction` (7) +* `/vulnerabilities[]/scores[]/cvss_v4/vulnConfidentialityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/vulnIntegrityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/vulnAvailabilityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/subConfidentialityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/subIntegrityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/subAvailabilityImpact` (4) +* `/vulnerabilities[]/scores[]/cvss_v4/exploitMaturity` (16) +* `/vulnerabilities[]/scores[]/cvss_v4/confidentialityRequirement` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/integrityRequirement` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/availabilityRequirement` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedAttackVector` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedAttackComplexity` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedAttackRequirements` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedPrivilegesRequired` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedUserInteraction` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedVulnConfidentialityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedVulnIntegrityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedVulnAvailabilityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedSubConfidentialityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedSubIntegrityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/modifiedSubAvailabilityImpact` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/Safety` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/Automatable` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/Recovery` (13) +* `/vulnerabilities[]/scores[]/cvss_v4/valueDensity` (12) +* `/vulnerabilities[]/scores[]/cvss_v4/vulnerabilityResponseEffort` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/providerUrgency` (11) +* `/vulnerabilities[]/scores[]/cvss_v4/baseSeverity` (8) +* `/vulnerabilities[]/scores[]/cvss_v4/threatSeverity` (8) +* `/vulnerabilities[]/scores[]/cvss_v4/environmentalSeverity` (8) * `/vulnerabilities[]/threats[]/category` (14) ## C.6 Date diff --git a/csaf_2.1/referenced_schema/first/cvss-v4.0.json b/csaf_2.1/referenced_schema/first/cvss-v4.0.json new file mode 100644 index 00000000..6ffffd0e --- /dev/null +++ b/csaf_2.1/referenced_schema/first/cvss-v4.0.json @@ -0,0 +1,387 @@ +{ + "license": [ + "Copyright (c) 2023, FIRST.ORG, INC.", + "All rights reserved.", + "", + "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ", + "following conditions are met:", + "1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following ", + " disclaimer.", + "2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the ", + " following disclaimer in the documentation and/or other materials provided with the distribution.", + "3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote ", + " products derived from this software without specific prior written permission.", + "", + "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, ", + "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ", + "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ", + "SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ", + "SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ", + "WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ", + "OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + ], + + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "JSON Schema for Common Vulnerability Scoring System version 4.0", + "$id": "https://www.first.org/cvss/cvss-v4.0.json?20240216", + "type": "object", + "definitions": { + "attackVectorType": { + "type": "string", + "enum": [ "NETWORK", "ADJACENT", "LOCAL", "PHYSICAL" ] + }, + "modifiedAttackVectorType": { + "type": "string", + "enum": [ "NETWORK", "ADJACENT", "LOCAL", "PHYSICAL", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "attackComplexityType": { + "type": "string", + "enum": [ "HIGH", "LOW" ] + }, + "modifiedAttackComplexityType": { + "type": "string", + "enum": [ "HIGH", "LOW", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "attackRequirementsType": { + "type": "string", + "enum": [ "NONE", "PRESENT" ] + }, + "modifiedAttackRequirementsType": { + "type": "string", + "enum": [ "NONE", "PRESENT", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "privilegesRequiredType": { + "type": "string", + "enum": [ "HIGH", "LOW", "NONE" ] + }, + "modifiedPrivilegesRequiredType": { + "type": "string", + "enum": [ "HIGH", "LOW", "NONE", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "userInteractionType": { + "type": "string", + "enum": [ "NONE", "PASSIVE", "ACTIVE" ] + }, + "modifiedUserInteractionType": { + "type": "string", + "enum": [ "NONE", "PASSIVE", "ACTIVE", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "vulnCiaType": { + "type": "string", + "enum": [ "NONE", "LOW", "HIGH" ] + }, + "modifiedVulnCiaType": { + "type": "string", + "enum": [ "NONE", "LOW", "HIGH", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "subCiaType": { + "type": "string", + "enum": [ "NONE", "LOW", "HIGH" ] + }, + "modifiedSubCType": { + "type": "string", + "enum": [ "NEGLIGIBLE", "LOW", "HIGH", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "modifiedSubIaType": { + "type": "string", + "enum": [ "NEGLIGIBLE", "LOW", "HIGH", "SAFETY", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "exploitMaturityType": { + "type": "string", + "enum": [ "UNREPORTED", "PROOF_OF_CONCEPT", "ATTACKED", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "ciaRequirementType": { + "type": "string", + "enum": [ "LOW", "MEDIUM", "HIGH", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "safetyType": { + "type": "string", + "enum": [ "NEGLIGIBLE", "PRESENT", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "automatableType": { + "type": "string", + "enum": [ "NO", "YES", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "recoveryType": { + "type": "string", + "enum": [ "AUTOMATIC", "USER", "IRRECOVERABLE", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "valueDensityType": { + "type": "string", + "enum": [ "DIFFUSE", "CONCENTRATED", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "vulnerabilityResponseEffortType": { + "type": "string", + "enum": [ "LOW", "MODERATE", "HIGH", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "providerUrgencyType": { + "type": "string", + "enum": [ "CLEAR", "GREEN", "AMBER", "RED", "NOT_DEFINED" ], + "default": "NOT_DEFINED" + }, + "noneScoreType": { + "type": "number", + "minimum": 0.0, + "maximum": 0.0 + }, + "lowScoreType": { + "type": "number", + "minimum": 0.1, + "maximum": 3.9, + "multipleOf": 0.1 + }, + "mediumScoreType": { + "type": "number", + "minimum": 4.0, + "maximum": 6.9, + "multipleOf": 0.1 + }, + "highScoreType": { + "type": "number", + "minimum": 7.0, + "maximum": 8.9, + "multipleOf": 0.1 + }, + "criticalScoreType": { + "type": "number", + "minimum": 9.0, + "maximum": 10, + "multipleOf": 0.1 + }, + "noneSeverityType": { + "const": "NONE" + }, + "lowSeverityType": { + "const": "LOW" + }, + "mediumSeverityType": { + "const": "MEDIUM" + }, + "highSeverityType": { + "const": "HIGH" + }, + "criticalSeverityType": { + "const": "CRITICAL" + } + }, + "properties": { + "version": { + "description": "CVSS Version", + "type": "string", + "enum": [ "4.0" ] + }, + "vectorString": { + "type": "string", + "pattern": "^CVSS:4[.]0\/AV:[NALP]\/AC:[LH]\/AT:[NP]\/PR:[NLH]\/UI:[NPA]\/VC:[HLN]\/VI:[HLN]\/VA:[HLN]\/SC:[HLN]\/SI:[HLN]\/SA:[HLN](\/E:[XAPU])?(\/CR:[XHML])?(\/IR:[XHML])?(\/AR:[XHML])?(\/MAV:[XNALP])?(\/MAC:[XLH])?(\/MAT:[XNP])?(\/MPR:[XNLH])?(\/MUI:[XNPA])?(\/MVC:[XNLH])?(\/MVI:[XNLH])?(\/MVA:[XNLH])?(\/MSC:[XNLH])?(\/MSI:[XNLHS])?(\/MSA:[XNLHS])?(\/S:[XNP])?(\/AU:[XNY])?(\/R:[XAUI])?(\/V:[XDC])?(\/RE:[XLMH])?(\/U:(X|Clear|Green|Amber|Red))?$" + }, + "attackVector": { "$ref": "#/definitions/attackVectorType" }, + "attackComplexity": { "$ref": "#/definitions/attackComplexityType" }, + "attackRequirements": { "$ref": "#/definitions/attackRequirementsType" }, + "privilegesRequired": { "$ref": "#/definitions/privilegesRequiredType" }, + "userInteraction": { "$ref": "#/definitions/userInteractionType" }, + "vulnConfidentialityImpact": { "$ref": "#/definitions/vulnCiaType" }, + "vulnIntegrityImpact": { "$ref": "#/definitions/vulnCiaType" }, + "vulnAvailabilityImpact": { "$ref": "#/definitions/vulnCiaType" }, + "subConfidentialityImpact": { "$ref": "#/definitions/subCiaType" }, + "subIntegrityImpact": { "$ref": "#/definitions/subCiaType" }, + "subAvailabilityImpact": { "$ref": "#/definitions/subCiaType" }, + "exploitMaturity": { "$ref": "#/definitions/exploitMaturityType" }, + "confidentialityRequirement": { "$ref": "#/definitions/ciaRequirementType" }, + "integrityRequirement": { "$ref": "#/definitions/ciaRequirementType" }, + "availabilityRequirement": { "$ref": "#/definitions/ciaRequirementType" }, + "modifiedAttackVector": { "$ref": "#/definitions/modifiedAttackVectorType" }, + "modifiedAttackComplexity": { "$ref": "#/definitions/modifiedAttackComplexityType" }, + "modifiedAttackRequirements": { "$ref": "#/definitions/modifiedAttackRequirementsType" }, + "modifiedPrivilegesRequired": { "$ref": "#/definitions/modifiedPrivilegesRequiredType" }, + "modifiedUserInteraction": { "$ref": "#/definitions/modifiedUserInteractionType" }, + "modifiedVulnConfidentialityImpact": { "$ref": "#/definitions/modifiedVulnCiaType" }, + "modifiedVulnIntegrityImpact": { "$ref": "#/definitions/modifiedVulnCiaType" }, + "modifiedVulnAvailabilityImpact": { "$ref": "#/definitions/modifiedVulnCiaType" }, + "modifiedSubConfidentialityImpact": { "$ref": "#/definitions/modifiedSubCType" }, + "modifiedSubIntegrityImpact": { "$ref": "#/definitions/modifiedSubIaType" }, + "modifiedSubAvailabilityImpact": { "$ref": "#/definitions/modifiedSubIaType" }, + "Safety": { "$ref": "#/definitions/safetyType" }, + "Automatable": { "$ref": "#/definitions/automatableType" }, + "Recovery": { "$ref": "#/definitions/recoveryType" }, + "valueDensity": { "$ref": "#/definitions/valueDensityType" }, + "vulnerabilityResponseEffort": { "$ref": "#/definitions/vulnerabilityResponseEffortType" }, + "providerUrgency": { "$ref": "#/definitions/providerUrgencyType" } + }, + "allOf": [ + { + "anyOf": [{ + "properties": { + "baseScore" : { + "$ref": "#/definitions/noneScoreType" + }, + "baseSeverity" : { + "$ref": "#/definitions/noneSeverityType" + } + } + }, + { + "properties": { + "baseScore" : { + "$ref": "#/definitions/lowScoreType" + }, + "baseSeverity" : { + "$ref": "#/definitions/lowSeverityType" + } + } + }, + { + "properties": { + "baseScore" : { + "$ref": "#/definitions/mediumScoreType" + }, + "baseSeverity" : { + "$ref": "#/definitions/mediumSeverityType" + } + } + }, + { + "properties": { + "baseScore" : { + "$ref": "#/definitions/highScoreType" + }, + "baseSeverity" : { + "$ref": "#/definitions/highSeverityType" + } + } + }, + { + "properties": { + "baseScore" : { + "$ref": "#/definitions/criticalScoreType" + }, + "baseSeverity" : { + "$ref": "#/definitions/criticalSeverityType" + } + } + }] + }, + { + "anyOf": [{ + "properties": { + "threatScore" : { + "$ref": "#/definitions/noneScoreType" + }, + "threatSeverity" : { + "$ref": "#/definitions/noneSeverityType" + } + } + }, + { + "properties": { + "threatScore" : { + "$ref": "#/definitions/lowScoreType" + }, + "threatSeverity" : { + "$ref": "#/definitions/lowSeverityType" + } + } + }, + { + "properties": { + "threatScore" : { + "$ref": "#/definitions/mediumScoreType" + }, + "threatSeverity" : { + "$ref": "#/definitions/mediumSeverityType" + } + } + }, + { + "properties": { + "threatScore" : { + "$ref": "#/definitions/highScoreType" + }, + "threatSeverity" : { + "$ref": "#/definitions/highSeverityType" + } + } + }, + { + "properties": { + "threatScore" : { + "$ref": "#/definitions/criticalScoreType" + }, + "threatSeverity" : { + "$ref": "#/definitions/criticalSeverityType" + } + } + } + ] + }, + { + "anyOf": [ + { + "properties": { + "environmentalScore" : { + "$ref": "#/definitions/noneScoreType" + }, + "environmentalSeverity" : { + "$ref": "#/definitions/noneSeverityType" + } + } + }, + { + "properties": { + "environmentalScore" : { + "$ref": "#/definitions/lowScoreType" + }, + "environmentalSeverity" : { + "$ref": "#/definitions/lowSeverityType" + } + } + }, + { + "properties": { + "environmentalScore" : { + "$ref": "#/definitions/mediumScoreType" + }, + "environmentalSeverity" : { + "$ref": "#/definitions/mediumSeverityType" + } + } + }, + { + "properties": { + "environmentalScore" : { + "$ref": "#/definitions/highScoreType" + }, + "environmentalSeverity" : { + "$ref": "#/definitions/highSeverityType" + } + } + }, + { + "properties": { + "environmentalScore" : { + "$ref": "#/definitions/criticalScoreType" + }, + "environmentalSeverity" : { + "$ref": "#/definitions/criticalSeverityType" + } + } + } + ] + } + ], + "required": [ "version", "vectorString", "baseScore", "baseSeverity" ] +} diff --git a/csaf_2.1/referenced_schema/first/cvss-v4.0_strict.json b/csaf_2.1/referenced_schema/first/cvss-v4.0_strict.json new file mode 100644 index 00000000..e6a3eb6d --- /dev/null +++ b/csaf_2.1/referenced_schema/first/cvss-v4.0_strict.json @@ -0,0 +1,566 @@ +{ + "$id": "https://www.first.org/cvss/cvss-v4.0.json?20240216", + "$schema": "http://json-schema.org/draft-07/schema#", + "unevaluatedProperties": false, + "allOf": [ + { + "anyOf": [ + { + "properties": { + "baseScore": { + "$ref": "#/definitions/noneScoreType" + }, + "baseSeverity": { + "$ref": "#/definitions/noneSeverityType" + } + } + }, + { + "properties": { + "baseScore": { + "$ref": "#/definitions/lowScoreType" + }, + "baseSeverity": { + "$ref": "#/definitions/lowSeverityType" + } + } + }, + { + "properties": { + "baseScore": { + "$ref": "#/definitions/mediumScoreType" + }, + "baseSeverity": { + "$ref": "#/definitions/mediumSeverityType" + } + } + }, + { + "properties": { + "baseScore": { + "$ref": "#/definitions/highScoreType" + }, + "baseSeverity": { + "$ref": "#/definitions/highSeverityType" + } + } + }, + { + "properties": { + "baseScore": { + "$ref": "#/definitions/criticalScoreType" + }, + "baseSeverity": { + "$ref": "#/definitions/criticalSeverityType" + } + } + } + ] + }, + { + "anyOf": [ + { + "properties": { + "threatScore": { + "$ref": "#/definitions/noneScoreType" + }, + "threatSeverity": { + "$ref": "#/definitions/noneSeverityType" + } + } + }, + { + "properties": { + "threatScore": { + "$ref": "#/definitions/lowScoreType" + }, + "threatSeverity": { + "$ref": "#/definitions/lowSeverityType" + } + } + }, + { + "properties": { + "threatScore": { + "$ref": "#/definitions/mediumScoreType" + }, + "threatSeverity": { + "$ref": "#/definitions/mediumSeverityType" + } + } + }, + { + "properties": { + "threatScore": { + "$ref": "#/definitions/highScoreType" + }, + "threatSeverity": { + "$ref": "#/definitions/highSeverityType" + } + } + }, + { + "properties": { + "threatScore": { + "$ref": "#/definitions/criticalScoreType" + }, + "threatSeverity": { + "$ref": "#/definitions/criticalSeverityType" + } + } + } + ] + }, + { + "anyOf": [ + { + "properties": { + "environmentalScore": { + "$ref": "#/definitions/noneScoreType" + }, + "environmentalSeverity": { + "$ref": "#/definitions/noneSeverityType" + } + } + }, + { + "properties": { + "environmentalScore": { + "$ref": "#/definitions/lowScoreType" + }, + "environmentalSeverity": { + "$ref": "#/definitions/lowSeverityType" + } + } + }, + { + "properties": { + "environmentalScore": { + "$ref": "#/definitions/mediumScoreType" + }, + "environmentalSeverity": { + "$ref": "#/definitions/mediumSeverityType" + } + } + }, + { + "properties": { + "environmentalScore": { + "$ref": "#/definitions/highScoreType" + }, + "environmentalSeverity": { + "$ref": "#/definitions/highSeverityType" + } + } + }, + { + "properties": { + "environmentalScore": { + "$ref": "#/definitions/criticalScoreType" + }, + "environmentalSeverity": { + "$ref": "#/definitions/criticalSeverityType" + } + } + } + ] + } + ], + "definitions": { + "attackComplexityType": { + "enum": [ + "HIGH", + "LOW" + ], + "type": "string" + }, + "attackRequirementsType": { + "enum": [ + "NONE", + "PRESENT" + ], + "type": "string" + }, + "attackVectorType": { + "enum": [ + "NETWORK", + "ADJACENT", + "LOCAL", + "PHYSICAL" + ], + "type": "string" + }, + "automatableType": { + "default": "NOT_DEFINED", + "enum": [ + "NO", + "YES", + "NOT_DEFINED" + ], + "type": "string" + }, + "ciaRequirementType": { + "default": "NOT_DEFINED", + "enum": [ + "LOW", + "MEDIUM", + "HIGH", + "NOT_DEFINED" + ], + "type": "string" + }, + "criticalScoreType": { + "maximum": 10, + "minimum": 9.0, + "multipleOf": 0.1, + "type": "number" + }, + "criticalSeverityType": { + "const": "CRITICAL" + }, + "exploitMaturityType": { + "default": "NOT_DEFINED", + "enum": [ + "UNREPORTED", + "PROOF_OF_CONCEPT", + "ATTACKED", + "NOT_DEFINED" + ], + "type": "string" + }, + "highScoreType": { + "maximum": 8.9, + "minimum": 7.0, + "multipleOf": 0.1, + "type": "number" + }, + "highSeverityType": { + "const": "HIGH" + }, + "lowScoreType": { + "maximum": 3.9, + "minimum": 0.1, + "multipleOf": 0.1, + "type": "number" + }, + "lowSeverityType": { + "const": "LOW" + }, + "mediumScoreType": { + "maximum": 6.9, + "minimum": 4.0, + "multipleOf": 0.1, + "type": "number" + }, + "mediumSeverityType": { + "const": "MEDIUM" + }, + "modifiedAttackComplexityType": { + "default": "NOT_DEFINED", + "enum": [ + "HIGH", + "LOW", + "NOT_DEFINED" + ], + "type": "string" + }, + "modifiedAttackRequirementsType": { + "default": "NOT_DEFINED", + "enum": [ + "NONE", + "PRESENT", + "NOT_DEFINED" + ], + "type": "string" + }, + "modifiedAttackVectorType": { + "default": "NOT_DEFINED", + "enum": [ + "NETWORK", + "ADJACENT", + "LOCAL", + "PHYSICAL", + "NOT_DEFINED" + ], + "type": "string" + }, + "modifiedPrivilegesRequiredType": { + "default": "NOT_DEFINED", + "enum": [ + "HIGH", + "LOW", + "NONE", + "NOT_DEFINED" + ], + "type": "string" + }, + "modifiedSubCType": { + "default": "NOT_DEFINED", + "enum": [ + "NEGLIGIBLE", + "LOW", + "HIGH", + "NOT_DEFINED" + ], + "type": "string" + }, + "modifiedSubIaType": { + "default": "NOT_DEFINED", + "enum": [ + "NEGLIGIBLE", + "LOW", + "HIGH", + "SAFETY", + "NOT_DEFINED" + ], + "type": "string" + }, + "modifiedUserInteractionType": { + "default": "NOT_DEFINED", + "enum": [ + "NONE", + "PASSIVE", + "ACTIVE", + "NOT_DEFINED" + ], + "type": "string" + }, + "modifiedVulnCiaType": { + "default": "NOT_DEFINED", + "enum": [ + "NONE", + "LOW", + "HIGH", + "NOT_DEFINED" + ], + "type": "string" + }, + "noneScoreType": { + "maximum": 0.0, + "minimum": 0.0, + "type": "number" + }, + "noneSeverityType": { + "const": "NONE" + }, + "privilegesRequiredType": { + "enum": [ + "HIGH", + "LOW", + "NONE" + ], + "type": "string" + }, + "providerUrgencyType": { + "default": "NOT_DEFINED", + "enum": [ + "CLEAR", + "GREEN", + "AMBER", + "RED", + "NOT_DEFINED" + ], + "type": "string" + }, + "recoveryType": { + "default": "NOT_DEFINED", + "enum": [ + "AUTOMATIC", + "USER", + "IRRECOVERABLE", + "NOT_DEFINED" + ], + "type": "string" + }, + "safetyType": { + "default": "NOT_DEFINED", + "enum": [ + "NEGLIGIBLE", + "PRESENT", + "NOT_DEFINED" + ], + "type": "string" + }, + "subCiaType": { + "enum": [ + "NONE", + "LOW", + "HIGH" + ], + "type": "string" + }, + "userInteractionType": { + "enum": [ + "NONE", + "PASSIVE", + "ACTIVE" + ], + "type": "string" + }, + "valueDensityType": { + "default": "NOT_DEFINED", + "enum": [ + "DIFFUSE", + "CONCENTRATED", + "NOT_DEFINED" + ], + "type": "string" + }, + "vulnCiaType": { + "enum": [ + "NONE", + "LOW", + "HIGH" + ], + "type": "string" + }, + "vulnerabilityResponseEffortType": { + "default": "NOT_DEFINED", + "enum": [ + "LOW", + "MODERATE", + "HIGH", + "NOT_DEFINED" + ], + "type": "string" + } + }, + "license": [ + "Copyright (c) 2023, FIRST.ORG, INC.", + "All rights reserved.", + "", + "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ", + "following conditions are met:", + "1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following ", + " disclaimer.", + "2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the ", + " following disclaimer in the documentation and/or other materials provided with the distribution.", + "3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote ", + " products derived from this software without specific prior written permission.", + "", + "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, ", + "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ", + "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ", + "SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ", + "SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ", + "WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ", + "OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + ], + "properties": { + "Automatable": { + "$ref": "#/definitions/automatableType" + }, + "Recovery": { + "$ref": "#/definitions/recoveryType" + }, + "Safety": { + "$ref": "#/definitions/safetyType" + }, + "attackComplexity": { + "$ref": "#/definitions/attackComplexityType" + }, + "attackRequirements": { + "$ref": "#/definitions/attackRequirementsType" + }, + "attackVector": { + "$ref": "#/definitions/attackVectorType" + }, + "availabilityRequirement": { + "$ref": "#/definitions/ciaRequirementType" + }, + "confidentialityRequirement": { + "$ref": "#/definitions/ciaRequirementType" + }, + "exploitMaturity": { + "$ref": "#/definitions/exploitMaturityType" + }, + "integrityRequirement": { + "$ref": "#/definitions/ciaRequirementType" + }, + "modifiedAttackComplexity": { + "$ref": "#/definitions/modifiedAttackComplexityType" + }, + "modifiedAttackRequirements": { + "$ref": "#/definitions/modifiedAttackRequirementsType" + }, + "modifiedAttackVector": { + "$ref": "#/definitions/modifiedAttackVectorType" + }, + "modifiedPrivilegesRequired": { + "$ref": "#/definitions/modifiedPrivilegesRequiredType" + }, + "modifiedSubAvailabilityImpact": { + "$ref": "#/definitions/modifiedSubIaType" + }, + "modifiedSubConfidentialityImpact": { + "$ref": "#/definitions/modifiedSubCType" + }, + "modifiedSubIntegrityImpact": { + "$ref": "#/definitions/modifiedSubIaType" + }, + "modifiedUserInteraction": { + "$ref": "#/definitions/modifiedUserInteractionType" + }, + "modifiedVulnAvailabilityImpact": { + "$ref": "#/definitions/modifiedVulnCiaType" + }, + "modifiedVulnConfidentialityImpact": { + "$ref": "#/definitions/modifiedVulnCiaType" + }, + "modifiedVulnIntegrityImpact": { + "$ref": "#/definitions/modifiedVulnCiaType" + }, + "privilegesRequired": { + "$ref": "#/definitions/privilegesRequiredType" + }, + "providerUrgency": { + "$ref": "#/definitions/providerUrgencyType" + }, + "subAvailabilityImpact": { + "$ref": "#/definitions/subCiaType" + }, + "subConfidentialityImpact": { + "$ref": "#/definitions/subCiaType" + }, + "subIntegrityImpact": { + "$ref": "#/definitions/subCiaType" + }, + "userInteraction": { + "$ref": "#/definitions/userInteractionType" + }, + "valueDensity": { + "$ref": "#/definitions/valueDensityType" + }, + "vectorString": { + "pattern": "^CVSS:4[.]0/AV:[NALP]/AC:[LH]/AT:[NP]/PR:[NLH]/UI:[NPA]/VC:[HLN]/VI:[HLN]/VA:[HLN]/SC:[HLN]/SI:[HLN]/SA:[HLN](/E:[XAPU])?(/CR:[XHML])?(/IR:[XHML])?(/AR:[XHML])?(/MAV:[XNALP])?(/MAC:[XLH])?(/MAT:[XNP])?(/MPR:[XNLH])?(/MUI:[XNPA])?(/MVC:[XNLH])?(/MVI:[XNLH])?(/MVA:[XNLH])?(/MSC:[XNLH])?(/MSI:[XNLHS])?(/MSA:[XNLHS])?(/S:[XNP])?(/AU:[XNY])?(/R:[XAUI])?(/V:[XDC])?(/RE:[XLMH])?(/U:(X|Clear|Green|Amber|Red))?$", + "type": "string" + }, + "version": { + "description": "CVSS Version", + "enum": [ + "4.0" + ], + "type": "string" + }, + "vulnAvailabilityImpact": { + "$ref": "#/definitions/vulnCiaType" + }, + "vulnConfidentialityImpact": { + "$ref": "#/definitions/vulnCiaType" + }, + "vulnIntegrityImpact": { + "$ref": "#/definitions/vulnCiaType" + }, + "vulnerabilityResponseEffort": { + "$ref": "#/definitions/vulnerabilityResponseEffortType" + } + }, + "required": [ + "version", + "vectorString", + "baseScore", + "baseSeverity" + ], + "title": "JSON Schema for Common Vulnerability Scoring System version 4.0", + "type": "object" +} diff --git a/csaf_2.1/test/aggregator_schema/run_tests.sh b/csaf_2.1/test/aggregator_schema/run_tests.sh index cd370bd0..fbaf761a 100755 --- a/csaf_2.1/test/aggregator_schema/run_tests.sh +++ b/csaf_2.1/test/aggregator_schema/run_tests.sh @@ -7,6 +7,7 @@ CSAF_STRICT_SCHEMA=${STRICT_BUILD}/csaf_strict_schema.json CVSS_20_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v2.0_strict.json CVSS_30_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v3.0_strict.json CVSS_31_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v3.1_strict.json +CVSS_40_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v4.0_strict.json PROVIDER_STRICT_SCHEMA=${STRICT_BUILD}/provider_strict_schema.json VALIDATOR=csaf_2.1/test/validator.py STRICT_GENERATOR=csaf_2.1/test/generate_strict_schema.py @@ -19,7 +20,7 @@ cd `dirname $0`/../../.. validate() { printf "%s" "Testing file $1 against schema ${SCHEMA} ... " - if python3 ${VALIDATOR} ${SCHEMA} $1 ${CSAF_STRICT_SCHEMA} ${CVSS_20_STRICT_SCHEMA} ${CVSS_30_STRICT_SCHEMA} ${CVSS_31_STRICT_SCHEMA} ${PROVIDER_STRICT_SCHEMA}; then + if python3 ${VALIDATOR} ${SCHEMA} $1 ${CSAF_STRICT_SCHEMA} ${CVSS_20_STRICT_SCHEMA} ${CVSS_30_STRICT_SCHEMA} ${CVSS_31_STRICT_SCHEMA} ${CVSS_40_STRICT_SCHEMA} ${PROVIDER_STRICT_SCHEMA}; then printf "%s\n" SUCCESS else printf "%s\n" FAILED diff --git a/csaf_2.1/test/csaf_schema/run_tests.sh b/csaf_2.1/test/csaf_schema/run_tests.sh index 1f7517ae..d24a9ed4 100755 --- a/csaf_2.1/test/csaf_schema/run_tests.sh +++ b/csaf_2.1/test/csaf_schema/run_tests.sh @@ -6,6 +6,7 @@ CSAF_STRICT_SCHEMA=${STRICT_BUILD}/csaf_strict_schema.json CVSS_20_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v2.0_strict.json CVSS_30_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v3.0_strict.json CVSS_31_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v3.1_strict.json +CVSS_40_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v4.0_strict.json VALIDATOR=csaf_2.1/test/validator.py STRICT_GENERATOR=csaf_2.1/test/generate_strict_schema.py TESTPATH=csaf_2.1/examples/csaf/$1/*.json @@ -17,7 +18,7 @@ cd `dirname $0`/../../.. validate() { printf "%s" "Testing file $1 against schema ${SCHEMA} ... " - if python3 ${VALIDATOR} ${SCHEMA} $1 ${CVSS_20_STRICT_SCHEMA} ${CVSS_30_STRICT_SCHEMA} ${CVSS_31_STRICT_SCHEMA}; then + if python3 ${VALIDATOR} ${SCHEMA} $1 ${CVSS_20_STRICT_SCHEMA} ${CVSS_30_STRICT_SCHEMA} ${CVSS_31_STRICT_SCHEMA} ${CVSS_40_STRICT_SCHEMA}; then printf "%s\n" SUCCESS else printf "%s\n" FAILED diff --git a/csaf_2.1/test/provider_schema/run_tests.sh b/csaf_2.1/test/provider_schema/run_tests.sh index 59372cc1..0ec6b864 100755 --- a/csaf_2.1/test/provider_schema/run_tests.sh +++ b/csaf_2.1/test/provider_schema/run_tests.sh @@ -6,6 +6,7 @@ CSAF_STRICT_SCHEMA=${STRICT_BUILD}/csaf_strict_schema.json CVSS_20_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v2.0_strict.json CVSS_30_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v3.0_strict.json CVSS_31_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v3.1_strict.json +CVSS_40_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v4.0_strict.json PROVIDER_STRICT_SCHEMA=${STRICT_BUILD}/provider_strict_schema.json VALIDATOR=csaf_2.1/test/validator.py STRICT_GENERATOR=csaf_2.1/test/generate_strict_schema.py @@ -18,7 +19,7 @@ cd `dirname $0`/../../.. validate() { printf "%s" "Testing file $1 against schema ${SCHEMA} ... " - if python3 ${VALIDATOR} ${SCHEMA} $1 ${CSAF_STRICT_SCHEMA} ${CVSS_20_STRICT_SCHEMA} ${CVSS_30_STRICT_SCHEMA} ${CVSS_31_STRICT_SCHEMA}; then + if python3 ${VALIDATOR} ${SCHEMA} $1 ${CSAF_STRICT_SCHEMA} ${CVSS_20_STRICT_SCHEMA} ${CVSS_30_STRICT_SCHEMA} ${CVSS_31_STRICT_SCHEMA} ${CVSS_40_STRICT_SCHEMA}; then printf "%s\n" SUCCESS else printf "%s\n" FAILED diff --git a/csaf_2.1/test/validator.py b/csaf_2.1/test/validator.py index 8a441cc6..4fbcea50 100644 --- a/csaf_2.1/test/validator.py +++ b/csaf_2.1/test/validator.py @@ -1,3 +1,4 @@ +import decimal import jsonschema from jsonschema.validators import Draft202012Validator from referencing import Registry, Resource @@ -15,20 +16,20 @@ with open(json_schema, 'r') as f: schema_data = f.read() - schema = json.loads(schema_data) + schema = json.loads(schema_data, parse_float=decimal.Decimal) resource = Resource.from_contents(schema) registry = Registry().with_resource(resource.id(), resource) with open(json_input, 'r') as f: input_data = f.read() - input_obj = json.loads(input_data) + input_obj = json.loads(input_data, parse_float=decimal.Decimal) if len(json_referenced_schemas) > 0: for i in json_referenced_schemas: with open(i, 'r') as f: current_ref_schema_data = f.read() - current_ref_schema = json.loads(current_ref_schema_data) + current_ref_schema = json.loads(current_ref_schema_data, parse_float=decimal.Decimal) current_resource = Resource.from_contents(current_ref_schema) registry = registry.combine(Registry().with_resource(current_resource.id().split('?')[0], current_resource)) diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-03.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-03.json new file mode 100644 index 00000000..7005f046 --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-03.json @@ -0,0 +1,104 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Use of CVSS v2 as the only Scoring System (failing example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-01-03", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:N", + "baseScore": 5.5 + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 10 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:L/AC:L/Au:S/C:C/I:N/A:N", + "baseScore": 4.6 + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N", + "baseScore": 5.7, + "baseSeverity": "MEDIUM" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:M/Au:N/C:P/I:N/A:N", + "baseScore": 4.3 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-13.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-13.json new file mode 100644 index 00000000..0b70b72c --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-13.json @@ -0,0 +1,122 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Use of CVSS v2 as the only Scoring System (valid example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-01-13", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:N", + "baseScore": 5.5 + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:H/SI:H/SA:N", + "baseScore": 5.3, + "baseSeverity": "MEDIUM" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 10 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:L/AC:L/Au:S/C:C/I:N/A:N", + "baseScore": 4.6 + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N", + "baseScore": 5.7, + "baseSeverity": "MEDIUM" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:M/Au:N/C:P/I:N/A:N", + "baseScore": 4.3 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N", + "baseScore": 3.1, + "baseSeverity": "LOW" + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:A/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N", + "baseScore": 2.1, + "baseSeverity": "LOW" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-01.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-01.json new file mode 100644 index 00000000..6f12dd55 --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-01.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Missing CVSS v4.0 (failing example 1)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-12-01", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-02.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-02.json new file mode 100644 index 00000000..c60cb985 --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-02.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Missing CVSS v4.0 (failing example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-12-02", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-03.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-03.json new file mode 100644 index 00000000..33724493 --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-03.json @@ -0,0 +1,50 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Missing CVSS v4.0 (failing example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-12-03", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 10 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-04.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-04.json new file mode 100644 index 00000000..8dda3429 --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-04.json @@ -0,0 +1,102 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Informative test: Missing CVSS v4.0 (failing example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-12-04", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:N", + "baseScore": 5.5 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N", + "baseScore": 6.4, + "baseSeverity": "MEDIUM" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 10 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:M/Au:N/C:P/I:N/A:N", + "baseScore": 4.3 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N", + "baseScore": 3.1, + "baseSeverity": "LOW" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-11.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-11.json new file mode 100644 index 00000000..aa285c5c --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-11.json @@ -0,0 +1,57 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Missing CVSS v4.0 (valid example 1)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-12-11", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-12.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-12.json new file mode 100644 index 00000000..4eb00e5e --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-12.json @@ -0,0 +1,57 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Missing CVSS v4.0 (valid example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-12-12", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-13.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-13.json new file mode 100644 index 00000000..04a9bc41 --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-13.json @@ -0,0 +1,56 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Missing CVSS v4.0 (valid example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-12-13", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 10 + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-14.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-14.json new file mode 100644 index 00000000..cc2610ef --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-14.json @@ -0,0 +1,114 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Informative test: Missing CVSS v4.0 (valid example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-12-14", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:N", + "baseScore": 5.5 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N", + "baseScore": 6.4, + "baseSeverity": "MEDIUM" + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:H/SI:L/SA:N", + "baseScore": 6.3, + "baseSeverity": "MEDIUM" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 10 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:M/Au:N/C:P/I:N/A:N", + "baseScore": 4.3 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N", + "baseScore": 3.1, + "baseSeverity": "LOW" + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:A/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N", + "baseScore": 2.1, + "baseSeverity": "LOW" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-15.json b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-15.json new file mode 100644 index 00000000..f7b6ba25 --- /dev/null +++ b/csaf_2.1/test/validator/data/informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-15.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Informative test: Missing CVSS v4.0 (valid example 5)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-3-12-15", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-02.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-02.json new file mode 100644 index 00000000..f2541e2f --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-02.json @@ -0,0 +1,62 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Multiple Scores with same Version per Product (failing example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-07-02", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + }, + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H", + "baseScore": 6.5, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-03.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-03.json new file mode 100644 index 00000000..cc16c168 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-03.json @@ -0,0 +1,60 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Multiple Scores with same Version per Product (failing example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-07-03", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:N", + "baseScore": 5.5 + } + }, + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 10 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-04.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-04.json new file mode 100644 index 00000000..d8ae29dd --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-04.json @@ -0,0 +1,62 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Multiple Scores with same Version per Product (failing example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-07-04", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + }, + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:H/SI:N/SA:N", + "baseScore": 4.9, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-13.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-13.json new file mode 100644 index 00000000..5917c5e9 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-13.json @@ -0,0 +1,66 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Multiple Scores with same Version per Product (valid example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-07-13", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H", + "baseScore": 6.5, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-14.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-14.json new file mode 100644 index 00000000..eae8df65 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-14.json @@ -0,0 +1,64 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Multiple Scores with same Version per Product (valid example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-07-14", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:N", + "baseScore": 5.5 + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 10 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-15.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-15.json new file mode 100644 index 00000000..615aa4af --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-15.json @@ -0,0 +1,66 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Multiple Scores with same Version per Product (valid example 5)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-07-15", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + }, + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N", + "baseScore": 5.4, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-16.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-16.json new file mode 100644 index 00000000..3b5fc310 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-16.json @@ -0,0 +1,62 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Multiple Scores with same Version per Product (valid example 6)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-07-16", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:N", + "baseScore": 5.5 + }, + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N", + "baseScore": 6.4, + "baseSeverity": "MEDIUM" + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:H/SI:N/SA:N", + "baseScore": 4.9, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-17.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-17.json new file mode 100644 index 00000000..01001257 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-17.json @@ -0,0 +1,62 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Multiple Scores with same Version per Product (valid example 7)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-07-17", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:N", + "baseScore": 5.5 + }, + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N", + "baseScore": 6.4, + "baseSeverity": "MEDIUM" + }, + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N", + "baseScore": 5.3, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-02.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-02.json new file mode 100644 index 00000000..9b4ac1ad --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-02.json @@ -0,0 +1,50 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS (failing example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-08-02", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H", + "baseScore": 6.5 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-03.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-03.json new file mode 100644 index 00000000..d88c5941 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-03.json @@ -0,0 +1,49 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS (failing example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-08-03", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "vectorString": "AV:L/AC:L/Au:M/C:C/I:C/A:C", + "baseScore": 6.5 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-04.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-04.json new file mode 100644 index 00000000..ecb44285 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-04.json @@ -0,0 +1,50 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS (failing example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-08-04", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L", + "baseScore": 5.4 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-11.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-11.json new file mode 100644 index 00000000..2dd374cf --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-11.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS (valid example 1)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-08-11", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H", + "baseScore": 6.5, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-12.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-12.json new file mode 100644 index 00000000..78d1dcb5 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-12.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS (valid example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-08-12", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H", + "baseScore": 6.5, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-13.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-13.json new file mode 100644 index 00000000..cf3318a0 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-13.json @@ -0,0 +1,50 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS (valid example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-08-13", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:L/AC:L/Au:M/C:C/I:C/A:C", + "baseScore": 6.5 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-14.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-14.json new file mode 100644 index 00000000..306eab72 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-14.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS (valid example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-08-14", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L", + "baseScore": 5.4, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-02.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-02.json new file mode 100644 index 00000000..f086512e --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-02.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (failing example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-02", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "HIGH" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-03.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-03.json new file mode 100644 index 00000000..a91adfcb --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-03.json @@ -0,0 +1,50 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (failing example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-03", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 6.5 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-04.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-04.json new file mode 100644 index 00000000..4cf48fc2 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-04.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (failing example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-04", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 9.3, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-05.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-05.json new file mode 100644 index 00000000..fb5a9ef4 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-05.json @@ -0,0 +1,53 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (failing example 5)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-05", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P", + "baseScore": 10.0, + "baseSeverity": "CRITICAL", + "threatScore": 9.9, + "threatSeverity": "HIGH" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-11.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-11.json new file mode 100644 index 00000000..37acd246 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-11.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (valid example 1)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-11", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-12.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-12.json new file mode 100644 index 00000000..5be233d3 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-12.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (valid example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-12", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H", + "baseScore": 10, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-13.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-13.json new file mode 100644 index 00000000..8377632e --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-13.json @@ -0,0 +1,50 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (valid example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-13", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", + "baseScore": 10.0 + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-14.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-14.json new file mode 100644 index 00000000..30b1e90a --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-14.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (valid example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-14", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10.0, + "baseSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-15.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-15.json new file mode 100644 index 00000000..ac4dff9b --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-15.json @@ -0,0 +1,53 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (valid example 5)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-15", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P", + "baseScore": 10.0, + "baseSeverity": "CRITICAL", + "threatScore": 9.3, + "threatSeverity": "CRITICAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-16.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-16.json new file mode 100644 index 00000000..236a4726 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-16.json @@ -0,0 +1,51 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Invalid CVSS computation (valid example 6)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-09-16", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N", + "baseScore": 5.3, + "baseSeverity": "MEDIUM" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-02.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-02.json new file mode 100644 index 00000000..0055db47 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-02.json @@ -0,0 +1,59 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Inconsistent CVSS (failing example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-10-02", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", + "baseScore": 9.8, + "baseSeverity": "CRITICAL", + "attackVector": "NETWORK", + "attackComplexity": "HIGH", + "privilegesRequired": "HIGH", + "userInteraction": "REQUIRED", + "scope": "UNCHANGED", + "confidentialityImpact": "NONE", + "integrityImpact": "HIGH", + "availabilityImpact": "HIGH" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-03.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-03.json new file mode 100644 index 00000000..7ec9611f --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-03.json @@ -0,0 +1,57 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Inconsistent CVSS (failing example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-10-03", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C/E:POC", + "baseScore": 9.0, + "accessVector": "NETWORK", + "accessComplexity": "HIGH", + "authentication": "MULTIPLE", + "confidentialityImpact": "PARTIAL", + "integrityImpact": "NONE", + "availabilityImpact": "COMPLETE", + "exploitability": "FUNCTIONAL" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-04.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-04.json new file mode 100644 index 00000000..2b6f38ec --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-04.json @@ -0,0 +1,62 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Inconsistent CVSS (failing example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-10-04", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10.0, + "baseSeverity": "CRITICAL", + "attackVector": "LOCAL", + "attackComplexity": "HIGH", + "attackRequirements": "PRESENT", + "privilegesRequired": "NONE", + "userInteraction": "PASSIVE", + "vulnConfidentialityImpact": "LOW", + "vulnIntegrityImpact": "NONE", + "vulnAvailabilityImpact": "HIGH", + "subConfidentialityImpact": "LOW", + "subIntegrityImpact": "HIGH", + "subAvailabilityImpact": "NONE" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-11.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-11.json new file mode 100644 index 00000000..f834e0b9 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-11.json @@ -0,0 +1,59 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Inconsistent CVSS (valid example 1)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-10-11", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.1", + "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", + "baseScore": 9.8, + "baseSeverity": "CRITICAL", + "attackVector": "NETWORK", + "attackComplexity": "LOW", + "privilegesRequired": "NONE", + "userInteraction": "NONE", + "scope": "UNCHANGED", + "confidentialityImpact": "HIGH", + "integrityImpact": "HIGH", + "availabilityImpact": "HIGH" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-12.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-12.json new file mode 100644 index 00000000..16a8e4e8 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-12.json @@ -0,0 +1,59 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Inconsistent CVSS (valid example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-10-12", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v3": { + "version": "3.0", + "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", + "baseScore": 9.8, + "baseSeverity": "CRITICAL", + "attackVector": "NETWORK", + "attackComplexity": "LOW", + "privilegesRequired": "NONE", + "userInteraction": "NONE", + "scope": "UNCHANGED", + "confidentialityImpact": "HIGH", + "integrityImpact": "HIGH", + "availabilityImpact": "HIGH" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-13.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-13.json new file mode 100644 index 00000000..efc09b66 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-13.json @@ -0,0 +1,57 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Inconsistent CVSS (valid example 3)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-10-13", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v2": { + "version": "2.0", + "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C/E:POC", + "baseScore": 9.0, + "accessVector": "NETWORK", + "accessComplexity": "LOW", + "authentication": "NONE", + "confidentialityImpact": "COMPLETE", + "integrityImpact": "COMPLETE", + "availabilityImpact": "COMPLETE", + "exploitability": "PROOF_OF_CONCEPT" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-14.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-14.json new file mode 100644 index 00000000..8bc7d618 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-14.json @@ -0,0 +1,62 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: Inconsistent CVSS (valid example 4)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-10-14", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "scores": [ + { + "products": [ + "CSAFPID-9080700" + ], + "cvss_v4": { + "version": "4.0", + "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "baseScore": 10.0, + "baseSeverity": "CRITICAL", + "attackVector": "NETWORK", + "attackComplexity": "LOW", + "attackRequirements": "NONE", + "privilegesRequired": "NONE", + "userInteraction": "NONE", + "vulnConfidentialityImpact": "HIGH", + "vulnIntegrityImpact": "HIGH", + "vulnAvailabilityImpact": "HIGH", + "subConfidentialityImpact": "HIGH", + "subIntegrityImpact": "HIGH", + "subAvailabilityImpact": "HIGH" + } + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-07.json b/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-07.json new file mode 100644 index 00000000..f1b0f2c8 --- /dev/null +++ b/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-07.json @@ -0,0 +1,56 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Optional test: CVSS for Fixed Products (failing example 7)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-2-19-07", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "product_status": { + "first_fixed": [ + "CSAFPID-9080700" + ] + }, + "scores": [ + { + "cvss_v4": { + "baseScore": 7.3, + "baseSeverity": "HIGH", + "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "version": "4.0" + }, + "products": [ + "CSAFPID-9080700" + ] + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-08.json b/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-08.json new file mode 100644 index 00000000..87f31ded --- /dev/null +++ b/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-08.json @@ -0,0 +1,61 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Optional test: CVSS for Fixed Products (failing example 8)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-2-19-08", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "product_status": { + "first_fixed": [ + "CSAFPID-9080700" + ] + }, + "scores": [ + { + "cvss_v4": { + "baseScore": 7.3, + "baseSeverity": "HIGH", + "modifiedVulnConfidentialityImpact": "NONE", + "modifiedVulnIntegrityImpact": "NONE", + "modifiedVulnAvailabilityImpact": "NONE", + "modifiedSubConfidentialityImpact": "NEGLIGIBLE", + "modifiedSubIntegrityImpact": "NEGLIGIBLE", + "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "version": "4.0" + }, + "products": [ + "CSAFPID-9080700" + ] + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-18.json b/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-18.json new file mode 100644 index 00000000..789c6d2c --- /dev/null +++ b/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-18.json @@ -0,0 +1,56 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Optional test: CVSS for Fixed Products (valid example 8)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-2-19-18", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "product_status": { + "first_fixed": [ + "CSAFPID-9080700" + ] + }, + "scores": [ + { + "cvss_v4": { + "baseScore": 7.3, + "baseSeverity": "HIGH", + "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:N/MVI:N/MVA:N/MSC:N/MSI:N/MSA:N", + "version": "4.0" + }, + "products": [ + "CSAFPID-9080700" + ] + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-19.json b/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-19.json new file mode 100644 index 00000000..07098e88 --- /dev/null +++ b/csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-19.json @@ -0,0 +1,62 @@ +{ + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Optional test: CVSS for Fixed Products (valid example 9)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-2-19-19", + "initial_release_date": "2024-01-24T10:00:00.000Z", + "revision_history": [ + { + "date": "2024-01-24T10:00:00.000Z", + "number": "1", + "summary": "Initial version." + } + ], + "status": "final", + "version": "1" + } + }, + "product_tree": { + "full_product_names": [ + { + "product_id": "CSAFPID-9080700", + "name": "Product A" + } + ] + }, + "vulnerabilities": [ + { + "product_status": { + "first_fixed": [ + "CSAFPID-9080700" + ] + }, + "scores": [ + { + "cvss_v4": { + "baseScore": 7.3, + "baseSeverity": "HIGH", + "modifiedVulnConfidentialityImpact": "NONE", + "modifiedVulnIntegrityImpact": "NONE", + "modifiedVulnAvailabilityImpact": "NONE", + "modifiedSubConfidentialityImpact": "NEGLIGIBLE", + "modifiedSubIntegrityImpact": "NEGLIGIBLE", + "modifiedSubAvailabilityImpact": "NEGLIGIBLE", + "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H", + "version": "4.0" + }, + "products": [ + "CSAFPID-9080700" + ] + } + ] + } + ] +} diff --git a/csaf_2.1/test/validator/data/testcases.json b/csaf_2.1/test/validator/data/testcases.json index 7443b698..6924b4b6 100644 --- a/csaf_2.1/test/validator/data/testcases.json +++ b/csaf_2.1/test/validator/data/testcases.json @@ -107,6 +107,18 @@ { "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-01.json", "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-02.json", + "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-03.json", + "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-04.json", + "valid": false } ], "valid": [ @@ -117,6 +129,26 @@ { "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-12.json", "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-13.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-14.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-15.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-16.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-07-17.json", + "valid": true } ] }, @@ -127,6 +159,36 @@ { "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-01.json", "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-02.json", + "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-03.json", + "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-04.json", + "valid": false + } + ], + "valid": [ + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-11.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-12.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-13.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-14.json", + "valid": true } ] }, @@ -137,6 +199,48 @@ { "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-01.json", "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-02.json", + "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-03.json", + "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-04.json", + "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-05.json", + "valid": false + } + ], + "valid": [ + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-11.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-12.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-13.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-14.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-15.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-09-16.json", + "valid": true } ] }, @@ -147,6 +251,36 @@ { "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-01.json", "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-02.json", + "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-03.json", + "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-04.json", + "valid": false + } + ], + "valid": [ + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-11.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-12.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-13.json", + "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-10-14.json", + "valid": true } ] }, @@ -1085,6 +1219,14 @@ { "name": "optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-06.json", "valid": true + }, + { + "name": "optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-07.json", + "valid": true + }, + { + "name": "optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-08.json", + "valid": true } ], "valid": [ @@ -1115,6 +1257,14 @@ { "name": "optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-17.json", "valid": true + }, + { + "name": "optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-18.json", + "valid": true + }, + { + "name": "optional/oasis_csaf_tc-csaf_2_1-2024-6-2-19-19.json", + "valid": true } ] }, @@ -1139,6 +1289,10 @@ { "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-02.json", "valid": true + }, + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-03.json", + "valid": true } ], "valid": [ @@ -1149,6 +1303,10 @@ { "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-12.json", "valid": true + }, + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-01-13.json", + "valid": true } ] }, @@ -1369,6 +1527,50 @@ "valid": true } ] + }, + { + "id": "6.3.12", + "group": "informative", + "failures": [ + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-01.json", + "valid": true + }, + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-02.json", + "valid": true + }, + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-03.json", + "valid": true + }, + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-04.json", + "valid": true + } + ], + "valid": [ + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-11.json", + "valid": true + }, + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-12.json", + "valid": true + }, + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-13.json", + "valid": true + }, + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-14.json", + "valid": true + }, + { + "name": "informative/oasis_csaf_tc-csaf_2_1-2024-6-3-12-15.json", + "valid": true + } + ] } ] } diff --git a/csaf_2.1/test/validator/run_tests.sh b/csaf_2.1/test/validator/run_tests.sh index 073e7995..cefb49e9 100755 --- a/csaf_2.1/test/validator/run_tests.sh +++ b/csaf_2.1/test/validator/run_tests.sh @@ -6,10 +6,11 @@ CSAF_STRICT_SCHEMA=${STRICT_BUILD}/csaf_strict_schema.json CVSS_20_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v2.0_strict.json CVSS_30_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v3.0_strict.json CVSS_31_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v3.1_strict.json +CVSS_40_STRICT_SCHEMA=csaf_2.1/referenced_schema/first/cvss-v4.0_strict.json VALIDATOR=csaf_2.1/test/validator.py STRICT_GENERATOR=csaf_2.1/test/generate_strict_schema.py TESTPATH=csaf_2.1/test/validator/data/$1/*.json -EXCLUDE=oasis_csaf_tc-csaf_2_1-2024-6-1-08-01.json +EXCLUDE='oasis_csaf_tc-csaf_2_1-2024-6-1-08-01.json|oasis_csaf_tc-csaf_2_1-2024-6-1-08-02.json|oasis_csaf_tc-csaf_2_1-2024-6-1-08-03.json|oasis_csaf_tc-csaf_2_1-2024-6-1-08-04.json|oasis_csaf_tc-csaf_2_1-2024-6-1-09-05.json' EXCLUDE_STRICT=oasis_csaf_tc-csaf_2_1-2024-6-2-20-01.json FAIL=0 @@ -19,7 +20,7 @@ cd `dirname $0`/../../.. validate() { printf "%s" "Testing file $1 against schema ${SCHEMA} ... " - if python3 $VALIDATOR $SCHEMA $1 ${CVSS_20_STRICT_SCHEMA} ${CVSS_30_STRICT_SCHEMA} ${CVSS_31_STRICT_SCHEMA}; then + if python3 $VALIDATOR $SCHEMA $1 ${CVSS_20_STRICT_SCHEMA} ${CVSS_30_STRICT_SCHEMA} ${CVSS_31_STRICT_SCHEMA} ${CVSS_40_STRICT_SCHEMA}; then printf "%s\n" SUCCESS else printf "%s\n" FAILED @@ -29,14 +30,14 @@ validate() { } test_all() { - for i in $(ls -1 ${TESTPATH} | grep -v $EXCLUDE) + for i in $(ls -1 ${TESTPATH} | grep -Ev "${EXCLUDE}") do validate $i done } test_all_strict() { - for i in $(ls -1 ${TESTPATH} | grep -v $EXCLUDE | grep -v ${EXCLUDE_STRICT}) + for i in $(ls -1 ${TESTPATH} | grep -Ev "${EXCLUDE}" | grep -v ${EXCLUDE_STRICT}) do validate $i done diff --git a/csaf_2.1/test/validator/testcases_json_schema.json b/csaf_2.1/test/validator/testcases_json_schema.json index 9d8f99e5..24b0d510 100644 --- a/csaf_2.1/test/validator/testcases_json_schema.json +++ b/csaf_2.1/test/validator/testcases_json_schema.json @@ -62,7 +62,7 @@ "title": "Number of the test", "description": "Contains the section number of the test in the specification.", "type": "string", - "pattern": "^6\\.(([1-3]\\.[1-9])|([12]\\.1[0-9])|(3\\.1[01])|([12]\\.20)|(1\\.2[1-68-9])|(1\\.27\\.([1-9]|10|11))|(1\\.3[0-3]))$" + "pattern": "^6\\.(([1-3]\\.[1-9])|([12]\\.1[0-9])|(3\\.1[0-2])|([12]\\.20)|(1\\.2[1-68-9])|(1\\.27\\.([1-9]|10|11))|(1\\.3[0-3]))$" }, "valid": { "title": "List of valid examples",