Class EvidenceMatcher
java.lang.Object
org.owasp.dependencycheck.xml.hints.EvidenceMatcher
EvidenceMatcher can match one or more
Evidences. By using regular
expressions for some fields and allowing omission of Evidence fields it can
be used to match more than one occurrence of evidence to enable hints that
work for a range of similar false positives/false negatives.
The EvidenceMatcher is used for processing Evidences of a project's
dependencies in conjunction with the <given> and <remove>
clauses of the hints file.- Author:
- Hans Aikema
-
Constructor Summary
ConstructorsConstructorDescriptionEvidenceMatcher(String source, String name, String value, boolean regex, Confidence confidence) Creates a new EvidenceMatcher objects. -
Method Summary
-
Constructor Details
-
EvidenceMatcher
public EvidenceMatcher(String source, String name, String value, boolean regex, Confidence confidence) Creates a new EvidenceMatcher objects.- Parameters:
source- the source of the evidence, a source that isnullindicates any source should match.name- the non-nullname of the evidence.value- the non-nullvalue of the evidence.regex- whether value is a regex.confidence- the confidence of the evidence, a confidence that isnullindicates any confidence should match.
-
-
Method Details
-
matches
Tests whether the given Evidence matches this EvidenceMatcher.- Parameters:
evidence- the evidence to match- Returns:
- whether the evidence matches this matcher
-
toString
-