Package com.vaadin.appsec.backend
Class AppSecUtils
java.lang.Object
com.vaadin.appsec.backend.AppSecUtils
Helper class to provide information about dependencies and vulnerabilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringbomRefToMavenGroupAndName(String bomRef) Gets the concatenated group and name from a Maven BOM reference string.static StringbomRefToNpmGroupAndName(String bomRef) Gets the concatenated group and name from a npm BOM reference string.static StringbomRefToVersion(String bomRef) Gets the version from a BOM reference string.static StringgetDepGroupAndName(Dependency dependency) Gets the concatenated group and name of a BOM dependency.static EcosystemgetEcosystem(org.cyclonedx.model.Component component) Gets ecosystem from a BOM component.static StringgetVulnDepGroup(Affected affected) Gets the group of a dependency the vulnerability belongs to.static StringgetVulnDepName(Affected affected) Gets the name of a dependency the vulnerability belongs to.
-
Method Details
-
getEcosystem
Gets ecosystem from a BOM component.- Parameters:
component- the component- Returns:
- the ecosystem the component belongs to
-
getDepGroupAndName
Gets the concatenated group and name of a BOM dependency.- Parameters:
dependency- the dependency- Returns:
- the concatenated group and name
-
bomRefToMavenGroupAndName
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
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
Gets the version from a BOM reference string.- Parameters:
bomRef- the BOM reference string- Returns:
- the version
-
getVulnDepGroup
Gets the group of a dependency the vulnerability belongs to.- Parameters:
affected- the affected dependency- Returns:
- the dependency group
-
getVulnDepName
Gets the name of a dependency the vulnerability belongs to.- Parameters:
affected- the affected dependency- Returns:
- the dependency name
-