All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.danielsomerfield.cvecheck.owaspdependencycheck.reporting.OWASPScanReportGenerator.groovy Maven / Gradle / Ivy

There is a newer version: 0.6.2-100
Show newest version
package com.danielsomerfield.cvecheck.owaspdependencycheck.reporting

import com.danielsomerfield.cvecheck.owaspdependencycheck.OWASPScanResult
import com.danielsomerfield.util.io.OutputStreamFactory
import com.danielsomerfield.cvecheck.reporting.ScanReportGenerator
import org.owasp.dependencycheck.reporting.ReportGenerator
import org.owasp.dependencycheck.reporting.ReportGenerator.Format

class OWASPScanReportGenerator implements ScanReportGenerator {

  private ReportGenerator reportGenerator;
  private Format format;
  private OutputStreamFactory outputStreamFactory;

  def OWASPScanReportGenerator(ReportGenerator reportGenerator, Format format, OutputStreamFactory outputStreamFactory) {
    this.reportGenerator = reportGenerator
    this.format = format;
    this.outputStreamFactory = outputStreamFactory;
  }

  @Override
  def generateReport(OWASPScanResult result) {
    outputStreamFactory.getOutputStream().withCloseable { OutputStream out ->
      this.reportGenerator.generateReports(out, format)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy