mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 00:29:21 +01:00
Merge branch 'master' of github.com:jeremylong/DependencyCheck
Former-commit-id: b4c8b0aceafa5975733d800161a68fc95d36667d
This commit is contained in:
@@ -209,6 +209,29 @@ public class DependencyCheckScanAgent {
|
|||||||
this.autoUpdate = autoUpdate;
|
this.autoUpdate = autoUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* flag indicating whether or not to generate a report of findings.
|
||||||
|
*/
|
||||||
|
private boolean generateReport = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of generateReport.
|
||||||
|
*
|
||||||
|
* @return the value of generateReport
|
||||||
|
*/
|
||||||
|
public boolean isGenerateReport() {
|
||||||
|
return generateReport;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of generateReport.
|
||||||
|
*
|
||||||
|
* @param generateReport new value of generateReport
|
||||||
|
*/
|
||||||
|
public void setGenerateReport(boolean generateReport) {
|
||||||
|
this.generateReport = generateReport;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The report format to be generated (HTML, XML, VULN, ALL). This configuration option has no affect if using this
|
* The report format to be generated (HTML, XML, VULN, ALL). This configuration option has no affect if using this
|
||||||
* within the Site plugin unless the externalReport is set to true. Default is HTML.
|
* within the Site plugin unless the externalReport is set to true. Default is HTML.
|
||||||
@@ -945,11 +968,13 @@ public class DependencyCheckScanAgent {
|
|||||||
* @throws org.owasp.dependencycheck.exception.ScanAgentException thrown if there is an exception executing the
|
* @throws org.owasp.dependencycheck.exception.ScanAgentException thrown if there is an exception executing the
|
||||||
* scan.
|
* scan.
|
||||||
*/
|
*/
|
||||||
public void execute() throws ScanAgentException {
|
public Engine execute() throws ScanAgentException {
|
||||||
Engine engine = null;
|
Engine engine = null;
|
||||||
try {
|
try {
|
||||||
engine = executeDependencyCheck();
|
engine = executeDependencyCheck();
|
||||||
generateExternalReports(engine, new File(this.reportOutputDirectory));
|
if (this.generateReport) {
|
||||||
|
generateExternalReports(engine, new File(this.reportOutputDirectory));
|
||||||
|
}
|
||||||
if (this.showSummary) {
|
if (this.showSummary) {
|
||||||
showSummary(engine.getDependencies());
|
showSummary(engine.getDependencies());
|
||||||
}
|
}
|
||||||
@@ -966,6 +991,7 @@ public class DependencyCheckScanAgent {
|
|||||||
engine.cleanup();
|
engine.cleanup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return engine;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user