Class HintRule
- java.lang.Object
-
- org.owasp.dependencycheck.xml.hints.HintRule
-
@NotThreadSafe public class HintRule extends java.lang.ObjectA 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 Constructor Description HintRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAddProduct(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence)Adds a given product to the list of evidence to add when matched.voidaddAddVendor(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence)Adds a given vendor to the list of evidence to add when matched.voidaddAddVersion(java.lang.String source, java.lang.String name, java.lang.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(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)Adds a given product to the list of evidence to matched.voidaddGivenVendor(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)Adds a given vendors to the list of evidence to matched.voidaddGivenVersion(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)Adds a given version to the list of evidence to match.voidaddRemoveProduct(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)Adds a given product to the list of evidence to remove when matched.voidaddRemoveVendor(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)Adds a given vendor to the list of evidence to remove when matched.voidaddRemoveVersion(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)Adds a given version to the list of evidence to remove when matched.java.util.List<Evidence>getAddProduct()Get the value of addProduct.java.util.List<Evidence>getAddVendor()Get the value of addVendor.java.util.List<Evidence>getAddVersion()Get the value of addVersion.java.util.List<PropertyType>getFileNames()Returns the list of fileName evidence to match against.java.util.List<EvidenceMatcher>getGivenProduct()Get the value of givenProduct.java.util.List<EvidenceMatcher>getGivenVendor()Get the value of givenVendor.java.util.List<EvidenceMatcher>getGivenVersion()Get the value of givenVersion.java.util.List<EvidenceMatcher>getRemoveProduct()Get the value of removeProduct.java.util.List<EvidenceMatcher>getRemoveVendor()Get the value of removeVendor.java.util.List<EvidenceMatcher>getRemoveVersion()Get the value of removeVersion.
-
-
-
Method Detail
-
addFilename
public void addFilename(PropertyType filename)
Adds the filename evidence to the collection.- Parameters:
filename- the filename to add
-
getFileNames
public java.util.List<PropertyType> getFileNames()
Returns the list of fileName evidence to match against.- Returns:
- the list of fileName evidence to match against
-
addGivenProduct
public void addGivenProduct(java.lang.String source, java.lang.String name, java.lang.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
public java.util.List<EvidenceMatcher> getGivenProduct()
Get the value of givenProduct.- Returns:
- the value of givenProduct
-
addGivenVendor
public void addGivenVendor(java.lang.String source, java.lang.String name, java.lang.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
public java.util.List<EvidenceMatcher> getGivenVendor()
Get the value of givenVendor.- Returns:
- the value of givenVendor
-
addAddProduct
public void addAddProduct(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence)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
public java.util.List<Evidence> getAddProduct()
Get the value of addProduct.- Returns:
- the value of addProduct
-
addAddVersion
public void addAddVersion(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence)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
public java.util.List<Evidence> getAddVersion()
Get the value of addVersion.- Returns:
- the value of addVersion
-
addAddVendor
public void addAddVendor(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence)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
public java.util.List<Evidence> getAddVendor()
Get the value of addVendor.- Returns:
- the value of addVendor
-
addRemoveVendor
public void addRemoveVendor(java.lang.String source, java.lang.String name, java.lang.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
public java.util.List<EvidenceMatcher> getRemoveVendor()
Get the value of removeVendor.- Returns:
- the value of removeVendor
-
addRemoveProduct
public void addRemoveProduct(java.lang.String source, java.lang.String name, java.lang.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
public java.util.List<EvidenceMatcher> getRemoveProduct()
Get the value of removeProduct.- Returns:
- the value of removeProduct
-
addRemoveVersion
public void addRemoveVersion(java.lang.String source, java.lang.String name, java.lang.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
public java.util.List<EvidenceMatcher> getRemoveVersion()
Get the value of removeVersion.- Returns:
- the value of removeVersion
-
addGivenVersion
public void addGivenVersion(java.lang.String source, java.lang.String name, java.lang.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
public java.util.List<EvidenceMatcher> getGivenVersion()
Get the value of givenVersion.- Returns:
- the value of givenVersion
-
-