Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc fixes #205

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,11 @@ public Set<CompositeVulnerability> attachNvdVulns(Set<CompositeVulnerability> vu
String cveId = null;
String lastCveId = null;
Map<String, List<String>> sourceMap = new HashMap<>();
boolean foundOne = false;
while (res.next()) { // goes through each matching cve_id, creates the NvdVuln and attaches it to the CompVuln
// Store last cve id to determine duplicate entries
lastCveId = cveId;
foundOne = true;

// Update cveId value
cveId = res.getString("cve_id");
Expand All @@ -256,7 +258,7 @@ public Set<CompositeVulnerability> attachNvdVulns(Set<CompositeVulnerability> vu
}

// If only one result was found
if(lastCveId == null) {
if(lastCveId == null && foundOne) {
NvdVulnerability nvdVuln = new NvdVulnerability(
cveId,
res.getTimestamp("published_date"),
Expand Down
2 changes: 1 addition & 1 deletion reconciler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN mvn dependency:go-offline --projects=reconciler

ADD reconciler/src/main reconciler/src/main

RUN mvn package -Dmaven.test.skip=true --projects=reconciler
RUN mvn package -Dmaven.test.skip=true --projects=db,reconciler

### Reconciler Run Stage
FROM openjdk:11-jre-slim
Expand Down
Loading