Skip to content

Commit 74deccf

Browse files
authored
Add files via upload
The script supports risk-based vulnerability prioritization by correlating CVEs from patch/vulnerability reports against local KEV JSON and EPSS CSV datasets. It outputs a structured table including asset context, CVE, KEV status, EPSS score, and derived risk rating to help distinguish actively exploited or more likely exploitable vulnerabilities from bulk CVE noise in cumulative updates.
1 parent f94bfcd commit 74deccf

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

generic/lookup.ps1

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
$kev = (Get-Content kev.json | ConvertFrom-Json).vulnerabilities
2+
$epss = Import-Csv epss.csv
3+
4+
$myCves = @(
5+
6+
[PSCustomObject]@{
7+
Asset = "FooBAR - Linux Python setuptools"
8+
CVE = "CVE-2022-40897"
9+
},
10+
11+
)
12+
13+
14+
15+
$result = foreach ($entry in $myCves) {
16+
17+
$cve = $entry.CVE
18+
19+
$kevHit = $kev | Where-Object { $_.cveID -eq $cve }
20+
$epssHit = $epss | Where-Object { $_.cve -eq $cve }
21+
22+
[PSCustomObject]@{
23+
Asset = $entry.Asset
24+
CVE = $cve
25+
KEV = if ($kevHit) { "YES" } else { "NO" }
26+
EPSS = if ($epssHit) { [math]::Round([double]$epssHit.epss, 5) } else { "N/A" }
27+
Risk = switch ($true) {
28+
($epssHit.epss -gt 0.02) { "MEDIUM" }
29+
($epssHit.epss -gt 0.005) { "LOW-MED" }
30+
default { "LOW" }
31+
}
32+
}
33+
}
34+
35+
$result | Format-Table -AutoSize

0 commit comments

Comments
 (0)