Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
- addresses parts of #754, #341
- add valid testfile for 6.1.8 in CSAF 2.0 and CSAF 2.1 that does not contain CVSS
  • Loading branch information
tschmidtb51 committed Jul 31, 2024
1 parent 2d777fb commit b39cd0b
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"document": {
"category": "csaf_base",
"csaf_version": "2.0",
"publisher": {
"category": "other",
"name": "OASIS CSAF TC",
"namespace": "https://csaf.io"
},
"title": "Mandatory test: Invalid CVSS (valid example 4)",
"tracking": {
"current_release_date": "2021-07-21T10:00:00.000Z",
"id": "OASIS_CSAF_TC-CSAF_2.0-2021-6-1-08-14",
"initial_release_date": "2021-07-21T10:00:00.000Z",
"revision_history": [
{
"date": "2021-07-21T10: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": [
{
"notes": [
{
"category": "summary",
"text": "A vulnerability without CVSS passes the test as well."
}
]
}
]
}
4 changes: 4 additions & 0 deletions csaf_2.0/test/validator/data/testcases.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
{
"name": "mandatory/oasis_csaf_tc-csaf_2_0-2021-6-1-08-13.json",
"valid": true
},
{
"name": "mandatory/oasis_csaf_tc-csaf_2_0-2021-6-1-08-14.json",
"valid": true
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$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: Invalid CVSS (valid example 5)",
"tracking": {
"current_release_date": "2024-01-24T10:00:00.000Z",
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-08-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": [
{
"notes": [
{
"category": "summary",
"text": "A vulnerability without CVSS passes the test as well."
}
]
}
]
}
4 changes: 4 additions & 0 deletions csaf_2.1/test/validator/data/testcases.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@
{
"name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-14.json",
"valid": true
},
{
"name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-08-15.json",
"valid": true
}
]
},
Expand Down

0 comments on commit b39cd0b

Please sign in to comment.