Skip to content

Commit 5cc0832

Browse files
authored
Merge pull request #119 from secvisogram/chore/dependency-updates
Chore/dependency updates
2 parents f6696c6 + 07940dd commit 5cc0832

File tree

9 files changed

+47
-45
lines changed

9 files changed

+47
-45
lines changed

backend/lib/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default async function (fastify) {
1010
openapi: {
1111
info: {
1212
title: 'CSAF Validator Service',
13-
version: '1.3.41',
13+
version: '1.3.42',
1414
description:
1515
'This is a service to validate documents against the CSAF standard.',
1616
contact: {

backend/package-lock.json

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

csaf-validator-lib/lib/mandatoryTests/mandatoryTest_6_1_13.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ export default function mandatoryTest_6_1_13(doc) {
1616
/** @type {any} */ fullProductName,
1717
/** @type {number} */ fullProductNameIndex
1818
) => {
19-
checkProductIdentificationHelperPURL(fullProductName, () => {
19+
checkProductIdentificationHelperPURL(fullProductName, (errorMessage) => {
2020
isValid = false
2121
errors.push({
2222
instancePath: `/product_tree/full_product_names/${fullProductNameIndex}/product_identification_helper/purl`,
23-
message: `invalid purl`,
23+
message: `invalid purl: ${errorMessage}`,
2424
})
2525
})
2626
}
@@ -35,11 +35,11 @@ export default function mandatoryTest_6_1_13(doc) {
3535
) => {
3636
checkProductIdentificationHelperPURL(
3737
relationship.full_product_name,
38-
() => {
38+
(errorMessage) => {
3939
isValid = false
4040
errors.push({
4141
instancePath: `/product_tree/relationships/${relationshipIndex}/full_product_name/product_identification_helper/purl`,
42-
message: `invalid purl`,
42+
message: `invalid purl: ${errorMessage}`,
4343
})
4444
}
4545
)
@@ -48,15 +48,15 @@ export default function mandatoryTest_6_1_13(doc) {
4848
}
4949

5050
if (doc.product_tree) {
51-
checkBranchesForInvalidPURLs(doc.product_tree, ({ branchIndexes }) => {
51+
checkBranchesForInvalidPURLs(doc.product_tree, ({ branchIndexes, errorMessage }) => {
5252
isValid = false
5353
const branchPathPart = branchIndexes.reduce(
5454
(str, index) => `${str}/branches/${index}`,
5555
'/product_tree'
5656
)
5757
errors.push({
5858
instancePath: `${branchPathPart}/product/product_identification_helper/purl`,
59-
message: `invalid purl`,
59+
message: `invalid purl: ${errorMessage}`,
6060
})
6161
})
6262
}
@@ -67,7 +67,7 @@ export default function mandatoryTest_6_1_13(doc) {
6767
/**
6868
*
6969
* @param {any} parent
70-
* @param {(error: { branchIndexes: number[] }) => void} onError
70+
* @param {(error: { branchIndexes: number[], errorMessage: string }) => void} onError
7171
* @param {number[]} [branchIndexes]
7272
*/
7373
const checkBranchesForInvalidPURLs = (parent, onError, branchIndexes = []) => {
@@ -76,9 +76,10 @@ const checkBranchesForInvalidPURLs = (parent, onError, branchIndexes = []) => {
7676
(/** @type {any} */ branch, /** @type {number} */ branchIndex) => {
7777
const currentBranchIndexes = branchIndexes.concat([branchIndex])
7878

79-
checkProductIdentificationHelperPURL(branch.product, () => {
79+
checkProductIdentificationHelperPURL(branch.product, (errorMessage) => {
8080
onError({
8181
branchIndexes: currentBranchIndexes,
82+
errorMessage,
8283
})
8384
})
8485
checkBranchesForInvalidPURLs(branch, onError, currentBranchIndexes)
@@ -89,7 +90,7 @@ const checkBranchesForInvalidPURLs = (parent, onError, branchIndexes = []) => {
8990

9091
/**
9192
* @param {any} productALike
92-
* @param {() => void} onError
93+
* @param {(errorMessage: string) => void} onError
9394
* @returns
9495
*/
9596
const checkProductIdentificationHelperPURL = (productALike, onError) => {
@@ -98,6 +99,7 @@ const checkProductIdentificationHelperPURL = (productALike, onError) => {
9899
try {
99100
PackageURL.fromString(productALike?.product_identification_helper?.purl)
100101
} catch (e) {
101-
onError()
102+
const errorObject = /** @type {{message: string}} */ (e)
103+
onError(errorObject?.message ?? "Unknown purl error")
102104
}
103105
}

csaf-validator-lib/package-lock.json

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

csaf-validator-lib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"cvss2js": "^1.1.0",
2929
"json-pointer": "^0.6.1",
3030
"lodash": "^4.17.21",
31-
"packageurl-js": "^1.1.1",
31+
"packageurl-js": "^2.0.1",
3232
"semver": "^7.5.4",
3333
"undici": "^5.27.0"
3434
},
@@ -48,5 +48,5 @@
4848
"typescript": "^4.9.4",
4949
"xml2js": "^0.5.0"
5050
},
51-
"version": "1.3.40"
51+
"version": "1.3.41"
5252
}

documents/generated/asciidoc/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= CSAF Validator Service
22
secvisogram@bsi.bund.de
3-
1.3.41
3+
1.3.42
44
:toc: left
55
:numbered:
66
:toclevels: 4

documents/generated/html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ <h1>CSAF Validator Service</h1>
183183
<div class="app-desc">This is a service to validate documents against the CSAF standard.</div>
184184
<div class="app-desc">More information: <a href="https://github.com/secvisogram/csaf-validator-service">https://github.com/secvisogram/csaf-validator-service</a></div>
185185
<div class="app-desc">Contact Info: <a href="secvisogram@bsi.bund.de">secvisogram@bsi.bund.de</a></div>
186-
<div class="app-desc">Version: 1.3.41</div>
186+
<div class="app-desc">Version: 1.3.42</div>
187187
<div class="app-desc">BasePath:</div>
188188
<div class="license-info">MIT</div>
189189
<div class="license-url">https://github.com/secvisogram/csaf-validator-service/blob/main/LICENSE</div>

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
"prettier": "^2.8.8",
3333
"typescript": "^5.3.3"
3434
},
35-
"version": "1.3.41"
35+
"version": "1.3.42"
3636
}

0 commit comments

Comments
 (0)