Class HintRule

java.lang.Object
org.owasp.dependencycheck.xml.hints.HintRule

@NotThreadSafe public class HintRule extends Object
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 Details

    • HintRule

      public HintRule()
  • Method Details

    • addFilename

      public void addFilename(PropertyType filename)
      Adds the filename evidence to the collection.
      Parameters:
      filename - the filename to add
    • getFileNames

      public 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(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 evidence
      name - the name of the evidence
      value - the value of the evidence
      regex - whether value is a regex
      confidence - the confidence of the evidence
    • getGivenProduct

      public List<EvidenceMatcher> 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 evidence
      name - the name of the evidence
      value - the value of the evidence
      regex - whether value is a regex
      confidence - the confidence of the evidence
    • getGivenVendor

      public List<EvidenceMatcher> getGivenVendor()
      Get the value of givenVendor.
      Returns:
      the value of givenVendor
    • addAddProduct

      public void addAddProduct(String source, String name, String value, Confidence confidence)
      Adds a given product to the list of evidence to add when matched.
      Parameters:
      source - the source of the evidence
      name - the name of the evidence
      value - the value of the evidence
      confidence - the confidence of the evidence
    • getAddProduct

      public List<Evidence> getAddProduct()
      Get the value of addProduct.
      Returns:
      the value of addProduct
    • addAddVersion

      public void addAddVersion(String source, String name, String value, Confidence confidence)
      Adds a given version to the list of evidence to add when matched.
      Parameters:
      source - the source of the evidence
      name - the name of the evidence
      value - the value of the evidence
      confidence - the confidence of the evidence
    • getAddVersion

      public List<Evidence> getAddVersion()
      Get the value of addVersion.
      Returns:
      the value of addVersion
    • addAddVendor

      public void addAddVendor(String source, String name, String value, Confidence confidence)
      Adds a given vendor to the list of evidence to add when matched.
      Parameters:
      source - the source of the evidence
      name - the name of the evidence
      value - the value of the evidence
      confidence - the confidence of the evidence
    • getAddVendor

      public List<Evidence> getAddVendor()
      Get the value of addVendor.
      Returns:
      the value of addVendor
    • 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 evidence
      name - the name of the evidence
      value - the value of the evidence
      regex - whether value is a regex
      confidence - the confidence of the evidence
    • getRemoveVendor

      public List<EvidenceMatcher> 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 evidence
      name - the name of the evidence
      value - the value of the evidence
      regex - whether value is a regex
      confidence - the confidence of the evidence
    • getRemoveProduct

      public List<EvidenceMatcher> 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 evidence
      name - the name of the evidence
      value - the value of the evidence
      regex - whether value is a regex
      confidence - the confidence of the evidence
    • getRemoveVersion

      public List<EvidenceMatcher> 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 evidence
      name - the name of the evidence
      value - the value of the evidence
      regex - whether value is a regex
      confidence - the confidence of the evidence
    • getGivenVersion

      public List<EvidenceMatcher> getGivenVersion()
      Get the value of givenVersion.
      Returns:
      the value of givenVersion