dependency-check / dependency-check/DependencyCheck

Parse found_by and reported_by in NpmAuditParser.parseAdvisory

Open
#1,678 0 comments 0 reactions 0 assignees View on GitHub
enhancement npm
Dominant language
Java
Stars
7.7k
Forks
1.4k
Avg merge
9d 22h
Merged PRs (30d)
13

Description

In NpmAuditParser.parseAdvisory this code is commented:
//advisory.setFoundBy(object.optString("author", null));
//advisory.setReportedBy(object.optString("author", null));

To parse found_by and reported_by you need something as:

JSONObject foundBy=object.optJSONObject("found_by");
JSONObject reportedBy=object.optJSONObject("reported_by");

if(foundBy!=null){
advisory.setFoundBy(foundBy.optString("name"));
}
if(reportedBy!=null){
advisory.setReportedBy(reportedBy.optString("name"));
}

Could you include it on next releases?

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.