Skip to content

Commit 88b0c75

Browse files
UlisesGasconRafaelGSS
authored andcommitted
feat: extended affectedEnvironments validation to support ALL as value
See nodejs/security-wg@e3b8f8a
1 parent 6acd1ff commit 88b0c75

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ function getVulnerabilityList (currentVersion, data, systemEnvironment) {
117117
!satisfies(currentVersion, vuln.patched)
118118
) && (
119119
(!systemEnvironment || !Array.isArray(vuln.affectedEnvironments)) ||
120-
vuln.affectedEnvironments.includes(systemEnvironment)
120+
vuln.affectedEnvironments.includes(systemEnvironment) ||
121+
vuln.affectedEnvironments.includes('all')
121122
)
122123
) {
123124
list.push(`${bold(vuln.cve)}: ${vuln.overview}\n${bold('Patched versions')}: ${vuln.patched}`)

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ function getVulnerabilityList (currentVersion, data, systemEnvironment) {
7070
!satisfies(currentVersion, vuln.patched)
7171
) && (
7272
(!systemEnvironment || !Array.isArray(vuln.affectedEnvironments)) ||
73-
vuln.affectedEnvironments.includes(systemEnvironment)
73+
vuln.affectedEnvironments.includes(systemEnvironment) ||
74+
vuln.affectedEnvironments.includes('all')
7475
)
7576
) {
7677
list.push(`${bold(vuln.cve)}: ${vuln.overview}\n${bold('Patched versions')}: ${vuln.patched}`)

0 commit comments

Comments
 (0)