Skip to content

Commit

Permalink
log and skip empty cve ids
Browse files Browse the repository at this point in the history
  • Loading branch information
memeeerit authored and ctevse committed Nov 9, 2023
1 parent aa6c86e commit c181520
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crawler/src/main/java/edu/rit/se/nvip/crawler/CveCrawler.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ public void visit(Page page) {
updateCrawlerReport("No CVEs found at " + pageURL + "!");
} else {
for (RawVulnerability vulnerability : vulnerabilityList) {
if (vulnerability.getCveId().isEmpty()) {
log.info("A cve found by the {} parser at the URL {} has an empty cve_id and will not be inserted", vulnerability.getParserType(), vulnerability.getSourceURL());
continue;
}
if (foundCVEs.get(vulnerability.getCveId()) != null) {
foundCVEs.get(vulnerability.getCveId()).add(vulnerability);
} else {
Expand Down

0 comments on commit c181520

Please sign in to comment.