Skip to content

Commit 72b2282

Browse files
Merge pull request #173 from secvisogram/chore/dependency-updates
Chore/dependency updates
2 parents 2911022 + 6d77f79 commit 72b2282

28 files changed

+810
-97
lines changed

backend/package-lock.json

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

csaf-validator-lib/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ The following tests are not yet implemented and therefore missing:
316316
- Mandatory Test 6.1.27.18
317317
- Mandatory Test 6.1.42
318318
- Mandatory Test 6.1.44
319-
- Mandatory Test 6.1.45
320319
- Mandatory Test 6.1.46
321320
- Mandatory Test 6.1.47
322321
- Mandatory Test 6.1.48
@@ -434,6 +433,7 @@ export const mandatoryTest_6_1_39: DocumentTest
434433
export const mandatoryTest_6_1_40: DocumentTest
435434
export const mandatoryTest_6_1_41: DocumentTest
436435
export const mandatoryTest_6_1_43: DocumentTest
436+
export const mandatoryTest_6_1_45: DocumentTest
437437
export const mandatoryTest_6_1_52: DocumentTest
438438
```
439439
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import addFormats from 'ajv-formats'
2+
import Ajv2020 from 'ajv/dist/2020.js'
3+
import cvss_v2_0 from '../schemas/cvss-v2.0.js'
4+
import cvss_v3_0 from '../schemas/cvss-v3.0.js'
5+
import cvss_v3_1 from '../schemas/cvss-v3.1.js'
6+
import cvss_v4_0 from './csafAjv/cvss-v4.0.js'
7+
import meta from './csafAjv/meta.js'
8+
import formatAssertion from './csafAjv/format-assertion.js'
9+
import ssvcDecisionPointValueSelection from './csafAjv/Decision_Point_Value_Selection-1-0-1.js'
10+
import ssvcDecisionPoint from './csafAjv/Decision_Point-1-0-1.js'
11+
import { timestampRegex, validateTimestamp } from './dateHelper.js'
12+
13+
const csafAjv = new Ajv2020({ strict: false, allErrors: true })
14+
addFormats(csafAjv)
15+
csafAjv.addSchema(cvss_v2_0, 'https://www.first.org/cvss/cvss-v2.0.json')
16+
csafAjv.addSchema(cvss_v3_0, 'https://www.first.org/cvss/cvss-v3.0.json')
17+
csafAjv.addSchema(cvss_v3_1, 'https://www.first.org/cvss/cvss-v3.1.json')
18+
csafAjv.addSchema(cvss_v4_0, 'https://www.first.org/cvss/cvss-v4.0.json')
19+
csafAjv.addSchema(
20+
meta,
21+
'https://docs.oasis-open.org/csaf/csaf/v2.1/schema/meta.json'
22+
)
23+
csafAjv.addSchema(
24+
formatAssertion,
25+
'https://json-schema.org/draft/2020-12/meta/format-assertion'
26+
)
27+
csafAjv.addSchema(
28+
ssvcDecisionPointValueSelection,
29+
'https://certcc.github.io/SSVC/data/schema/v1/Decision_Point_Value_Selection-1-0-1.schema.json'
30+
)
31+
csafAjv.addSchema(
32+
ssvcDecisionPoint,
33+
'https://certcc.github.io/SSVC/data/schema/v1/Decision_Point-1-0-1.schema.json'
34+
)
35+
36+
csafAjv.addFormat('date-time', {
37+
type: 'string',
38+
validate: (v) => {
39+
return timestampRegex.test(v) && validateTimestamp(v)
40+
},
41+
})
42+
43+
export default csafAjv

csaf-validator-lib/lib/shared/csafAjv/Decision_Point-1-0-1.js renamed to csaf-validator-lib/csaf_2_1/csafAjv/Decision_Point-1-0-1.js

File renamed without changes.

csaf-validator-lib/lib/shared/csafAjv/Decision_Point_Value_Selection-1-0-1.js renamed to csaf-validator-lib/csaf_2_1/csafAjv/Decision_Point_Value_Selection-1-0-1.js

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

csaf-validator-lib/lib/shared/csafAjv/format-assertion.js renamed to csaf-validator-lib/csaf_2_1/csafAjv/format-assertion.js

File renamed without changes.

0 commit comments

Comments
 (0)