Skip to content

Commit

Permalink
Improved logging of ignored advisories due to withdrawal.
Browse files Browse the repository at this point in the history
  • Loading branch information
MagielBruntink committed Jan 25, 2024
1 parent 071215b commit 3fb58a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void parseGHResponse(JSONHandler.GHResponse response, HashMap<String, Vul
for (JSONHandler.GHAdvisory advisory : response.getData().getSecurityAdvisories().getNodes()) {
logger.info("Parsing information of Vulnerability with ID - " + advisory.getAdvisoryId());
if(advisory.getWithdrawnAt() != null) {
logger.info("Vulnerability with ID was withdrawn at " + advisory.getWithdrawnAt() + " , skipping.");
logger.info("Vulnerability " + advisory.getAdvisoryId() + " was withdrawn at date " + advisory.getWithdrawnAt() + ", skipping.");
}
else {
var v = new Vulnerability(advisory.getAdvisoryId());
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/parsers/ghAPISecurityWithdrawn.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "https://github.com/advisories/GHSA-7hwc-46rm-65jh"
}
],
"withdrawnAt" : "placeholder date",
"withdrawnAt" : "<<placeholder date>>",
"vulnerabilities": {
"nodes": [
{
Expand Down

0 comments on commit 3fb58a2

Please sign in to comment.