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 18965edc5..08ddd9819 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 @@ -177,6 +177,33 @@ public class Dependency implements Comparable { this.filePath = filePath; } + /** + * The file name to display in reports. + */ + private String displayName = null; + + /** + * Sets the file name to display in reports. + * + * @param displayName the name to display + */ + public void setDisplayFileName(String displayName) { + this.displayName = displayName; + } + + /** + * Returns the file name to display in reports; if no display file name has been set it will default to the actual + * file name. + * + * @return the file name to display + */ + public String getDisplayFileName() { + if (displayName == null) { + return this.fileName; + } + return this.displayName; + } + /** *

* Gets the file path of the dependency.