-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
I am using the command-line scanner in a ci-pipeline. (Used version Dependency-Check Core version 5.3.0)
I was searching for parameter to rename the output-files, but was not able to find something.
For example from dependency-check-report.xml to dependency-check-app1.xml
After a quick look into ReportGenerator.java, it looks like it is static.
public static File getReportFile(String outputLocation, Format format) {
File outFile = new File(outputLocation);
if (outFile.getParentFile() == null) {
outFile = new File(".", outputLocation);
}
final String pathToCheck = outputLocation.toLowerCase();
if (format == Format.XML && !pathToCheck.endsWith(".xml")) {
return new File(outFile, "dependency-check-report.xml");
}
if (format == Format.HTML && !pathToCheck.endsWith(".html") && !pathToCheck.endsWith(".htm")) {
return new File(outFile, "dependency-check-report.html");
}
if (format == Format.JSON && !pathToCheck.endsWith(".json")) {
return new File(outFile, "dependency-check-report.json");
}
if (format == Format.CSV && !pathToCheck.endsWith(".csv")) {
return new File(outFile, "dependency-check-report.csv");
}
if (format == Format.JUNIT && !pathToCheck.endsWith(".xml")) {
return new File(outFile, "dependency-check-junit.xml");
}
return outFile;
}Could it be a option to add a variable to the Settings.java?
So it would be possible to overwrite it with a properties.file.
Reactions are currently unavailable