Class ReportTool

java.lang.Object
org.owasp.dependencycheck.reporting.ReportTool

public class ReportTool extends Object
Utilities to format items in the Velocity reports.
Author:
Jeremy Long
  • Constructor Details

    • ReportTool

      public ReportTool()
  • Method Details

    • identifierToSuppressionId

      public String identifierToSuppressionId(Identifier id)
      Converts an identifier into the Suppression string when possible.
      Parameters:
      id - the Identifier to format
      Returns:
      the formatted suppression string when possible; otherwise null.
    • estimateSeverity

      public Double estimateSeverity(String severity)
      Estimates the CVSS V2 score for the given severity.
      Parameters:
      severity - the text representation of a score
      Returns:
      the estimated score
    • convertToSarifRules

      public Collection<SarifRule> convertToSarifRules(List<Dependency> dependencies)
      Creates a list of SARIF rules for the SARIF report.
      Parameters:
      dependencies - the list of dependencies to extract rules from
      Returns:
      the list of SARIF rules
    • normalizeSeverity

      public String normalizeSeverity(Object sev)
      Map severity names from various sources to a standard set of severity names.
      Parameters:
      sev - the severity name
      Returns:
      the standardized severity name (critical, high, medium, low, unknown)
    • normalizeSeverity

      public String normalizeSeverity(String sev)
      Map severity names from various sources to a standard set of severity names.
      Parameters:
      sev - the severity name
      Returns:
      the standardized severity name (critical, high, medium, low, unknown)