code: public Engine execute() throws ScanAgentException {
          Engine engine = null;
          try {
              engine = executeDependencyCheck();
              if (!this.updateOnly) {
                  if (this.generateReport) {
                      generateExternalReports(engine, new File(this.reportOutputDirectory));
                  }
                  if (this.showSummary) {
                      showSummary(engine.getDependencies());
                  }
                  if (this.failBuildOnCVSS <= 10) {
                      checkForFailure(engine.getDependencies());
                  }
              }
          } catch (ExceptionCollection ex) {
              if (ex.isFatal()) {
                  LOGGER.error("A fatal exception occurred during analysis; analysis has stopped. Please see the debug log for more details.");
                  LOGGER.debug("", ex);
              }
              throw new ScanAgentException("One or more exceptions occurred during analysis; please see the debug log for more details.", ex);
          } finally {
              settings.cleanup(true);
              if (engine != null) {
                  engine.close();
              }
          }
          return engine;
      }
docs: Executes the dependency-check and generates the report.
  
  @return a reference to the engine used to perform the scan.
  @throws org.owasp.dependencycheck.exception.ScanAgentException thrown if
  there is an exception executing the scan.