diff --git a/crawler/src/main/java/edu/rit/se/nvip/crawler/CveCrawler.java b/crawler/src/main/java/edu/rit/se/nvip/crawler/CveCrawler.java index e0af24e35..6bb4cc5d6 100644 --- a/crawler/src/main/java/edu/rit/se/nvip/crawler/CveCrawler.java +++ b/crawler/src/main/java/edu/rit/se/nvip/crawler/CveCrawler.java @@ -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 {