Skip to content

Commit

Permalink
fix: showing all reference tags in reports (#6259)
Browse files Browse the repository at this point in the history
  • Loading branch information
clayton-piscopo committed Dec 8, 2023
1 parent f1fe21e commit d2b81a3
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -1227,12 +1227,12 @@ private void updateVulnerabilityInsertReferences(int vulnerabilityId, DefCveItem
if (cve.getCve().getReferences() != null) {
for (Reference r : cve.getCve().getReferences()) {
insertReference.setInt(1, vulnerabilityId);
Optional<String> name = Optional.empty();
String name = null;
if (r.getTags() != null) {
name = r.getTags().stream().sorted().findFirst();
name = r.getTags().stream().sorted().collect(Collectors.joining(",")).toUpperCase().replaceAll("\\s", "_");
}
if (name.isPresent()) {
insertReference.setString(2, name.get());
if (name != null) {
insertReference.setString(2, name);
} else {
insertReference.setNull(2, java.sql.Types.VARCHAR);
}
Expand Down

0 comments on commit d2b81a3

Please sign in to comment.