devops-kung-fu / devops-kung-fu/bomber
EPSS enricher will only return the first 100 results
- Dominant language
- Go
- Stars
- 624
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
The current enricher makes a single request https://github.com/devops-kung-fu/bomber/blob/main/lib/enrichment/epss.go
For an SBOM with more than 100 vulnerabilities this will hit the detail limits of the API, which is 100 records returned. It does appear that the limit can be increased using `?limit=X` but it's possible you'll hit length constrains before then.
This likely needs to parse the returned structure (which contains the limit, offsite and total) and then page through this, taking into account any URL length constrains (at least CVEs are fixed length).
```
http "https://api.first.org/data/v1/epss?cve=CVE-2022-46161,CVE-2022-46162&limit=1000"
{
"access": "public",
"data": [
{
"cve": "CVE-2022-46162",
"date": "2022-12-11",
"epss": "0.008850000",
"percentile": "0.271180000"
},
{
"cve": "CVE-2022-46161",
"date": "2022-12-11",
"epss": "0.014400000",
"percentile": "0.729830000"
}
],
"limit": 1000,
"offset": 0,
"status": "OK",
"status-code": 200,
"total": 2,
"version": "1.0"
}
```
Contributor guide
Assessment
This issue has not been assessed yet.