Class DescriptionEcosystemMapper
java.lang.Object
org.owasp.dependencycheck.data.nvd.ecosystem.DescriptionEcosystemMapper
Helper utility for mapping CVEs to their ecosystems based on the description.
- Author:
- skjolber
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEcosystem(io.github.jeremylong.openvulnerability.client.nvd.DefCveItem cve) Returns the ecosystem if identified by English description from the CVE data.getEcosystem(String multicase) Determines the ecosystem for the given string.protected static boolean[]getPrefixesFor(String str) protected voidincrement(int i, int[] ecosystemMap) protected static booleanisExtension(String str, int begin, int end) protected static booleanisLowercaseAscii(String multicase, int start, int end) static booleanTests if the string is a URL by looking for '://'.protected static StringAhoCorasickDoubleArrayTrie<EcosystemHint>
-
Constructor Details
-
DescriptionEcosystemMapper
public DescriptionEcosystemMapper()Constructs a new description ecosystem mapper.
-
-
Method Details
-
getPrefixesFor
-
toAhoCorasickDoubleArrayTrie
-
isExtension
-
isLowercaseAscii
-
isURL
Tests if the string is a URL by looking for '://'.- Parameters:
c- the text to test.begin- the position in the string to begin searching; note the search is decreasing to 0- Returns:
trueif `://` is found; otherwisefalse
-
increment
protected void increment(int i, int[] ecosystemMap) -
getEcosystem
Returns the ecosystem if identified by English description from the CVE data.- Parameters:
cve- the CVE data- Returns:
- the ecosystem if identified
-
getEcosystem
-