mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-17 23:04:07 +01:00
Ruby Bundler: Added URL to report.
This commit is contained in:
@@ -198,9 +198,11 @@ public class RubyBundleAuditAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
while (rdr.ready()) {
|
while (rdr.ready()) {
|
||||||
final String nextLine = rdr.readLine();
|
final String nextLine = rdr.readLine();
|
||||||
i++;
|
i++;
|
||||||
|
boolean appendToDescription = false;
|
||||||
if (null == nextLine) {
|
if (null == nextLine) {
|
||||||
break;
|
break;
|
||||||
} else if (nextLine.startsWith(NAME)) {
|
} else if (nextLine.startsWith(NAME)) {
|
||||||
|
appendToDescription = false;
|
||||||
gem = nextLine.substring(NAME.length());
|
gem = nextLine.substring(NAME.length());
|
||||||
if (map.containsKey(gem)) {
|
if (map.containsKey(gem)) {
|
||||||
dependency = map.get(gem);
|
dependency = map.get(gem);
|
||||||
@@ -265,6 +267,12 @@ public class RubyBundleAuditAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
ref.setUrl(url);
|
ref.setUrl(url);
|
||||||
vulnerability.getReferences().add(ref);
|
vulnerability.getReferences().add(ref);
|
||||||
}
|
}
|
||||||
|
LOGGER.info(String.format("bundle-audit (%s): %s", parentName, nextLine));
|
||||||
|
} else if (nextLine.startsWith("Description: ")) {
|
||||||
|
appendToDescription = true;
|
||||||
|
vulnerability.setDescription("Vulnerability obtained from bundle-audit. NVD links may not work.\n\n");
|
||||||
|
} else if (appendToDescription) {
|
||||||
|
vulnerability.setDescription(vulnerability.getDescription() + nextLine + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user