Skip to content

Commit 49575ad

Browse files
feat(CSAF2.1): #199 - test 6.3.2 for CSAF 2.1 - changed optionalProperties to properties in inputSchema
1 parent 7d0670f commit 49575ad

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

csaf_2_1/informativeTests/informativeTest_6_3_2.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const inputSchema = /** @type {const} */ ({
88
vulnerabilities: {
99
elements: {
1010
additionalProperties: true,
11-
properties: {},
1211
optionalProperties: {
1312
metrics: {
1413
elements: {
@@ -19,7 +18,6 @@ const inputSchema = /** @type {const} */ ({
1918
optionalProperties: {
2019
cvss_v3: {
2120
additionalProperties: true,
22-
properties: {},
2321
optionalProperties: {
2422
version: { type: 'string' },
2523
vectorString: { type: 'string' },

tests/csaf_2_1/informativeTest_6_3_2.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,26 @@ describe('informativeTest_6_3_2', function () {
55
it('only runs on relevant documents', function () {
66
assert.equal(informativeTest_6_3_2({ document: 'mydoc' }).infos.length, 0)
77
})
8+
it('test input schema with not considered json object in vulnerabilities', function () {
9+
assert.equal(
10+
informativeTest_6_3_2({
11+
document: {},
12+
vulnerabilities: [
13+
{},
14+
{
15+
metrics: [
16+
{
17+
content: {
18+
cvss_v3: {
19+
version: '3.0',
20+
},
21+
},
22+
},
23+
],
24+
},
25+
],
26+
}).infos.length,
27+
1
28+
)
29+
})
830
})

0 commit comments

Comments
 (0)