diff --git a/dependency-check-ant/src/main/java/org/owasp/dependencycheck/taskdefs/SuppressionFile.java b/dependency-check-ant/src/main/java/org/owasp/dependencycheck/taskdefs/SuppressionFile.java index 0cc3c3364..55f385986 100644 --- a/dependency-check-ant/src/main/java/org/owasp/dependencycheck/taskdefs/SuppressionFile.java +++ b/dependency-check-ant/src/main/java/org/owasp/dependencycheck/taskdefs/SuppressionFile.java @@ -35,8 +35,17 @@ public class SuppressionFile { * * @param text the simple content. */ - public final void addText(String text) { - this.path = text; + //public final void addConfigured(String text) { + // this.path = text; + //} + + /** + * Sets the path to the suppression file. + * + * @param path + */ + public void setPath(String path) { + this.path = path; } /** diff --git a/dependency-check-ant/src/site/markdown/configuration.md b/dependency-check-ant/src/site/markdown/configuration.md index 22f9a2164..16324e574 100644 --- a/dependency-check-ant/src/site/markdown/configuration.md +++ b/dependency-check-ant/src/site/markdown/configuration.md @@ -17,8 +17,7 @@ the project's dependencies. - - path/to/suppression.xml + @@ -46,12 +45,13 @@ proxyUsername | Defines the proxy user name. proxyPassword | Defines the proxy password. |   connectionTimeout | The URL Connection Timeout. |   enableExperimental | Enable the [experimental analyzers](../analyzers/index.html). If not enabled the experimental analyzers (see below) will not be loaded or used. | false +suppressionFile | The file path to the XML suppression file \- used to suppress [false positives](../general/suppression.html). |   The following nested elements can be set on the dependency-check task. -Property | Description | Default Value -----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------- -suppressionFile | The file path to the XML suppression file \- used to suppress [false positives](../general/suppression.html). Element can be specified multiple times. |   +Element | Property | Description | Default Value +------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------- +suppressionFile | path | The file path to the XML suppression file \- used to suppress [false positives](../general/suppression.html). Element can be specified multiple times. |   Analyzer Configuration ==================== diff --git a/dependency-check-ant/src/test/resources/build.xml b/dependency-check-ant/src/test/resources/build.xml index 472b48749..0a33d854f 100644 --- a/dependency-check-ant/src/test/resources/build.xml +++ b/dependency-check-ant/src/test/resources/build.xml @@ -78,8 +78,8 @@ reportOutputDirectory="${project.build.directory}/suppression-report.html" autoupdate="false" failBuildOnCVSS="3"> - ${project.build.directory}/test-classes/test-suppression1.xml - ${project.build.directory}/test-classes/test-suppression2.xml + + @@ -107,7 +107,7 @@ autoupdate="false" failBuildOnCVSS="3" suppressionFile="${project.build.directory}/test-classes/test-suppression1.xml"> - ${project.build.directory}/test-classes/test-suppression2.xml +