forked from oasis-tcs/csaf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- addresses parts of oasis-tcs#817 - add optional test to detect potential mixing of hard- and software (6.2.31) - add invalid example - add valid examples
- Loading branch information
1 parent
9d9915c
commit 95123f2
Showing
7 changed files
with
442 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-31-01.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"$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": "Optional test: Hardware and Software (failing example 1)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-2-31-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": { | ||
"branches": [ | ||
{ | ||
"branches": [ | ||
{ | ||
"branches": [ | ||
{ | ||
"category": "product_version", | ||
"name": "4.1", | ||
"product": { | ||
"name": "Example Company Controller A Firmware 4.1", | ||
"product_id": "CSAFPID-908070601", | ||
"product_identification_helper": { | ||
"serial_numbers": [ | ||
"143-D-354" | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"category": "product_name", | ||
"name": "Controller A" | ||
} | ||
], | ||
"category": "vendor", | ||
"name": "Example Company" | ||
} | ||
] | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-31-11.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"$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": "Optional test: Hardware and Software (valid example 1)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-2-31-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": { | ||
"branches": [ | ||
{ | ||
"branches": [ | ||
{ | ||
"category": "product_name", | ||
"name": "Controller A", | ||
"product": { | ||
"name": "Example Company Controller A", | ||
"product_id": "CSAFPID-908070601" | ||
} | ||
}, | ||
{ | ||
"branches": [ | ||
{ | ||
"category": "product_version", | ||
"name": "4.1", | ||
"product": { | ||
"name": "Example Company Controller A Firmware 4.1", | ||
"product_id": "CSAFPID-908070602", | ||
"product_identification_helper": { | ||
"hashes": [ | ||
{ | ||
"file_hashes": [ | ||
{ | ||
"algorithm": "sha256", | ||
"value": "3fb9d502d096b1dfbcdfe60eed80ddecd98c8771bf21a82bbe1752735c4dc9e2" | ||
} | ||
], | ||
"filename": "a_4-1.bin" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"category": "product_name", | ||
"name": "Controller A Firmware" | ||
} | ||
], | ||
"category": "vendor", | ||
"name": "Example Company" | ||
} | ||
], | ||
"relationships": [ | ||
{ | ||
"category": "installed_on", | ||
"full_product_name": { | ||
"name": "Example Company Controller A Firmware 4.1 installed on Example Company Controller A", | ||
"product_id": "CSAFPID-908070603" | ||
}, | ||
"product_reference": "CSAFPID-908070602", | ||
"relates_to_product_reference": "CSAFPID-908070601" | ||
} | ||
] | ||
} | ||
} |
160 changes: 160 additions & 0 deletions
160
csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-31-12.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
{ | ||
"$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": "Optional test: Hardware and Software (valid example 2)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-2-31-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": { | ||
"branches": [ | ||
{ | ||
"branches": [ | ||
{ | ||
"branches": [ | ||
{ | ||
"category": "product_version", | ||
"name": "1.0", | ||
"product": { | ||
"name": "Example Company Controller A 1.0", | ||
"product_id": "CSAFPID-908070601", | ||
"product_identification_helper": { | ||
"serial_numbers": [ | ||
"143-D-354" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"category": "product_version", | ||
"name": "2.0", | ||
"product": { | ||
"name": "Example Company Controller A 2.0", | ||
"product_id": "CSAFPID-908070602", | ||
"product_identification_helper": { | ||
"serial_numbers": [ | ||
"354-D-003" | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"category": "product_name", | ||
"name": "Controller A" | ||
}, | ||
{ | ||
"branches": [ | ||
{ | ||
"category": "product_version", | ||
"name": "4.1", | ||
"product": { | ||
"name": "Example Company Controller A Firmware 4.1", | ||
"product_id": "CSAFPID-908070603", | ||
"product_identification_helper": { | ||
"hashes": [ | ||
{ | ||
"file_hashes": [ | ||
{ | ||
"algorithm": "sha256", | ||
"value": "3fb9d502d096b1dfbcdfe60eed80ddecd98c8771bf21a82bbe1752735c4dc9e2" | ||
} | ||
], | ||
"filename": "a_4-1.bin" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"category": "product_version", | ||
"name": "4.2", | ||
"product": { | ||
"name": "Example Company Controller A Firmware 4.2", | ||
"product_id": "CSAFPID-908070604", | ||
"product_identification_helper": { | ||
"hashes": [ | ||
{ | ||
"file_hashes": [ | ||
{ | ||
"algorithm": "sha256", | ||
"value": "0a853ce2337f0608489ac596a308dc5b7b19d35a52b10bf31261586ac368b175" | ||
} | ||
], | ||
"filename": "a_4-2.bin" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"category": "product_name", | ||
"name": "Controller A Firmware" | ||
} | ||
], | ||
"category": "vendor", | ||
"name": "Example Company" | ||
} | ||
], | ||
"relationships": [ | ||
{ | ||
"category": "installed_on", | ||
"full_product_name": { | ||
"name": "Example Company Controller A Firmware 4.1 installed on Example Company Controller A 1.0", | ||
"product_id": "CSAFPID-908070605" | ||
}, | ||
"product_reference": "CSAFPID-908070603", | ||
"relates_to_product_reference": "CSAFPID-908070601" | ||
}, | ||
{ | ||
"category": "installed_on", | ||
"full_product_name": { | ||
"name": "Example Company Controller A Firmware 4.2 installed on Example Company Controller A 1.0", | ||
"product_id": "CSAFPID-908070606" | ||
}, | ||
"product_reference": "CSAFPID-908070604", | ||
"relates_to_product_reference": "CSAFPID-908070601" | ||
}, | ||
{ | ||
"category": "installed_on", | ||
"full_product_name": { | ||
"name": "Example Company Controller A Firmware 4.1 installed on Example Company Controller A 2.0", | ||
"product_id": "CSAFPID-908070607" | ||
}, | ||
"product_reference": "CSAFPID-908070603", | ||
"relates_to_product_reference": "CSAFPID-908070602" | ||
}, | ||
{ | ||
"category": "installed_on", | ||
"full_product_name": { | ||
"name": "Example Company Controller A Firmware 4.2 installed on Example Company Controller A 2.0", | ||
"product_id": "CSAFPID-908070608" | ||
}, | ||
"product_reference": "CSAFPID-908070604", | ||
"relates_to_product_reference": "CSAFPID-908070602" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.