Class AppSecUtils

java.lang.Object
com.vaadin.appsec.backend.AppSecUtils

public class AppSecUtils extends Object
Helper class to provide information about dependencies and vulnerabilities.
  • Method Details

    • getEcosystem

      public static Ecosystem getEcosystem(org.cyclonedx.model.Component component)
      Gets ecosystem from a BOM component.
      Parameters:
      component - the component
      Returns:
      the ecosystem the component belongs to
    • getDepGroupAndName

      public static String getDepGroupAndName(Dependency dependency)
      Gets the concatenated group and name of a BOM dependency.
      Parameters:
      dependency - the dependency
      Returns:
      the concatenated group and name
    • bomRefToMavenGroupAndName

      public static String bomRefToMavenGroupAndName(String bomRef)
      Gets the concatenated group and name from a Maven BOM reference string.
      Parameters:
      bomRef - the BOM reference string
      Returns:
      the concatenated group and name
    • bomRefToNpmGroupAndName

      public static String bomRefToNpmGroupAndName(String bomRef)
      Gets the concatenated group and name from a npm BOM reference string.
      Parameters:
      bomRef - the BOM reference string
      Returns:
      the concatenated group and name
    • bomRefToVersion

      public static String bomRefToVersion(String bomRef)
      Gets the version from a BOM reference string.
      Parameters:
      bomRef - the BOM reference string
      Returns:
      the version
    • getVulnDepGroup

      public static String getVulnDepGroup(Affected affected)
      Gets the group of a dependency the vulnerability belongs to.
      Parameters:
      affected - the affected dependency
      Returns:
      the dependency group
    • getVulnDepName

      public static String getVulnDepName(Affected affected)
      Gets the name of a dependency the vulnerability belongs to.
      Parameters:
      affected - the affected dependency
      Returns:
      the dependency name