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#705 - add mandatory test to prevent usage of Max UUID in other TLP than CLEAR - add invalid examples - add valid examples - adapt testcases list and schema
- Loading branch information
1 parent
60a460b
commit 02ae5ba
Showing
12 changed files
with
389 additions
and
1 deletion.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
..._2.1/prose/edit/src/tests-01-mndtr-39-non-public-sharing-group-with-max-uuid.md
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,25 @@ | ||
### Non-Public Sharing Group with Max UUID | ||
|
||
It MUST be tested that a CSAF document using Max UUID as sharing group ID has the TLP label `CLEAR`. | ||
|
||
The relevant path for this test is: | ||
|
||
``` | ||
/document/distribution/tlp/label | ||
``` | ||
|
||
*Example 1 (which fails the test):* | ||
|
||
``` | ||
"distribution": { | ||
"sharing_group": { | ||
"id": "ffffffff-ffff-ffff-ffff-ffffffffffff", | ||
"name": "Public" | ||
}, | ||
"tlp": { | ||
"label": "RED" | ||
} | ||
}, | ||
``` | ||
|
||
> The sharing group uses the Max UUID but the CSAF document is labeled as `TLP:RED`. |
36 changes: 36 additions & 0 deletions
36
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-39-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,36 @@ | ||
{ | ||
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", | ||
"document": { | ||
"category": "csaf_base", | ||
"csaf_version": "2.1", | ||
"distribution": { | ||
"sharing_group": { | ||
"id": "ffffffff-ffff-ffff-ffff-ffffffffffff", | ||
"name": "Public" | ||
}, | ||
"tlp": { | ||
"label": "RED" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Non-Public Sharing Group with Max UUID (failing example 1)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-39-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" | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-39-02.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,36 @@ | ||
{ | ||
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", | ||
"document": { | ||
"category": "csaf_base", | ||
"csaf_version": "2.1", | ||
"distribution": { | ||
"sharing_group": { | ||
"id": "ffffffff-ffff-ffff-ffff-ffffffffffff", | ||
"name": "Public" | ||
}, | ||
"tlp": { | ||
"label": "AMBER+STRICT" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Non-Public Sharing Group with Max UUID (failing example 2)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-39-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" | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-39-03.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,36 @@ | ||
{ | ||
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", | ||
"document": { | ||
"category": "csaf_base", | ||
"csaf_version": "2.1", | ||
"distribution": { | ||
"sharing_group": { | ||
"id": "ffffffff-ffff-ffff-ffff-ffffffffffff", | ||
"name": "Public" | ||
}, | ||
"tlp": { | ||
"label": "AMBER" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Non-Public Sharing Group with Max UUID (failing example 3)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-39-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" | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-39-04.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,36 @@ | ||
{ | ||
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", | ||
"document": { | ||
"category": "csaf_base", | ||
"csaf_version": "2.1", | ||
"distribution": { | ||
"sharing_group": { | ||
"id": "ffffffff-ffff-ffff-ffff-ffffffffffff", | ||
"name": "Public" | ||
}, | ||
"tlp": { | ||
"label": "GREEN" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Non-Public Sharing Group with Max UUID (failing example 4)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-39-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" | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-39-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,36 @@ | ||
{ | ||
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", | ||
"document": { | ||
"category": "csaf_base", | ||
"csaf_version": "2.1", | ||
"distribution": { | ||
"sharing_group": { | ||
"id": "86c81730-1a06-478d-82d4-978e41eb332f", | ||
"name": "Example Sharing Group 1" | ||
}, | ||
"tlp": { | ||
"label": "RED" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Non-Public Sharing Group with Max UUID (valid example 1)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-39-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" | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-39-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,35 @@ | ||
{ | ||
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", | ||
"document": { | ||
"category": "csaf_base", | ||
"csaf_version": "2.1", | ||
"distribution": { | ||
"sharing_group": { | ||
"id": "5868d6be-b28a-404e-a245-0b5093b31b8b" | ||
}, | ||
"tlp": { | ||
"label": "AMBER+STRICT" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Non-Public Sharing Group with Max UUID (valid example 2)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-39-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" | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-39-13.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,36 @@ | ||
{ | ||
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", | ||
"document": { | ||
"category": "csaf_base", | ||
"csaf_version": "2.1", | ||
"distribution": { | ||
"sharing_group": { | ||
"id": "234efd7a-a3a1-4897-8296-633d5d37659c", | ||
"name": "Example Sharing Group 3" | ||
}, | ||
"tlp": { | ||
"label": "AMBER" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Non-Public Sharing Group with Max UUID (valid example 3)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-39-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" | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-39-14.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,32 @@ | ||
{ | ||
"$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": "GREEN" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Non-Public Sharing Group with Max UUID (valid example 4)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-39-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" | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-39-15.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,36 @@ | ||
{ | ||
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json", | ||
"document": { | ||
"category": "csaf_base", | ||
"csaf_version": "2.1", | ||
"distribution": { | ||
"sharing_group": { | ||
"id": "ffffffff-ffff-ffff-ffff-ffffffffffff", | ||
"name": "Public" | ||
}, | ||
"tlp": { | ||
"label": "CLEAR" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Non-Public Sharing Group with Max UUID (valid example 5)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-39-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" | ||
} | ||
} | ||
} |
Oops, something went wrong.