diff --git a/README.md b/README.md index 2f16af0f..dd186e2e 100644 --- a/README.md +++ b/README.md @@ -369,7 +369,6 @@ The following tests are not yet implemented and therefore missing: - Informative Test 6.3.19.5 - Informative Test 6.3.20 - Informative Test 6.3.21.2 -- Informative Test 6.3.21.3 - Informative Test 6.3.21.4 - Informative Test 6.3.21.5 - Informative Test 6.3.21.6 @@ -523,6 +522,7 @@ export const informativeTest_6_3_11: DocumentTest export const informativeTest_6_3_12: DocumentTest export const informativeTest_6_3_18: DocumentTest export const informativeTest_6_3_21_1: DocumentTest +export const informativeTest_6_3_21_3: DocumentTest ``` [(back to top)](#bsi-csaf-validator-lib) diff --git a/csaf_2_1/informativeTests.js b/csaf_2_1/informativeTests.js index 22d3a07d..2fef9c62 100644 --- a/csaf_2_1/informativeTests.js +++ b/csaf_2_1/informativeTests.js @@ -14,3 +14,4 @@ export { informativeTest_6_3_5 } from './informativeTests/informativeTest_6_3_5. export { informativeTest_6_3_12 } from './informativeTests/informativeTest_6_3_12.js' export { informativeTest_6_3_18 } from './informativeTests/informativeTest_6_3_18.js' export { informativeTest_6_3_21_1 } from './informativeTests/informativeTest_6_3_21_1.js' +export { informativeTest_6_3_21_3 } from './informativeTests/informativeTest_6_3_21_3.js' diff --git a/csaf_2_1/informativeTests/informativeTest_6_3_21_3.js b/csaf_2_1/informativeTests/informativeTest_6_3_21_3.js new file mode 100644 index 00000000..7183b351 --- /dev/null +++ b/csaf_2_1/informativeTests/informativeTest_6_3_21_3.js @@ -0,0 +1,21 @@ +import { walkPath } from '../../lib/walkPaths.js' + +/** + * This implements the informative test 6.3.21.3 of the CSAF 2.1 standard. + * @param {any} doc + * @returns + */ +export async function informativeTest_6_3_21_3(doc) { + const ctx = { + infos: /** @type {Array<{ message: string; instancePath: string }>} */ ([]), + } + + await walkPath(doc, '/document/x_extensions[]', async (instancePath) => { + ctx.infos.push({ + instancePath, + message: `The element "$.document.x_extensions" exist.`, + }) + }) + + return ctx +} diff --git a/tests/csaf_2_1/oasis.js b/tests/csaf_2_1/oasis.js index 0f97584b..ba95ca5f 100644 --- a/tests/csaf_2_1/oasis.js +++ b/tests/csaf_2_1/oasis.js @@ -62,7 +62,6 @@ const excluded = [ '6.3.19.5', '6.3.20', '6.3.21.2', - '6.3.21.3', '6.3.21.4', '6.3.21.5', '6.3.21.6',