Class HintRule
java.lang.Object
org.owasp.dependencycheck.xml.hints.HintRule
A collection of product and vendor evidence to match; if any evidence is
matched the addVendor and addProduct evidence should be added to the
dependency.
- Author:
- Jeremy Long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAddProduct(String source, String name, String value, Confidence confidence) Adds a given product to the list of evidence to add when matched.voidaddAddVendor(String source, String name, String value, Confidence confidence) Adds a given vendor to the list of evidence to add when matched.voidaddAddVersion(String source, String name, String value, Confidence confidence) Adds a given version to the list of evidence to add when matched.voidaddFilename(PropertyType filename) Adds the filename evidence to the collection.voidaddGivenProduct(String source, String name, String value, boolean regex, Confidence confidence) Adds a given product to the list of evidence to matched.voidaddGivenVendor(String source, String name, String value, boolean regex, Confidence confidence) Adds a given vendors to the list of evidence to matched.voidaddGivenVersion(String source, String name, String value, boolean regex, Confidence confidence) Adds a given version to the list of evidence to match.voidaddRemoveProduct(String source, String name, String value, boolean regex, Confidence confidence) Adds a given product to the list of evidence to remove when matched.voidaddRemoveVendor(String source, String name, String value, boolean regex, Confidence confidence) Adds a given vendor to the list of evidence to remove when matched.voidaddRemoveVersion(String source, String name, String value, boolean regex, Confidence confidence) Adds a given version to the list of evidence to remove when matched.Get the value of addProduct.Get the value of addVendor.Get the value of addVersion.Returns the list of fileName evidence to match against.Get the value of givenProduct.Get the value of givenVendor.Get the value of givenVersion.Get the value of removeProduct.Get the value of removeVendor.Get the value of removeVersion.
-
Constructor Details
-
HintRule
public HintRule()
-
-
Method Details
-
addFilename
Adds the filename evidence to the collection.- Parameters:
filename- the filename to add
-
getFileNames
Returns the list of fileName evidence to match against.- Returns:
- the list of fileName evidence to match against
-
addGivenProduct
public void addGivenProduct(String source, String name, String value, boolean regex, Confidence confidence) Adds a given product to the list of evidence to matched.- Parameters:
source- the source of the evidencename- the name of the evidencevalue- the value of the evidenceregex- whether value is a regexconfidence- the confidence of the evidence
-
getGivenProduct
Get the value of givenProduct.- Returns:
- the value of givenProduct
-
addGivenVendor
public void addGivenVendor(String source, String name, String value, boolean regex, Confidence confidence) Adds a given vendors to the list of evidence to matched.- Parameters:
source- the source of the evidencename- the name of the evidencevalue- the value of the evidenceregex- whether value is a regexconfidence- the confidence of the evidence
-
getGivenVendor
Get the value of givenVendor.- Returns:
- the value of givenVendor
-
addAddProduct
Adds a given product to the list of evidence to add when matched.- Parameters:
source- the source of the evidencename- the name of the evidencevalue- the value of the evidenceconfidence- the confidence of the evidence
-
getAddProduct
-
addAddVersion
Adds a given version to the list of evidence to add when matched.- Parameters:
source- the source of the evidencename- the name of the evidencevalue- the value of the evidenceconfidence- the confidence of the evidence
-
getAddVersion
-
addAddVendor
Adds a given vendor to the list of evidence to add when matched.- Parameters:
source- the source of the evidencename- the name of the evidencevalue- the value of the evidenceconfidence- the confidence of the evidence
-
getAddVendor
-
addRemoveVendor
public void addRemoveVendor(String source, String name, String value, boolean regex, Confidence confidence) Adds a given vendor to the list of evidence to remove when matched.- Parameters:
source- the source of the evidencename- the name of the evidencevalue- the value of the evidenceregex- whether value is a regexconfidence- the confidence of the evidence
-
getRemoveVendor
Get the value of removeVendor.- Returns:
- the value of removeVendor
-
addRemoveProduct
public void addRemoveProduct(String source, String name, String value, boolean regex, Confidence confidence) Adds a given product to the list of evidence to remove when matched.- Parameters:
source- the source of the evidencename- the name of the evidencevalue- the value of the evidenceregex- whether value is a regexconfidence- the confidence of the evidence
-
getRemoveProduct
Get the value of removeProduct.- Returns:
- the value of removeProduct
-
addRemoveVersion
public void addRemoveVersion(String source, String name, String value, boolean regex, Confidence confidence) Adds a given version to the list of evidence to remove when matched.- Parameters:
source- the source of the evidencename- the name of the evidencevalue- the value of the evidenceregex- whether value is a regexconfidence- the confidence of the evidence
-
getRemoveVersion
Get the value of removeVersion.- Returns:
- the value of removeVersion
-
addGivenVersion
public void addGivenVersion(String source, String name, String value, boolean regex, Confidence confidence) Adds a given version to the list of evidence to match.- Parameters:
source- the source of the evidencename- the name of the evidencevalue- the value of the evidenceregex- whether value is a regexconfidence- the confidence of the evidence
-
getGivenVersion
Get the value of givenVersion.- Returns:
- the value of givenVersion
-