diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java index 636640a1b..38a628baa 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java @@ -247,6 +247,20 @@ public class Dependency implements Comparable { this.identifiers.add(i); } + /** + * Adds an entry to the list of detected Identifiers for the dependency file. + * + * @param type the type of identifier (such as CPE) + * @param value the value of the identifier + * @param url the URL of the identifier + * @param confidence the confidence in the Identifier being accurate + */ + public void addIdentifier(String type, String value, String url, Confidence confidence) { + final Identifier i = new Identifier(type, value, url); + i.setConfidence(confidence); + this.identifiers.add(i); + } + /** * Adds an entry to the list of detected Identifiers for the dependency file. *