-
Notifications
You must be signed in to change notification settings - Fork 42
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 #782 - add mandatory test 6.1.45 for inconsistent disclosure date - add valid examples - add invalid examples
- Loading branch information
1 parent
a77be1e
commit 7d9d451
Showing
8 changed files
with
275 additions
and
1 deletion.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
csaf_2.1/prose/edit/src/tests-01-mndtr-45-inconsistent-disclosure-date.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,46 @@ | ||
### Inconsistent Disclosure Date | ||
|
||
For each vulnerability, it MUST be tested that the `disclosure_date` is not newer than the `date` of the newest item of the `revision_history` | ||
if the document is labeled `TLP:CLEAR` and the document status is `final` or `interim`. | ||
As the timestamps might use different timezones, the sorting MUST take timezones into account. | ||
|
||
The relevant path for this test is: | ||
|
||
``` | ||
/vulnerabilities[]/disclosure_date | ||
``` | ||
|
||
*Example 1 (which fails the test):* | ||
|
||
``` | ||
"document": { | ||
// ... | ||
"distribution": { | ||
"tlp": { | ||
"label": "CLEAR" | ||
} | ||
}, | ||
// ... | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
// ... | ||
"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" | ||
} | ||
}, | ||
"vulnerabilities": [ | ||
{ | ||
"disclosure_date": "2024-02-24T10:00:00.000Z" | ||
} | ||
] | ||
``` | ||
|
||
> The document is labeled `TLP:CLEAR` and in status `final` but the `disclosure_date` is newer than the date of newest item in the `revision_history`. |
37 changes: 37 additions & 0 deletions
37
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-45-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,37 @@ | ||
{ | ||
"$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: Inconsistent Disclosure Date (failing example 1)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-45-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" | ||
} | ||
}, | ||
"vulnerabilities": [ | ||
{ | ||
"disclosure_date": "2024-02-24T10:00:00.000Z" | ||
} | ||
] | ||
} |
42 changes: 42 additions & 0 deletions
42
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-45-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,42 @@ | ||
{ | ||
"$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: Inconsistent Disclosure Date (failing example 2)", | ||
"tracking": { | ||
"current_release_date": "2024-02-29T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-45-02", | ||
"initial_release_date": "2024-01-24T10:00:00.000Z", | ||
"revision_history": [ | ||
{ | ||
"date": "2024-01-24T10:00:00.000Z", | ||
"number": "1", | ||
"summary": "Initial version." | ||
}, | ||
{ | ||
"date": "2024-02-29T10:00:00.000Z", | ||
"number": "2", | ||
"summary": "Second version." | ||
} | ||
], | ||
"status": "final", | ||
"version": "2" | ||
} | ||
}, | ||
"vulnerabilities": [ | ||
{ | ||
"disclosure_date": "2025-02-26T10:00:00.000Z" | ||
} | ||
] | ||
} |
37 changes: 37 additions & 0 deletions
37
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-45-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,37 @@ | ||
{ | ||
"$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: Inconsistent Disclosure Date (valid example 1)", | ||
"tracking": { | ||
"current_release_date": "2024-01-24T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-45-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" | ||
} | ||
}, | ||
"vulnerabilities": [ | ||
{ | ||
"disclosure_date": "2024-01-24T10:00:00.000Z" | ||
} | ||
] | ||
} |
42 changes: 42 additions & 0 deletions
42
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-45-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,42 @@ | ||
{ | ||
"$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: Inconsistent Disclosure Date (valid example 2)", | ||
"tracking": { | ||
"current_release_date": "2024-02-29T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-45-12", | ||
"initial_release_date": "2024-01-24T10:00:00.000Z", | ||
"revision_history": [ | ||
{ | ||
"date": "2024-01-24T10:00:00.000Z", | ||
"number": "1", | ||
"summary": "Initial version." | ||
}, | ||
{ | ||
"date": "2024-02-29T10:00:00.000Z", | ||
"number": "2", | ||
"summary": "Second version." | ||
} | ||
], | ||
"status": "final", | ||
"version": "2" | ||
} | ||
}, | ||
"vulnerabilities": [ | ||
{ | ||
"disclosure_date": "2024-02-26T10:00:00.000Z" | ||
} | ||
] | ||
} |
42 changes: 42 additions & 0 deletions
42
csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-45-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,42 @@ | ||
{ | ||
"$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": "AMBER+STRICT" | ||
} | ||
}, | ||
"publisher": { | ||
"category": "other", | ||
"name": "OASIS CSAF TC", | ||
"namespace": "https://csaf.io" | ||
}, | ||
"title": "Mandatory test: Inconsistent Disclosure Date (valid example 3)", | ||
"tracking": { | ||
"current_release_date": "2024-02-29T10:00:00.000Z", | ||
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-45-13", | ||
"initial_release_date": "2024-01-24T10:00:00.000Z", | ||
"revision_history": [ | ||
{ | ||
"date": "2024-01-24T10:00:00.000Z", | ||
"number": "1", | ||
"summary": "Initial version." | ||
}, | ||
{ | ||
"date": "2024-02-29T10:00:00.000Z", | ||
"number": "2", | ||
"summary": "Second version." | ||
} | ||
], | ||
"status": "final", | ||
"version": "2" | ||
} | ||
}, | ||
"vulnerabilities": [ | ||
{ | ||
"disclosure_date": "2025-02-26T10:00:00.000Z" | ||
} | ||
] | ||
} |
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
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