feat(CSAF2.1): #302 add recommendedTest_6_2_20.js#463
feat(CSAF2.1): #302 add recommendedTest_6_2_20.js#463
Conversation
# Conflicts: # csaf_2_1/csafAjv.js
|
Coverage after merging 198-csaf-2.1-recommended-test-6.2.20 into main
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rainer-exxcellent
left a comment
There was a problem hiding this comment.
In test Recommended Test: Additional Properties (failing example 1)
the same error seams to be added twice
This issue occurs because the csaf_2_1_strict/schema.json uses oneOf for cvss_v3. However, if the test file matches both schemas, both validations fail — resulting in two error messages. |
tschmidtb51
left a comment
There was a problem hiding this comment.
Please see my comments.
*Note: CVSSv4 might change again - depending on @domachine investigation. I suggest to leave that PR for now and update once oasis-tcs/csaf#1287 is resolved.
| baseScore: { $ref: '#/definitions/noneScoreType' }, | ||
| baseSeverity: { $ref: '#/definitions/noneSeverityType' }, | ||
| threatScore: { $ref: '#/definitions/noneScoreType' }, | ||
| threatSeverity: { $ref: '#/definitions/noneSeverityType' }, | ||
| environmentalScore: { $ref: '#/definitions/noneScoreType' }, | ||
| environmentalSeverity: { $ref: '#/definitions/noneSeverityType' }, |
There was a problem hiding this comment.
This is not part of the CVSSv4!
| 'JSON Schema for Common Vulnerability Scoring System version 4.0, Revision 1', | ||
| $id: 'https://www.first.org/cvss/cvss-v4.0.1.json?20250704', | ||
| type: 'object', | ||
| additionalProperties: false, |
There was a problem hiding this comment.
You can't use additionalProperties if there are multiple schemas involved.
| additionalProperties: false, | |
| unevaluatedProperties: false, |
| if (!validateStrictSchema(doc)) { | ||
| const additionalPropertiesErrors = | ||
| validateStrictSchema.errors?.filter( | ||
| (e) => e.keyword === 'additionalProperties' |
There was a problem hiding this comment.
Please check whether that is still true for CVSSv4.
https://github.com/oasis-tcs/csaf/blob/master/csaf_2.1/prose/share/csaf-v2.1-draft.md#additional-properties