Skip to content

Commit

Permalink
don't insert new vuln row on updates
Browse files Browse the repository at this point in the history
  • Loading branch information
memeeerit committed Nov 30, 2023
1 parent 17d0850 commit cd13c91
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ private CompositeVulnerability handleReconcilerJob(String cveId) {
int newRawCount = wrapper.setNewToUneval();
// get an existing vuln from prior reconciliation if one exists
CompositeVulnerability existing = vulnRepo.getCompositeVulnerability(cveId);
boolean newVuln = existing == null;
// filter in waves by priority
FilterReturn firstWaveReturn = filterHandler.runFilters(wrapper.firstFilterWave()); //high prio sources
FilterReturn secondWaveReturn = filterHandler.runFilters(wrapper.secondFilterWave()); //either empty or low prio depending on filter status of high prio sources
Expand All @@ -196,7 +197,7 @@ private CompositeVulnerability handleReconcilerJob(String cveId) {
// we do this because publish dates and mod dates should be determined by all sources, not just those with good descriptions
out.setPotentialSources(rawVulns);

vulnRepo.insertOrUpdateVulnerabilityFull(out, existing == null);
vulnRepo.insertOrUpdateVulnerabilityFull(out, newVuln);

logger.info("Finished job for cveId " + out.getCveId());

Expand Down

0 comments on commit cd13c91

Please sign in to comment.