Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Silva97 committed Dec 4, 2022
2 parents a11fc28 + f4cb525 commit b43f459
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ async function main(): Promise<void> {
return;
}

if (
cve.descriptions[0].value.indexOf('DO NOT USE THIS CANDIDATE NUMBER') != -1
) {
console.log(`[INFO] ${cve.id} ignored because it was withdrawn`);
return;
}

const cvssMetric =
typeof cve.metrics['cvssMetricV31'] != 'undefined'
? cve.metrics['cvssMetricV31'][0]
Expand All @@ -52,7 +59,7 @@ async function main(): Promise<void> {

cve.weaknesses?.forEach((weakness: NvdWeakness) => {
weakness.description.forEach((description) => {
if (description.value == 'NVD-CWE-noinfo') {
if (description.value.substring(0, 4) != 'CWE-') {
return;
}

Expand Down Expand Up @@ -89,5 +96,5 @@ async function main(): Promise<void> {
`${references?.join('\n')}\n`,
});

console.log('[PUBLISHED] ' + cve.id);
console.log(`[INFO] ${cve.id} published`);
}

0 comments on commit b43f459

Please sign in to comment.