Skip to content

Commit 0b4d3c4

Browse files
committed
Ignore withdrawn advisories
1 parent 9cfdcd2 commit 0b4d3c4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/malwareMatcher.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ export function matchMalware(advisories: MalwareAdvisoryNode[], sboms: Repositor
7777
// Build advisory index keyed by ecosystem::name
7878
const index = new Map<string, MalwareAdvisoryNode[]>();
7979
for (const adv of advisories) {
80+
// Ignore advisories that have been withdrawn
81+
// Assumes MalwareAdvisoryNode has an optional withdrawnAt (string | null | undefined)
82+
if ((adv as unknown as { withdrawnAt?: string | null }).withdrawnAt) continue;
8083
for (const vuln of adv.vulnerabilities) {
8184
if (!vuln.name || !vuln.ecosystem) continue;
8285
const key = `${vuln.ecosystem}::${vuln.name}`.toLowerCase();

0 commit comments

Comments
 (0)