From f6225501f650b8cd197c0963dd7a2b468209304a Mon Sep 17 00:00:00 2001 From: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com> Date: Mon, 13 Jan 2025 12:01:43 +0100 Subject: [PATCH] Test 6.1.13 - addresses parts of oasis-tcs/csaf#774, oasis-tcs/csaf#781, oasis-tcs/csaf#341 - add valid example - add invalid example for oci case (not namespace allowed) --- ...oasis_csaf_tc-csaf_2_1-2024-6-1-13-02.json | 45 +++++++++++++++++++ ...oasis_csaf_tc-csaf_2_1-2024-6-1-13-12.json | 45 +++++++++++++++++++ csaf_2.1/test/validator/data/testcases.json | 8 ++++ 3 files changed, 98 insertions(+) create mode 100644 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-02.json create mode 100644 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-12.json diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-02.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-02.json new file mode 100644 index 00000000..73fda409 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-02.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "distribution": { + "tlp": { + "label": "CLEAR" + } + }, + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: PURL (failing example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-13-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": [ + { + "name": "Product A", + "product_id": "CSAFPID-9080700", + "product_identification_helper": { + "purls": [ + "pkg:oci/com.example/product-A@sha256%3Add134261219b2" + ] + } + } + ] + } +} diff --git a/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-12.json b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-12.json new file mode 100644 index 00000000..784f4907 --- /dev/null +++ b/csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-12.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", + "document": { + "category": "csaf_base", + "csaf_version": "2.1", + "distribution": { + "tlp": { + "label": "CLEAR" + } + }, + "publisher": { + "category": "other", + "name": "OASIS CSAF TC", + "namespace": "https://csaf.io" + }, + "title": "Mandatory test: PURL (valid example 2)", + "tracking": { + "current_release_date": "2024-01-24T10:00:00.000Z", + "id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-13-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": [ + { + "name": "Product A", + "product_id": "CSAFPID-9080700", + "product_identification_helper": { + "purls": [ + "pkg:oci/product-A@sha256%3Add134261219b2?repository_url=https://registry.example.com" + ] + } + } + ] + } +} diff --git a/csaf_2.1/test/validator/data/testcases.json b/csaf_2.1/test/validator/data/testcases.json index e558c0f3..db8340b2 100644 --- a/csaf_2.1/test/validator/data/testcases.json +++ b/csaf_2.1/test/validator/data/testcases.json @@ -369,12 +369,20 @@ { "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-01.json", "valid": false + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-02.json", + "valid": false } ], "valid": [ { "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-11.json", "valid": true + }, + { + "name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-13-12.json", + "valid": false } ] },