diff --git a/analyzers/archive-analyzer.html b/analyzers/archive-analyzer.html
index aab7add4a..acada5f73 100644
--- a/analyzers/archive-analyzer.html
+++ b/analyzers/archive-analyzer.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Archive Analyzer
@@ -59,9 +59,9 @@
Archive Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/assembly-analyzer.html b/analyzers/assembly-analyzer.html
index 71843a75e..83b852012 100644
--- a/analyzers/assembly-analyzer.html
+++ b/analyzers/assembly-analyzer.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Assembly Analyzer
@@ -59,9 +59,9 @@
Assembly Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/autoconf.html b/analyzers/autoconf.html
index f5071deb2..36e0207d8 100644
--- a/analyzers/autoconf.html
+++ b/analyzers/autoconf.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Autoconf Analyzer
@@ -59,9 +59,9 @@
Autoconf Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/central-analyzer.html b/analyzers/central-analyzer.html
index 722eaab9b..80820bda2 100644
--- a/analyzers/central-analyzer.html
+++ b/analyzers/central-analyzer.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Central Analyzer
@@ -59,9 +59,9 @@
Central Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/cmake.html b/analyzers/cmake.html
index a62fcacd4..306145b4a 100644
--- a/analyzers/cmake.html
+++ b/analyzers/cmake.html
@@ -1,13 +1,13 @@
-
+
dependency-check – CMake Analyzer
@@ -59,9 +59,9 @@
CMake Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/composer-lock.html b/analyzers/composer-lock.html
index 38b18d90e..368dac24a 100644
--- a/analyzers/composer-lock.html
+++ b/analyzers/composer-lock.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Composer Lock Analyzer
@@ -59,9 +59,9 @@
Composer Lock Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/index.html b/analyzers/index.html
index 62722b1bf..801f29e13 100644
--- a/analyzers/index.html
+++ b/analyzers/index.html
@@ -1,13 +1,13 @@
-
+
dependency-check – File Type Analyzers
@@ -59,9 +59,9 @@
File Type Analyzers
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/jar-analyzer.html b/analyzers/jar-analyzer.html
index e7d032d9a..fb89865e3 100644
--- a/analyzers/jar-analyzer.html
+++ b/analyzers/jar-analyzer.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Jar Analyzer
@@ -59,9 +59,9 @@
Jar Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/nexus-analyzer.html b/analyzers/nexus-analyzer.html
index 32c9d4f3a..a6eee2e2f 100644
--- a/analyzers/nexus-analyzer.html
+++ b/analyzers/nexus-analyzer.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Nexus Analyzer
@@ -59,9 +59,9 @@
Nexus Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/nodejs.html b/analyzers/nodejs.html
index 690dc0302..7faaa7eac 100644
--- a/analyzers/nodejs.html
+++ b/analyzers/nodejs.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Node.js Analyzer
@@ -59,9 +59,9 @@
Node.js Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/nuspec-analyzer.html b/analyzers/nuspec-analyzer.html
index 4b0a40e24..de07e3c57 100644
--- a/analyzers/nuspec-analyzer.html
+++ b/analyzers/nuspec-analyzer.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Nuspec Analyzer
@@ -59,9 +59,9 @@
Nuspec Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/openssl.html b/analyzers/openssl.html
index 11c188d3e..f6c6cfcfc 100644
--- a/analyzers/openssl.html
+++ b/analyzers/openssl.html
@@ -1,13 +1,13 @@
-
+
dependency-check – OpenSSL Analyzer
@@ -59,9 +59,9 @@
OpenSSL Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/python.html b/analyzers/python.html
index e8dee681f..1d91fb0f0 100644
--- a/analyzers/python.html
+++ b/analyzers/python.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Python Analyzer
@@ -59,9 +59,9 @@
Python Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/analyzers/ruby-gemspec.html b/analyzers/ruby-gemspec.html
index 6cf6d439e..e8e78db6c 100644
--- a/analyzers/ruby-gemspec.html
+++ b/analyzers/ruby-gemspec.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Ruby Gemspec Analyzer
@@ -59,9 +59,9 @@
Ruby Gemspec Analyzer
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/current.txt b/current.txt
index e21e727f9..c9929e36a 100644
--- a/current.txt
+++ b/current.txt
@@ -1 +1 @@
-1.4.0
\ No newline at end of file
+1.4.2
\ No newline at end of file
diff --git a/data/cachenvd.html b/data/cachenvd.html
index d743827cc..ef5f34e1b 100644
--- a/data/cachenvd.html
+++ b/data/cachenvd.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Snapshotting the NVD
@@ -59,9 +59,9 @@
Snapshotting the NVD
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/data/database.html b/data/database.html
index 6e1856983..d85954cb5 100644
--- a/data/database.html
+++ b/data/database.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Using a Database Server
@@ -59,9 +59,9 @@
Using a Database Server
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -244,11 +244,12 @@
Using a Database Server
WARNING: This discusses an advanced setup and you may run into issues.
Out of the box dependency-check uses a local H2 database. The location of the database file is configured using the data directory configuration option (see CLI ).
-Some organizations may want to use a more robust centralized database. Currently, H2 in server mode , MySQL, PostgreSQL, Oracle, and MS SQL Server have been tested. In general, the setup is done by creating a central database, setting up a single instance of dependency-check, which can connect to the Internet, that is run in update-only mode once a day. Then the other dependency-check clients can connect, using a read-only connection, to perform the analysis. Please note that if the clients are unable to access the Internet the analysis may result in a few false negatives; see the note about Central here .
+Some organizations may want to use a more robust centralized database. Currently, H2 in server mode , MySQL, MariaDB, PostgreSQL, Oracle, and MS SQL Server have been tested. In general, the setup is done by creating a central database, setting up a single instance of dependency-check, which can connect to the Internet, that is run in update-only mode once a day. Then the other dependency-check clients can connect, using a read-only connection, to perform the analysis. Please note that if the clients are unable to access the Internet the analysis may result in a few false negatives; see the note about Central here .
To setup a centralized database the following generalized steps can be used:
-Create the database and tables using either one of the intialization scripts found here .
+Create the database and tables using either initialize.sql
+ or one of the other initialization scripts found here .
The account that the clients will connect using must have select granted on the tables.
@@ -268,9 +269,52 @@
The connection string, database user name, and the database user's password will also need to be configured.
-Depending on the database being used, you may need to customize the dbStatements.properties . Alternatively to modifying the dbStatements.properties it is now possible to use a dialect file to support other databases. See dbStatements_h2.properties as an example.
+Depending on the database being used, you may need to customize the dbStatements.properties . Alternatively to modifying the dbStatements.properties it is possible to use a dialect file to support other databases. See dbStatements_h2.properties as an example.
Also, if using an external database you will need to manually upgrade the schema. See database upgrades for more information.
-As always, feel free to open an issue or post a question to the dependency-check google group .
+
+
Examples
+
The following example shows how to use the Maven plugin with MariaDB:
+
+
+
<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>dummy</groupId>
+ <artifactId>dummy</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.owasp</groupId>
+ <artifactId>dependency-check-maven</artifactId>
+ <version>1.4.2</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.mariadb.jdbc</groupId>
+ <artifactId>mariadb-java-client</artifactId>
+ <version>1.4.6</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <databaseDriverName>org.mariadb.jdbc.Driver</databaseDriverName>
+ <connectionString>jdbc:mariadb://my.cvedb.host/cvedb</connectionString>
+ <databaseUser>depscan</databaseUser>
+ <databasePassword>NotReallyMyDbPassword</databasePassword>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>update-only</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
+
diff --git a/data/index.html b/data/index.html
index 157484ce9..af6a8d577 100644
--- a/data/index.html
+++ b/data/index.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Internet Access Required
@@ -59,9 +59,9 @@
Internet Access Required
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/data/mirrornvd.html b/data/mirrornvd.html
index bbe3f485e..947695f96 100644
--- a/data/mirrornvd.html
+++ b/data/mirrornvd.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Mirroring the NVD from NIST
@@ -59,9 +59,9 @@
Mirroring the NVD from NIST
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/data/proxy.html b/data/proxy.html
index 88659f7c3..e591d11ab 100644
--- a/data/proxy.html
+++ b/data/proxy.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Proxy Configuration
@@ -59,9 +59,9 @@
Proxy Configuration
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/data/upgrade.html b/data/upgrade.html
index 57ae6b181..24153e06d 100644
--- a/data/upgrade.html
+++ b/data/upgrade.html
@@ -1,13 +1,13 @@
-
+
dependency-check – Database Upgrades
@@ -59,9 +59,9 @@
Database Upgrades
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-analysis.html b/dependency-analysis.html
index 579c2a355..603b636a2 100644
--- a/dependency-analysis.html
+++ b/dependency-analysis.html
@@ -1,13 +1,13 @@
-
+
dependency-check –
@@ -59,9 +59,9 @@
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/apidocs/allclasses-frame.html b/dependency-check-ant/apidocs/allclasses-frame.html
index 2d007a06e..788c6c775 100644
--- a/dependency-check-ant/apidocs/allclasses-frame.html
+++ b/dependency-check-ant/apidocs/allclasses-frame.html
@@ -2,10 +2,10 @@
-
+
-All Classes (Dependency-Check Ant Task 1.4.0 API)
-
+All Classes (Dependency-Check Ant Task 1.4.2 API)
+
diff --git a/dependency-check-ant/apidocs/allclasses-noframe.html b/dependency-check-ant/apidocs/allclasses-noframe.html
index 3c32881a4..0adbf1434 100644
--- a/dependency-check-ant/apidocs/allclasses-noframe.html
+++ b/dependency-check-ant/apidocs/allclasses-noframe.html
@@ -2,10 +2,10 @@
-
+
-All Classes (Dependency-Check Ant Task 1.4.0 API)
-
+All Classes (Dependency-Check Ant Task 1.4.2 API)
+
diff --git a/dependency-check-ant/apidocs/constant-values.html b/dependency-check-ant/apidocs/constant-values.html
index 81be668ff..c144a8b19 100644
--- a/dependency-check-ant/apidocs/constant-values.html
+++ b/dependency-check-ant/apidocs/constant-values.html
@@ -2,10 +2,10 @@
-
+
-Constant Field Values (Dependency-Check Ant Task 1.4.0 API)
-
+Constant Field Values (Dependency-Check Ant Task 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-ant/apidocs/org/owasp/dependencycheck/ant/logging/package-summary.html b/dependency-check-ant/apidocs/org/owasp/dependencycheck/ant/logging/package-summary.html
index 4122dca57..e7d8539af 100644
--- a/dependency-check-ant/apidocs/org/owasp/dependencycheck/ant/logging/package-summary.html
+++ b/dependency-check-ant/apidocs/org/owasp/dependencycheck/ant/logging/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.ant.logging (Dependency-Check Ant Task 1.4.0 API)
-
+org.owasp.dependencycheck.ant.logging (Dependency-Check Ant Task 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,13 +13,13 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-ant/apidocs/org/owasp/dependencycheck/taskdefs/package-summary.html b/dependency-check-ant/apidocs/org/owasp/dependencycheck/taskdefs/package-summary.html
index 32626b84c..9c06e7cf7 100644
--- a/dependency-check-ant/apidocs/org/owasp/dependencycheck/taskdefs/package-summary.html
+++ b/dependency-check-ant/apidocs/org/owasp/dependencycheck/taskdefs/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.taskdefs (Dependency-Check Ant Task 1.4.0 API)
-
+org.owasp.dependencycheck.taskdefs (Dependency-Check Ant Task 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-ant/apidocs/org/slf4j/impl/package-summary.html b/dependency-check-ant/apidocs/org/slf4j/impl/package-summary.html
index 2bc885b85..bdad23959 100644
--- a/dependency-check-ant/apidocs/org/slf4j/impl/package-summary.html
+++ b/dependency-check-ant/apidocs/org/slf4j/impl/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.slf4j.impl (Dependency-Check Ant Task 1.4.0 API)
-
+org.slf4j.impl (Dependency-Check Ant Task 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-ant/apidocs/overview-summary.html b/dependency-check-ant/apidocs/overview-summary.html
index d19102b0c..af89d6683 100644
--- a/dependency-check-ant/apidocs/overview-summary.html
+++ b/dependency-check-ant/apidocs/overview-summary.html
@@ -2,10 +2,10 @@
-
+
-Overview (Dependency-Check Ant Task 1.4.0 API)
-
+Overview (Dependency-Check Ant Task 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
-
+
diff --git a/dependency-check-ant/cobertura/frame-summary-org.owasp.dependencycheck.taskdefs.html b/dependency-check-ant/cobertura/frame-summary-org.owasp.dependencycheck.taskdefs.html
index 7c4a174af..a98879409 100644
--- a/dependency-check-ant/cobertura/frame-summary-org.owasp.dependencycheck.taskdefs.html
+++ b/dependency-check-ant/cobertura/frame-summary-org.owasp.dependencycheck.taskdefs.html
@@ -16,7 +16,7 @@
-
+
diff --git a/dependency-check-ant/cobertura/frame-summary-org.slf4j.impl.html b/dependency-check-ant/cobertura/frame-summary-org.slf4j.impl.html
index 842d8e428..6d495b900 100644
--- a/dependency-check-ant/cobertura/frame-summary-org.slf4j.impl.html
+++ b/dependency-check-ant/cobertura/frame-summary-org.slf4j.impl.html
@@ -37,6 +37,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-ant/cobertura/frame-summary.html b/dependency-check-ant/cobertura/frame-summary.html
index 7e2658471..fdc7eb515 100644
--- a/dependency-check-ant/cobertura/frame-summary.html
+++ b/dependency-check-ant/cobertura/frame-summary.html
@@ -16,9 +16,9 @@
@@ -27,6 +27,6 @@ var packageTable = new SortableTable(document.getElementById("packageResults"),
["String", "Number", "Percentage", "Percentage", "FormattedNumber"]);
packageTable.sort(0);
-
+
diff --git a/dependency-check-ant/cobertura/org.owasp.dependencycheck.ant.logging.AntLoggerAdapter.html b/dependency-check-ant/cobertura/org.owasp.dependencycheck.ant.logging.AntLoggerAdapter.html
index 6cb7a0145..75abee2e4 100644
--- a/dependency-check-ant/cobertura/org.owasp.dependencycheck.ant.logging.AntLoggerAdapter.html
+++ b/dependency-check-ant/cobertura/org.owasp.dependencycheck.ant.logging.AntLoggerAdapter.html
@@ -103,9 +103,9 @@
43
public AntLoggerAdapter(Task task) {
- 44 26 super ();
- 45 26 this .task = task;
- 46 26 }
+ 44 13 super ();
+ 45 13 this .task = task;
+ 46 13 }
47
48
@@ -141,23 +141,23 @@
@Override
65
public void trace(String msg) {
- 66 61 if (task != null ) {
- 67 54 task.log(msg, Project.MSG_VERBOSE);
+ 66 32 if (task != null ) {
+ 67 27 task.log(msg, Project.MSG_VERBOSE);
68
}
- 69 61 }
+ 69 32 }
70
71
@Override
72
public void trace(String format, Object arg) {
- 73 58 if (task != null ) {
- 74 42 final FormattingTuple tp = MessageFormatter.format(format, arg);
- 75 42 task.log(tp.getMessage(), Project.MSG_VERBOSE);
+ 73 29 if (task != null ) {
+ 74 21 final FormattingTuple tp = MessageFormatter.format(format, arg);
+ 75 21 task.log(tp.getMessage(), Project.MSG_VERBOSE);
76
}
- 77 58 }
+ 77 29 }
78
79
@@ -199,7 +199,7 @@
@Override
103
public boolean isDebugEnabled() {
- 104 20 return true ;
+ 104 10 return true ;
105
}
106
@@ -208,47 +208,47 @@
@Override
108
public void debug(String msg) {
- 109 268 if (task != null ) {
- 110 234 task.log(msg, Project.MSG_DEBUG);
+ 109 137 if (task != null ) {
+ 110 117 task.log(msg, Project.MSG_DEBUG);
111
}
- 112 268 }
+ 112 137 }
113
114
@Override
115
public void debug(String format, Object arg) {
- 116 660 if (task != null ) {
- 117 634 final FormattingTuple tp = MessageFormatter.format(format, arg);
- 118 634 task.log(tp.getMessage(), Project.MSG_DEBUG);
+ 116 330 if (task != null ) {
+ 117 317 final FormattingTuple tp = MessageFormatter.format(format, arg);
+ 118 317 task.log(tp.getMessage(), Project.MSG_DEBUG);
119
}
- 120 660 }
+ 120 330 }
121
122
@Override
123
public void debug(String format, Object arg1, Object arg2) {
- 124 50 if (task != null ) {
- 125 38 final FormattingTuple tp = MessageFormatter.format(format, arg1, arg2);
- 126 38 task.log(tp.getMessage(), Project.MSG_DEBUG);
+ 124 25 if (task != null ) {
+ 125 19 final FormattingTuple tp = MessageFormatter.format(format, arg1, arg2);
+ 126 19 task.log(tp.getMessage(), Project.MSG_DEBUG);
127
}
- 128 50 }
+ 128 25 }
129
130
@Override
131
public void debug(String format, Object... arguments) {
- 132 4 if (task != null ) {
- 133 4 final FormattingTuple tp = MessageFormatter.format(format, arguments);
- 134 4 task.log(tp.getMessage(), Project.MSG_DEBUG);
+ 132 2 if (task != null ) {
+ 133 2 final FormattingTuple tp = MessageFormatter.format(format, arguments);
+ 134 2 task.log(tp.getMessage(), Project.MSG_DEBUG);
135
}
- 136 4 }
+ 136 2 }
137
138
@@ -275,23 +275,23 @@
@Override
151
public void info(String msg) {
- 152 12 if (task != null ) {
- 153 12 task.log(msg, Project.MSG_INFO);
+ 152 6 if (task != null ) {
+ 153 6 task.log(msg, Project.MSG_INFO);
154
}
- 155 12 }
+ 155 6 }
156
157
@Override
158
public void info(String format, Object arg) {
- 159 12 if (task != null ) {
- 160 12 final FormattingTuple tp = MessageFormatter.format(format, arg);
- 161 12 task.log(tp.getMessage(), Project.MSG_INFO);
+ 159 6 if (task != null ) {
+ 160 6 final FormattingTuple tp = MessageFormatter.format(format, arg);
+ 161 6 task.log(tp.getMessage(), Project.MSG_INFO);
162
}
- 163 12 }
+ 163 6 }
164
165
@@ -465,6 +465,6 @@
}
-
+
diff --git a/dependency-check-ant/cobertura/org.owasp.dependencycheck.ant.logging.AntLoggerFactory.html b/dependency-check-ant/cobertura/org.owasp.dependencycheck.ant.logging.AntLoggerFactory.html
index 982f58e7a..9e417d03c 100644
--- a/dependency-check-ant/cobertura/org.owasp.dependencycheck.ant.logging.AntLoggerFactory.html
+++ b/dependency-check-ant/cobertura/org.owasp.dependencycheck.ant.logging.AntLoggerFactory.html
@@ -99,9 +99,9 @@
41
public AntLoggerFactory(Task task) {
- 42 26 super ();
- 43 26 this .antLoggerAdapter = new AntLoggerAdapter(task);
- 44 26 }
+ 42 13 super ();
+ 43 13 this .antLoggerAdapter = new AntLoggerAdapter(task);
+ 44 13 }
45
46
@@ -120,13 +120,13 @@
@Override
53
public Logger getLogger(String name) {
- 54 92 return antLoggerAdapter;
+ 54 52 return antLoggerAdapter;
55
}
56
}
-
+
diff --git a/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Check.html b/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Check.html
index 61ab76bc2..f946da362 100644
--- a/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Check.html
+++ b/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Check.html
@@ -12,8 +12,8 @@
@@ -59,33 +59,33 @@
20
import java.io.File;
21
- import java.io.IOException;
- 22
import java.util.List;
- 23
+ 22
import org.apache.tools.ant.BuildException;
- 24
+ 23
import org.apache.tools.ant.Project;
- 25
+ 24
import org.apache.tools.ant.types.EnumeratedAttribute;
- 26
+ 25
import org.apache.tools.ant.types.Reference;
- 27
+ 26
import org.apache.tools.ant.types.Resource;
- 28
+ 27
import org.apache.tools.ant.types.ResourceCollection;
- 29
+ 28
import org.apache.tools.ant.types.resources.FileProvider;
- 30
+ 29
import org.apache.tools.ant.types.resources.Resources;
- 31
+ 30
import org.owasp.dependencycheck.Engine;
- 32
+ 31
import org.owasp.dependencycheck.data.nvdcve.CveDB;
- 33
+ 32
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
- 34
+ 33
import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
+ 34
+ import org.owasp.dependencycheck.data.update.exception.UpdateException;
35
import org.owasp.dependencycheck.dependency.Dependency;
36
@@ -93,1700 +93,1724 @@
37
import org.owasp.dependencycheck.dependency.Vulnerability;
38
- import org.owasp.dependencycheck.reporting.ReportGenerator;
+ import org.owasp.dependencycheck.exception.ExceptionCollection;
39
- import org.owasp.dependencycheck.reporting.ReportGenerator.Format;
+ import org.owasp.dependencycheck.exception.ReportException;
40
- import org.owasp.dependencycheck.utils.Settings;
+ import org.owasp.dependencycheck.reporting.ReportGenerator;
41
- import org.slf4j.impl.StaticLoggerBinder;
+ import org.owasp.dependencycheck.reporting.ReportGenerator.Format;
42
-
+ import org.owasp.dependencycheck.utils.Settings;
43
-
+ import org.slf4j.impl.StaticLoggerBinder;
44
-
+
45
-
+
46
-
+
47
-
+
48
- public class Check extends Update {
+
49
-
+
50
-
+ public class Check extends Update {
51
-
+
52
-
- 53 2 private static final String NEW_LINE = System.getProperty("line.separator" , "\n" ).intern();
+
+ 53
+
54
-
- 55
-
+
+ 55 1 private static final String NEW_LINE = System.getProperty("line.separator" , "\n" ).intern();
56
-
+
57
-
+
58
- public Check() {
- 59 8 super ();
+
+ 59
+
60
+ public Check() {
+ 61 4 super ();
+ 62
- 61
+ 63
- 62 8 StaticLoggerBinder.getSingleton().setTask(this );
- 63 8 }
- 64
-
- 65
-
+ 64 4 StaticLoggerBinder.getSingleton().setTask(this );
+ 65 4 }
66
-
+
67
-
+
68
-
- 69 8 private Resources path = null ;
+
+ 69
+
70
-
- 71
-
+
+ 71 4 private Resources path = null ;
72
-
- 73 8 private Reference refid = null ;
+
+ 73
+
74
-
- 75
-
+
+ 75 4 private Reference refid = null ;
76
-
+
77
-
+
78
-
+
79
-
+
80
-
+
81
+
+ 82
+
+ 83
public void add(ResourceCollection rc) {
- 82 8 if (isReference()) {
- 83 0 throw new BuildException("Nested elements are not allowed when using the refid attribute." );
- 84
+ 84 4 if (isReference()) {
+ 85 0 throw new BuildException("Nested elements are not allowed when using the refid attribute." );
+ 86
}
- 85 8 getPath().add(rc);
- 86 8 }
- 87
-
- 88
-
+ 87 4 getPath().add(rc);
+ 88 4 }
89
-
+
90
-
+
91
-
+
92
-
+
93
-
+
94
+
+ 95
+
+ 96
private synchronized Resources getPath() {
- 95 8 if (path == null ) {
- 96 6 path = new Resources(getProject());
- 97 6 path.setCache(true );
- 98
- }
- 99 8 return path;
+ 97 4 if (path == null ) {
+ 98 3 path = new Resources(getProject());
+ 99 3 path.setCache(true );
100
- }
- 101
-
+ }
+ 101 4 return path;
102
-
- 103
-
- 104
-
- 105
-
- 106
-
- 107
- public boolean isReference() {
- 108 16 return refid != null ;
- 109
}
- 110
+ 103
+ 104
+
+ 105
+
+ 106
+
+ 107
+
+ 108
+
+ 109
+ public boolean isReference() {
+ 110 8 return refid != null ;
111
-
+ }
112
-
+
113
-
+
114
-
+
115
-
+
116
-
+
117
+
+ 118
+
+ 119
public void setRefid(Reference r) {
- 118 0 if (path != null ) {
- 119 0 throw new BuildException("Nested elements are not allowed when using the refid attribute." );
- 120
+ 120 0 if (path != null ) {
+ 121 0 throw new BuildException("Nested elements are not allowed when using the refid attribute." );
+ 122
}
- 121 0 refid = r;
- 122 0 }
- 123
-
- 124
-
+ 123 0 refid = r;
+ 124 0 }
125
-
- 126
-
- 127
-
- 128
-
- 129
-
- 130
- private void dealWithReferences() throws BuildException {
- 131 8 if (isReference()) {
- 132 0 final Object o = refid.getReferencedObject(getProject());
- 133 0 if (!(o instanceof ResourceCollection)) {
- 134 0 throw new BuildException("refid '" + refid.getRefId()
- 135
- + "' does not refer to a resource collection." );
- 136
- }
- 137 0 getPath().add((ResourceCollection) o);
- 138
- }
- 139 8 }
- 140
-
- 141
-
- 142
-
- 143
-
- 144
-
- 145
-
- 146 8 @Deprecated
- 147
- private String applicationName = null ;
- 148
- 149
+ 126
- 150
-
- 151
+ 127
+
+ 128
+
+ 129
+ 130
+
+ 131
+
+ 132
+ private void dealWithReferences() throws BuildException {
+ 133 4 if (isReference()) {
+ 134 0 final Object o = refid.getReferencedObject(getProject());
+ 135 0 if (!(o instanceof ResourceCollection)) {
+ 136 0 throw new BuildException("refid '" + refid.getRefId()
+ 137
+ + "' does not refer to a resource collection." );
+ 138
+ }
+ 139 0 getPath().add((ResourceCollection) o);
+ 140
+ }
+ 141 4 }
+ 142
+
+ 143
+
+ 144
+
+ 145
+
+ 146
+
+ 147
+
+ 148 4 @Deprecated
+ 149
+ private String applicationName = null ;
+ 150
+
+ 151
+
152
-
+
153
154
-
+
155
-
+
156
- @Deprecated
- 157
- public String getApplicationName() {
- 158 0 return applicationName;
- 159
- }
- 160
-
- 161
-
- 162
-
- 163
-
- 164
-
- 165
+ 157
+
+ 158
+ @Deprecated
+ 159
+ public String getApplicationName() {
+ 160 0 return applicationName;
+ 161
+ }
+ 162
+
+ 163
+
+ 164
+
+ 165
+
166
-
+
167
- @Deprecated
+
168
+
+ 169
+ @Deprecated
+ 170
public void setApplicationName(String applicationName) {
- 169 8 this .applicationName = applicationName;
- 170 8 }
- 171
-
- 172
-
+ 171 4 this .applicationName = applicationName;
+ 172 4 }
173
-
- 174 8 private String projectName = "dependency-check" ;
+
+ 174
+
175
-
- 176
-
+
+ 176 4 private String projectName = "dependency-check" ;
177
-
+
178
-
+
179
-
+
180
-
+
181
+
+ 182
+
+ 183
public String getProjectName() {
- 182 6 if (applicationName != null ) {
- 183 6 log("Configuration 'applicationName' has been deprecated, please use 'projectName' instead" , Project.MSG_WARN);
- 184 6 if ("dependency-check" .equals(projectName)) {
- 185 6 projectName = applicationName;
- 186
+ 184 3 if (applicationName != null ) {
+ 185 3 log("Configuration 'applicationName' has been deprecated, please use 'projectName' instead" , Project.MSG_WARN);
+ 186 3 if ("dependency-check" .equals(projectName)) {
+ 187 3 projectName = applicationName;
+ 188
}
- 187
- }
- 188 6 return projectName;
189
- }
- 190
-
+ }
+ 190 3 return projectName;
191
-
+ }
192
-
+
193
-
+
194
-
+
195
-
+
196
+
+ 197
+
+ 198
public void setProjectName(String projectName) {
- 197 0 this .projectName = projectName;
- 198 0 }
- 199
-
- 200
-
+ 199 0 this .projectName = projectName;
+ 200 0 }
201
-
+
202
-
+
203
-
- 204 8 private String reportOutputDirectory = "." ;
+
+ 204
+
205
-
- 206
-
+
+ 206 4 private String reportOutputDirectory = "." ;
207
-
+
208
-
+
209
-
+
210
-
+
211
- public String getReportOutputDirectory() {
- 212 0 return reportOutputDirectory;
+
+ 212
+
213
- }
- 214
-
+ public String getReportOutputDirectory() {
+ 214 0 return reportOutputDirectory;
215
-
+ }
216
-
+
217
-
+
218
-
+
219
-
+
220
+
+ 221
+
+ 222
public void setReportOutputDirectory(String reportOutputDirectory) {
- 221 8 this .reportOutputDirectory = reportOutputDirectory;
- 222 8 }
- 223
-
- 224
-
+ 223 4 this .reportOutputDirectory = reportOutputDirectory;
+ 224 4 }
225
-
+
226
-
+
227
-
+
228
-
+
229
-
- 230 8 private float failBuildOnCVSS = 11;
+
+ 230
+
231
-
- 232
-
+
+ 232 4 private float failBuildOnCVSS = 11;
233
-
+
234
-
+
235
-
+
236
-
+
237
- public float getFailBuildOnCVSS() {
- 238 0 return failBuildOnCVSS;
+
+ 238
+
239
- }
- 240
-
+ public float getFailBuildOnCVSS() {
+ 240 0 return failBuildOnCVSS;
241
-
+ }
242
-
+
243
-
+
244
-
+
245
-
+
246
+
+ 247
+
+ 248
public void setFailBuildOnCVSS(float failBuildOnCVSS) {
- 247 2 this .failBuildOnCVSS = failBuildOnCVSS;
- 248 2 }
- 249
-
- 250
-
+ 249 1 this .failBuildOnCVSS = failBuildOnCVSS;
+ 250 1 }
251
-
+
252
-
+
253
- private Boolean autoUpdate;
+
254
-
+
255
-
+ private Boolean autoUpdate;
256
-
+
257
-
+
258
-
+
259
-
+
260
- public Boolean isAutoUpdate() {
- 261 0 return autoUpdate;
+
+ 261
+
262
- }
- 263
-
+ public Boolean isAutoUpdate() {
+ 263 0 return autoUpdate;
264
-
+ }
265
-
+
266
-
+
267
-
+
268
-
+
269
+
+ 270
+
+ 271
public void setAutoUpdate(Boolean autoUpdate) {
- 270 8 this .autoUpdate = autoUpdate;
- 271 8 }
- 272
-
- 273
-
+ 272 4 this .autoUpdate = autoUpdate;
+ 273 4 }
274
-
+
275
-
+
276
-
- 277 8 @Deprecated
+
+ 277
+
278
- private boolean updateOnly = false ;
- 279
-
+
+ 279 4 @Deprecated
280
-
+ private boolean updateOnly = false ;
281
-
+
282
-
+
283
-
+
284
-
+
285
-
+
286
- @Deprecated
- 287
- public boolean isUpdateOnly() {
- 288 6 return updateOnly;
- 289
- }
- 290
-
- 291
-
- 292
-
- 293
-
- 294
-
- 295
- 296
+ 287
- 297
+ 288
@Deprecated
+ 289
+ public boolean isUpdateOnly() {
+ 290 3 return updateOnly;
+ 291
+ }
+ 292
+
+ 293
+
+ 294
+
+ 295
+
+ 296
+
+ 297
+
298
+
+ 299
+ @Deprecated
+ 300
public void setUpdateOnly(boolean updateOnly) {
- 299 0 this .updateOnly = updateOnly;
- 300 0 }
- 301
-
- 302
-
+ 301 0 this .updateOnly = updateOnly;
+ 302 0 }
303
-
+
304
-
+
305
-
- 306 8 private String reportFormat = "HTML" ;
+
+ 306
+
307
-
- 308
-
+
+ 308 4 private String reportFormat = "HTML" ;
309
-
+
310
-
+
311
-
+
312
-
+
313
- public String getReportFormat() {
- 314 0 return reportFormat;
+
+ 314
+
315
- }
- 316
-
+ public String getReportFormat() {
+ 316 0 return reportFormat;
317
-
+ }
318
-
+
319
-
+
320
-
+
321
-
+
322
+
+ 323
+
+ 324
public void setReportFormat(ReportFormats reportFormat) {
- 323 8 this .reportFormat = reportFormat.getValue();
- 324 8 }
- 325
-
- 326
-
+ 325 4 this .reportFormat = reportFormat.getValue();
+ 326 4 }
327
-
+
328
- private String suppressionFile;
+
329
-
+
330
-
+ private String suppressionFile;
331
-
+
332
-
+
333
-
+
334
-
+
335
- public String getSuppressionFile() {
- 336 0 return suppressionFile;
+
+ 336
+
337
- }
- 338
-
+ public String getSuppressionFile() {
+ 338 0 return suppressionFile;
339
-
+ }
340
-
+
341
-
+
342
-
+
343
-
+
344
+
+ 345
+
+ 346
public void setSuppressionFile(String suppressionFile) {
- 345 0 this .suppressionFile = suppressionFile;
- 346 0 }
- 347
-
- 348
-
+ 347 0 this .suppressionFile = suppressionFile;
+ 348 0 }
349
-
- 350 8 private boolean showSummary = true ;
+
+ 350
+
351
-
- 352
-
+
+ 352 4 private boolean showSummary = true ;
353
-
+
354
-
+
355
-
+
356
-
+
357
- public boolean isShowSummary() {
- 358 0 return showSummary;
+
+ 358
+
359
- }
- 360
-
+ public boolean isShowSummary() {
+ 360 0 return showSummary;
361
-
+ }
362
-
+
363
-
+
364
-
+
365
-
+
366
+
+ 367
+
+ 368
public void setShowSummary(boolean showSummary) {
- 367 0 this .showSummary = showSummary;
- 368 0 }
- 369
-
- 370
-
+ 369 0 this .showSummary = showSummary;
+ 370 0 }
371
-
+
372
-
+
373
- private Boolean enableExperimental;
+
374
-
+
375
-
+ private Boolean enableExperimental;
376
-
+
377
-
+
378
-
+
379
-
+
380
- public Boolean isEnableExperimental() {
- 381 0 return enableExperimental;
+
+ 381
+
382
- }
- 383
-
+ public Boolean isEnableExperimental() {
+ 383 0 return enableExperimental;
384
-
+ }
385
-
+
386
-
+
387
-
+
388
-
+
389
+
+ 390
+
+ 391
public void setEnableExperimental(Boolean enableExperimental) {
- 390 0 this .enableExperimental = enableExperimental;
- 391 0 }
- 392
-
- 393
-
+ 392 0 this .enableExperimental = enableExperimental;
+ 393 0 }
394
-
+
395
-
+
396
- private Boolean jarAnalyzerEnabled;
+
397
-
+
398
-
+ private Boolean jarAnalyzerEnabled;
399
-
+
400
-
+
401
-
+
402
-
+
403
- public Boolean isJarAnalyzerEnabled() {
- 404 0 return jarAnalyzerEnabled;
+
+ 404
+
405
- }
- 406
-
+ public Boolean isJarAnalyzerEnabled() {
+ 406 0 return jarAnalyzerEnabled;
407
-
+ }
408
-
+
409
-
+
410
-
+
411
-
+
412
+
+ 413
+
+ 414
public void setJarAnalyzerEnabled(Boolean jarAnalyzerEnabled) {
- 413 0 this .jarAnalyzerEnabled = jarAnalyzerEnabled;
- 414 0 }
- 415
-
- 416
-
+ 415 0 this .jarAnalyzerEnabled = jarAnalyzerEnabled;
+ 416 0 }
417
-
+
418
- private Boolean archiveAnalyzerEnabled;
+
419
-
+
420
-
+ private Boolean archiveAnalyzerEnabled;
421
-
+
422
-
+
423
-
+
424
-
+
425
- public Boolean isArchiveAnalyzerEnabled() {
- 426 0 return archiveAnalyzerEnabled;
+
+ 426
+
427
- }
- 428
-
+ public Boolean isArchiveAnalyzerEnabled() {
+ 428 0 return archiveAnalyzerEnabled;
429
-
+ }
430
-
+
431
- private Boolean assemblyAnalyzerEnabled;
+
432
-
+
433
-
+ private Boolean assemblyAnalyzerEnabled;
434
-
+
435
-
+
436
-
+
437
-
+
438
+
+ 439
+
+ 440
public void setArchiveAnalyzerEnabled(Boolean archiveAnalyzerEnabled) {
- 439 0 this .archiveAnalyzerEnabled = archiveAnalyzerEnabled;
- 440 0 }
- 441
-
- 442
-
+ 441 0 this .archiveAnalyzerEnabled = archiveAnalyzerEnabled;
+ 442 0 }
443
-
+
444
-
+
445
-
- 446
-
- 447
- public Boolean isAssemblyAnalyzerEnabled() {
- 448 0 return assemblyAnalyzerEnabled;
- 449
- }
- 450
-
- 451
-
- 452
-
- 453
-
- 454
-
- 455
-
- 456
- public void setAssemblyAnalyzerEnabled(Boolean assemblyAnalyzerEnabled) {
- 457 0 this .assemblyAnalyzerEnabled = assemblyAnalyzerEnabled;
- 458 0 }
- 459
-
- 460
-
- 461
-
- 462
- private Boolean nuspecAnalyzerEnabled;
- 463
-
- 464
-
- 465
- 466
+ 446
- 467
+ 447
- 468
+ 448
- 469
- public Boolean isNuspecAnalyzerEnabled() {
- 470 0 return nuspecAnalyzerEnabled;
- 471
+ 449
+ public Boolean isAssemblyAnalyzerEnabled() {
+ 450 0 return assemblyAnalyzerEnabled;
+ 451
}
- 472
+ 452
- 473
+ 453
- 474
+ 454
+ 455
+
+ 456
+
+ 457
+
+ 458
+ public void setAssemblyAnalyzerEnabled(Boolean assemblyAnalyzerEnabled) {
+ 459 0 this .assemblyAnalyzerEnabled = assemblyAnalyzerEnabled;
+ 460 0 }
+ 461
+
+ 462
+
+ 463
+
+ 464
+ private Boolean nuspecAnalyzerEnabled;
+ 465
+
+ 466
+
+ 467
+
+ 468
+
+ 469
+
+ 470
+
+ 471
+ public Boolean isNuspecAnalyzerEnabled() {
+ 472 0 return nuspecAnalyzerEnabled;
+ 473
+ }
+ 474
+
475
-
+
476
-
+
477
-
+
478
+
+ 479
+
+ 480
public void setNuspecAnalyzerEnabled(Boolean nuspecAnalyzerEnabled) {
- 479 0 this .nuspecAnalyzerEnabled = nuspecAnalyzerEnabled;
- 480 0 }
- 481
-
- 482
-
+ 481 0 this .nuspecAnalyzerEnabled = nuspecAnalyzerEnabled;
+ 482 0 }
483
-
+
484
- private Boolean composerAnalyzerEnabled;
+
485
-
+
486
-
+ private Boolean composerAnalyzerEnabled;
487
-
+
488
-
+
489
-
+
490
-
+
491
- public Boolean isComposerAnalyzerEnabled() {
- 492 0 return composerAnalyzerEnabled;
+
+ 492
+
493
- }
- 494
-
+ public Boolean isComposerAnalyzerEnabled() {
+ 494 0 return composerAnalyzerEnabled;
495
-
+ }
496
-
+
497
-
+
498
-
+
499
-
+
500
+
+ 501
+
+ 502
public void setComposerAnalyzerEnabled(Boolean composerAnalyzerEnabled) {
- 501 0 this .composerAnalyzerEnabled = composerAnalyzerEnabled;
- 502 0 }
- 503
-
- 504
-
+ 503 0 this .composerAnalyzerEnabled = composerAnalyzerEnabled;
+ 504 0 }
505
-
+
506
- private Boolean autoconfAnalyzerEnabled;
+
507
-
+
508
-
+ private Boolean autoconfAnalyzerEnabled;
509
-
+
510
-
+
511
-
+
512
-
+
513
- public Boolean isAutoconfAnalyzerEnabled() {
- 514 0 return autoconfAnalyzerEnabled;
+
+ 514
+
515
- }
- 516
-
+ public Boolean isAutoconfAnalyzerEnabled() {
+ 516 0 return autoconfAnalyzerEnabled;
517
-
+ }
518
-
+
519
-
+
520
-
+
521
-
+
522
+
+ 523
+
+ 524
public void setAutoconfAnalyzerEnabled(Boolean autoconfAnalyzerEnabled) {
- 523 0 this .autoconfAnalyzerEnabled = autoconfAnalyzerEnabled;
- 524 0 }
- 525
-
- 526
-
+ 525 0 this .autoconfAnalyzerEnabled = autoconfAnalyzerEnabled;
+ 526 0 }
527
-
+
528
- private Boolean cmakeAnalyzerEnabled;
+
529
-
+
530
-
+ private Boolean cmakeAnalyzerEnabled;
531
-
+
532
-
+
533
-
+
534
-
+
535
- public Boolean isCMakeAnalyzerEnabled() {
- 536 0 return cmakeAnalyzerEnabled;
+
+ 536
+
537
- }
- 538
-
+ public Boolean isCMakeAnalyzerEnabled() {
+ 538 0 return cmakeAnalyzerEnabled;
539
-
+ }
540
-
+
541
-
+
542
-
+
543
-
+
544
+
+ 545
+
+ 546
public void setCMakeAnalyzerEnabled(Boolean cmakeAnalyzerEnabled) {
- 545 0 this .cmakeAnalyzerEnabled = cmakeAnalyzerEnabled;
- 546 0 }
- 547
-
- 548
-
+ 547 0 this .cmakeAnalyzerEnabled = cmakeAnalyzerEnabled;
+ 548 0 }
549
-
+
550
- private Boolean opensslAnalyzerEnabled;
+
551
-
+
552
-
+ private Boolean opensslAnalyzerEnabled;
553
-
+
554
-
+
555
-
+
556
-
+
557
- public Boolean isOpensslAnalyzerEnabled() {
- 558 0 return opensslAnalyzerEnabled;
+
+ 558
+
559
- }
- 560
-
+ public Boolean isOpensslAnalyzerEnabled() {
+ 560 0 return opensslAnalyzerEnabled;
561
-
+ }
562
-
+
563
-
+
564
-
+
565
-
+
566
+
+ 567
+
+ 568
public void setOpensslAnalyzerEnabled(Boolean opensslAnalyzerEnabled) {
- 567 0 this .opensslAnalyzerEnabled = opensslAnalyzerEnabled;
- 568 0 }
- 569
-
- 570
-
+ 569 0 this .opensslAnalyzerEnabled = opensslAnalyzerEnabled;
+ 570 0 }
571
-
+
572
- private Boolean nodeAnalyzerEnabled;
+
573
-
+
574
-
+ private Boolean nodeAnalyzerEnabled;
575
-
+
576
-
+
577
-
+
578
-
+
579
- public Boolean isNodeAnalyzerEnabled() {
- 580 0 return nodeAnalyzerEnabled;
+
+ 580
+
581
- }
- 582
-
+ public Boolean isNodeAnalyzerEnabled() {
+ 582 0 return nodeAnalyzerEnabled;
583
-
+ }
584
-
+
585
-
+
586
-
+
587
-
+
588
+
+ 589
+
+ 590
public void setNodeAnalyzerEnabled(Boolean nodeAnalyzerEnabled) {
- 589 0 this .nodeAnalyzerEnabled = nodeAnalyzerEnabled;
- 590 0 }
- 591
-
- 592
-
+ 591 0 this .nodeAnalyzerEnabled = nodeAnalyzerEnabled;
+ 592 0 }
593
-
+
594
- private Boolean rubygemsAnalyzerEnabled;
+
595
-
+
596
-
+ private Boolean rubygemsAnalyzerEnabled;
597
-
+
598
-
+
599
-
+
600
-
+
601
- public Boolean isRubygemsAnalyzerEnabled() {
- 602 0 return rubygemsAnalyzerEnabled;
+
+ 602
+
603
- }
- 604
-
+ public Boolean isRubygemsAnalyzerEnabled() {
+ 604 0 return rubygemsAnalyzerEnabled;
605
-
+ }
606
-
+
607
-
+
608
-
+
609
-
+
610
+
+ 611
+
+ 612
public void setRubygemsAnalyzerEnabled(Boolean rubygemsAnalyzerEnabled) {
- 611 0 this .rubygemsAnalyzerEnabled = rubygemsAnalyzerEnabled;
- 612 0 }
- 613
-
- 614
-
+ 613 0 this .rubygemsAnalyzerEnabled = rubygemsAnalyzerEnabled;
+ 614 0 }
615
-
+
616
- private Boolean pyPackageAnalyzerEnabled;
+
617
-
+
618
-
+ private Boolean pyPackageAnalyzerEnabled;
619
-
+
620
-
+
621
-
+
622
-
+
623
- public Boolean isPyPackageAnalyzerEnabled() {
- 624 0 return pyPackageAnalyzerEnabled;
+
+ 624
+
625
- }
- 626
-
+ public Boolean isPyPackageAnalyzerEnabled() {
+ 626 0 return pyPackageAnalyzerEnabled;
627
-
+ }
628
-
+
629
-
+
630
-
+
631
-
+
632
+
+ 633
+
+ 634
public void setPyPackageAnalyzerEnabled(Boolean pyPackageAnalyzerEnabled) {
- 633 0 this .pyPackageAnalyzerEnabled = pyPackageAnalyzerEnabled;
- 634 0 }
- 635
-
- 636
-
+ 635 0 this .pyPackageAnalyzerEnabled = pyPackageAnalyzerEnabled;
+ 636 0 }
637
-
+
638
-
+
639
- private Boolean pyDistributionAnalyzerEnabled;
+
640
-
+
641
-
+ private Boolean pyDistributionAnalyzerEnabled;
642
-
+
643
-
+
644
-
+
645
-
+
646
- public Boolean isPyDistributionAnalyzerEnabled() {
- 647 0 return pyDistributionAnalyzerEnabled;
+
+ 647
+
648
- }
- 649
-
+ public Boolean isPyDistributionAnalyzerEnabled() {
+ 649 0 return pyDistributionAnalyzerEnabled;
650
-
+ }
651
-
+
652
-
+
653
-
+
654
-
+
655
-
+
656
+
+ 657
+
+ 658
public void setPyDistributionAnalyzerEnabled(Boolean pyDistributionAnalyzerEnabled) {
- 657 0 this .pyDistributionAnalyzerEnabled = pyDistributionAnalyzerEnabled;
- 658 0 }
- 659
-
- 660
-
+ 659 0 this .pyDistributionAnalyzerEnabled = pyDistributionAnalyzerEnabled;
+ 660 0 }
661
-
+
662
-
+
663
- private Boolean centralAnalyzerEnabled;
+
664
-
+
665
-
+ private Boolean centralAnalyzerEnabled;
666
-
+
667
-
+
668
-
+
669
-
+
670
- public Boolean isCentralAnalyzerEnabled() {
- 671 0 return centralAnalyzerEnabled;
+
+ 671
+
672
- }
- 673
-
+ public Boolean isCentralAnalyzerEnabled() {
+ 673 0 return centralAnalyzerEnabled;
674
-
+ }
675
-
+
676
-
+
677
-
+
678
-
+
679
+
+ 680
+
+ 681
public void setCentralAnalyzerEnabled(Boolean centralAnalyzerEnabled) {
- 680 0 this .centralAnalyzerEnabled = centralAnalyzerEnabled;
- 681 0 }
- 682
-
- 683
-
+ 682 0 this .centralAnalyzerEnabled = centralAnalyzerEnabled;
+ 683 0 }
684
-
+
685
-
+
686
- private Boolean nexusAnalyzerEnabled;
+
687
-
+
688
-
+ private Boolean nexusAnalyzerEnabled;
689
-
+
690
-
+
691
-
+
692
-
+
693
- public Boolean isNexusAnalyzerEnabled() {
- 694 0 return nexusAnalyzerEnabled;
+
+ 694
+
695
- }
- 696
-
+ public Boolean isNexusAnalyzerEnabled() {
+ 696 0 return nexusAnalyzerEnabled;
697
-
+ }
698
-
+
699
-
+
700
-
+
701
-
+
702
+
+ 703
+
+ 704
public void setNexusAnalyzerEnabled(Boolean nexusAnalyzerEnabled) {
- 703 0 this .nexusAnalyzerEnabled = nexusAnalyzerEnabled;
- 704 0 }
- 705
-
- 706
-
+ 705 0 this .nexusAnalyzerEnabled = nexusAnalyzerEnabled;
+ 706 0 }
707
-
+
708
-
+
709
-
+
710
- private String nexusUrl;
+
711
-
+
712
-
+ private String nexusUrl;
713
-
+
714
-
+
715
-
+
716
-
+
717
- public String getNexusUrl() {
- 718 0 return nexusUrl;
+
+ 718
+
719
- }
- 720
-
+ public String getNexusUrl() {
+ 720 0 return nexusUrl;
721
-
+ }
722
-
+
723
-
+
724
-
+
725
-
+
726
+
+ 727
+
+ 728
public void setNexusUrl(String nexusUrl) {
- 727 0 this .nexusUrl = nexusUrl;
- 728 0 }
- 729
-
- 730
-
+ 729 0 this .nexusUrl = nexusUrl;
+ 730 0 }
731
-
+
732
- private Boolean nexusUsesProxy;
+
733
-
+
734
-
+ private Boolean nexusUsesProxy;
735
-
+
736
-
+
737
-
+
738
-
+
739
- public Boolean isNexusUsesProxy() {
- 740 0 return nexusUsesProxy;
+
+ 740
+
741
- }
- 742
-
+ public Boolean isNexusUsesProxy() {
+ 742 0 return nexusUsesProxy;
743
-
+ }
744
-
+
745
-
+
746
-
+
747
-
+
748
+
+ 749
+
+ 750
public void setNexusUsesProxy(Boolean nexusUsesProxy) {
- 749 0 this .nexusUsesProxy = nexusUsesProxy;
- 750 0 }
- 751
-
- 752
-
+ 751 0 this .nexusUsesProxy = nexusUsesProxy;
+ 752 0 }
753
-
+
754
-
+
755
-
+
756
- private String zipExtensions;
+
757
-
+
758
-
+ private String zipExtensions;
759
-
+
760
-
+
761
-
+
762
-
+
763
- public String getZipExtensions() {
- 764 0 return zipExtensions;
+
+ 764
+
765
- }
- 766
-
+ public String getZipExtensions() {
+ 766 0 return zipExtensions;
767
-
- 768
-
- 769
-
- 770
-
- 771
-
- 772
- public void setZipExtensions(String zipExtensions) {
- 773 0 this .zipExtensions = zipExtensions;
- 774 0 }
- 775
-
- 776
-
- 777
-
- 778
-
- 779
- private String pathToMono;
- 780
-
- 781
-
- 782
-
- 783
-
- 784
-
- 785
-
- 786
- public String getPathToMono() {
- 787 0 return pathToMono;
- 788
}
- 789
+ 768
- 790
+ 769
- 791
-
- 792
+ 770
+
+ 771
- 793
-
- 794
+ 772
+
+ 773
- 795
- public void setPathToMono(String pathToMono) {
- 796 0 this .pathToMono = pathToMono;
- 797 0 }
- 798
+ 774
+ public void setZipExtensions(String zipExtensions) {
+ 775 0 this .zipExtensions = zipExtensions;
+ 776 0 }
+ 777
- 799
- @Override
+ 778
+
+ 779
+
+ 780
+
+ 781
+ private String pathToMono;
+ 782
+
+ 783
+
+ 784
+
+ 785
+
+ 786
+
+ 787
+
+ 788
+ public String getPathToMono() {
+ 789 0 return pathToMono;
+ 790
+ }
+ 791
+
+ 792
+
+ 793
+
+ 794
+
+ 795
+
+ 796
+
+ 797
+ public void setPathToMono(String pathToMono) {
+ 798 0 this .pathToMono = pathToMono;
+ 799 0 }
800
+
+ 801
+ @Override
+ 802
public void execute() throws BuildException {
- 801 8 dealWithReferences();
- 802 8 validateConfiguration();
- 803 6 populateSettings();
- 804 6 Engine engine = null ;
- 805
+ 803 4 dealWithReferences();
+ 804 4 validateConfiguration();
+ 805 3 populateSettings();
+ 806 3 Engine engine = null ;
+ 807
try {
- 806 6 engine = new Engine(Check.class .getClassLoader());
- 807 6 if (isUpdateOnly()) {
- 808 0 log("Deprecated 'UpdateOnly' property set; please use the UpdateTask instead" , Project.MSG_WARN);
- 809 0 engine.doUpdates();
- 810
- } else {
+ 808 3 engine = new Engine(Check.class .getClassLoader());
+ 809 3 if (isUpdateOnly()) {
+ 810 0 log("Deprecated 'UpdateOnly' property set; please use the UpdateTask instead" , Project.MSG_WARN);
811
try {
- 812 6 for (Resource resource : path) {
- 813 10 final FileProvider provider = resource.as(FileProvider.class );
- 814 10 if (provider != null ) {
- 815 10 final File file = provider.getFile();
- 816 10 if (file != null && file.exists()) {
- 817 8 engine.scan(file);
- 818
- }
+ 812 0 engine.doUpdates();
+ 813 0 } catch (UpdateException ex) {
+ 814 0 if (this .isFailOnError()) {
+ 815 0 throw new BuildException(ex);
+ 816
+ }
+ 817 0 log(ex.getMessage(), Project.MSG_ERR);
+ 818 0 }
819
+ } else {
+ 820 3 for (Resource resource : path) {
+ 821 5 final FileProvider provider = resource.as(FileProvider.class );
+ 822 5 if (provider != null ) {
+ 823 5 final File file = provider.getFile();
+ 824 5 if (file != null && file.exists()) {
+ 825 4 engine.scan(file);
+ 826
}
- 820 10 }
- 821
+ 827
+ }
+ 828 5 }
+ 829
- 822 6 engine.analyzeDependencies();
- 823 6 DatabaseProperties prop = null ;
- 824 6 CveDB cve = null ;
- 825
- try {
- 826 6 cve = new CveDB();
- 827 6 cve.open();
- 828 6 prop = cve.getDatabaseProperties();
- 829 0 } catch (DatabaseException ex) {
- 830 0 log("Unable to retrieve DB Properties" , ex, Project.MSG_DEBUG);
- 831
- } finally {
- 832 6 if (cve != null ) {
- 833 6 cve.close();
- 834
- }
+ 830
+ try {
+ 831 3 engine.analyzeDependencies();
+ 832 0 } catch (ExceptionCollection ex) {
+ 833 0 if (this .isFailOnError()) {
+ 834 0 throw new BuildException(ex);
835
}
- 836 6 final ReportGenerator reporter = new ReportGenerator(getProjectName(), engine.getDependencies(), engine.getAnalyzers(), prop);
- 837 6 reporter.generateReports(reportOutputDirectory, reportFormat);
- 838
-
- 839 6 if (this .failBuildOnCVSS <= 10) {
- 840 0 checkForFailure(engine.getDependencies());
- 841
+ 836 3 }
+ 837 3 DatabaseProperties prop = null ;
+ 838 3 CveDB cve = null ;
+ 839
+ try {
+ 840 3 cve = new CveDB();
+ 841 3 cve.open();
+ 842 3 prop = cve.getDatabaseProperties();
+ 843 0 } catch (DatabaseException ex) {
+ 844 0 log("Unable to retrieve DB Properties" , ex, Project.MSG_DEBUG);
+ 845
+ } finally {
+ 846 3 if (cve != null ) {
+ 847 3 cve.close();
+ 848
}
- 842 6 if (this .showSummary) {
- 843 6 showSummary(engine.getDependencies());
- 844
- }
- 845 0 } catch (IOException ex) {
- 846 0 log("Unable to generate dependency-check report" , ex, Project.MSG_DEBUG);
- 847 0 throw new BuildException("Unable to generate dependency-check report" , ex);
- 848 0 } catch (Exception ex) {
- 849 0 log("An exception occurred; unable to continue task" , ex, Project.MSG_DEBUG);
- 850 0 throw new BuildException("An exception occurred; unable to continue task" , ex);
- 851 6 }
+ 849
+ }
+ 850 3 final ReportGenerator reporter = new ReportGenerator(getProjectName(), engine.getDependencies(), engine.getAnalyzers(), prop);
+ 851 3 reporter.generateReports(reportOutputDirectory, reportFormat);
852
- }
- 853 0 } catch (DatabaseException ex) {
- 854 0 log("Unable to connect to the dependency-check database; analysis has stopped" , ex, Project.MSG_ERR);
+
+ 853 3 if (this .failBuildOnCVSS <= 10) {
+ 854 0 checkForFailure(engine.getDependencies());
855
- } finally {
- 856 6 Settings.cleanup(true );
- 857 6 if (engine != null ) {
- 858 6 engine.cleanup();
+ }
+ 856 3 if (this .showSummary) {
+ 857 3 showSummary(engine.getDependencies());
+ 858
+ }
859
}
- 860
- }
- 861 6 }
- 862
-
- 863
-
+ 860 0 } catch (DatabaseException ex) {
+ 861 0 final String msg = "Unable to connect to the dependency-check database; analysis has stopped" ;
+ 862 0 if (this .isFailOnError()) {
+ 863 0 throw new BuildException(msg, ex);
864
-
- 865
-
- 866
-
- 867
-
- 868
-
- 869
- private void validateConfiguration() throws BuildException {
- 870 8 if (path == null ) {
- 871 2 throw new BuildException("No project dependencies have been defined to analyze." );
+ }
+ 865 0 log(msg, ex, Project.MSG_ERR);
+ 866 0 } catch (ReportException ex) {
+ 867 0 final String msg = "Unable to generate the dependency-check report" ;
+ 868 0 if (this .isFailOnError()) {
+ 869 0 throw new BuildException(msg, ex);
+ 870
+ }
+ 871 0 log(msg, ex, Project.MSG_ERR);
872
- }
- 873 6 if (failBuildOnCVSS < 0 || failBuildOnCVSS > 11) {
- 874 0 throw new BuildException("Invalid configuration, failBuildOnCVSS must be between 0 and 11." );
- 875
- }
- 876 6 }
+ } finally {
+ 873 3 Settings.cleanup(true );
+ 874 3 if (engine != null ) {
+ 875 3 engine.cleanup();
+ 876
+ }
877
-
- 878
-
+ }
+ 878 3 }
879
-
+
880
-
+
881
-
+
882
-
+
883
-
+
884
-
+
885
- @Override
+
886
+ private void validateConfiguration() throws BuildException {
+ 887 4 if (path == null ) {
+ 888 1 throw new BuildException("No project dependencies have been defined to analyze." );
+ 889
+ }
+ 890 3 if (failBuildOnCVSS < 0 || failBuildOnCVSS > 11) {
+ 891 0 throw new BuildException("Invalid configuration, failBuildOnCVSS must be between 0 and 11." );
+ 892
+ }
+ 893 3 }
+ 894
+
+ 895
+
+ 896
+
+ 897
+
+ 898
+
+ 899
+
+ 900
+
+ 901
+
+ 902
+ @Override
+ 903
protected void populateSettings() throws BuildException {
- 887 6 super .populateSettings();
- 888 6 Settings.setBooleanIfNotNull(Settings.KEYS.AUTO_UPDATE, autoUpdate);
- 889 6 Settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
- 890 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_EXPERIMENTAL_ENABLED, enableExperimental);
- 891 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_JAR_ENABLED, jarAnalyzerEnabled);
- 892 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, pyDistributionAnalyzerEnabled);
- 893 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, pyPackageAnalyzerEnabled);
- 894 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, rubygemsAnalyzerEnabled);
- 895 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, opensslAnalyzerEnabled);
- 896 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CMAKE_ENABLED, cmakeAnalyzerEnabled);
- 897 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, autoconfAnalyzerEnabled);
- 898 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, composerAnalyzerEnabled);
- 899 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, nodeAnalyzerEnabled);
- 900 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, nuspecAnalyzerEnabled);
- 901 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, centralAnalyzerEnabled);
- 902 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_ENABLED, nexusAnalyzerEnabled);
- 903 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, archiveAnalyzerEnabled);
- 904 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, assemblyAnalyzerEnabled);
- 905 6 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
- 906 6 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY, nexusUsesProxy);
- 907 6 Settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, zipExtensions);
- 908 6 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH, pathToMono);
- 909 6 }
- 910
+ 904 3 super .populateSettings();
+ 905 3 Settings.setBooleanIfNotNull(Settings.KEYS.AUTO_UPDATE, autoUpdate);
+ 906 3 Settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
+ 907 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_EXPERIMENTAL_ENABLED, enableExperimental);
+ 908 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_JAR_ENABLED, jarAnalyzerEnabled);
+ 909 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, pyDistributionAnalyzerEnabled);
+ 910 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, pyPackageAnalyzerEnabled);
+ 911 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, rubygemsAnalyzerEnabled);
+ 912 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, opensslAnalyzerEnabled);
+ 913 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CMAKE_ENABLED, cmakeAnalyzerEnabled);
+ 914 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, autoconfAnalyzerEnabled);
+ 915 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, composerAnalyzerEnabled);
+ 916 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, nodeAnalyzerEnabled);
+ 917 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, nuspecAnalyzerEnabled);
+ 918 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, centralAnalyzerEnabled);
+ 919 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_ENABLED, nexusAnalyzerEnabled);
+ 920 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, archiveAnalyzerEnabled);
+ 921 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, assemblyAnalyzerEnabled);
+ 922 3 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
+ 923 3 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY, nexusUsesProxy);
+ 924 3 Settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, zipExtensions);
+ 925 3 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH, pathToMono);
+ 926 3 }
+ 927
- 911
-
- 912
-
- 913
-
- 914
-
- 915
-
- 916
-
- 917
-
- 918
-
- 919
- private void checkForFailure(List<Dependency> dependencies) throws BuildException {
- 920 0 final StringBuilder ids = new StringBuilder();
- 921 0 for (Dependency d : dependencies) {
- 922 0 for (Vulnerability v : d.getVulnerabilities()) {
- 923 0 if (v.getCvssScore() >= failBuildOnCVSS) {
- 924 0 if (ids.length() == 0) {
- 925 0 ids.append(v.getName());
- 926
- } else {
- 927 0 ids.append(", " ).append(v.getName());
928
- }
+
929
- }
- 930 0 }
- 931 0 }
- 932 0 if (ids.length() > 0) {
- 933 0 final String msg = String.format("%n%nDependency-Check Failure:%n"
- 934
- + "One or more dependencies were identified with vulnerabilities that have a CVSS score greater then '%.1f': %s%n"
- 935 0 + "See the dependency-check report for more details.%n%n" , failBuildOnCVSS, ids.toString());
- 936 0 throw new BuildException(msg);
- 937
- }
- 938 0 }
- 939
-
- 940
-
- 941
-
- 942
-
- 943
+
+ 930
+
+ 931
- 944
-
- 945
+ 932
+
+ 933
+
+ 934
+
+ 935
- 946
- private void showSummary(List<Dependency> dependencies) {
- 947 6 final StringBuilder summary = new StringBuilder();
- 948 6 for (Dependency d : dependencies) {
- 949 10 boolean firstEntry = true ;
- 950 10 final StringBuilder ids = new StringBuilder();
- 951 10 for (Vulnerability v : d.getVulnerabilities()) {
- 952 36 if (firstEntry) {
- 953 8 firstEntry = false ;
- 954
- } else {
- 955 28 ids.append(", " );
- 956
- }
- 957 36 ids.append(v.getName());
- 958 36 }
- 959 10 if (ids.length() > 0) {
- 960 8 summary.append(d.getFileName()).append(" (" );
- 961 8 firstEntry = true ;
- 962 8 for (Identifier id : d.getIdentifiers()) {
- 963 30 if (firstEntry) {
- 964 8 firstEntry = false ;
- 965
+ 936
+ private void checkForFailure(List<Dependency> dependencies) throws BuildException {
+ 937 0 final StringBuilder ids = new StringBuilder();
+ 938 0 for (Dependency d : dependencies) {
+ 939 0 for (Vulnerability v : d.getVulnerabilities()) {
+ 940 0 if (v.getCvssScore() >= failBuildOnCVSS) {
+ 941 0 if (ids.length() == 0) {
+ 942 0 ids.append(v.getName());
+ 943
} else {
- 966 22 summary.append(", " );
- 967
+ 944 0 ids.append(", " ).append(v.getName());
+ 945
}
- 968 30 summary.append(id.getValue());
- 969 30 }
- 970 8 summary.append(") : " ).append(ids).append(NEW_LINE);
- 971
- }
- 972 10 }
- 973 6 if (summary.length() > 0) {
- 974 12 final String msg = String.format("%n%n"
- 975
- + "One or more dependencies were identified with known vulnerabilities:%n%n%s"
- 976 6 + "%n%nSee the dependency-check report for more details.%n%n" , summary.toString());
- 977 6 log(msg, Project.MSG_WARN);
- 978
+ 946
+ }
+ 947 0 }
+ 948 0 }
+ 949 0 if (ids.length() > 0) {
+ 950 0 final String msg = String.format("%n%nDependency-Check Failure:%n"
+ 951
+ + "One or more dependencies were identified with vulnerabilities that have a CVSS score greater then '%.1f': %s%n"
+ 952 0 + "See the dependency-check report for more details.%n%n" , failBuildOnCVSS, ids.toString());
+ 953 0 throw new BuildException(msg);
+ 954
}
- 979 6 }
- 980
+ 955 0 }
+ 956
- 981
+ 957
- 982
-
- 983
-
- 984
+ 958
+
+ 959
+
+ 960
+
+ 961
+
+ 962
- 985 8 public static class ReportFormats extends EnumeratedAttribute {
- 986
-
- 987
-
+ 963
+ private void showSummary(List<Dependency> dependencies) {
+ 964 3 final StringBuilder summary = new StringBuilder();
+ 965 3 for (Dependency d : dependencies) {
+ 966 5 boolean firstEntry = true ;
+ 967 5 final StringBuilder ids = new StringBuilder();
+ 968 5 for (Vulnerability v : d.getVulnerabilities()) {
+ 969 18 if (firstEntry) {
+ 970 4 firstEntry = false ;
+ 971
+ } else {
+ 972 14 ids.append(", " );
+ 973
+ }
+ 974 18 ids.append(v.getName());
+ 975 18 }
+ 976 5 if (ids.length() > 0) {
+ 977 4 summary.append(d.getFileName()).append(" (" );
+ 978 4 firstEntry = true ;
+ 979 4 for (Identifier id : d.getIdentifiers()) {
+ 980 15 if (firstEntry) {
+ 981 4 firstEntry = false ;
+ 982
+ } else {
+ 983 11 summary.append(", " );
+ 984
+ }
+ 985 15 summary.append(id.getValue());
+ 986 15 }
+ 987 4 summary.append(") : " ).append(ids).append(NEW_LINE);
988
-
- 989
-
- 990
-
- 991
-
- 992
- @Override
- 993
- public String[] getValues() {
- 994 8 int i = 0;
- 995 8 final Format[] formats = Format.values();
- 996 8 final String[] values = new String[formats.length];
- 997 40 for (Format format : formats) {
- 998 32 values[i++] = format.name();
- 999
}
- 1000 8 return values;
- 1001
+ 989 5 }
+ 990 3 if (summary.length() > 0) {
+ 991 6 final String msg = String.format("%n%n"
+ 992
+ + "One or more dependencies were identified with known vulnerabilities:%n%n%s"
+ 993 3 + "%n%nSee the dependency-check report for more details.%n%n" , summary.toString());
+ 994 3 log(msg, Project.MSG_WARN);
+ 995
}
- 1002
- }
+ 996 3 }
+ 997
+
+ 998
+
+ 999
+
+ 1000
+
+ 1001
+
+ 1002 4 public static class ReportFormats extends EnumeratedAttribute {
1003
+
+ 1004
+
+ 1005
+
+ 1006
+
+ 1007
+
+ 1008
+
+ 1009
+ @Override
+ 1010
+ public String[] getValues() {
+ 1011 4 int i = 0;
+ 1012 4 final Format[] formats = Format.values();
+ 1013 4 final String[] values = new String[formats.length];
+ 1014 20 for (Format format : formats) {
+ 1015 16 values[i++] = format.name();
+ 1016
+ }
+ 1017 4 return values;
+ 1018
+ }
+ 1019
+ }
+ 1020
}
-
+
diff --git a/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Purge.html b/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Purge.html
index edf8c1e15..72d1befa9 100644
--- a/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Purge.html
+++ b/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Purge.html
@@ -12,7 +12,7 @@
@@ -105,13 +105,13 @@
44
public Purge() {
- 45 8 super ();
+ 45 4 super ();
46
47
- 48 8 StaticLoggerBinder.getSingleton().setTask(this );
- 49 8 }
+ 48 4 StaticLoggerBinder.getSingleton().setTask(this );
+ 49 4 }
50
51
@@ -120,7 +120,7 @@
53
- 54 8 private String dataDirectory = null ;
+ 54 4 private String dataDirectory = null ;
55
56
@@ -157,84 +157,153 @@
73
74
- @Override
- 75
- public void execute() throws BuildException {
- 76 0 populateSettings();
- 77
- File db;
- 78
- try {
- 79 0 db = new File(Settings.getDataDirectory(), "dc.h2.db" );
- 80 0 if (db.exists()) {
- 81 0 if (db.delete()) {
- 82 0 log("Database file purged; local copy of the NVD has been removed" , Project.MSG_INFO);
- 83
- } else {
- 84 0 log(String.format("Unable to delete '%s'; please delete the file manually" , db.getAbsolutePath()), Project.MSG_ERR);
- 85
- }
- 86
- } else {
- 87 0 log(String.format("Unable to purge database; the database file does not exists: %s" , db.getAbsolutePath()), Project.MSG_ERR);
- 88
- }
- 89 0 } catch (IOException ex) {
- 90 0 log("Unable to delete the database" , Project.MSG_ERR);
- 91
- } finally {
- 92 0 Settings.cleanup(true );
- 93 0 }
- 94 0 }
- 95
-
- 96
- 97
-
- 98
-
- 99
+ 75
+
+ 76
+
+ 77
- 100
- protected void populateSettings() {
- 101 6 Settings.initialize();
- 102 6 InputStream taskProperties = null ;
- 103
+ 78 4 private boolean failOnError = true ;
+ 79
+
+ 80
+
+ 81
+
+ 82
+
+ 83
+
+ 84
+
+ 85
+ public boolean isFailOnError() {
+ 86 0 return failOnError;
+ 87
+ }
+ 88
+
+ 89
+
+ 90
+
+ 91
+
+ 92
+
+ 93
+
+ 94
+ public void setFailOnError(boolean failOnError) {
+ 95 0 this .failOnError = failOnError;
+ 96 0 }
+ 97
+
+ 98
+ @Override
+ 99
+ public void execute() throws BuildException {
+ 100 0 populateSettings();
+ 101
+ File db;
+ 102
try {
- 104 6 taskProperties = this .getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE);
- 105 6 Settings.mergeProperties(taskProperties);
- 106 0 } catch (IOException ex) {
- 107 0 log("Unable to load the dependency-check ant task.properties file." , ex, Project.MSG_WARN);
- 108
- } finally {
- 109 6 if (taskProperties != null ) {
- 110
- try {
- 111 6 taskProperties.close();
- 112 0 } catch (IOException ex) {
- 113 0 log("" , ex, Project.MSG_DEBUG);
- 114 6 }
- 115
+ 103 0 db = new File(Settings.getDataDirectory(), "dc.h2.db" );
+ 104 0 if (db.exists()) {
+ 105 0 if (db.delete()) {
+ 106 0 log("Database file purged; local copy of the NVD has been removed" , Project.MSG_INFO);
+ 107
+ } else {
+ 108 0 final String msg = String.format("Unable to delete '%s'; please delete the file manually" , db.getAbsolutePath());
+ 109 0 if (this .failOnError) {
+ 110 0 throw new BuildException(msg);
+ 111
+ }
+ 112 0 log(msg, Project.MSG_ERR);
+ 113 0 }
+ 114
+ } else {
+ 115 0 final String msg = String.format("Unable to purge database; the database file does not exists: %s" , db.getAbsolutePath());
+ 116 0 if (this .failOnError) {
+ 117 0 throw new BuildException(msg);
+ 118
+ }
+ 119 0 log(msg, Project.MSG_ERR);
+ 120
}
- 116
- }
- 117 6 if (dataDirectory != null ) {
- 118 0 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
- 119
- } else {
- 120 6 final File jarPath = new File(Purge.class .getProtectionDomain().getCodeSource().getLocation().getPath());
- 121 6 final File base = jarPath.getParentFile();
- 122 6 final String sub = Settings.getString(Settings.KEYS.DATA_DIRECTORY);
- 123 6 final File dataDir = new File(base, sub);
- 124 6 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
+ 121 0 } catch (IOException ex) {
+ 122 0 final String msg = "Unable to delete the database" ;
+ 123 0 if (this .failOnError) {
+ 124 0 throw new BuildException(msg);
125
- }
- 126 6 }
+ }
+ 126 0 log(msg, Project.MSG_ERR);
127
+ } finally {
+ 128 0 Settings.cleanup(true );
+ 129 0 }
+ 130 0 }
+ 131
+
+ 132
+
+ 133
+
+ 134
+
+ 135
+
+ 136
+
+ 137
+
+ 138
+
+ 139
+ protected void populateSettings() throws BuildException {
+ 140 3 Settings.initialize();
+ 141 3 InputStream taskProperties = null ;
+ 142
+ try {
+ 143 3 taskProperties = this .getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE);
+ 144 3 Settings.mergeProperties(taskProperties);
+ 145 0 } catch (IOException ex) {
+ 146 0 final String msg = "Unable to load the dependency-check ant task.properties file." ;
+ 147 0 if (this .failOnError) {
+ 148 0 throw new BuildException(msg, ex);
+ 149
+ }
+ 150 0 log(msg, ex, Project.MSG_WARN);
+ 151
+ } finally {
+ 152 3 if (taskProperties != null ) {
+ 153
+ try {
+ 154 3 taskProperties.close();
+ 155 0 } catch (IOException ex) {
+ 156 0 log("" , ex, Project.MSG_DEBUG);
+ 157 3 }
+ 158
+ }
+ 159
+ }
+ 160 3 if (dataDirectory != null ) {
+ 161 0 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
+ 162
+ } else {
+ 163 3 final File jarPath = new File(Purge.class .getProtectionDomain().getCodeSource().getLocation().getPath());
+ 164 3 final File base = jarPath.getParentFile();
+ 165 3 final String sub = Settings.getString(Settings.KEYS.DATA_DIRECTORY);
+ 166 3 final File dataDir = new File(base, sub);
+ 167 3 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
+ 168
+ }
+ 169 3 }
+ 170
}
-
+
diff --git a/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Update.html b/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Update.html
index 474e7ce83..2a5018171 100644
--- a/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Update.html
+++ b/dependency-check-ant/cobertura/org.owasp.dependencycheck.taskdefs.Update.html
@@ -12,7 +12,7 @@
@@ -58,763 +58,787 @@
20
import org.apache.tools.ant.BuildException;
21
- import org.owasp.dependencycheck.Engine;
+ import org.apache.tools.ant.Project;
22
- import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
+ import org.owasp.dependencycheck.Engine;
23
- import org.owasp.dependencycheck.utils.Settings;
+ import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
24
- import org.slf4j.impl.StaticLoggerBinder;
+ import org.owasp.dependencycheck.data.update.exception.UpdateException;
25
-
+ import org.owasp.dependencycheck.utils.Settings;
26
-
+ import org.slf4j.impl.StaticLoggerBinder;
27
-
+
28
-
+
29
-
+
30
-
+
31
-
+
32
- public class Update extends Purge {
+
33
-
+
34
-
+
35
-
+ public class Update extends Purge {
36
-
+
37
- public Update() {
- 38 8 super ();
+
+ 38
+
39
-
+
40
-
- 41 8 StaticLoggerBinder.getSingleton().setTask(this );
- 42 8 }
+ public Update() {
+ 41 4 super ();
+ 42
+
43
-
- 44
-
- 45
-
+
+ 44 4 StaticLoggerBinder.getSingleton().setTask(this );
+ 45 4 }
46
-
+
47
- private String proxyServer;
+
48
-
+
49
-
+
50
-
+ private String proxyServer;
51
-
+
52
-
+
53
-
+
54
- public String getProxyServer() {
- 55 0 return proxyServer;
+
+ 55
+
56
- }
+
57
-
- 58
-
+ public String getProxyServer() {
+ 58 0 return proxyServer;
59
-
+ }
60
-
+
61
-
+
62
-
+
63
- public void setProxyServer(String server) {
- 64 0 this .proxyServer = server;
- 65 0 }
+
+ 64
+
+ 65
+
66
-
- 67
-
- 68
-
+ public void setProxyServer(String server) {
+ 67 0 this .proxyServer = server;
+ 68 0 }
69
-
+
70
- private String proxyPort;
+
71
-
+
72
-
+
73
-
+ private String proxyPort;
74
-
+
75
-
+
76
-
+
77
- public String getProxyPort() {
- 78 0 return proxyPort;
+
+ 78
+
79
- }
+
80
-
- 81
-
+ public String getProxyPort() {
+ 81 0 return proxyPort;
82
-
+ }
83
-
+
84
-
+
85
-
+
86
- public void setProxyPort(String proxyPort) {
- 87 0 this .proxyPort = proxyPort;
- 88 0 }
+
+ 87
+
+ 88
+
89
-
- 90
-
- 91
-
+ public void setProxyPort(String proxyPort) {
+ 90 0 this .proxyPort = proxyPort;
+ 91 0 }
92
- private String proxyUsername;
+
93
-
+
94
-
+
95
-
+ private String proxyUsername;
96
-
+
97
-
+
98
-
+
99
- public String getProxyUsername() {
- 100 0 return proxyUsername;
+
+ 100
+
101
- }
+
102
-
- 103
-
+ public String getProxyUsername() {
+ 103 0 return proxyUsername;
104
-
+ }
105
-
+
106
-
+
107
-
+
108
- public void setProxyUsername(String proxyUsername) {
- 109 0 this .proxyUsername = proxyUsername;
- 110 0 }
+
+ 109
+
+ 110
+
111
-
- 112
-
- 113
-
+ public void setProxyUsername(String proxyUsername) {
+ 112 0 this .proxyUsername = proxyUsername;
+ 113 0 }
114
- private String proxyPassword;
+
115
-
+
116
-
+
117
-
+ private String proxyPassword;
118
-
+
119
-
+
120
-
+
121
- public String getProxyPassword() {
- 122 0 return proxyPassword;
+
+ 122
+
123
- }
+
124
-
- 125
-
+ public String getProxyPassword() {
+ 125 0 return proxyPassword;
126
-
+ }
127
-
+
128
-
+
129
-
+
130
- public void setProxyPassword(String proxyPassword) {
- 131 0 this .proxyPassword = proxyPassword;
- 132 0 }
+
+ 131
+
+ 132
+
133
-
- 134
-
- 135
-
+ public void setProxyPassword(String proxyPassword) {
+ 134 0 this .proxyPassword = proxyPassword;
+ 135 0 }
136
- private String connectionTimeout;
+
137
-
+
138
-
+
139
-
+ private String connectionTimeout;
140
-
+
141
-
+
142
-
+
143
- public String getConnectionTimeout() {
- 144 0 return connectionTimeout;
+
+ 144
+
145
- }
+
146
-
- 147
-
+ public String getConnectionTimeout() {
+ 147 0 return connectionTimeout;
148
-
+ }
149
-
+
150
-
+
151
-
+
152
- public void setConnectionTimeout(String connectionTimeout) {
- 153 0 this .connectionTimeout = connectionTimeout;
- 154 0 }
+
+ 153
+
+ 154
+
155
-
- 156
-
- 157
-
+ public void setConnectionTimeout(String connectionTimeout) {
+ 156 0 this .connectionTimeout = connectionTimeout;
+ 157 0 }
158
- private String databaseDriverName;
+
159
-
+
160
-
+
161
-
+ private String databaseDriverName;
162
-
+
163
-
+
164
-
+
165
- public String getDatabaseDriverName() {
- 166 0 return databaseDriverName;
+
+ 166
+
167
- }
+
168
-
- 169
-
+ public String getDatabaseDriverName() {
+ 169 0 return databaseDriverName;
170
-
+ }
171
-
+
172
-
+
173
-
+
174
- public void setDatabaseDriverName(String databaseDriverName) {
- 175 0 this .databaseDriverName = databaseDriverName;
- 176 0 }
+
+ 175
+
+ 176
+
177
-
- 178
-
- 179
-
+ public void setDatabaseDriverName(String databaseDriverName) {
+ 178 0 this .databaseDriverName = databaseDriverName;
+ 179 0 }
180
-
+
181
- private String databaseDriverPath;
+
182
-
+
183
-
+
184
-
+ private String databaseDriverPath;
185
-
+
186
-
+
187
-
+
188
- public String getDatabaseDriverPath() {
- 189 0 return databaseDriverPath;
+
+ 189
+
190
- }
+
191
-
- 192
-
+ public String getDatabaseDriverPath() {
+ 192 0 return databaseDriverPath;
193
-
+ }
194
-
+
195
-
+
196
-
+
197
- public void setDatabaseDriverPath(String databaseDriverPath) {
- 198 0 this .databaseDriverPath = databaseDriverPath;
- 199 0 }
+
+ 198
+
+ 199
+
200
-
- 201
-
- 202
-
+ public void setDatabaseDriverPath(String databaseDriverPath) {
+ 201 0 this .databaseDriverPath = databaseDriverPath;
+ 202 0 }
203
- private String connectionString;
+
204
-
+
205
-
+
206
-
+ private String connectionString;
207
-
+
208
-
+
209
-
+
210
- public String getConnectionString() {
- 211 0 return connectionString;
+
+ 211
+
212
- }
+
213
-
- 214
-
+ public String getConnectionString() {
+ 214 0 return connectionString;
215
-
+ }
216
-
+
217
-
+
218
-
+
219
- public void setConnectionString(String connectionString) {
- 220 0 this .connectionString = connectionString;
- 221 0 }
+
+ 220
+
+ 221
+
222
-
- 223
-
- 224
-
+ public void setConnectionString(String connectionString) {
+ 223 0 this .connectionString = connectionString;
+ 224 0 }
225
- private String databaseUser;
+
226
-
+
227
-
+
228
-
+ private String databaseUser;
229
-
+
230
-
+
231
-
+
232
- public String getDatabaseUser() {
- 233 0 return databaseUser;
+
+ 233
+
234
- }
+
235
-
- 236
-
+ public String getDatabaseUser() {
+ 236 0 return databaseUser;
237
-
+ }
238
-
+
239
-
+
240
-
+
241
- public void setDatabaseUser(String databaseUser) {
- 242 0 this .databaseUser = databaseUser;
- 243 0 }
+
+ 242
+
+ 243
+
244
-
- 245
-
- 246
-
+ public void setDatabaseUser(String databaseUser) {
+ 245 0 this .databaseUser = databaseUser;
+ 246 0 }
247
-
+
248
- private String databasePassword;
+
249
-
+
250
-
+
251
-
+ private String databasePassword;
252
-
+
253
-
+
254
-
+
255
- public String getDatabasePassword() {
- 256 0 return databasePassword;
+
+ 256
+
257
- }
+
258
-
- 259
-
+ public String getDatabasePassword() {
+ 259 0 return databasePassword;
260
-
+ }
261
-
+
262
-
+
263
-
+
264
- public void setDatabasePassword(String databasePassword) {
- 265 0 this .databasePassword = databasePassword;
- 266 0 }
+
+ 265
+
+ 266
+
267
-
- 268
-
- 269
-
+ public void setDatabasePassword(String databasePassword) {
+ 268 0 this .databasePassword = databasePassword;
+ 269 0 }
270
-
+
271
- private String cveUrl12Modified;
+
272
-
+
273
-
+
274
-
+ private String cveUrl12Modified;
275
-
+
276
-
+
277
-
+
278
- public String getCveUrl12Modified() {
- 279 0 return cveUrl12Modified;
+
+ 279
+
280
- }
+
281
-
- 282
-
+ public String getCveUrl12Modified() {
+ 282 0 return cveUrl12Modified;
283
-
+ }
284
-
+
285
-
+
286
-
+
287
- public void setCveUrl12Modified(String cveUrl12Modified) {
- 288 0 this .cveUrl12Modified = cveUrl12Modified;
- 289 0 }
+
+ 288
+
+ 289
+
290
-
- 291
-
- 292
-
+ public void setCveUrl12Modified(String cveUrl12Modified) {
+ 291 0 this .cveUrl12Modified = cveUrl12Modified;
+ 292 0 }
293
-
+
294
- private String cveUrl20Modified;
+
295
-
+
296
-
+
297
-
+ private String cveUrl20Modified;
298
-
+
299
-
+
300
-
+
301
- public String getCveUrl20Modified() {
- 302 0 return cveUrl20Modified;
+
+ 302
+
303
- }
+
304
-
- 305
-
+ public String getCveUrl20Modified() {
+ 305 0 return cveUrl20Modified;
306
-
+ }
307
-
+
308
-
+
309
-
+
310
- public void setCveUrl20Modified(String cveUrl20Modified) {
- 311 0 this .cveUrl20Modified = cveUrl20Modified;
- 312 0 }
+
+ 311
+
+ 312
+
313
-
- 314
-
- 315
-
+ public void setCveUrl20Modified(String cveUrl20Modified) {
+ 314 0 this .cveUrl20Modified = cveUrl20Modified;
+ 315 0 }
316
-
+
317
- private String cveUrl12Base;
+
318
-
+
319
-
+
320
-
+ private String cveUrl12Base;
321
-
+
322
-
+
323
-
+
324
- public String getCveUrl12Base() {
- 325 0 return cveUrl12Base;
+
+ 325
+
326
- }
+
327
-
- 328
-
+ public String getCveUrl12Base() {
+ 328 0 return cveUrl12Base;
329
-
+ }
330
-
+
331
-
+
332
-
+
333
- public void setCveUrl12Base(String cveUrl12Base) {
- 334 0 this .cveUrl12Base = cveUrl12Base;
- 335 0 }
+
+ 334
+
+ 335
+
336
-
- 337
-
- 338
-
+ public void setCveUrl12Base(String cveUrl12Base) {
+ 337 0 this .cveUrl12Base = cveUrl12Base;
+ 338 0 }
339
-
+
340
- private String cveUrl20Base;
+
341
-
+
342
-
+
343
-
+ private String cveUrl20Base;
344
-
+
345
-
+
346
-
+
347
- public String getCveUrl20Base() {
- 348 0 return cveUrl20Base;
+
+ 348
+
349
- }
+
350
-
- 351
-
+ public String getCveUrl20Base() {
+ 351 0 return cveUrl20Base;
352
-
- 353
-
- 354
-
- 355
-
- 356
- public void setCveUrl20Base(String cveUrl20Base) {
- 357 0 this .cveUrl20Base = cveUrl20Base;
- 358 0 }
- 359
-
- 360
-
- 361
-
- 362
-
- 363
- private Integer cveValidForHours;
- 364
-
- 365
-
- 366
-
- 367
-
- 368
-
- 369
-
- 370
- public Integer getCveValidForHours() {
- 371 0 return cveValidForHours;
- 372
}
+ 353
+
+ 354
+
+ 355
+
+ 356
+
+ 357
+
+ 358
+
+ 359
+ public void setCveUrl20Base(String cveUrl20Base) {
+ 360 0 this .cveUrl20Base = cveUrl20Base;
+ 361 0 }
+ 362
+
+ 363
+
+ 364
+
+ 365
+
+ 366
+ private Integer cveValidForHours;
+ 367
+
+ 368
+
+ 369
+
+ 370
+
+ 371
+
+ 372
+
373
-
- 374
-
+ public Integer getCveValidForHours() {
+ 374 0 return cveValidForHours;
375
-
+ }
376
-
+
377
-
+
378
-
+
379
- public void setCveValidForHours(Integer cveValidForHours) {
- 380 0 this .cveValidForHours = cveValidForHours;
- 381 0 }
+
+ 380
+
+ 381
+
382
-
- 383
-
- 384
-
+ public void setCveValidForHours(Integer cveValidForHours) {
+ 383 0 this .cveValidForHours = cveValidForHours;
+ 384 0 }
385
-
- 386
-
- 387
-
- 388
-
- 389
- @Override
- 390
- public void execute() throws BuildException {
- 391 0 populateSettings();
- 392 0 Engine engine = null ;
- 393
- try {
- 394 0 engine = new Engine(Update.class .getClassLoader());
- 395 0 engine.doUpdates();
- 396 0 } catch (DatabaseException ex) {
- 397 0 throw new BuildException("Unable to connect to the dependency-check database; unable to update the NVD data" , ex);
- 398
- } finally {
- 399 0 Settings.cleanup(true );
- 400 0 if (engine != null ) {
- 401 0 engine.cleanup();
- 402
- }
- 403
- }
- 404 0 }
- 405
- 406
+ 386
- 407
-
- 408
-
- 409
+ 387
+
+ 388
+
+ 389
- 410
-
- 411
+ 390
+
+ 391
+
+ 392
- 412
+ 393
@Override
- 413
- protected void populateSettings() throws BuildException {
- 414 6 super .populateSettings();
- 415 6 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_SERVER, proxyServer);
- 416 6 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PORT, proxyPort);
- 417 6 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_USERNAME, proxyUsername);
- 418 6 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPassword);
- 419 6 Settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
- 420 6 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName);
- 421 6 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath);
- 422 6 Settings.setStringIfNotEmpty(Settings.KEYS.DB_CONNECTION_STRING, connectionString);
- 423 6 Settings.setStringIfNotEmpty(Settings.KEYS.DB_USER, databaseUser);
- 424 6 Settings.setStringIfNotEmpty(Settings.KEYS.DB_PASSWORD, databasePassword);
- 425 6 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_MODIFIED_12_URL, cveUrl12Modified);
- 426 6 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_MODIFIED_20_URL, cveUrl20Modified);
- 427 6 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_1_2, cveUrl12Base);
- 428 6 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_2_0, cveUrl20Base);
- 429 6 if (cveValidForHours != null ) {
- 430 0 if (cveValidForHours >= 0) {
- 431 0 Settings.setInt(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours);
- 432
- } else {
- 433 0 throw new BuildException("Invalid setting: `cpeValidForHours` must be 0 or greater" );
- 434
+ 394
+ public void execute() throws BuildException {
+ 395 0 populateSettings();
+ 396 0 Engine engine = null ;
+ 397
+ try {
+ 398 0 engine = new Engine(Update.class .getClassLoader());
+ 399
+ try {
+ 400 0 engine.doUpdates();
+ 401 0 } catch (UpdateException ex) {
+ 402 0 if (this .isFailOnError()) {
+ 403 0 throw new BuildException(ex);
+ 404
+ }
+ 405 0 log(ex.getMessage(), Project.MSG_ERR);
+ 406 0 }
+ 407 0 } catch (DatabaseException ex) {
+ 408 0 final String msg = "Unable to connect to the dependency-check database; unable to update the NVD data" ;
+ 409 0 if (this .isFailOnError()) {
+ 410 0 throw new BuildException(msg, ex);
+ 411
}
- 435
+ 412 0 log(msg, Project.MSG_ERR);
+ 413
+ } finally {
+ 414 0 Settings.cleanup(true );
+ 415 0 if (engine != null ) {
+ 416 0 engine.cleanup();
+ 417
+ }
+ 418
}
- 436 6 }
- 437
+ 419 0 }
+ 420
+
+ 421
+
+ 422
+
+ 423
+
+ 424
+
+ 425
+
+ 426
+
+ 427
+
+ 428
+ @Override
+ 429
+ protected void populateSettings() throws BuildException {
+ 430 3 super .populateSettings();
+ 431 3 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_SERVER, proxyServer);
+ 432 3 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PORT, proxyPort);
+ 433 3 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_USERNAME, proxyUsername);
+ 434 3 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPassword);
+ 435 3 Settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
+ 436 3 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName);
+ 437 3 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath);
+ 438 3 Settings.setStringIfNotEmpty(Settings.KEYS.DB_CONNECTION_STRING, connectionString);
+ 439 3 Settings.setStringIfNotEmpty(Settings.KEYS.DB_USER, databaseUser);
+ 440 3 Settings.setStringIfNotEmpty(Settings.KEYS.DB_PASSWORD, databasePassword);
+ 441 3 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_MODIFIED_12_URL, cveUrl12Modified);
+ 442 3 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_MODIFIED_20_URL, cveUrl20Modified);
+ 443 3 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_1_2, cveUrl12Base);
+ 444 3 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_2_0, cveUrl20Base);
+ 445 3 if (cveValidForHours != null ) {
+ 446 0 if (cveValidForHours >= 0) {
+ 447 0 Settings.setInt(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours);
+ 448
+ } else {
+ 449 0 throw new BuildException("Invalid setting: `cpeValidForHours` must be 0 or greater" );
+ 450
+ }
+ 451
+ }
+ 452 3 }
+ 453
}
-
+
diff --git a/dependency-check-ant/cobertura/org.slf4j.impl.StaticLoggerBinder.html b/dependency-check-ant/cobertura/org.slf4j.impl.StaticLoggerBinder.html
index 3b263a180..d25b986ee 100644
--- a/dependency-check-ant/cobertura/org.slf4j.impl.StaticLoggerBinder.html
+++ b/dependency-check-ant/cobertura/org.slf4j.impl.StaticLoggerBinder.html
@@ -93,7 +93,7 @@
38
- 39 2 private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
+ 39 1 private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
40
41
@@ -108,7 +108,7 @@
46
public static final StaticLoggerBinder getSingleton() {
- 47 120 return SINGLETON;
+ 47 66 return SINGLETON;
48
}
49
@@ -121,7 +121,7 @@
53
- 54 2 private Task task = null ;
+ 54 1 private Task task = null ;
55
56
@@ -136,9 +136,9 @@
61
public void setTask(Task task) {
- 62 24 this .task = task;
- 63 24 loggerFactory = new AntLoggerFactory(task);
- 64 24 }
+ 62 12 this .task = task;
+ 63 12 loggerFactory = new AntLoggerFactory(task);
+ 64 12 }
65
66
@@ -155,7 +155,7 @@
72
- 73 2 public static String REQUESTED_API_VERSION = "1.7.12" ;
+ 73 1 public static String REQUESTED_API_VERSION = "1.7.12" ;
74
75
@@ -168,7 +168,7 @@
79
- 80 2 private static final String LOGGER_FACTORY_CLASS = AntLoggerFactory.class .getName();
+ 80 1 private static final String LOGGER_FACTORY_CLASS = AntLoggerFactory.class .getName();
81
82
@@ -189,9 +189,9 @@
90
- 91 2 private StaticLoggerBinder() {
- 92 2 loggerFactory = new AntLoggerFactory(task);
- 93 2 }
+ 91 1 private StaticLoggerBinder() {
+ 92 1 loggerFactory = new AntLoggerFactory(task);
+ 93 1 }
94
95
@@ -208,7 +208,7 @@
@Override
101
public ILoggerFactory getLoggerFactory() {
- 102 92 return loggerFactory;
+ 102 52 return loggerFactory;
103
}
104
@@ -227,13 +227,13 @@
@Override
111
public String getLoggerFactoryClassStr() {
- 112 2 return LOGGER_FACTORY_CLASS;
+ 112 1 return LOGGER_FACTORY_CLASS;
113
}
114
}
-
+
diff --git a/dependency-check-ant/config-purge.html b/dependency-check-ant/config-purge.html
index 997b4f2f8..a7149aee0 100644
--- a/dependency-check-ant/config-purge.html
+++ b/dependency-check-ant/config-purge.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Configuration
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Configuration
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -180,6 +180,15 @@
data
+
+
+
+failOnError
+
+Whether the build should fail if there is an error executing the purge
+
+true
+
diff --git a/dependency-check-ant/config-update.html b/dependency-check-ant/config-update.html
index d65e31734..2a78af02c 100644
--- a/dependency-check-ant/config-update.html
+++ b/dependency-check-ant/config-update.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Configuration
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Configuration
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -216,6 +216,15 @@
+
+
+
+failOnError
+
+Whether the build should fail if there is an error executing the update
+
+true
+
Advanced Configuration
diff --git a/dependency-check-ant/configuration.html b/dependency-check-ant/configuration.html
index 27ea1ccc3..9c6f9a4a6 100644
--- a/dependency-check-ant/configuration.html
+++ b/dependency-check-ant/configuration.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Configuration
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Configuration
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -216,6 +216,15 @@
+failOnError
+
+Whether the build should fail if there is an error executing the dependency-check analysis
+
+true
+
+
+
+
projectName
The name of the project being scanned.
@@ -223,7 +232,7 @@
Dependency-Check
-
+
reportFormat
@@ -232,7 +241,7 @@
HTML
-
+
reportOutputDirectory
@@ -241,7 +250,7 @@
‘target’
-
+
suppressionFile
@@ -250,7 +259,7 @@
-
+
proxyServer
@@ -259,7 +268,7 @@
-
+
proxyPort
@@ -268,7 +277,7 @@
-
+
proxyUsername
@@ -277,7 +286,7 @@
-
+
proxyPassword
@@ -286,7 +295,7 @@
-
+
connectionTimeout
@@ -295,7 +304,7 @@
-
+
enableExperimental
diff --git a/dependency-check-ant/dependency-analysis.html b/dependency-check-ant/dependency-analysis.html
index 869c3ca7f..bd8506db7 100644
--- a/dependency-check-ant/dependency-analysis.html
+++ b/dependency-check-ant/dependency-analysis.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Dependencies Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Dependencies Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -239,7 +239,7 @@
org.owasp
dependency-check-core
-1.4.0
+1.4.2
compile
jar
@@ -247,7 +247,7 @@
org.owasp
dependency-check-utils
-1.4.0
+1.4.2
compile
jar
@@ -255,7 +255,7 @@
org.owasp
dependency-check-core
-1.4.0
+1.4.2
test
tests
test-jar
diff --git a/dependency-check-ant/dependency-updates-report.html b/dependency-check-ant/dependency-updates-report.html
index ca16efbef..d81165dbc 100644
--- a/dependency-check-ant/dependency-updates-report.html
+++ b/dependency-check-ant/dependency-updates-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Dependency Updates Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Dependency Updates Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -230,7 +230,7 @@
# of dependencies using the latest version available
-24
+25
# of dependencies where the next version available is smaller than an incremental version update
@@ -238,7 +238,7 @@
# of dependencies where the next version available is an incremental version update
-1
+0
# of dependencies where the next version available is a minor version update
@@ -398,7 +398,7 @@
org.apache.commons
commons-compress
-1.11
+1.12
jar
@@ -578,24 +578,24 @@
org.jmockit
jmockit
-1.22
+1.24
test
jar
-1.23
+1.25
-
+
org.jsoup
jsoup
-1.9.1
+1.9.2
jar
-1.9.2
+
@@ -665,7 +665,7 @@
org.owasp
dependency-check-core
-1.4.0
+1.4.2
compile
jar
@@ -677,7 +677,7 @@
org.owasp
dependency-check-utils
-1.4.0
+1.4.2
compile
jar
@@ -984,7 +984,7 @@
commons-compress
Current Version
-1.11
+1.12
Scope
@@ -1047,7 +1047,7 @@
jar
Newer versions
-4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 6.0.06.0.1 Latest Major
+4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 5.5.2 6.0.0 6.0.16.1.0 Latest Major
org.apache.lucene:lucene-core
@@ -1074,7 +1074,7 @@
jar
Newer versions
-4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 6.0.06.0.1 Latest Major
+4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 5.5.2 6.0.0 6.0.16.1.0 Latest Major
org.apache.lucene:lucene-queryparser
@@ -1101,7 +1101,7 @@
jar
Newer versions
-4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 6.0.06.0.1 Latest Major
+4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 5.5.2 6.0.0 6.0.16.1.0 Latest Major
org.apache.lucene:lucene-test-framework
@@ -1128,7 +1128,7 @@
jar
Newer versions
-4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 6.0.06.0.1 Latest Major
+4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 5.5.2 6.0.0 6.0.16.1.0 Latest Major
org.apache.maven:maven-core
@@ -1359,7 +1359,7 @@
jmockit
Current Version
-1.22
+1.24
Scope
test
@@ -1371,13 +1371,13 @@
jar
Newer versions
-1.23 Next Minor 1.24 Latest Minor
+1.25 Next Minor
org.jsoup:jsoup
Status
- There is at least one newer incremental version available. Incremental updates are typically passive.
+ No newer versions available.
Group Id
org.jsoup
@@ -1386,7 +1386,7 @@
jsoup
Current Version
-1.9.1
+1.9.2
Scope
@@ -1395,10 +1395,7 @@
Type
-jar
-
-Newer versions
-1.9.2 Next Incremental
+jar
org.owasp:dependency-check-core
@@ -1413,7 +1410,7 @@
dependency-check-core
Current Version
-1.4.0
+1.4.2
Scope
compile
@@ -1437,7 +1434,7 @@
dependency-check-utils
Current Version
-1.4.0
+1.4.2
Scope
compile
diff --git a/dependency-check-ant/findbugs.html b/dependency-check-ant/findbugs.html
index 62f02f09e..6a633008f 100644
--- a/dependency-check-ant/findbugs.html
+++ b/dependency-check-ant/findbugs.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – FindBugs Bug Detector Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
FindBugs Bug Detector Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -264,7 +264,7 @@
Inconsistent synchronization of org.owasp.dependencycheck.taskdefs.Check.path; locked 44% of time
MT_CORRECTNESS
IS2_INCONSISTENT_SYNC
-870
+887
Medium
diff --git a/dependency-check-ant/index.html b/dependency-check-ant/index.html
index 70d962843..ae431870a 100644
--- a/dependency-check-ant/index.html
+++ b/dependency-check-ant/index.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – About
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
About
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -150,7 +150,7 @@
-Download dependency-check-ant from bintray here .
+Download dependency-check-ant from bintray here .
Unzip the archive
diff --git a/dependency-check-ant/integration.html b/dependency-check-ant/integration.html
index 76e088e8a..73e98d56f 100644
--- a/dependency-check-ant/integration.html
+++ b/dependency-check-ant/integration.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – CI Management
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
CI Management
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/issue-tracking.html b/dependency-check-ant/issue-tracking.html
index 378db0cc3..f2cf2bdda 100644
--- a/dependency-check-ant/issue-tracking.html
+++ b/dependency-check-ant/issue-tracking.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Issue Management
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Issue Management
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/license.html b/dependency-check-ant/license.html
index 4c298a65d..a720c353f 100644
--- a/dependency-check-ant/license.html
+++ b/dependency-check-ant/license.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Project Licenses
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Licenses
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/mail-lists.html b/dependency-check-ant/mail-lists.html
index ce7c4c66f..4824edfef 100644
--- a/dependency-check-ant/mail-lists.html
+++ b/dependency-check-ant/mail-lists.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Project Mailing Lists
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Mailing Lists
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/plugin-updates-report.html b/dependency-check-ant/plugin-updates-report.html
index c41d3ed4c..fcac7e5d5 100644
--- a/dependency-check-ant/plugin-updates-report.html
+++ b/dependency-check-ant/plugin-updates-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Plugin Updates Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Plugin Updates Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -230,7 +230,7 @@
# of plugins using the latest version available
-18
+19
# of plugins where the next version available is smaller than an incremental version update
@@ -246,7 +246,7 @@
# of plugins where the next version available is a major version update
-1
+0
# of plugins where a dependencies section containes a dependency with an updated version
@@ -368,7 +368,7 @@
org.apache.maven.plugins
maven-jar-plugin
-3.0.0
+3.0.2
@@ -378,7 +378,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
-2.10.3
+2.10.4
@@ -415,14 +415,14 @@
-
+
org.apache.maven.plugins
maven-source-plugin
-2.4
+3.0.1
+
-3.0.0
@@ -634,7 +634,7 @@
maven-jar-plugin
Current Version
-3.0.0
+3.0.2
Plugin org.apache.maven.plugins:maven-javadoc-plugin
@@ -649,7 +649,7 @@
maven-javadoc-plugin
Current Version
-2.10.3
+2.10.4
Plugin org.apache.maven.plugins:maven-release-plugin
@@ -700,7 +700,7 @@
Status
- There is at least one newer major version available. Major updates are rarely passive.
+ No newer versions available.
Group Id
org.apache.maven.plugins
@@ -709,10 +709,7 @@
maven-source-plugin
Current Version
-2.4
-
-Newer versions
-3.0.0 Next Major
+3.0.1
Plugin org.apache.maven.plugins:maven-surefire-plugin
diff --git a/dependency-check-ant/project-info.html b/dependency-check-ant/project-info.html
index 183cda180..52eee0113 100644
--- a/dependency-check-ant/project-info.html
+++ b/dependency-check-ant/project-info.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Project Information
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Information
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/project-reports.html b/dependency-check-ant/project-reports.html
index d2a0f70fc..e0b1d2343 100644
--- a/dependency-check-ant/project-reports.html
+++ b/dependency-check-ant/project-reports.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Generated Reports
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Generated Reports
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/project-summary.html b/dependency-check-ant/project-summary.html
index cfbe4f71c..bbd602b98 100644
--- a/dependency-check-ant/project-summary.html
+++ b/dependency-check-ant/project-summary.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Project Summary
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Summary
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -238,7 +238,7 @@
dependency-check-ant
Version
-1.4.0
+1.4.2
Type
jar
diff --git a/dependency-check-ant/source-repository.html b/dependency-check-ant/source-repository.html
index 8ac1dcba0..1250faa72 100644
--- a/dependency-check-ant/source-repository.html
+++ b/dependency-check-ant/source-repository.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Source Code Management
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Source Code Management
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/surefire-report.html b/dependency-check-ant/surefire-report.html
index d54168ed6..153eccf3f 100644
--- a/dependency-check-ant/surefire-report.html
+++ b/dependency-check-ant/surefire-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Surefire Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Surefire Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -259,7 +259,7 @@ function toggleDisplay(elementId) {
0
0
100%
-16.843
+
16.967
Note: failures are anticipated and checked for with assertions while errors are unanticipated.
Package List
@@ -280,7 +280,7 @@ function toggleDisplay(elementId) {
0
0
100%
-
16.843
+
16.967
Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.
org.owasp.dependencycheck.taskdefs
@@ -302,7 +302,7 @@ function toggleDisplay(elementId) {
0
0
100%
-
16.843
+16.967
Test Cases
[Summary ] [Package List ] [Test Cases ]
@@ -312,19 +312,19 @@ function toggleDisplay(elementId) {
testGetFailBuildOnCVSS
-0.402
+
0.454
testAddDirSet
-7.583
+
7.177
testAddFileSet
-4.888
+
4.975
testAddFileList
-3.884
+4.258
diff --git a/dependency-check-ant/taglist.html b/dependency-check-ant/taglist.html
index f81456efa..ea957f8cb 100644
--- a/dependency-check-ant/taglist.html
+++ b/dependency-check-ant/taglist.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Tag List report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Tag List report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/team-list.html b/dependency-check-ant/team-list.html
index 38b0559b4..846133cc7 100644
--- a/dependency-check-ant/team-list.html
+++ b/dependency-check-ant/team-list.html
@@ -1,13 +1,13 @@
-
+
dependency-check-ant – Project Team
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Team
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-ant/xref-test/index.html b/dependency-check-ant/xref-test/index.html
index 87b737854..a6c03eb1f 100644
--- a/dependency-check-ant/xref-test/index.html
+++ b/dependency-check-ant/xref-test/index.html
@@ -4,7 +4,7 @@
- Dependency-Check Ant Task 1.4.0 Reference
+ Dependency-Check Ant Task 1.4.2 Reference
diff --git a/dependency-check-ant/xref-test/org/owasp/dependencycheck/taskdefs/package-frame.html b/dependency-check-ant/xref-test/org/owasp/dependencycheck/taskdefs/package-frame.html
index 106e7d141..2165a446e 100644
--- a/dependency-check-ant/xref-test/org/owasp/dependencycheck/taskdefs/package-frame.html
+++ b/dependency-check-ant/xref-test/org/owasp/dependencycheck/taskdefs/package-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference Package org.owasp.dependencycheck.taskdefs
+ Dependency-Check Ant Task 1.4.2 Reference Package org.owasp.dependencycheck.taskdefs
diff --git a/dependency-check-ant/xref-test/org/owasp/dependencycheck/taskdefs/package-summary.html b/dependency-check-ant/xref-test/org/owasp/dependencycheck/taskdefs/package-summary.html
index e0c2c2c73..a3b1934f2 100644
--- a/dependency-check-ant/xref-test/org/owasp/dependencycheck/taskdefs/package-summary.html
+++ b/dependency-check-ant/xref-test/org/owasp/dependencycheck/taskdefs/package-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference Package org.owasp.dependencycheck.taskdefs
+ Dependency-Check Ant Task 1.4.2 Reference Package org.owasp.dependencycheck.taskdefs
diff --git a/dependency-check-ant/xref-test/overview-frame.html b/dependency-check-ant/xref-test/overview-frame.html
index 815bfa189..a9ab11169 100644
--- a/dependency-check-ant/xref-test/overview-frame.html
+++ b/dependency-check-ant/xref-test/overview-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference
+ Dependency-Check Ant Task 1.4.2 Reference
diff --git a/dependency-check-ant/xref-test/overview-summary.html b/dependency-check-ant/xref-test/overview-summary.html
index 9be5448cb..43107983f 100644
--- a/dependency-check-ant/xref-test/overview-summary.html
+++ b/dependency-check-ant/xref-test/overview-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference
+ Dependency-Check Ant Task 1.4.2 Reference
@@ -24,7 +24,7 @@
- Dependency-Check Ant Task 1.4.0 Reference
+ Dependency-Check Ant Task 1.4.2 Reference
diff --git a/dependency-check-ant/xref/index.html b/dependency-check-ant/xref/index.html
index 87b737854..a6c03eb1f 100644
--- a/dependency-check-ant/xref/index.html
+++ b/dependency-check-ant/xref/index.html
@@ -4,7 +4,7 @@
- Dependency-Check Ant Task 1.4.0 Reference
+ Dependency-Check Ant Task 1.4.2 Reference
diff --git a/dependency-check-ant/xref/org/owasp/dependencycheck/ant/logging/package-frame.html b/dependency-check-ant/xref/org/owasp/dependencycheck/ant/logging/package-frame.html
index f96519771..ae86307de 100644
--- a/dependency-check-ant/xref/org/owasp/dependencycheck/ant/logging/package-frame.html
+++ b/dependency-check-ant/xref/org/owasp/dependencycheck/ant/logging/package-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference Package org.owasp.dependencycheck.ant.logging
+ Dependency-Check Ant Task 1.4.2 Reference Package org.owasp.dependencycheck.ant.logging
diff --git a/dependency-check-ant/xref/org/owasp/dependencycheck/ant/logging/package-summary.html b/dependency-check-ant/xref/org/owasp/dependencycheck/ant/logging/package-summary.html
index b47da75a0..d61fa2b55 100644
--- a/dependency-check-ant/xref/org/owasp/dependencycheck/ant/logging/package-summary.html
+++ b/dependency-check-ant/xref/org/owasp/dependencycheck/ant/logging/package-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference Package org.owasp.dependencycheck.ant.logging
+ Dependency-Check Ant Task 1.4.2 Reference Package org.owasp.dependencycheck.ant.logging
diff --git a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Check.html b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Check.html
index 2c447834d..4d625b854 100644
--- a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Check.html
+++ b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Check.html
@@ -26,989 +26,1006 @@
18 package org.owasp.dependencycheck.taskdefs;
19
20 import java.io.File;
-21 import java.io.IOException;
-22 import java.util.List;
-23 import org.apache.tools.ant.BuildException;
-24 import org.apache.tools.ant.Project;
-25 import org.apache.tools.ant.types.EnumeratedAttribute;
-26 import org.apache.tools.ant.types.Reference;
-27 import org.apache.tools.ant.types.Resource;
-28 import org.apache.tools.ant.types.ResourceCollection;
-29 import org.apache.tools.ant.types.resources.FileProvider;
-30 import org.apache.tools.ant.types.resources.Resources;
-31 import org.owasp.dependencycheck.Engine;
-32 import org.owasp.dependencycheck.data.nvdcve.CveDB;
-33 import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
-34 import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
+21 import java.util.List;
+22 import org.apache.tools.ant.BuildException;
+23 import org.apache.tools.ant.Project;
+24 import org.apache.tools.ant.types.EnumeratedAttribute;
+25 import org.apache.tools.ant.types.Reference;
+26 import org.apache.tools.ant.types.Resource;
+27 import org.apache.tools.ant.types.ResourceCollection;
+28 import org.apache.tools.ant.types.resources.FileProvider;
+29 import org.apache.tools.ant.types.resources.Resources;
+30 import org.owasp.dependencycheck.Engine;
+31 import org.owasp.dependencycheck.data.nvdcve.CveDB;
+32 import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
+33 import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
+34 import org.owasp.dependencycheck.data.update.exception.UpdateException;
35 import org.owasp.dependencycheck.dependency.Dependency;
36 import org.owasp.dependencycheck.dependency.Identifier;
37 import org.owasp.dependencycheck.dependency.Vulnerability;
-38 import org.owasp.dependencycheck.reporting.ReportGenerator;
-39 import org.owasp.dependencycheck.reporting.ReportGenerator.Format;
-40 import org.owasp.dependencycheck.utils.Settings;
-41 import org.slf4j.impl.StaticLoggerBinder;
-42
-43
-44
-45
-46
-47
-48 public class Check extends Update {
-49
-50
-51
-52
-53 private static final String NEW_LINE = System.getProperty("line.separator" , "\n" ).intern();
-54
-55
-56
-57
-58 public Check () {
-59 super ();
-60
-61
-62 StaticLoggerBinder.getSingleton().setTask(this );
-63 }
-64
-65
-66
-67
-68
-69 private Resources path = null ;
-70
-71
-72
-73 private Reference refid = null ;
-74
-75
-76
-77
-78
-79
-80
-81 public void add(ResourceCollection rc) {
-82 if (isReference()) {
-83 throw new BuildException("Nested elements are not allowed when using the refid attribute." );
-84 }
-85 getPath().add(rc);
-86 }
-87
-88
-89
-90
-91
-92
-93
-94 private synchronized Resources getPath() {
-95 if (path == null ) {
-96 path = new Resources(getProject());
-97 path.setCache(true );
-98 }
-99 return path;
-100 }
-101
-102
-103
-104
-105
-106
-107 public boolean isReference() {
-108 return refid != null ;
-109 }
-110
-111
-112
-113
-114
-115
-116
-117 public void setRefid(Reference r) {
-118 if (path != null ) {
-119 throw new BuildException("Nested elements are not allowed when using the refid attribute." );
-120 }
-121 refid = r;
-122 }
-123
-124
-125
-126
-127
-128
-129
-130 private void dealWithReferences() throws BuildException {
-131 if (isReference()) {
-132 final Object o = refid.getReferencedObject(getProject());
-133 if (!(o instanceof ResourceCollection)) {
-134 throw new BuildException("refid '" + refid.getRefId()
-135 + "' does not refer to a resource collection." );
-136 }
-137 getPath().add((ResourceCollection) o);
-138 }
-139 }
-140
-141
-142
-143
-144
-145
-146 @Deprecated
-147 private String applicationName = null ;
-148
-149
-150
-151
-152
+38 import org.owasp.dependencycheck.exception.ExceptionCollection;
+39 import org.owasp.dependencycheck.exception.ReportException;
+40 import org.owasp.dependencycheck.reporting.ReportGenerator;
+41 import org.owasp.dependencycheck.reporting.ReportGenerator.Format;
+42 import org.owasp.dependencycheck.utils.Settings;
+43 import org.slf4j.impl.StaticLoggerBinder;
+44
+45
+46
+47
+48
+49
+50 public class Check extends Update {
+51
+52
+53
+54
+55 private static final String NEW_LINE = System.getProperty("line.separator" , "\n" ).intern();
+56
+57
+58
+59
+60 public Check () {
+61 super ();
+62
+63
+64 StaticLoggerBinder.getSingleton().setTask(this );
+65 }
+66
+67
+68
+69
+70
+71 private Resources path = null ;
+72
+73
+74
+75 private Reference refid = null ;
+76
+77
+78
+79
+80
+81
+82
+83 public void add(ResourceCollection rc) {
+84 if (isReference()) {
+85 throw new BuildException("Nested elements are not allowed when using the refid attribute." );
+86 }
+87 getPath().add(rc);
+88 }
+89
+90
+91
+92
+93
+94
+95
+96 private synchronized Resources getPath() {
+97 if (path == null ) {
+98 path = new Resources(getProject());
+99 path.setCache(true );
+100 }
+101 return path;
+102 }
+103
+104
+105
+106
+107
+108
+109 public boolean isReference() {
+110 return refid != null ;
+111 }
+112
+113
+114
+115
+116
+117
+118
+119 public void setRefid(Reference r) {
+120 if (path != null ) {
+121 throw new BuildException("Nested elements are not allowed when using the refid attribute." );
+122 }
+123 refid = r;
+124 }
+125
+126
+127
+128
+129
+130
+131
+132 private void dealWithReferences() throws BuildException {
+133 if (isReference()) {
+134 final Object o = refid.getReferencedObject(getProject());
+135 if (!(o instanceof ResourceCollection)) {
+136 throw new BuildException("refid '" + refid.getRefId()
+137 + "' does not refer to a resource collection." );
+138 }
+139 getPath().add((ResourceCollection) o);
+140 }
+141 }
+142
+143
+144
+145
+146
+147
+148 @Deprecated
+149 private String applicationName = null ;
+150
+151
+152
153
-154
-155
-156 @Deprecated
-157 public String getApplicationName() {
-158 return applicationName;
-159 }
-160
-161
-162
-163
-164
-165
-166
-167 @Deprecated
-168 public void setApplicationName(String applicationName) {
-169 this .applicationName = applicationName;
-170 }
-171
-172
-173
-174 private String projectName = "dependency-check" ;
-175
-176
-177
-178
-179
-180
-181 public String getProjectName() {
-182 if (applicationName != null ) {
-183 log("Configuration 'applicationName' has been deprecated, please use 'projectName' instead" , Project.MSG_WARN);
-184 if ("dependency-check" .equals(projectName)) {
-185 projectName = applicationName;
-186 }
-187 }
-188 return projectName;
-189 }
-190
-191
-192
-193
-194
-195
-196 public void setProjectName(String projectName) {
-197 this .projectName = projectName;
-198 }
-199
-200
-201
-202
-203
-204 private String reportOutputDirectory = "." ;
-205
-206
-207
-208
-209
-210
-211 public String getReportOutputDirectory() {
-212 return reportOutputDirectory;
-213 }
-214
-215
-216
-217
-218
-219
-220 public void setReportOutputDirectory(String reportOutputDirectory) {
-221 this .reportOutputDirectory = reportOutputDirectory;
-222 }
-223
-224
-225
-226
-227
-228
-229
-230 private float failBuildOnCVSS = 11;
-231
-232
-233
-234
-235
-236
-237 public float getFailBuildOnCVSS() {
-238 return failBuildOnCVSS;
-239 }
-240
-241
-242
-243
-244
-245
-246 public void setFailBuildOnCVSS(float failBuildOnCVSS) {
-247 this .failBuildOnCVSS = failBuildOnCVSS;
-248 }
-249
-250
-251
-252
-253 private Boolean autoUpdate;
-254
-255
-256
-257
-258
-259
-260 public Boolean isAutoUpdate() {
-261 return autoUpdate;
-262 }
-263
-264
-265
-266
-267
-268
-269 public void setAutoUpdate(Boolean autoUpdate) {
-270 this .autoUpdate = autoUpdate;
-271 }
-272
-273
-274
-275
-276
-277 @Deprecated
-278 private boolean updateOnly = false;
-279
-280
-281
-282
-283
-284
-285
-286 @Deprecated
-287 public boolean isUpdateOnly() {
-288 return updateOnly;
-289 }
-290
-291
-292
-293
-294
-295
-296
-297 @Deprecated
-298 public void setUpdateOnly(boolean updateOnly) {
-299 this .updateOnly = updateOnly;
-300 }
-301
-302
-303
-304
-305
-306 private String reportFormat = "HTML" ;
-307
-308
-309
-310
-311
-312
-313 public String getReportFormat() {
-314 return reportFormat;
-315 }
-316
-317
-318
-319
-320
-321
-322 public void setReportFormat(ReportFormats reportFormat) {
-323 this .reportFormat = reportFormat.getValue();
-324 }
-325
-326
-327
-328 private String suppressionFile;
-329
-330
-331
-332
-333
-334
-335 public String getSuppressionFile() {
-336 return suppressionFile;
-337 }
-338
-339
-340
-341
-342
-343
-344 public void setSuppressionFile(String suppressionFile) {
-345 this .suppressionFile = suppressionFile;
-346 }
-347
-348
-349
-350 private boolean showSummary = true ;
-351
-352
-353
-354
-355
-356
-357 public boolean isShowSummary() {
-358 return showSummary;
-359 }
-360
-361
-362
-363
-364
-365
-366 public void setShowSummary(boolean showSummary) {
-367 this .showSummary = showSummary;
-368 }
-369
-370
-371
-372
-373 private Boolean enableExperimental;
-374
-375
-376
-377
-378
-379
-380 public Boolean isEnableExperimental() {
-381 return enableExperimental;
-382 }
-383
-384
-385
-386
-387
-388
-389 public void setEnableExperimental(Boolean enableExperimental) {
-390 this .enableExperimental = enableExperimental;
-391 }
-392
-393
-394
-395
-396 private Boolean jarAnalyzerEnabled;
-397
-398
-399
-400
-401
-402
-403 public Boolean isJarAnalyzerEnabled() {
-404 return jarAnalyzerEnabled;
-405 }
-406
-407
-408
-409
-410
-411
-412 public void setJarAnalyzerEnabled(Boolean jarAnalyzerEnabled) {
-413 this .jarAnalyzerEnabled = jarAnalyzerEnabled;
-414 }
-415
-416
-417
-418 private Boolean archiveAnalyzerEnabled;
-419
-420
-421
-422
-423
-424
-425 public Boolean isArchiveAnalyzerEnabled() {
-426 return archiveAnalyzerEnabled;
-427 }
-428
-429
-430
-431 private Boolean assemblyAnalyzerEnabled;
-432
-433
-434
-435
-436
-437
-438 public void setArchiveAnalyzerEnabled(Boolean archiveAnalyzerEnabled) {
-439 this .archiveAnalyzerEnabled = archiveAnalyzerEnabled;
-440 }
-441
-442
-443
-444
-445
-446
-447 public Boolean isAssemblyAnalyzerEnabled() {
-448 return assemblyAnalyzerEnabled;
-449 }
-450
-451
-452
-453
-454
-455
-456 public void setAssemblyAnalyzerEnabled(Boolean assemblyAnalyzerEnabled) {
-457 this .assemblyAnalyzerEnabled = assemblyAnalyzerEnabled;
-458 }
-459
-460
-461
-462 private Boolean nuspecAnalyzerEnabled;
-463
-464
-465
-466
-467
-468
-469 public Boolean isNuspecAnalyzerEnabled() {
-470 return nuspecAnalyzerEnabled;
-471 }
-472
-473
-474
-475
-476
-477
-478 public void setNuspecAnalyzerEnabled(Boolean nuspecAnalyzerEnabled) {
-479 this .nuspecAnalyzerEnabled = nuspecAnalyzerEnabled;
-480 }
-481
-482
-483
-484 private Boolean composerAnalyzerEnabled;
-485
-486
-487
-488
-489
-490
-491 public Boolean isComposerAnalyzerEnabled() {
-492 return composerAnalyzerEnabled;
-493 }
-494
-495
-496
-497
-498
-499
-500 public void setComposerAnalyzerEnabled(Boolean composerAnalyzerEnabled) {
-501 this .composerAnalyzerEnabled = composerAnalyzerEnabled;
-502 }
-503
-504
-505
-506 private Boolean autoconfAnalyzerEnabled;
-507
-508
-509
-510
-511
-512
-513 public Boolean isAutoconfAnalyzerEnabled() {
-514 return autoconfAnalyzerEnabled;
-515 }
-516
-517
-518
-519
-520
-521
-522 public void setAutoconfAnalyzerEnabled(Boolean autoconfAnalyzerEnabled) {
-523 this .autoconfAnalyzerEnabled = autoconfAnalyzerEnabled;
-524 }
-525
-526
-527
-528 private Boolean cmakeAnalyzerEnabled;
-529
-530
-531
-532
-533
-534
-535 public Boolean isCMakeAnalyzerEnabled() {
-536 return cmakeAnalyzerEnabled;
-537 }
-538
-539
-540
-541
-542
-543
-544 public void setCMakeAnalyzerEnabled(Boolean cmakeAnalyzerEnabled) {
-545 this .cmakeAnalyzerEnabled = cmakeAnalyzerEnabled;
-546 }
-547
-548
-549
-550 private Boolean opensslAnalyzerEnabled;
-551
-552
-553
-554
-555
-556
-557 public Boolean isOpensslAnalyzerEnabled() {
-558 return opensslAnalyzerEnabled;
-559 }
-560
-561
-562
-563
-564
-565
-566 public void setOpensslAnalyzerEnabled(Boolean opensslAnalyzerEnabled) {
-567 this .opensslAnalyzerEnabled = opensslAnalyzerEnabled;
-568 }
-569
-570
-571
-572 private Boolean nodeAnalyzerEnabled;
-573
-574
-575
-576
-577
-578
-579 public Boolean isNodeAnalyzerEnabled() {
-580 return nodeAnalyzerEnabled;
-581 }
-582
-583
-584
-585
-586
-587
-588 public void setNodeAnalyzerEnabled(Boolean nodeAnalyzerEnabled) {
-589 this .nodeAnalyzerEnabled = nodeAnalyzerEnabled;
-590 }
-591
-592
-593
-594 private Boolean rubygemsAnalyzerEnabled;
-595
-596
-597
-598
-599
-600
-601 public Boolean isRubygemsAnalyzerEnabled() {
-602 return rubygemsAnalyzerEnabled;
-603 }
-604
-605
-606
-607
-608
-609
-610 public void setRubygemsAnalyzerEnabled(Boolean rubygemsAnalyzerEnabled) {
-611 this .rubygemsAnalyzerEnabled = rubygemsAnalyzerEnabled;
-612 }
-613
-614
-615
-616 private Boolean pyPackageAnalyzerEnabled;
-617
-618
-619
-620
-621
-622
-623 public Boolean isPyPackageAnalyzerEnabled() {
-624 return pyPackageAnalyzerEnabled;
-625 }
-626
-627
-628
-629
-630
-631
-632 public void setPyPackageAnalyzerEnabled(Boolean pyPackageAnalyzerEnabled) {
-633 this .pyPackageAnalyzerEnabled = pyPackageAnalyzerEnabled;
-634 }
-635
-636
-637
-638
-639 private Boolean pyDistributionAnalyzerEnabled;
-640
-641
-642
-643
-644
-645
-646 public Boolean isPyDistributionAnalyzerEnabled() {
-647 return pyDistributionAnalyzerEnabled;
-648 }
-649
-650
-651
-652
-653
-654
-655
-656 public void setPyDistributionAnalyzerEnabled(Boolean pyDistributionAnalyzerEnabled) {
-657 this .pyDistributionAnalyzerEnabled = pyDistributionAnalyzerEnabled;
-658 }
-659
-660
-661
-662
-663 private Boolean centralAnalyzerEnabled;
-664
-665
-666
-667
-668
-669
-670 public Boolean isCentralAnalyzerEnabled() {
-671 return centralAnalyzerEnabled;
-672 }
-673
-674
-675
-676
-677
-678
-679 public void setCentralAnalyzerEnabled(Boolean centralAnalyzerEnabled) {
-680 this .centralAnalyzerEnabled = centralAnalyzerEnabled;
-681 }
-682
-683
-684
-685
-686 private Boolean nexusAnalyzerEnabled;
-687
-688
-689
-690
-691
-692
-693 public Boolean isNexusAnalyzerEnabled() {
-694 return nexusAnalyzerEnabled;
-695 }
-696
-697
-698
-699
-700
-701
-702 public void setNexusAnalyzerEnabled(Boolean nexusAnalyzerEnabled) {
-703 this .nexusAnalyzerEnabled = nexusAnalyzerEnabled;
-704 }
-705
-706
-707
-708
-709
-710 private String nexusUrl;
-711
-712
-713
-714
-715
-716
-717 public String getNexusUrl() {
-718 return nexusUrl;
-719 }
-720
-721
-722
-723
-724
-725
-726 public void setNexusUrl(String nexusUrl) {
-727 this .nexusUrl = nexusUrl;
-728 }
-729
-730
-731
-732 private Boolean nexusUsesProxy;
-733
-734
-735
-736
-737
-738
-739 public Boolean isNexusUsesProxy() {
-740 return nexusUsesProxy;
-741 }
-742
-743
-744
-745
-746
-747
-748 public void setNexusUsesProxy(Boolean nexusUsesProxy) {
-749 this .nexusUsesProxy = nexusUsesProxy;
-750 }
-751
-752
-753
-754
-755
-756 private String zipExtensions;
-757
-758
-759
-760
-761
-762
-763 public String getZipExtensions() {
-764 return zipExtensions;
-765 }
-766
-767
-768
-769
-770
-771
-772 public void setZipExtensions(String zipExtensions) {
-773 this .zipExtensions = zipExtensions;
-774 }
-775
-776
-777
-778
-779 private String pathToMono;
-780
-781
-782
-783
-784
-785
-786 public String getPathToMono() {
-787 return pathToMono;
-788 }
-789
-790
-791
-792
-793
-794
-795 public void setPathToMono(String pathToMono) {
-796 this .pathToMono = pathToMono;
-797 }
-798
-799 @Override
-800 public void execute() throws BuildException {
-801 dealWithReferences();
-802 validateConfiguration();
-803 populateSettings();
-804 Engine engine = null ;
-805 try {
-806 engine = new Engine(Check.class .getClassLoader());
-807 if (isUpdateOnly()) {
-808 log("Deprecated 'UpdateOnly' property set; please use the UpdateTask instead" , Project.MSG_WARN);
-809 engine.doUpdates();
-810 } else {
+154
+155
+156
+157
+158 @Deprecated
+159 public String getApplicationName() {
+160 return applicationName;
+161 }
+162
+163
+164
+165
+166
+167
+168
+169 @Deprecated
+170 public void setApplicationName(String applicationName) {
+171 this .applicationName = applicationName;
+172 }
+173
+174
+175
+176 private String projectName = "dependency-check" ;
+177
+178
+179
+180
+181
+182
+183 public String getProjectName() {
+184 if (applicationName != null ) {
+185 log("Configuration 'applicationName' has been deprecated, please use 'projectName' instead" , Project.MSG_WARN);
+186 if ("dependency-check" .equals(projectName)) {
+187 projectName = applicationName;
+188 }
+189 }
+190 return projectName;
+191 }
+192
+193
+194
+195
+196
+197
+198 public void setProjectName(String projectName) {
+199 this .projectName = projectName;
+200 }
+201
+202
+203
+204
+205
+206 private String reportOutputDirectory = "." ;
+207
+208
+209
+210
+211
+212
+213 public String getReportOutputDirectory() {
+214 return reportOutputDirectory;
+215 }
+216
+217
+218
+219
+220
+221
+222 public void setReportOutputDirectory(String reportOutputDirectory) {
+223 this .reportOutputDirectory = reportOutputDirectory;
+224 }
+225
+226
+227
+228
+229
+230
+231
+232 private float failBuildOnCVSS = 11;
+233
+234
+235
+236
+237
+238
+239 public float getFailBuildOnCVSS() {
+240 return failBuildOnCVSS;
+241 }
+242
+243
+244
+245
+246
+247
+248 public void setFailBuildOnCVSS(float failBuildOnCVSS) {
+249 this .failBuildOnCVSS = failBuildOnCVSS;
+250 }
+251
+252
+253
+254
+255 private Boolean autoUpdate;
+256
+257
+258
+259
+260
+261
+262 public Boolean isAutoUpdate() {
+263 return autoUpdate;
+264 }
+265
+266
+267
+268
+269
+270
+271 public void setAutoUpdate(Boolean autoUpdate) {
+272 this .autoUpdate = autoUpdate;
+273 }
+274
+275
+276
+277
+278
+279 @Deprecated
+280 private boolean updateOnly = false;
+281
+282
+283
+284
+285
+286
+287
+288 @Deprecated
+289 public boolean isUpdateOnly() {
+290 return updateOnly;
+291 }
+292
+293
+294
+295
+296
+297
+298
+299 @Deprecated
+300 public void setUpdateOnly(boolean updateOnly) {
+301 this .updateOnly = updateOnly;
+302 }
+303
+304
+305
+306
+307
+308 private String reportFormat = "HTML" ;
+309
+310
+311
+312
+313
+314
+315 public String getReportFormat() {
+316 return reportFormat;
+317 }
+318
+319
+320
+321
+322
+323
+324 public void setReportFormat(ReportFormats reportFormat) {
+325 this .reportFormat = reportFormat.getValue();
+326 }
+327
+328
+329
+330 private String suppressionFile;
+331
+332
+333
+334
+335
+336
+337 public String getSuppressionFile() {
+338 return suppressionFile;
+339 }
+340
+341
+342
+343
+344
+345
+346 public void setSuppressionFile(String suppressionFile) {
+347 this .suppressionFile = suppressionFile;
+348 }
+349
+350
+351
+352 private boolean showSummary = true ;
+353
+354
+355
+356
+357
+358
+359 public boolean isShowSummary() {
+360 return showSummary;
+361 }
+362
+363
+364
+365
+366
+367
+368 public void setShowSummary(boolean showSummary) {
+369 this .showSummary = showSummary;
+370 }
+371
+372
+373
+374
+375 private Boolean enableExperimental;
+376
+377
+378
+379
+380
+381
+382 public Boolean isEnableExperimental() {
+383 return enableExperimental;
+384 }
+385
+386
+387
+388
+389
+390
+391 public void setEnableExperimental(Boolean enableExperimental) {
+392 this .enableExperimental = enableExperimental;
+393 }
+394
+395
+396
+397
+398 private Boolean jarAnalyzerEnabled;
+399
+400
+401
+402
+403
+404
+405 public Boolean isJarAnalyzerEnabled() {
+406 return jarAnalyzerEnabled;
+407 }
+408
+409
+410
+411
+412
+413
+414 public void setJarAnalyzerEnabled(Boolean jarAnalyzerEnabled) {
+415 this .jarAnalyzerEnabled = jarAnalyzerEnabled;
+416 }
+417
+418
+419
+420 private Boolean archiveAnalyzerEnabled;
+421
+422
+423
+424
+425
+426
+427 public Boolean isArchiveAnalyzerEnabled() {
+428 return archiveAnalyzerEnabled;
+429 }
+430
+431
+432
+433 private Boolean assemblyAnalyzerEnabled;
+434
+435
+436
+437
+438
+439
+440 public void setArchiveAnalyzerEnabled(Boolean archiveAnalyzerEnabled) {
+441 this .archiveAnalyzerEnabled = archiveAnalyzerEnabled;
+442 }
+443
+444
+445
+446
+447
+448
+449 public Boolean isAssemblyAnalyzerEnabled() {
+450 return assemblyAnalyzerEnabled;
+451 }
+452
+453
+454
+455
+456
+457
+458 public void setAssemblyAnalyzerEnabled(Boolean assemblyAnalyzerEnabled) {
+459 this .assemblyAnalyzerEnabled = assemblyAnalyzerEnabled;
+460 }
+461
+462
+463
+464 private Boolean nuspecAnalyzerEnabled;
+465
+466
+467
+468
+469
+470
+471 public Boolean isNuspecAnalyzerEnabled() {
+472 return nuspecAnalyzerEnabled;
+473 }
+474
+475
+476
+477
+478
+479
+480 public void setNuspecAnalyzerEnabled(Boolean nuspecAnalyzerEnabled) {
+481 this .nuspecAnalyzerEnabled = nuspecAnalyzerEnabled;
+482 }
+483
+484
+485
+486 private Boolean composerAnalyzerEnabled;
+487
+488
+489
+490
+491
+492
+493 public Boolean isComposerAnalyzerEnabled() {
+494 return composerAnalyzerEnabled;
+495 }
+496
+497
+498
+499
+500
+501
+502 public void setComposerAnalyzerEnabled(Boolean composerAnalyzerEnabled) {
+503 this .composerAnalyzerEnabled = composerAnalyzerEnabled;
+504 }
+505
+506
+507
+508 private Boolean autoconfAnalyzerEnabled;
+509
+510
+511
+512
+513
+514
+515 public Boolean isAutoconfAnalyzerEnabled() {
+516 return autoconfAnalyzerEnabled;
+517 }
+518
+519
+520
+521
+522
+523
+524 public void setAutoconfAnalyzerEnabled(Boolean autoconfAnalyzerEnabled) {
+525 this .autoconfAnalyzerEnabled = autoconfAnalyzerEnabled;
+526 }
+527
+528
+529
+530 private Boolean cmakeAnalyzerEnabled;
+531
+532
+533
+534
+535
+536
+537 public Boolean isCMakeAnalyzerEnabled() {
+538 return cmakeAnalyzerEnabled;
+539 }
+540
+541
+542
+543
+544
+545
+546 public void setCMakeAnalyzerEnabled(Boolean cmakeAnalyzerEnabled) {
+547 this .cmakeAnalyzerEnabled = cmakeAnalyzerEnabled;
+548 }
+549
+550
+551
+552 private Boolean opensslAnalyzerEnabled;
+553
+554
+555
+556
+557
+558
+559 public Boolean isOpensslAnalyzerEnabled() {
+560 return opensslAnalyzerEnabled;
+561 }
+562
+563
+564
+565
+566
+567
+568 public void setOpensslAnalyzerEnabled(Boolean opensslAnalyzerEnabled) {
+569 this .opensslAnalyzerEnabled = opensslAnalyzerEnabled;
+570 }
+571
+572
+573
+574 private Boolean nodeAnalyzerEnabled;
+575
+576
+577
+578
+579
+580
+581 public Boolean isNodeAnalyzerEnabled() {
+582 return nodeAnalyzerEnabled;
+583 }
+584
+585
+586
+587
+588
+589
+590 public void setNodeAnalyzerEnabled(Boolean nodeAnalyzerEnabled) {
+591 this .nodeAnalyzerEnabled = nodeAnalyzerEnabled;
+592 }
+593
+594
+595
+596 private Boolean rubygemsAnalyzerEnabled;
+597
+598
+599
+600
+601
+602
+603 public Boolean isRubygemsAnalyzerEnabled() {
+604 return rubygemsAnalyzerEnabled;
+605 }
+606
+607
+608
+609
+610
+611
+612 public void setRubygemsAnalyzerEnabled(Boolean rubygemsAnalyzerEnabled) {
+613 this .rubygemsAnalyzerEnabled = rubygemsAnalyzerEnabled;
+614 }
+615
+616
+617
+618 private Boolean pyPackageAnalyzerEnabled;
+619
+620
+621
+622
+623
+624
+625 public Boolean isPyPackageAnalyzerEnabled() {
+626 return pyPackageAnalyzerEnabled;
+627 }
+628
+629
+630
+631
+632
+633
+634 public void setPyPackageAnalyzerEnabled(Boolean pyPackageAnalyzerEnabled) {
+635 this .pyPackageAnalyzerEnabled = pyPackageAnalyzerEnabled;
+636 }
+637
+638
+639
+640
+641 private Boolean pyDistributionAnalyzerEnabled;
+642
+643
+644
+645
+646
+647
+648 public Boolean isPyDistributionAnalyzerEnabled() {
+649 return pyDistributionAnalyzerEnabled;
+650 }
+651
+652
+653
+654
+655
+656
+657
+658 public void setPyDistributionAnalyzerEnabled(Boolean pyDistributionAnalyzerEnabled) {
+659 this .pyDistributionAnalyzerEnabled = pyDistributionAnalyzerEnabled;
+660 }
+661
+662
+663
+664
+665 private Boolean centralAnalyzerEnabled;
+666
+667
+668
+669
+670
+671
+672 public Boolean isCentralAnalyzerEnabled() {
+673 return centralAnalyzerEnabled;
+674 }
+675
+676
+677
+678
+679
+680
+681 public void setCentralAnalyzerEnabled(Boolean centralAnalyzerEnabled) {
+682 this .centralAnalyzerEnabled = centralAnalyzerEnabled;
+683 }
+684
+685
+686
+687
+688 private Boolean nexusAnalyzerEnabled;
+689
+690
+691
+692
+693
+694
+695 public Boolean isNexusAnalyzerEnabled() {
+696 return nexusAnalyzerEnabled;
+697 }
+698
+699
+700
+701
+702
+703
+704 public void setNexusAnalyzerEnabled(Boolean nexusAnalyzerEnabled) {
+705 this .nexusAnalyzerEnabled = nexusAnalyzerEnabled;
+706 }
+707
+708
+709
+710
+711
+712 private String nexusUrl;
+713
+714
+715
+716
+717
+718
+719 public String getNexusUrl() {
+720 return nexusUrl;
+721 }
+722
+723
+724
+725
+726
+727
+728 public void setNexusUrl(String nexusUrl) {
+729 this .nexusUrl = nexusUrl;
+730 }
+731
+732
+733
+734 private Boolean nexusUsesProxy;
+735
+736
+737
+738
+739
+740
+741 public Boolean isNexusUsesProxy() {
+742 return nexusUsesProxy;
+743 }
+744
+745
+746
+747
+748
+749
+750 public void setNexusUsesProxy(Boolean nexusUsesProxy) {
+751 this .nexusUsesProxy = nexusUsesProxy;
+752 }
+753
+754
+755
+756
+757
+758 private String zipExtensions;
+759
+760
+761
+762
+763
+764
+765 public String getZipExtensions() {
+766 return zipExtensions;
+767 }
+768
+769
+770
+771
+772
+773
+774 public void setZipExtensions(String zipExtensions) {
+775 this .zipExtensions = zipExtensions;
+776 }
+777
+778
+779
+780
+781 private String pathToMono;
+782
+783
+784
+785
+786
+787
+788 public String getPathToMono() {
+789 return pathToMono;
+790 }
+791
+792
+793
+794
+795
+796
+797 public void setPathToMono(String pathToMono) {
+798 this .pathToMono = pathToMono;
+799 }
+800
+801 @Override
+802 public void execute() throws BuildException {
+803 dealWithReferences();
+804 validateConfiguration();
+805 populateSettings();
+806 Engine engine = null ;
+807 try {
+808 engine = new Engine(Check.class .getClassLoader());
+809 if (isUpdateOnly()) {
+810 log("Deprecated 'UpdateOnly' property set; please use the UpdateTask instead" , Project.MSG_WARN);
811 try {
-812 for (Resource resource : path) {
-813 final FileProvider provider = resource.as(FileProvider.class );
-814 if (provider != null ) {
-815 final File file = provider.getFile();
-816 if (file != null && file.exists()) {
-817 engine.scan(file);
-818 }
-819 }
-820 }
-821
-822 engine.analyzeDependencies();
-823 DatabaseProperties prop = null ;
-824 CveDB cve = null ;
-825 try {
-826 cve = new CveDB();
-827 cve.open();
-828 prop = cve.getDatabaseProperties();
-829 } catch (DatabaseException ex) {
-830 log("Unable to retrieve DB Properties" , ex, Project.MSG_DEBUG);
-831 } finally {
-832 if (cve != null ) {
-833 cve.close();
-834 }
+812 engine.doUpdates();
+813 } catch (UpdateException ex) {
+814 if (this .isFailOnError()) {
+815 throw new BuildException(ex);
+816 }
+817 log(ex.getMessage(), Project.MSG_ERR);
+818 }
+819 } else {
+820 for (Resource resource : path) {
+821 final FileProvider provider = resource.as(FileProvider.class );
+822 if (provider != null ) {
+823 final File file = provider.getFile();
+824 if (file != null && file.exists()) {
+825 engine.scan(file);
+826 }
+827 }
+828 }
+829
+830 try {
+831 engine.analyzeDependencies();
+832 } catch (ExceptionCollection ex) {
+833 if (this .isFailOnError()) {
+834 throw new BuildException(ex);
835 }
-836 final ReportGenerator reporter = new ReportGenerator(getProjectName(), engine.getDependencies(), engine.getAnalyzers(), prop);
-837 reporter.generateReports(reportOutputDirectory, reportFormat);
-838
-839 if (this .failBuildOnCVSS <= 10) {
-840 checkForFailure(engine.getDependencies());
-841 }
-842 if (this .showSummary) {
-843 showSummary(engine.getDependencies());
-844 }
-845 } catch (IOException ex) {
-846 log("Unable to generate dependency-check report" , ex, Project.MSG_DEBUG);
-847 throw new BuildException("Unable to generate dependency-check report" , ex);
-848 } catch (Exception ex) {
-849 log("An exception occurred; unable to continue task" , ex, Project.MSG_DEBUG);
-850 throw new BuildException("An exception occurred; unable to continue task" , ex);
-851 }
-852 }
-853 } catch (DatabaseException ex) {
-854 log("Unable to connect to the dependency-check database; analysis has stopped" , ex, Project.MSG_ERR);
-855 } finally {
-856 Settings.cleanup(true );
-857 if (engine != null ) {
-858 engine.cleanup();
+836 }
+837 DatabaseProperties prop = null ;
+838 CveDB cve = null ;
+839 try {
+840 cve = new CveDB();
+841 cve.open();
+842 prop = cve.getDatabaseProperties();
+843 } catch (DatabaseException ex) {
+844 log("Unable to retrieve DB Properties" , ex, Project.MSG_DEBUG);
+845 } finally {
+846 if (cve != null ) {
+847 cve.close();
+848 }
+849 }
+850 final ReportGenerator reporter = new ReportGenerator(getProjectName(), engine.getDependencies(), engine.getAnalyzers(), prop);
+851 reporter.generateReports(reportOutputDirectory, reportFormat);
+852
+853 if (this .failBuildOnCVSS <= 10) {
+854 checkForFailure(engine.getDependencies());
+855 }
+856 if (this .showSummary) {
+857 showSummary(engine.getDependencies());
+858 }
859 }
-860 }
-861 }
-862
-863
-864
-865
-866
-867
-868
-869 private void validateConfiguration() throws BuildException {
-870 if (path == null ) {
-871 throw new BuildException("No project dependencies have been defined to analyze." );
-872 }
-873 if (failBuildOnCVSS < 0 || failBuildOnCVSS > 11) {
-874 throw new BuildException("Invalid configuration, failBuildOnCVSS must be between 0 and 11." );
-875 }
-876 }
-877
-878
-879
-880
-881
-882
-883
-884
-885 @Override
-886 protected void populateSettings() throws BuildException {
-887 super .populateSettings();
-888 Settings.setBooleanIfNotNull(Settings.KEYS.AUTO_UPDATE, autoUpdate);
-889 Settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
-890 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_EXPERIMENTAL_ENABLED, enableExperimental);
-891 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_JAR_ENABLED, jarAnalyzerEnabled);
-892 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, pyDistributionAnalyzerEnabled);
-893 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, pyPackageAnalyzerEnabled);
-894 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, rubygemsAnalyzerEnabled);
-895 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, opensslAnalyzerEnabled);
-896 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CMAKE_ENABLED, cmakeAnalyzerEnabled);
-897 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, autoconfAnalyzerEnabled);
-898 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, composerAnalyzerEnabled);
-899 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, nodeAnalyzerEnabled);
-900 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, nuspecAnalyzerEnabled);
-901 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, centralAnalyzerEnabled);
-902 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_ENABLED, nexusAnalyzerEnabled);
-903 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, archiveAnalyzerEnabled);
-904 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, assemblyAnalyzerEnabled);
-905 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
-906 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY, nexusUsesProxy);
-907 Settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, zipExtensions);
-908 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH, pathToMono);
-909 }
-910
-911
-912
-913
-914
-915
-916
-917
-918
-919 private void checkForFailure(List<Dependency> dependencies) throws BuildException {
-920 final StringBuilder ids = new StringBuilder();
-921 for (Dependency d : dependencies) {
-922 for (Vulnerability v : d.getVulnerabilities()) {
-923 if (v.getCvssScore() >= failBuildOnCVSS) {
-924 if (ids.length() == 0) {
-925 ids.append(v.getName());
-926 } else {
-927 ids.append(", " ).append(v.getName());
-928 }
-929 }
-930 }
-931 }
-932 if (ids.length() > 0) {
-933 final String msg = String.format("%n%nDependency-Check Failure:%n"
-934 + "One or more dependencies were identified with vulnerabilities that have a CVSS score greater then '%.1f': %s%n"
-935 + "See the dependency-check report for more details.%n%n" , failBuildOnCVSS, ids.toString());
-936 throw new BuildException(msg);
-937 }
-938 }
-939
-940
-941
-942
-943
-944
-945
-946 private void showSummary(List<Dependency> dependencies) {
-947 final StringBuilder summary = new StringBuilder();
-948 for (Dependency d : dependencies) {
-949 boolean firstEntry = true ;
-950 final StringBuilder ids = new StringBuilder();
-951 for (Vulnerability v : d.getVulnerabilities()) {
-952 if (firstEntry) {
-953 firstEntry = false;
-954 } else {
-955 ids.append(", " );
-956 }
-957 ids.append(v.getName());
-958 }
-959 if (ids.length() > 0) {
-960 summary.append(d.getFileName()).append(" (" );
-961 firstEntry = true ;
-962 for (Identifier id : d.getIdentifiers()) {
-963 if (firstEntry) {
-964 firstEntry = false;
-965 } else {
-966 summary.append(", " );
-967 }
-968 summary.append(id.getValue());
-969 }
-970 summary.append(") : " ).append(ids).append(NEW_LINE);
-971 }
-972 }
-973 if (summary.length() > 0) {
-974 final String msg = String.format("%n%n"
-975 + "One or more dependencies were identified with known vulnerabilities:%n%n%s"
-976 + "%n%nSee the dependency-check report for more details.%n%n" , summary.toString());
-977 log(msg, Project.MSG_WARN);
-978 }
-979 }
-980
-981
-982
-983
-984
-985 public static class ReportFormats extends EnumeratedAttribute {
-986
-987
-988
-989
-990
-991
-992 @Override
-993 public String[] getValues() {
-994 int i = 0;
-995 final Format[] formats = Format.values();
-996 final String[] values = new String[formats.length];
-997 for (Format format : formats) {
-998 values[i++] = format.name();
-999 }
-1000 return values;
-1001 }
-1002 }
-1003 }
+860 } catch (DatabaseException ex) {
+861 final String msg = "Unable to connect to the dependency-check database; analysis has stopped" ;
+862 if (this .isFailOnError()) {
+863 throw new BuildException(msg, ex);
+864 }
+865 log(msg, ex, Project.MSG_ERR);
+866 } catch (ReportException ex) {
+867 final String msg = "Unable to generate the dependency-check report" ;
+868 if (this .isFailOnError()) {
+869 throw new BuildException(msg, ex);
+870 }
+871 log(msg, ex, Project.MSG_ERR);
+872 } finally {
+873 Settings.cleanup(true );
+874 if (engine != null ) {
+875 engine.cleanup();
+876 }
+877 }
+878 }
+879
+880
+881
+882
+883
+884
+885
+886 private void validateConfiguration() throws BuildException {
+887 if (path == null ) {
+888 throw new BuildException("No project dependencies have been defined to analyze." );
+889 }
+890 if (failBuildOnCVSS < 0 || failBuildOnCVSS > 11) {
+891 throw new BuildException("Invalid configuration, failBuildOnCVSS must be between 0 and 11." );
+892 }
+893 }
+894
+895
+896
+897
+898
+899
+900
+901
+902 @Override
+903 protected void populateSettings() throws BuildException {
+904 super .populateSettings();
+905 Settings.setBooleanIfNotNull(Settings.KEYS.AUTO_UPDATE, autoUpdate);
+906 Settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
+907 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_EXPERIMENTAL_ENABLED, enableExperimental);
+908 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_JAR_ENABLED, jarAnalyzerEnabled);
+909 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, pyDistributionAnalyzerEnabled);
+910 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, pyPackageAnalyzerEnabled);
+911 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, rubygemsAnalyzerEnabled);
+912 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, opensslAnalyzerEnabled);
+913 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CMAKE_ENABLED, cmakeAnalyzerEnabled);
+914 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, autoconfAnalyzerEnabled);
+915 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, composerAnalyzerEnabled);
+916 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, nodeAnalyzerEnabled);
+917 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, nuspecAnalyzerEnabled);
+918 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, centralAnalyzerEnabled);
+919 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_ENABLED, nexusAnalyzerEnabled);
+920 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, archiveAnalyzerEnabled);
+921 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, assemblyAnalyzerEnabled);
+922 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
+923 Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY, nexusUsesProxy);
+924 Settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, zipExtensions);
+925 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH, pathToMono);
+926 }
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936 private void checkForFailure(List<Dependency> dependencies) throws BuildException {
+937 final StringBuilder ids = new StringBuilder();
+938 for (Dependency d : dependencies) {
+939 for (Vulnerability v : d.getVulnerabilities()) {
+940 if (v.getCvssScore() >= failBuildOnCVSS) {
+941 if (ids.length() == 0) {
+942 ids.append(v.getName());
+943 } else {
+944 ids.append(", " ).append(v.getName());
+945 }
+946 }
+947 }
+948 }
+949 if (ids.length() > 0) {
+950 final String msg = String.format("%n%nDependency-Check Failure:%n"
+951 + "One or more dependencies were identified with vulnerabilities that have a CVSS score greater then '%.1f': %s%n"
+952 + "See the dependency-check report for more details.%n%n" , failBuildOnCVSS, ids.toString());
+953 throw new BuildException(msg);
+954 }
+955 }
+956
+957
+958
+959
+960
+961
+962
+963 private void showSummary(List<Dependency> dependencies) {
+964 final StringBuilder summary = new StringBuilder();
+965 for (Dependency d : dependencies) {
+966 boolean firstEntry = true ;
+967 final StringBuilder ids = new StringBuilder();
+968 for (Vulnerability v : d.getVulnerabilities()) {
+969 if (firstEntry) {
+970 firstEntry = false;
+971 } else {
+972 ids.append(", " );
+973 }
+974 ids.append(v.getName());
+975 }
+976 if (ids.length() > 0) {
+977 summary.append(d.getFileName()).append(" (" );
+978 firstEntry = true ;
+979 for (Identifier id : d.getIdentifiers()) {
+980 if (firstEntry) {
+981 firstEntry = false;
+982 } else {
+983 summary.append(", " );
+984 }
+985 summary.append(id.getValue());
+986 }
+987 summary.append(") : " ).append(ids).append(NEW_LINE);
+988 }
+989 }
+990 if (summary.length() > 0) {
+991 final String msg = String.format("%n%n"
+992 + "One or more dependencies were identified with known vulnerabilities:%n%n%s"
+993 + "%n%nSee the dependency-check report for more details.%n%n" , summary.toString());
+994 log(msg, Project.MSG_WARN);
+995 }
+996 }
+997
+998
+999
+1000
+1001
+1002 public static class ReportFormats extends EnumeratedAttribute {
+1003
+1004
+1005
+1006
+1007
+1008
+1009 @Override
+1010 public String[] getValues() {
+1011 int i = 0;
+1012 final Format[] formats = Format.values();
+1013 final String[] values = new String[formats.length];
+1014 for (Format format : formats) {
+1015 values[i++] = format.name();
+1016 }
+1017 return values;
+1018 }
+1019 }
+1020 }
diff --git a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Purge.html b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Purge.html
index 35abcc910..967c6577a 100644
--- a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Purge.html
+++ b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Purge.html
@@ -79,60 +79,103 @@
71 this .dataDirectory = dataDirectory;
72 }
73
-74 @Override
-75 public void execute() throws BuildException {
-76 populateSettings();
-77 File db;
-78 try {
-79 db = new File(Settings.getDataDirectory(), "dc.h2.db" );
-80 if (db.exists()) {
-81 if (db.delete()) {
-82 log("Database file purged; local copy of the NVD has been removed" , Project.MSG_INFO);
-83 } else {
-84 log(String.format("Unable to delete '%s'; please delete the file manually" , db.getAbsolutePath()), Project.MSG_ERR);
-85 }
-86 } else {
-87 log(String.format("Unable to purge database; the database file does not exists: %s" , db.getAbsolutePath()), Project.MSG_ERR);
-88 }
-89 } catch (IOException ex) {
-90 log("Unable to delete the database" , Project.MSG_ERR);
-91 } finally {
-92 Settings.cleanup(true );
-93 }
-94 }
-95
-96
-97
-98
-99
-100 protected void populateSettings() {
-101 Settings.initialize();
-102 InputStream taskProperties = null ;
-103 try {
-104 taskProperties = this .getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE);
-105 Settings.mergeProperties(taskProperties);
-106 } catch (IOException ex) {
-107 log("Unable to load the dependency-check ant task.properties file." , ex, Project.MSG_WARN);
-108 } finally {
-109 if (taskProperties != null ) {
-110 try {
-111 taskProperties.close();
-112 } catch (IOException ex) {
-113 log("" , ex, Project.MSG_DEBUG);
-114 }
-115 }
-116 }
-117 if (dataDirectory != null ) {
-118 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
-119 } else {
-120 final File jarPath = new File(Purge.class .getProtectionDomain().getCodeSource().getLocation().getPath());
-121 final File base = jarPath.getParentFile();
-122 final String sub = Settings.getString(Settings.KEYS.DATA_DIRECTORY);
-123 final File dataDir = new File(base, sub);
-124 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
-125 }
-126 }
-127 }
+74
+75
+76
+77
+78 private boolean failOnError = true ;
+79
+80
+81
+82
+83
+84
+85 public boolean isFailOnError() {
+86 return failOnError;
+87 }
+88
+89
+90
+91
+92
+93
+94 public void setFailOnError(boolean failOnError) {
+95 this .failOnError = failOnError;
+96 }
+97
+98 @Override
+99 public void execute() throws BuildException {
+100 populateSettings();
+101 File db;
+102 try {
+103 db = new File(Settings.getDataDirectory(), "dc.h2.db" );
+104 if (db.exists()) {
+105 if (db.delete()) {
+106 log("Database file purged; local copy of the NVD has been removed" , Project.MSG_INFO);
+107 } else {
+108 final String msg = String.format("Unable to delete '%s'; please delete the file manually" , db.getAbsolutePath());
+109 if (this .failOnError) {
+110 throw new BuildException(msg);
+111 }
+112 log(msg, Project.MSG_ERR);
+113 }
+114 } else {
+115 final String msg = String.format("Unable to purge database; the database file does not exists: %s" , db.getAbsolutePath());
+116 if (this .failOnError) {
+117 throw new BuildException(msg);
+118 }
+119 log(msg, Project.MSG_ERR);
+120 }
+121 } catch (IOException ex) {
+122 final String msg = "Unable to delete the database" ;
+123 if (this .failOnError) {
+124 throw new BuildException(msg);
+125 }
+126 log(msg, Project.MSG_ERR);
+127 } finally {
+128 Settings.cleanup(true );
+129 }
+130 }
+131
+132
+133
+134
+135
+136
+137
+138
+139 protected void populateSettings() throws BuildException {
+140 Settings.initialize();
+141 InputStream taskProperties = null ;
+142 try {
+143 taskProperties = this .getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE);
+144 Settings.mergeProperties(taskProperties);
+145 } catch (IOException ex) {
+146 final String msg = "Unable to load the dependency-check ant task.properties file." ;
+147 if (this .failOnError) {
+148 throw new BuildException(msg, ex);
+149 }
+150 log(msg, ex, Project.MSG_WARN);
+151 } finally {
+152 if (taskProperties != null ) {
+153 try {
+154 taskProperties.close();
+155 } catch (IOException ex) {
+156 log("" , ex, Project.MSG_DEBUG);
+157 }
+158 }
+159 }
+160 if (dataDirectory != null ) {
+161 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
+162 } else {
+163 final File jarPath = new File(Purge.class .getProtectionDomain().getCodeSource().getLocation().getPath());
+164 final File base = jarPath.getParentFile();
+165 final String sub = Settings.getString(Settings.KEYS.DATA_DIRECTORY);
+166 final File dataDir = new File(base, sub);
+167 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
+168 }
+169 }
+170 }
diff --git a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Update.html b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Update.html
index ebe54bd74..1f0d074cb 100644
--- a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Update.html
+++ b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/Update.html
@@ -26,423 +26,439 @@
18 package org.owasp.dependencycheck.taskdefs;
19
20 import org.apache.tools.ant.BuildException;
-21 import org.owasp.dependencycheck.Engine;
-22 import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
-23 import org.owasp.dependencycheck.utils.Settings;
-24 import org.slf4j.impl.StaticLoggerBinder;
-25
-26
-27
-28
-29
-30
-31
-32 public class Update extends Purge {
-33
-34
-35
-36
-37 public Update () {
-38 super ();
-39
-40
-41 StaticLoggerBinder.getSingleton().setTask(this );
-42 }
-43
-44
-45
-46
-47 private String proxyServer;
-48
-49
-50
-51
-52
-53
-54 public String getProxyServer() {
-55 return proxyServer;
-56 }
-57
-58
-59
-60
-61
-62
-63 public void setProxyServer(String server) {
-64 this .proxyServer = server;
-65 }
-66
-67
-68
-69
-70 private String proxyPort;
-71
-72
-73
-74
-75
-76
-77 public String getProxyPort() {
-78 return proxyPort;
-79 }
-80
-81
-82
-83
-84
-85
-86 public void setProxyPort(String proxyPort) {
-87 this .proxyPort = proxyPort;
-88 }
-89
-90
-91
-92 private String proxyUsername;
-93
-94
-95
-96
-97
-98
-99 public String getProxyUsername() {
-100 return proxyUsername;
-101 }
-102
-103
-104
-105
-106
-107
-108 public void setProxyUsername(String proxyUsername) {
-109 this .proxyUsername = proxyUsername;
-110 }
-111
-112
-113
-114 private String proxyPassword;
-115
-116
-117
-118
-119
-120
-121 public String getProxyPassword() {
-122 return proxyPassword;
-123 }
-124
-125
-126
-127
-128
-129
-130 public void setProxyPassword(String proxyPassword) {
-131 this .proxyPassword = proxyPassword;
-132 }
-133
-134
-135
-136 private String connectionTimeout;
-137
-138
-139
-140
-141
-142
-143 public String getConnectionTimeout() {
-144 return connectionTimeout;
-145 }
-146
-147
-148
-149
-150
-151
-152 public void setConnectionTimeout(String connectionTimeout) {
-153 this .connectionTimeout = connectionTimeout;
-154 }
-155
-156
-157
-158 private String databaseDriverName;
-159
-160
-161
-162
-163
-164
-165 public String getDatabaseDriverName() {
-166 return databaseDriverName;
-167 }
-168
-169
-170
-171
-172
-173
-174 public void setDatabaseDriverName(String databaseDriverName) {
-175 this .databaseDriverName = databaseDriverName;
-176 }
-177
-178
-179
-180
-181 private String databaseDriverPath;
-182
-183
-184
-185
-186
-187
-188 public String getDatabaseDriverPath() {
-189 return databaseDriverPath;
-190 }
-191
-192
-193
-194
-195
-196
-197 public void setDatabaseDriverPath(String databaseDriverPath) {
-198 this .databaseDriverPath = databaseDriverPath;
-199 }
-200
-201
-202
-203 private String connectionString;
-204
-205
-206
-207
-208
-209
-210 public String getConnectionString() {
-211 return connectionString;
-212 }
-213
-214
-215
-216
-217
-218
-219 public void setConnectionString(String connectionString) {
-220 this .connectionString = connectionString;
-221 }
-222
-223
-224
-225 private String databaseUser;
-226
-227
-228
-229
-230
-231
-232 public String getDatabaseUser() {
-233 return databaseUser;
-234 }
-235
-236
-237
-238
-239
-240
-241 public void setDatabaseUser(String databaseUser) {
-242 this .databaseUser = databaseUser;
-243 }
-244
-245
-246
-247
-248 private String databasePassword;
-249
-250
-251
-252
-253
-254
-255 public String getDatabasePassword() {
-256 return databasePassword;
-257 }
-258
-259
-260
-261
-262
-263
-264 public void setDatabasePassword(String databasePassword) {
-265 this .databasePassword = databasePassword;
-266 }
-267
-268
-269
-270
-271 private String cveUrl12Modified;
-272
-273
-274
-275
-276
-277
-278 public String getCveUrl12Modified() {
-279 return cveUrl12Modified;
-280 }
-281
-282
-283
-284
-285
-286
-287 public void setCveUrl12Modified(String cveUrl12Modified) {
-288 this .cveUrl12Modified = cveUrl12Modified;
-289 }
-290
-291
-292
-293
-294 private String cveUrl20Modified;
-295
-296
-297
-298
-299
-300
-301 public String getCveUrl20Modified() {
-302 return cveUrl20Modified;
-303 }
-304
-305
-306
-307
-308
-309
-310 public void setCveUrl20Modified(String cveUrl20Modified) {
-311 this .cveUrl20Modified = cveUrl20Modified;
-312 }
-313
-314
-315
-316
-317 private String cveUrl12Base;
-318
-319
-320
-321
-322
-323
-324 public String getCveUrl12Base() {
-325 return cveUrl12Base;
-326 }
-327
-328
-329
-330
-331
-332
-333 public void setCveUrl12Base(String cveUrl12Base) {
-334 this .cveUrl12Base = cveUrl12Base;
-335 }
-336
-337
-338
-339
-340 private String cveUrl20Base;
-341
-342
-343
-344
-345
-346
-347 public String getCveUrl20Base() {
-348 return cveUrl20Base;
-349 }
-350
-351
-352
-353
-354
-355
-356 public void setCveUrl20Base(String cveUrl20Base) {
-357 this .cveUrl20Base = cveUrl20Base;
-358 }
-359
-360
-361
-362
-363 private Integer cveValidForHours;
-364
-365
-366
-367
-368
-369
-370 public Integer getCveValidForHours() {
-371 return cveValidForHours;
-372 }
-373
-374
-375
-376
-377
-378
-379 public void setCveValidForHours(Integer cveValidForHours) {
-380 this .cveValidForHours = cveValidForHours;
-381 }
-382
-383
-384
-385
-386
-387
-388
-389 @Override
-390 public void execute() throws BuildException {
-391 populateSettings();
-392 Engine engine = null ;
-393 try {
-394 engine = new Engine(Update.class .getClassLoader());
-395 engine.doUpdates();
-396 } catch (DatabaseException ex) {
-397 throw new BuildException("Unable to connect to the dependency-check database; unable to update the NVD data" , ex);
-398 } finally {
-399 Settings.cleanup(true );
-400 if (engine != null ) {
-401 engine.cleanup();
-402 }
-403 }
-404 }
-405
-406
-407
-408
-409
-410
-411
-412 @Override
-413 protected void populateSettings() throws BuildException {
-414 super .populateSettings();
-415 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_SERVER, proxyServer);
-416 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PORT, proxyPort);
-417 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_USERNAME, proxyUsername);
-418 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPassword);
-419 Settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
-420 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName);
-421 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath);
-422 Settings.setStringIfNotEmpty(Settings.KEYS.DB_CONNECTION_STRING, connectionString);
-423 Settings.setStringIfNotEmpty(Settings.KEYS.DB_USER, databaseUser);
-424 Settings.setStringIfNotEmpty(Settings.KEYS.DB_PASSWORD, databasePassword);
-425 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_MODIFIED_12_URL, cveUrl12Modified);
-426 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_MODIFIED_20_URL, cveUrl20Modified);
-427 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_1_2, cveUrl12Base);
-428 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_2_0, cveUrl20Base);
-429 if (cveValidForHours != null ) {
-430 if (cveValidForHours >= 0) {
-431 Settings.setInt(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours);
-432 } else {
-433 throw new BuildException("Invalid setting: `cpeValidForHours` must be 0 or greater" );
-434 }
-435 }
-436 }
-437 }
+21 import org.apache.tools.ant.Project;
+22 import org.owasp.dependencycheck.Engine;
+23 import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
+24 import org.owasp.dependencycheck.data.update.exception.UpdateException;
+25 import org.owasp.dependencycheck.utils.Settings;
+26 import org.slf4j.impl.StaticLoggerBinder;
+27
+28
+29
+30
+31
+32
+33
+34
+35 public class Update extends Purge {
+36
+37
+38
+39
+40 public Update () {
+41 super ();
+42
+43
+44 StaticLoggerBinder.getSingleton().setTask(this );
+45 }
+46
+47
+48
+49
+50 private String proxyServer;
+51
+52
+53
+54
+55
+56
+57 public String getProxyServer() {
+58 return proxyServer;
+59 }
+60
+61
+62
+63
+64
+65
+66 public void setProxyServer(String server) {
+67 this .proxyServer = server;
+68 }
+69
+70
+71
+72
+73 private String proxyPort;
+74
+75
+76
+77
+78
+79
+80 public String getProxyPort() {
+81 return proxyPort;
+82 }
+83
+84
+85
+86
+87
+88
+89 public void setProxyPort(String proxyPort) {
+90 this .proxyPort = proxyPort;
+91 }
+92
+93
+94
+95 private String proxyUsername;
+96
+97
+98
+99
+100
+101
+102 public String getProxyUsername() {
+103 return proxyUsername;
+104 }
+105
+106
+107
+108
+109
+110
+111 public void setProxyUsername(String proxyUsername) {
+112 this .proxyUsername = proxyUsername;
+113 }
+114
+115
+116
+117 private String proxyPassword;
+118
+119
+120
+121
+122
+123
+124 public String getProxyPassword() {
+125 return proxyPassword;
+126 }
+127
+128
+129
+130
+131
+132
+133 public void setProxyPassword(String proxyPassword) {
+134 this .proxyPassword = proxyPassword;
+135 }
+136
+137
+138
+139 private String connectionTimeout;
+140
+141
+142
+143
+144
+145
+146 public String getConnectionTimeout() {
+147 return connectionTimeout;
+148 }
+149
+150
+151
+152
+153
+154
+155 public void setConnectionTimeout(String connectionTimeout) {
+156 this .connectionTimeout = connectionTimeout;
+157 }
+158
+159
+160
+161 private String databaseDriverName;
+162
+163
+164
+165
+166
+167
+168 public String getDatabaseDriverName() {
+169 return databaseDriverName;
+170 }
+171
+172
+173
+174
+175
+176
+177 public void setDatabaseDriverName(String databaseDriverName) {
+178 this .databaseDriverName = databaseDriverName;
+179 }
+180
+181
+182
+183
+184 private String databaseDriverPath;
+185
+186
+187
+188
+189
+190
+191 public String getDatabaseDriverPath() {
+192 return databaseDriverPath;
+193 }
+194
+195
+196
+197
+198
+199
+200 public void setDatabaseDriverPath(String databaseDriverPath) {
+201 this .databaseDriverPath = databaseDriverPath;
+202 }
+203
+204
+205
+206 private String connectionString;
+207
+208
+209
+210
+211
+212
+213 public String getConnectionString() {
+214 return connectionString;
+215 }
+216
+217
+218
+219
+220
+221
+222 public void setConnectionString(String connectionString) {
+223 this .connectionString = connectionString;
+224 }
+225
+226
+227
+228 private String databaseUser;
+229
+230
+231
+232
+233
+234
+235 public String getDatabaseUser() {
+236 return databaseUser;
+237 }
+238
+239
+240
+241
+242
+243
+244 public void setDatabaseUser(String databaseUser) {
+245 this .databaseUser = databaseUser;
+246 }
+247
+248
+249
+250
+251 private String databasePassword;
+252
+253
+254
+255
+256
+257
+258 public String getDatabasePassword() {
+259 return databasePassword;
+260 }
+261
+262
+263
+264
+265
+266
+267 public void setDatabasePassword(String databasePassword) {
+268 this .databasePassword = databasePassword;
+269 }
+270
+271
+272
+273
+274 private String cveUrl12Modified;
+275
+276
+277
+278
+279
+280
+281 public String getCveUrl12Modified() {
+282 return cveUrl12Modified;
+283 }
+284
+285
+286
+287
+288
+289
+290 public void setCveUrl12Modified(String cveUrl12Modified) {
+291 this .cveUrl12Modified = cveUrl12Modified;
+292 }
+293
+294
+295
+296
+297 private String cveUrl20Modified;
+298
+299
+300
+301
+302
+303
+304 public String getCveUrl20Modified() {
+305 return cveUrl20Modified;
+306 }
+307
+308
+309
+310
+311
+312
+313 public void setCveUrl20Modified(String cveUrl20Modified) {
+314 this .cveUrl20Modified = cveUrl20Modified;
+315 }
+316
+317
+318
+319
+320 private String cveUrl12Base;
+321
+322
+323
+324
+325
+326
+327 public String getCveUrl12Base() {
+328 return cveUrl12Base;
+329 }
+330
+331
+332
+333
+334
+335
+336 public void setCveUrl12Base(String cveUrl12Base) {
+337 this .cveUrl12Base = cveUrl12Base;
+338 }
+339
+340
+341
+342
+343 private String cveUrl20Base;
+344
+345
+346
+347
+348
+349
+350 public String getCveUrl20Base() {
+351 return cveUrl20Base;
+352 }
+353
+354
+355
+356
+357
+358
+359 public void setCveUrl20Base(String cveUrl20Base) {
+360 this .cveUrl20Base = cveUrl20Base;
+361 }
+362
+363
+364
+365
+366 private Integer cveValidForHours;
+367
+368
+369
+370
+371
+372
+373 public Integer getCveValidForHours() {
+374 return cveValidForHours;
+375 }
+376
+377
+378
+379
+380
+381
+382 public void setCveValidForHours(Integer cveValidForHours) {
+383 this .cveValidForHours = cveValidForHours;
+384 }
+385
+386
+387
+388
+389
+390
+391
+392
+393 @Override
+394 public void execute() throws BuildException {
+395 populateSettings();
+396 Engine engine = null ;
+397 try {
+398 engine = new Engine(Update.class .getClassLoader());
+399 try {
+400 engine.doUpdates();
+401 } catch (UpdateException ex) {
+402 if (this .isFailOnError()) {
+403 throw new BuildException(ex);
+404 }
+405 log(ex.getMessage(), Project.MSG_ERR);
+406 }
+407 } catch (DatabaseException ex) {
+408 final String msg = "Unable to connect to the dependency-check database; unable to update the NVD data" ;
+409 if (this .isFailOnError()) {
+410 throw new BuildException(msg, ex);
+411 }
+412 log(msg, Project.MSG_ERR);
+413 } finally {
+414 Settings.cleanup(true );
+415 if (engine != null ) {
+416 engine.cleanup();
+417 }
+418 }
+419 }
+420
+421
+422
+423
+424
+425
+426
+427
+428 @Override
+429 protected void populateSettings() throws BuildException {
+430 super .populateSettings();
+431 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_SERVER, proxyServer);
+432 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PORT, proxyPort);
+433 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_USERNAME, proxyUsername);
+434 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPassword);
+435 Settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
+436 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName);
+437 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath);
+438 Settings.setStringIfNotEmpty(Settings.KEYS.DB_CONNECTION_STRING, connectionString);
+439 Settings.setStringIfNotEmpty(Settings.KEYS.DB_USER, databaseUser);
+440 Settings.setStringIfNotEmpty(Settings.KEYS.DB_PASSWORD, databasePassword);
+441 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_MODIFIED_12_URL, cveUrl12Modified);
+442 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_MODIFIED_20_URL, cveUrl20Modified);
+443 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_1_2, cveUrl12Base);
+444 Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_2_0, cveUrl20Base);
+445 if (cveValidForHours != null ) {
+446 if (cveValidForHours >= 0) {
+447 Settings.setInt(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours);
+448 } else {
+449 throw new BuildException("Invalid setting: `cpeValidForHours` must be 0 or greater" );
+450 }
+451 }
+452 }
+453 }
diff --git a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/package-frame.html b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/package-frame.html
index b63485c6d..74f9d9c4c 100644
--- a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/package-frame.html
+++ b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/package-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference Package org.owasp.dependencycheck.taskdefs
+ Dependency-Check Ant Task 1.4.2 Reference Package org.owasp.dependencycheck.taskdefs
diff --git a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/package-summary.html b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/package-summary.html
index 82c23676f..20dbdc8cf 100644
--- a/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/package-summary.html
+++ b/dependency-check-ant/xref/org/owasp/dependencycheck/taskdefs/package-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference Package org.owasp.dependencycheck.taskdefs
+ Dependency-Check Ant Task 1.4.2 Reference Package org.owasp.dependencycheck.taskdefs
diff --git a/dependency-check-ant/xref/org/slf4j/impl/package-frame.html b/dependency-check-ant/xref/org/slf4j/impl/package-frame.html
index b74e9fb84..fd362348d 100644
--- a/dependency-check-ant/xref/org/slf4j/impl/package-frame.html
+++ b/dependency-check-ant/xref/org/slf4j/impl/package-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference Package org.slf4j.impl
+ Dependency-Check Ant Task 1.4.2 Reference Package org.slf4j.impl
diff --git a/dependency-check-ant/xref/org/slf4j/impl/package-summary.html b/dependency-check-ant/xref/org/slf4j/impl/package-summary.html
index 1474d553a..01dd2fbda 100644
--- a/dependency-check-ant/xref/org/slf4j/impl/package-summary.html
+++ b/dependency-check-ant/xref/org/slf4j/impl/package-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference Package org.slf4j.impl
+ Dependency-Check Ant Task 1.4.2 Reference Package org.slf4j.impl
diff --git a/dependency-check-ant/xref/overview-frame.html b/dependency-check-ant/xref/overview-frame.html
index e51b8b623..b7e15bc6a 100644
--- a/dependency-check-ant/xref/overview-frame.html
+++ b/dependency-check-ant/xref/overview-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference
+ Dependency-Check Ant Task 1.4.2 Reference
diff --git a/dependency-check-ant/xref/overview-summary.html b/dependency-check-ant/xref/overview-summary.html
index 744480468..73645d9c9 100644
--- a/dependency-check-ant/xref/overview-summary.html
+++ b/dependency-check-ant/xref/overview-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Ant Task 1.4.0 Reference
+ Dependency-Check Ant Task 1.4.2 Reference
@@ -24,7 +24,7 @@
- Dependency-Check Ant Task 1.4.0 Reference
+ Dependency-Check Ant Task 1.4.2 Reference
diff --git a/dependency-check-cli/apidocs/allclasses-frame.html b/dependency-check-cli/apidocs/allclasses-frame.html
index 6a7938eab..a610559fb 100644
--- a/dependency-check-cli/apidocs/allclasses-frame.html
+++ b/dependency-check-cli/apidocs/allclasses-frame.html
@@ -2,10 +2,10 @@
-
+
-All Classes (Dependency-Check Command Line 1.4.0 API)
-
+All Classes (Dependency-Check Command Line 1.4.2 API)
+
diff --git a/dependency-check-cli/apidocs/allclasses-noframe.html b/dependency-check-cli/apidocs/allclasses-noframe.html
index 876d89003..00b750b10 100644
--- a/dependency-check-cli/apidocs/allclasses-noframe.html
+++ b/dependency-check-cli/apidocs/allclasses-noframe.html
@@ -2,10 +2,10 @@
-
+
-All Classes (Dependency-Check Command Line 1.4.0 API)
-
+All Classes (Dependency-Check Command Line 1.4.2 API)
+
diff --git a/dependency-check-cli/apidocs/constant-values.html b/dependency-check-cli/apidocs/constant-values.html
index 08f9fc6d1..bff536f38 100644
--- a/dependency-check-cli/apidocs/constant-values.html
+++ b/dependency-check-cli/apidocs/constant-values.html
@@ -2,10 +2,10 @@
-
+
-Constant Field Values (Dependency-Check Command Line 1.4.0 API)
-
+Constant Field Values (Dependency-Check Command Line 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-cli/apidocs/org/owasp/dependencycheck/package-summary.html b/dependency-check-cli/apidocs/org/owasp/dependencycheck/package-summary.html
index 76e02745f..462c44742 100644
--- a/dependency-check-cli/apidocs/org/owasp/dependencycheck/package-summary.html
+++ b/dependency-check-cli/apidocs/org/owasp/dependencycheck/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck (Dependency-Check Command Line 1.4.0 API)
-
+org.owasp.dependencycheck (Dependency-Check Command Line 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
-
+
diff --git a/dependency-check-cli/cobertura/frame-summary.html b/dependency-check-cli/cobertura/frame-summary.html
index fed446866..8054f27da 100644
--- a/dependency-check-cli/cobertura/frame-summary.html
+++ b/dependency-check-cli/cobertura/frame-summary.html
@@ -16,8 +16,8 @@
-
+
diff --git a/dependency-check-cli/cobertura/org.owasp.dependencycheck.App.html b/dependency-check-cli/cobertura/org.owasp.dependencycheck.App.html
index acdd31361..969f91068 100644
--- a/dependency-check-cli/cobertura/org.owasp.dependencycheck.App.html
+++ b/dependency-check-cli/cobertura/org.owasp.dependencycheck.App.html
@@ -12,7 +12,7 @@
@@ -96,561 +96,668 @@
39
import ch.qos.logback.core.FileAppender;
40
- import org.slf4j.impl.StaticLoggerBinder;
+ import org.owasp.dependencycheck.data.update.exception.UpdateException;
41
-
+ import org.owasp.dependencycheck.exception.ExceptionCollection;
42
-
+ import org.owasp.dependencycheck.exception.ReportException;
43
-
+ import org.owasp.dependencycheck.utils.InvalidSettingException;
44
-
+ import org.slf4j.impl.StaticLoggerBinder;
45
-
+
46
-
- 47 4 public class App {
+
+ 47
+
48
-
+
49
-
+
50
-
- 51
-
- 52 2 private static final Logger LOGGER = LoggerFactory.getLogger(App.class );
+
+ 51 2 public class App {
+ 52
+
53
-
+
54
-
+
55
-
- 56
-
+
+ 56 1 private static final Logger LOGGER = LoggerFactory.getLogger(App.class );
57
-
+
58
-
+
59
- public static void main(String[] args) {
+
60
- try {
- 61 0 Settings.initialize();
- 62 0 final App app = new App();
- 63 0 app.run(args);
- 64
- } finally {
- 65 0 Settings.cleanup(true );
- 66 0 }
- 67 0 }
- 68
-
- 69
-
- 70
-
- 71
- 72
+ 61
- 73
+ 62
- 74
- public void run(String[] args) {
- 75 0 final CliParser cli = new CliParser();
+ 63
+ public static void main(String[] args) {
+ 64 0 int exitCode = 0;
+ 65
+ try {
+ 66 0 Settings.initialize();
+ 67 0 final App app = new App();
+ 68 0 exitCode = app.run(args);
+ 69 0 LOGGER.debug("Exit code: " + exitCode);
+ 70
+ } finally {
+ 71 0 Settings.cleanup(true );
+ 72 0 }
+ 73 0 System.exit(exitCode);
+ 74 0 }
+ 75
+
76
-
+
77
+
+ 78
+
+ 79
+
+ 80
+
+ 81
+
+ 82
+ public int run(String[] args) {
+ 83 0 int exitCode = 0;
+ 84 0 final CliParser cli = new CliParser();
+ 85
+
+ 86
try {
- 78 0 cli.parse(args);
- 79 0 } catch (FileNotFoundException ex) {
- 80 0 System.err.println(ex.getMessage());
- 81 0 cli.printHelp();
- 82 0 return ;
- 83 0 } catch (ParseException ex) {
- 84 0 System.err.println(ex.getMessage());
- 85 0 cli.printHelp();
- 86 0 return ;
- 87 0 }
- 88
+ 87 0 cli.parse(args);
+ 88 0 } catch (FileNotFoundException ex) {
+ 89 0 System.err.println(ex.getMessage());
+ 90 0 cli.printHelp();
+ 91 0 return -1;
+ 92 0 } catch (ParseException ex) {
+ 93 0 System.err.println(ex.getMessage());
+ 94 0 cli.printHelp();
+ 95 0 return -2;
+ 96 0 }
+ 97
- 89 0 if (cli.getVerboseLog() != null ) {
- 90 0 prepareLogger(cli.getVerboseLog());
- 91
+ 98 0 if (cli.getVerboseLog() != null ) {
+ 99 0 prepareLogger(cli.getVerboseLog());
+ 100
}
- 92
+ 101
- 93 0 if (cli.isPurge()) {
- 94 0 if (cli.getConnectionString() != null ) {
- 95 0 LOGGER.error("Unable to purge the database when using a non-default connection string" );
- 96
- } else {
- 97 0 populateSettings(cli);
- 98
- File db;
- 99
- try {
- 100 0 db = new File(Settings.getDataDirectory(), "dc.h2.db" );
- 101 0 if (db.exists()) {
- 102 0 if (db.delete()) {
- 103 0 LOGGER.info("Database file purged; local copy of the NVD has been removed" );
- 104
- } else {
- 105 0 LOGGER.error("Unable to delete '{}'; please delete the file manually" , db.getAbsolutePath());
+ 102 0 if (cli.isPurge()) {
+ 103 0 if (cli.getConnectionString() != null ) {
+ 104 0 LOGGER.error("Unable to purge the database when using a non-default connection string" );
+ 105 0 exitCode = -3;
106
- }
+ } else {
107
+ try {
+ 108 0 populateSettings(cli);
+ 109 0 } catch (InvalidSettingException ex) {
+ 110 0 LOGGER.error(ex.getMessage());
+ 111 0 LOGGER.debug("Error loading properties file" , ex);
+ 112 0 exitCode = -4;
+ 113 0 }
+ 114
+ File db;
+ 115
+ try {
+ 116 0 db = new File(Settings.getDataDirectory(), "dc.h2.db" );
+ 117 0 if (db.exists()) {
+ 118 0 if (db.delete()) {
+ 119 0 LOGGER.info("Database file purged; local copy of the NVD has been removed" );
+ 120
+ } else {
+ 121 0 LOGGER.error("Unable to delete '{}'; please delete the file manually" , db.getAbsolutePath());
+ 122 0 exitCode = -5;
+ 123
+ }
+ 124
} else {
- 108 0 LOGGER.error("Unable to purge database; the database file does not exists: {}" , db.getAbsolutePath());
- 109
- }
- 110 0 } catch (IOException ex) {
- 111 0 LOGGER.error("Unable to delete the database" );
- 112 0 }
- 113
- }
- 114 0 } else if (cli.isGetVersion()) {
- 115 0 cli.printVersionInfo();
- 116 0 } else if (cli.isUpdateOnly()) {
- 117 0 populateSettings(cli);
- 118 0 runUpdateOnly();
- 119 0 } else if (cli.isRunScan()) {
- 120 0 populateSettings(cli);
- 121
- try {
- 122 0 runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getProjectName(), cli.getScanFiles(),
- 123 0 cli.getExcludeList(), cli.getSymLinkDepth());
- 124 0 } catch (InvalidScanPathException ex) {
- 125 0 LOGGER.error("An invalid scan path was detected; unable to scan '//*' paths" );
- 126 0 }
+ 125 0 LOGGER.error("Unable to purge database; the database file does not exists: {}" , db.getAbsolutePath());
+ 126 0 exitCode = -6;
127
- } else {
- 128 0 cli.printHelp();
- 129
- }
- 130 0 }
- 131
-
+ }
+ 128 0 } catch (IOException ex) {
+ 129 0 LOGGER.error("Unable to delete the database" );
+ 130 0 exitCode = -7;
+ 131 0 }
132
-
- 133
-
- 134
-
- 135
-
+ }
+ 133 0 } else if (cli.isGetVersion()) {
+ 134 0 cli.printVersionInfo();
+ 135 0 } else if (cli.isUpdateOnly()) {
136
-
- 137
-
- 138
-
- 139
-
- 140
-
- 141
-
- 142
-
+ try {
+ 137 0 populateSettings(cli);
+ 138 0 } catch (InvalidSettingException ex) {
+ 139 0 LOGGER.error(ex.getMessage());
+ 140 0 LOGGER.debug("Error loading properties file" , ex);
+ 141 0 exitCode = -4;
+ 142 0 }
143
-
- 144
- private void runScan(String reportDirectory, String outputFormat, String applicationName, String[] files,
- 145
- String[] excludes, int symLinkDepth) throws InvalidScanPathException {
- 146 0 Engine engine = null ;
- 147
- try {
- 148 0 engine = new Engine();
- 149 0 final List<String> antStylePaths = new ArrayList<String>();
- 150 0 for (String file : files) {
- 151 0 final String antPath = ensureCanonicalPath(file);
- 152 0 antStylePaths.add(antPath);
+ try {
+ 144 0 runUpdateOnly();
+ 145 0 } catch (UpdateException ex) {
+ 146 0 LOGGER.error(ex.getMessage());
+ 147 0 exitCode = -8;
+ 148 0 } catch (DatabaseException ex) {
+ 149 0 LOGGER.error(ex.getMessage());
+ 150 0 exitCode = -9;
+ 151 0 }
+ 152 0 } else if (cli.isRunScan()) {
153
- }
- 154
-
- 155 0 final Set<File> paths = new HashSet<File>();
- 156 0 for (String file : antStylePaths) {
- 157 0 LOGGER.debug("Scanning {}" , file);
- 158 0 final DirectoryScanner scanner = new DirectoryScanner();
- 159 0 String include = file.replace('\\' , '/' );
+ try {
+ 154 0 populateSettings(cli);
+ 155 0 } catch (InvalidSettingException ex) {
+ 156 0 LOGGER.error(ex.getMessage());
+ 157 0 LOGGER.debug("Error loading properties file" , ex);
+ 158 0 exitCode = -4;
+ 159 0 }
160
- File baseDir;
- 161
-
- 162 0 if (include.startsWith("//" )) {
- 163 0 throw new InvalidScanPathException("Unable to scan paths specified by //" );
- 164
- } else {
- 165 0 final int pos = getLastFileSeparator(include);
- 166 0 final String tmpBase = include.substring(0, pos);
- 167 0 final String tmpInclude = include.substring(pos + 1);
- 168 0 if (tmpInclude.indexOf('*' ) >= 0 || tmpInclude.indexOf('?' ) >= 0
- 169 0 || (new File(include)).isFile()) {
- 170 0 baseDir = new File(tmpBase);
- 171 0 include = tmpInclude;
- 172
- } else {
- 173 0 baseDir = new File(tmpBase, tmpInclude);
- 174 0 include = "**/*" ;
- 175
- }
+ try {
+ 161 0 runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getProjectName(), cli.getScanFiles(),
+ 162 0 cli.getExcludeList(), cli.getSymLinkDepth());
+ 163 0 } catch (InvalidScanPathException ex) {
+ 164 0 LOGGER.error("An invalid scan path was detected; unable to scan '//*' paths" );
+ 165 0 exitCode = -10;
+ 166 0 } catch (DatabaseException ex) {
+ 167 0 LOGGER.error(ex.getMessage());
+ 168 0 exitCode = -11;
+ 169 0 } catch (ReportException ex) {
+ 170 0 LOGGER.error(ex.getMessage());
+ 171 0 exitCode = -12;
+ 172 0 } catch (ExceptionCollection ex) {
+ 173 0 if (ex.isFatal()) {
+ 174 0 exitCode = -13;
+ 175 0 LOGGER.error("One or more fatal errors occured" );
176
- }
- 177
-
+ } else {
+ 177 0 exitCode = -14;
178
-
- 179 0 scanner.setBasedir(baseDir);
- 180 0 final String[] includes = {include};
- 181 0 scanner.setIncludes(includes);
- 182 0 scanner.setMaxLevelsOfSymlinks(symLinkDepth);
- 183 0 if (symLinkDepth <= 0) {
- 184 0 scanner.setFollowSymlinks(false );
+ }
+ 179 0 for (Throwable e : ex.getExceptions()) {
+ 180 0 LOGGER.error(e.getMessage());
+ 181 0 }
+ 182 0 }
+ 183
+ } else {
+ 184 0 cli.printHelp();
185
- }
- 186 0 if (excludes != null && excludes.length > 0) {
- 187 0 scanner.addExcludes(excludes);
+ }
+ 186 0 return exitCode;
+ 187
+ }
188
- }
- 189 0 scanner.scan();
- 190 0 if (scanner.getIncludedFilesCount() > 0) {
- 191 0 for (String s : scanner.getIncludedFiles()) {
- 192 0 final File f = new File(baseDir, s);
- 193 0 LOGGER.debug("Found file {}" , f.toString());
- 194 0 paths.add(f);
- 195
- }
- 196
- }
- 197 0 }
- 198 0 engine.scan(paths);
- 199
- 200 0 engine.analyzeDependencies();
- 201 0 final List<Dependency> dependencies = engine.getDependencies();
- 202 0 DatabaseProperties prop = null ;
- 203 0 CveDB cve = null ;
- 204
- try {
- 205 0 cve = new CveDB();
- 206 0 cve.open();
- 207 0 prop = cve.getDatabaseProperties();
- 208 0 } catch (DatabaseException ex) {
- 209 0 LOGGER.debug("Unable to retrieve DB Properties" , ex);
- 210
- } finally {
- 211 0 if (cve != null ) {
- 212 0 cve.close();
- 213
- }
- 214
- }
- 215 0 final ReportGenerator report = new ReportGenerator(applicationName, dependencies, engine.getAnalyzers(), prop);
- 216
- try {
- 217 0 report.generateReports(reportDirectory, outputFormat);
- 218 0 } catch (IOException ex) {
- 219 0 LOGGER.error("There was an IO error while attempting to generate the report." );
- 220 0 LOGGER.debug("" , ex);
- 221 0 } catch (Throwable ex) {
- 222 0 LOGGER.error("There was an error while attempting to generate the report." );
- 223 0 LOGGER.debug("" , ex);
- 224 0 }
- 225 0 } catch (DatabaseException ex) {
- 226 0 LOGGER.error("Unable to connect to the dependency-check database; analysis has stopped" );
- 227 0 LOGGER.debug("" , ex);
- 228
- } finally {
- 229 0 if (engine != null ) {
- 230 0 engine.cleanup();
- 231
- }
- 232
- }
- 233 0 }
- 234
-
- 235
+ 189
- 236
-
- 237
-
- 238
- private void runUpdateOnly() {
- 239 0 Engine engine = null ;
- 240
- try {
- 241 0 engine = new Engine();
- 242 0 engine.doUpdates();
- 243 0 } catch (DatabaseException ex) {
- 244 0 LOGGER.error("Unable to connect to the dependency-check database; analysis has stopped" );
- 245 0 LOGGER.debug("" , ex);
- 246
- } finally {
- 247 0 if (engine != null ) {
- 248 0 engine.cleanup();
- 249
- }
- 250
- }
- 251 0 }
- 252
-
- 253
-
- 254
-
- 255
+ 190
+
+ 191
+
+ 192
- 256
-
- 257
-
- 258
+ 193
+
+ 194
+
+ 195
+
+ 196
+
+ 197
+
+ 198
+
+ 199
+
+ 200
+
+ 201
+
+ 202
+
+ 203
+
+ 204
+
+ 205
+
+ 206
+
+ 207
+
+ 208
+
+ 209
+ 210
+ private void runScan(String reportDirectory, String outputFormat, String applicationName, String[] files,
+ 211
+ String[] excludes, int symLinkDepth) throws InvalidScanPathException, DatabaseException, ExceptionCollection, ReportException {
+ 212 0 Engine engine = null ;
+ 213
+ try {
+ 214 0 engine = new Engine();
+ 215 0 final List<String> antStylePaths = new ArrayList<String>();
+ 216 0 for (String file : files) {
+ 217 0 final String antPath = ensureCanonicalPath(file);
+ 218 0 antStylePaths.add(antPath);
+ 219
+ }
+ 220
+
+ 221 0 final Set<File> paths = new HashSet<File>();
+ 222 0 for (String file : antStylePaths) {
+ 223 0 LOGGER.debug("Scanning {}" , file);
+ 224 0 final DirectoryScanner scanner = new DirectoryScanner();
+ 225 0 String include = file.replace('\\' , '/' );
+ 226
+ File baseDir;
+ 227
+
+ 228 0 if (include.startsWith("//" )) {
+ 229 0 throw new InvalidScanPathException("Unable to scan paths specified by //" );
+ 230
+ } else {
+ 231 0 final int pos = getLastFileSeparator(include);
+ 232 0 final String tmpBase = include.substring(0, pos);
+ 233 0 final String tmpInclude = include.substring(pos + 1);
+ 234 0 if (tmpInclude.indexOf('*' ) >= 0 || tmpInclude.indexOf('?' ) >= 0
+ 235 0 || (new File(include)).isFile()) {
+ 236 0 baseDir = new File(tmpBase);
+ 237 0 include = tmpInclude;
+ 238
+ } else {
+ 239 0 baseDir = new File(tmpBase, tmpInclude);
+ 240 0 include = "**/*" ;
+ 241
+ }
+ 242
+ }
+ 243 0 scanner.setBasedir(baseDir);
+ 244 0 final String[] includes = {include};
+ 245 0 scanner.setIncludes(includes);
+ 246 0 scanner.setMaxLevelsOfSymlinks(symLinkDepth);
+ 247 0 if (symLinkDepth <= 0) {
+ 248 0 scanner.setFollowSymlinks(false );
+ 249
+ }
+ 250 0 if (excludes != null && excludes.length > 0) {
+ 251 0 scanner.addExcludes(excludes);
+ 252
+ }
+ 253 0 scanner.scan();
+ 254 0 if (scanner.getIncludedFilesCount() > 0) {
+ 255 0 for (String s : scanner.getIncludedFiles()) {
+ 256 0 final File f = new File(baseDir, s);
+ 257 0 LOGGER.debug("Found file {}" , f.toString());
+ 258 0 paths.add(f);
259
- private void populateSettings(CliParser cli) {
+ }
260
+ }
+ 261 0 }
+ 262 0 engine.scan(paths);
+ 263
- 261 0 final boolean autoUpdate = cli.isAutoUpdate();
- 262 0 final String connectionTimeout = cli.getConnectionTimeout();
- 263 0 final String proxyServer = cli.getProxyServer();
- 264 0 final String proxyPort = cli.getProxyPort();
- 265 0 final String proxyUser = cli.getProxyUsername();
- 266 0 final String proxyPass = cli.getProxyPassword();
- 267 0 final String dataDirectory = cli.getDataDirectory();
- 268 0 final File propertiesFile = cli.getPropertiesFile();
- 269 0 final String suppressionFile = cli.getSuppressionFile();
- 270 0 final String nexusUrl = cli.getNexusUrl();
- 271 0 final String databaseDriverName = cli.getDatabaseDriverName();
- 272 0 final String databaseDriverPath = cli.getDatabaseDriverPath();
- 273 0 final String connectionString = cli.getConnectionString();
- 274 0 final String databaseUser = cli.getDatabaseUser();
- 275 0 final String databasePassword = cli.getDatabasePassword();
- 276 0 final String additionalZipExtensions = cli.getAdditionalZipExtensions();
- 277 0 final String pathToMono = cli.getPathToMono();
- 278 0 final String cveMod12 = cli.getModifiedCve12Url();
- 279 0 final String cveMod20 = cli.getModifiedCve20Url();
- 280 0 final String cveBase12 = cli.getBaseCve12Url();
- 281 0 final String cveBase20 = cli.getBaseCve20Url();
- 282 0 final Integer cveValidForHours = cli.getCveValidForHours();
- 283 0 final boolean experimentalEnabled = cli.isExperimentalEnabled();
+ 264 0 ExceptionCollection exCol = null ;
+ 265
+ try {
+ 266 0 engine.analyzeDependencies();
+ 267 0 } catch (ExceptionCollection ex) {
+ 268 0 if (ex.isFatal()) {
+ 269 0 throw ex;
+ 270
+ }
+ 271 0 exCol = ex;
+ 272 0 }
+ 273 0 final List<Dependency> dependencies = engine.getDependencies();
+ 274 0 DatabaseProperties prop = null ;
+ 275 0 CveDB cve = null ;
+ 276
+ try {
+ 277 0 cve = new CveDB();
+ 278 0 cve.open();
+ 279 0 prop = cve.getDatabaseProperties();
+ 280
+ } finally {
+ 281 0 if (cve != null ) {
+ 282 0 cve.close();
+ 283
+ }
284
-
- 285 0 if (propertiesFile != null ) {
+ }
+ 285 0 final ReportGenerator report = new ReportGenerator(applicationName, dependencies, engine.getAnalyzers(), prop);
286
try {
- 287 0 Settings.mergeProperties(propertiesFile);
- 288 0 } catch (FileNotFoundException ex) {
- 289 0 LOGGER.error("Unable to load properties file '{}'" , propertiesFile.getPath());
- 290 0 LOGGER.debug("" , ex);
- 291 0 } catch (IOException ex) {
- 292 0 LOGGER.error("Unable to find properties file '{}'" , propertiesFile.getPath());
- 293 0 LOGGER.debug("" , ex);
- 294 0 }
- 295
- }
- 296
-
- 297
-
+ 287 0 report.generateReports(reportDirectory, outputFormat);
+ 288 0 } catch (ReportException ex) {
+ 289 0 if (exCol != null ) {
+ 290 0 exCol.addException(ex);
+ 291 0 throw exCol;
+ 292
+ } else {
+ 293 0 throw ex;
+ 294
+ }
+ 295 0 }
+ 296 0 if (exCol != null && exCol.getExceptions().size()>0) {
+ 297 0 throw exCol;
298
-
- 299 0 final boolean nexusUsesProxy = cli.isNexusUsesProxy();
- 300 0 if (dataDirectory != null ) {
- 301 0 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
- 302 0 } else if (System.getProperty("basedir" ) != null ) {
- 303 0 final File dataDir = new File(System.getProperty("basedir" ), "data" );
- 304 0 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
- 305 0 } else {
- 306 0 final File jarPath = new File(App.class .getProtectionDomain().getCodeSource().getLocation().getPath());
- 307 0 final File base = jarPath.getParentFile();
- 308 0 final String sub = Settings.getString(Settings.KEYS.DATA_DIRECTORY);
- 309 0 final File dataDir = new File(base, sub);
- 310 0 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
- 311
- }
- 312 0 Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
- 313 0 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_SERVER, proxyServer);
- 314 0 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PORT, proxyPort);
- 315 0 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_USERNAME, proxyUser);
- 316 0 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPass);
- 317 0 Settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
- 318 0 Settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
- 319 0 Settings.setIntIfNotNull(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours);
- 320
-
- 321
-
- 322 0 Settings.setBoolean(Settings.KEYS.ANALYZER_EXPERIMENTAL_ENABLED, experimentalEnabled);
- 323 0 Settings.setBoolean(Settings.KEYS.ANALYZER_JAR_ENABLED, !cli.isJarDisabled());
- 324 0 Settings.setBoolean(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, !cli.isArchiveDisabled());
- 325 0 Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, !cli.isPythonDistributionDisabled());
- 326 0 Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, !cli.isPythonPackageDisabled());
- 327 0 Settings.setBoolean(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, !cli.isAutoconfDisabled());
- 328 0 Settings.setBoolean(Settings.KEYS.ANALYZER_CMAKE_ENABLED, !cli.isCmakeDisabled());
- 329 0 Settings.setBoolean(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, !cli.isNuspecDisabled());
- 330 0 Settings.setBoolean(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, !cli.isAssemblyDisabled());
- 331 0 Settings.setBoolean(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_ENABLED, !cli.isBundleAuditDisabled());
- 332 0 Settings.setBoolean(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, !cli.isOpenSSLDisabled());
- 333 0 Settings.setBoolean(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, !cli.isComposerDisabled());
- 334 0 Settings.setBoolean(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, !cli.isNodeJsDisabled());
- 335 0 Settings.setBoolean(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, !cli.isRubyGemspecDisabled());
- 336 0 Settings.setBoolean(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, !cli.isCentralDisabled());
- 337 0 Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED, !cli.isNexusDisabled());
- 338
-
- 339 0 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_PATH, cli.getPathToBundleAudit());
- 340 0 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
- 341 0 Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY, nexusUsesProxy);
- 342 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName);
- 343 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath);
- 344 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_CONNECTION_STRING, connectionString);
- 345 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_USER, databaseUser);
- 346 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_PASSWORD, databasePassword);
- 347 0 Settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, additionalZipExtensions);
- 348 0 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH, pathToMono);
- 349 0 if (cveBase12 != null && !cveBase12.isEmpty()) {
- 350 0 Settings.setString(Settings.KEYS.CVE_SCHEMA_1_2, cveBase12);
- 351 0 Settings.setString(Settings.KEYS.CVE_SCHEMA_2_0, cveBase20);
- 352 0 Settings.setString(Settings.KEYS.CVE_MODIFIED_12_URL, cveMod12);
- 353 0 Settings.setString(Settings.KEYS.CVE_MODIFIED_20_URL, cveMod20);
- 354
- }
- 355 0 }
- 356
-
- 357
-
- 358
-
- 359
-
- 360
-
- 361
-
- 362
- private void prepareLogger(String verboseLog) {
- 363 0 final StaticLoggerBinder loggerBinder = StaticLoggerBinder.getSingleton();
- 364 0 final LoggerContext context = (LoggerContext) loggerBinder.getLoggerFactory();
- 365
-
- 366 0 final PatternLayoutEncoder encoder = new PatternLayoutEncoder();
- 367 0 encoder.setPattern("%d %C:%L%n%-5level - %msg%n" );
- 368 0 encoder.setContext(context);
- 369 0 encoder.start();
- 370 0 final FileAppender fa = new FileAppender();
- 371 0 fa.setAppend(true );
- 372 0 fa.setEncoder(encoder);
- 373 0 fa.setContext(context);
- 374 0 fa.setFile(verboseLog);
- 375 0 final File f = new File(verboseLog);
- 376 0 String name = f.getName();
- 377 0 final int i = name.lastIndexOf('.' );
- 378 0 if (i > 1) {
- 379 0 name = name.substring(0, i);
- 380
- }
- 381 0 fa.setName(name);
- 382 0 fa.start();
- 383 0 final ch.qos.logback.classic.Logger rootLogger = context.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
- 384 0 rootLogger.addAppender(fa);
- 385 0 }
- 386
-
- 387
-
- 388
-
- 389
-
- 390
-
- 391
-
- 392
-
- 393
-
- 394
-
- 395
- protected String ensureCanonicalPath(String path) {
- 396 4 String basePath = null ;
- 397 4 String wildCards = null ;
- 398 4 final String file = path.replace('\\' , '/' );
- 399 4 if (file.contains("*" ) || file.contains("?" )) {
- 400
-
- 401 2 int pos = getLastFileSeparator(file);
- 402 2 if (pos < 0) {
- 403 0 return file;
- 404
}
- 405 2 pos += 1;
- 406 2 basePath = file.substring(0, pos);
- 407 2 wildCards = file.substring(pos);
- 408 2 } else {
- 409 2 basePath = file;
- 410
+ 299
+ } finally {
+ 300 0 if (engine != null ) {
+ 301 0 engine.cleanup();
+ 302
+ }
+ 303
}
+ 304
+
+ 305 0 }
+ 306
+
+ 307
+
+ 308
+
+ 309
+
+ 310
+
+ 311
+
+ 312
+
+ 313
+
+ 314
+ private void runUpdateOnly() throws UpdateException, DatabaseException {
+ 315 0 Engine engine = null ;
+ 316
+ try {
+ 317 0 engine = new Engine();
+ 318 0 engine.doUpdates();
+ 319
+ } finally {
+ 320 0 if (engine != null ) {
+ 321 0 engine.cleanup();
+ 322
+ }
+ 323
+ }
+ 324 0 }
+ 325
+
+ 326
+
+ 327
+
+ 328
+
+ 329
+
+ 330
+
+ 331
+
+ 332
+
+ 333
+
+ 334
+
+ 335
+ private void populateSettings(CliParser cli) throws InvalidSettingException {
+ 336 0 final boolean autoUpdate = cli.isAutoUpdate();
+ 337 0 final String connectionTimeout = cli.getConnectionTimeout();
+ 338 0 final String proxyServer = cli.getProxyServer();
+ 339 0 final String proxyPort = cli.getProxyPort();
+ 340 0 final String proxyUser = cli.getProxyUsername();
+ 341 0 final String proxyPass = cli.getProxyPassword();
+ 342 0 final String dataDirectory = cli.getDataDirectory();
+ 343 0 final File propertiesFile = cli.getPropertiesFile();
+ 344 0 final String suppressionFile = cli.getSuppressionFile();
+ 345 0 final String nexusUrl = cli.getNexusUrl();
+ 346 0 final String databaseDriverName = cli.getDatabaseDriverName();
+ 347 0 final String databaseDriverPath = cli.getDatabaseDriverPath();
+ 348 0 final String connectionString = cli.getConnectionString();
+ 349 0 final String databaseUser = cli.getDatabaseUser();
+ 350 0 final String databasePassword = cli.getDatabasePassword();
+ 351 0 final String additionalZipExtensions = cli.getAdditionalZipExtensions();
+ 352 0 final String pathToMono = cli.getPathToMono();
+ 353 0 final String cveMod12 = cli.getModifiedCve12Url();
+ 354 0 final String cveMod20 = cli.getModifiedCve20Url();
+ 355 0 final String cveBase12 = cli.getBaseCve12Url();
+ 356 0 final String cveBase20 = cli.getBaseCve20Url();
+ 357 0 final Integer cveValidForHours = cli.getCveValidForHours();
+ 358 0 final boolean experimentalEnabled = cli.isExperimentalEnabled();
+ 359
+
+ 360 0 if (propertiesFile != null ) {
+ 361
+ try {
+ 362 0 Settings.mergeProperties(propertiesFile);
+ 363 0 } catch (FileNotFoundException ex) {
+ 364 0 throw new InvalidSettingException("Unable to find properties file '" + propertiesFile.getPath() + "'" , ex);
+ 365 0 } catch (IOException ex) {
+ 366 0 throw new InvalidSettingException("Error reading properties file '" + propertiesFile.getPath() + "'" , ex);
+ 367 0 }
+ 368
+ }
+ 369
+
+ 370
+
+ 371
+
+ 372 0 final boolean nexusUsesProxy = cli.isNexusUsesProxy();
+ 373 0 if (dataDirectory != null ) {
+ 374 0 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
+ 375 0 } else if (System.getProperty("basedir" ) != null ) {
+ 376 0 final File dataDir = new File(System.getProperty("basedir" ), "data" );
+ 377 0 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
+ 378 0 } else {
+ 379 0 final File jarPath = new File(App.class .getProtectionDomain().getCodeSource().getLocation().getPath());
+ 380 0 final File base = jarPath.getParentFile();
+ 381 0 final String sub = Settings.getString(Settings.KEYS.DATA_DIRECTORY);
+ 382 0 final File dataDir = new File(base, sub);
+ 383 0 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
+ 384
+ }
+ 385 0 Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
+ 386 0 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_SERVER, proxyServer);
+ 387 0 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PORT, proxyPort);
+ 388 0 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_USERNAME, proxyUser);
+ 389 0 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPass);
+ 390 0 Settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
+ 391 0 Settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
+ 392 0 Settings.setIntIfNotNull(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours);
+ 393
+
+ 394
+
+ 395 0 Settings.setBoolean(Settings.KEYS.ANALYZER_EXPERIMENTAL_ENABLED, experimentalEnabled);
+ 396 0 Settings.setBoolean(Settings.KEYS.ANALYZER_JAR_ENABLED, !cli.isJarDisabled());
+ 397 0 Settings.setBoolean(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, !cli.isArchiveDisabled());
+ 398 0 Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, !cli.isPythonDistributionDisabled());
+ 399 0 Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, !cli.isPythonPackageDisabled());
+ 400 0 Settings.setBoolean(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, !cli.isAutoconfDisabled());
+ 401 0 Settings.setBoolean(Settings.KEYS.ANALYZER_CMAKE_ENABLED, !cli.isCmakeDisabled());
+ 402 0 Settings.setBoolean(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, !cli.isNuspecDisabled());
+ 403 0 Settings.setBoolean(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, !cli.isAssemblyDisabled());
+ 404 0 Settings.setBoolean(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_ENABLED, !cli.isBundleAuditDisabled());
+ 405 0 Settings.setBoolean(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, !cli.isOpenSSLDisabled());
+ 406 0 Settings.setBoolean(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, !cli.isComposerDisabled());
+ 407 0 Settings.setBoolean(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, !cli.isNodeJsDisabled());
+ 408 0 Settings.setBoolean(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, !cli.isRubyGemspecDisabled());
+ 409 0 Settings.setBoolean(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, !cli.isCentralDisabled());
+ 410 0 Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED, !cli.isNexusDisabled());
411
- 412 4 File f = new File(basePath);
- 413
- try {
- 414 4 f = f.getCanonicalFile();
- 415 4 if (wildCards != null ) {
- 416 2 f = new File(f, wildCards);
- 417
- }
- 418 0 } catch (IOException ex) {
- 419 0 LOGGER.warn("Invalid path '{}' was provided." , path);
- 420 0 LOGGER.debug("Invalid path provided" , ex);
- 421 4 }
- 422 4 return f.getAbsolutePath().replace('\\' , '/' );
- 423
- }
- 424
-
- 425
-
- 426
-
+ 412 0 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_PATH, cli.getPathToBundleAudit());
+ 413 0 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
+ 414 0 Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY, nexusUsesProxy);
+ 415 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName);
+ 416 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath);
+ 417 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_CONNECTION_STRING, connectionString);
+ 418 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_USER, databaseUser);
+ 419 0 Settings.setStringIfNotEmpty(Settings.KEYS.DB_PASSWORD, databasePassword);
+ 420 0 Settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, additionalZipExtensions);
+ 421 0 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH, pathToMono);
+ 422 0 if (cveBase12 != null && !cveBase12.isEmpty()) {
+ 423 0 Settings.setString(Settings.KEYS.CVE_SCHEMA_1_2, cveBase12);
+ 424 0 Settings.setString(Settings.KEYS.CVE_SCHEMA_2_0, cveBase20);
+ 425 0 Settings.setString(Settings.KEYS.CVE_MODIFIED_12_URL, cveMod12);
+ 426 0 Settings.setString(Settings.KEYS.CVE_MODIFIED_20_URL, cveMod20);
427
-
- 428
-
- 429
-
- 430
-
- 431
- private int getLastFileSeparator(String file) {
- 432 2 if (file.contains("*" ) || file.contains("?" )) {
- 433 2 int p1 = file.indexOf('*' );
- 434 2 int p2 = file.indexOf('?' );
- 435 2 p1 = p1 > 0 ? p1 : file.length();
- 436 2 p2 = p2 > 0 ? p2 : file.length();
- 437 2 int pos = p1 < p2 ? p1 : p2;
- 438 2 pos = file.lastIndexOf('/' , pos);
- 439 2 return pos;
- 440
- } else {
- 441 0 return file.lastIndexOf('/' );
- 442
}
- 443
+ 428 0 }
+ 429
+
+ 430
+
+ 431
+
+ 432
+
+ 433
+
+ 434
+
+ 435
+ private void prepareLogger(String verboseLog) {
+ 436 0 final StaticLoggerBinder loggerBinder = StaticLoggerBinder.getSingleton();
+ 437 0 final LoggerContext context = (LoggerContext) loggerBinder.getLoggerFactory();
+ 438
+
+ 439 0 final PatternLayoutEncoder encoder = new PatternLayoutEncoder();
+ 440 0 encoder.setPattern("%d %C:%L%n%-5level - %msg%n" );
+ 441 0 encoder.setContext(context);
+ 442 0 encoder.start();
+ 443 0 final FileAppender fa = new FileAppender();
+ 444 0 fa.setAppend(true );
+ 445 0 fa.setEncoder(encoder);
+ 446 0 fa.setContext(context);
+ 447 0 fa.setFile(verboseLog);
+ 448 0 final File f = new File(verboseLog);
+ 449 0 String name = f.getName();
+ 450 0 final int i = name.lastIndexOf('.' );
+ 451 0 if (i > 1) {
+ 452 0 name = name.substring(0, i);
+ 453
+ }
+ 454 0 fa.setName(name);
+ 455 0 fa.start();
+ 456 0 final ch.qos.logback.classic.Logger rootLogger = context.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
+ 457 0 rootLogger.addAppender(fa);
+ 458 0 }
+ 459
+
+ 460
+
+ 461
+
+ 462
+
+ 463
+
+ 464
+
+ 465
+
+ 466
+
+ 467
+
+ 468
+
+ 469
+ protected String ensureCanonicalPath(String path) {
+ 470
+ String basePath;
+ 471 2 String wildCards = null ;
+ 472 2 final String file = path.replace('\\' , '/' );
+ 473 2 if (file.contains("*" ) || file.contains("?" )) {
+ 474
+
+ 475 1 int pos = getLastFileSeparator(file);
+ 476 1 if (pos < 0) {
+ 477 0 return file;
+ 478
+ }
+ 479 1 pos += 1;
+ 480 1 basePath = file.substring(0, pos);
+ 481 1 wildCards = file.substring(pos);
+ 482 1 } else {
+ 483 1 basePath = file;
+ 484
+ }
+ 485
+
+ 486 2 File f = new File(basePath);
+ 487
+ try {
+ 488 2 f = f.getCanonicalFile();
+ 489 2 if (wildCards != null ) {
+ 490 1 f = new File(f, wildCards);
+ 491
+ }
+ 492 0 } catch (IOException ex) {
+ 493 0 LOGGER.warn("Invalid path '{}' was provided." , path);
+ 494 0 LOGGER.debug("Invalid path provided" , ex);
+ 495 2 }
+ 496 2 return f.getAbsolutePath().replace('\\' , '/' );
+ 497
}
- 444
+ 498
+
+ 499
+
+ 500
+
+ 501
+
+ 502
+
+ 503
+
+ 504
+
+ 505
+ private int getLastFileSeparator(String file) {
+ 506 1 if (file.contains("*" ) || file.contains("?" )) {
+ 507 1 int p1 = file.indexOf('*' );
+ 508 1 int p2 = file.indexOf('?' );
+ 509 1 p1 = p1 > 0 ? p1 : file.length();
+ 510 1 p2 = p2 > 0 ? p2 : file.length();
+ 511 1 int pos = p1 < p2 ? p1 : p2;
+ 512 1 pos = file.lastIndexOf('/' , pos);
+ 513 1 return pos;
+ 514
+ } else {
+ 515 0 return file.lastIndexOf('/' );
+ 516
+ }
+ 517
+ }
+ 518
}
-
+
diff --git a/dependency-check-cli/cobertura/org.owasp.dependencycheck.CliParser.html b/dependency-check-cli/cobertura/org.owasp.dependencycheck.CliParser.html
index 0a3ad314f..80577c16f 100644
--- a/dependency-check-cli/cobertura/org.owasp.dependencycheck.CliParser.html
+++ b/dependency-check-cli/cobertura/org.owasp.dependencycheck.CliParser.html
@@ -100,7 +100,7 @@
41
- 42 18 public final class CliParser {
+ 42 9 public final class CliParser {
43
44
@@ -109,7 +109,7 @@
46
- 47 2 private static final Logger LOGGER = LoggerFactory.getLogger(CliParser.class );
+ 47 1 private static final Logger LOGGER = LoggerFactory.getLogger(CliParser.class );
48
49
@@ -124,7 +124,7 @@
54
- 55 18 private boolean isValid = true ;
+ 55 9 private boolean isValid = true ;
56
57
@@ -145,14 +145,14 @@
65
public void parse(String[] args) throws FileNotFoundException, ParseException {
- 66 18 line = parseArgs(args);
+ 66 9 line = parseArgs(args);
67
- 68 14 if (line != null ) {
- 69 14 validateArgs();
+ 68 7 if (line != null ) {
+ 69 7 validateArgs();
70
}
- 71 12 }
+ 71 6 }
72
73
@@ -171,9 +171,9 @@
80
private CommandLine parseArgs(String[] args) throws ParseException {
- 81 18 final CommandLineParser parser = new DefaultParser();
- 82 18 final Options options = createCommandLineOptions();
- 83 18 return parser.parse(options, args);
+ 81 9 final CommandLineParser parser = new DefaultParser();
+ 82 9 final Options options = createCommandLineOptions();
+ 83 9 return parser.parse(options, args);
84
}
85
@@ -196,9 +196,9 @@
94
private void validateArgs() throws FileNotFoundException, ParseException {
- 95 14 if (isUpdateOnly() || isRunScan()) {
- 96 4 final String value = line.getOptionValue(ARGUMENT.CVE_VALID_FOR_HOURS);
- 97 4 if (value != null ) {
+ 95 7 if (isUpdateOnly() || isRunScan()) {
+ 96 2 final String value = line.getOptionValue(ARGUMENT.CVE_VALID_FOR_HOURS);
+ 97 2 if (value != null ) {
98
try {
99 0 final int i = Integer.parseInt(value);
@@ -213,18 +213,18 @@
}
107
}
- 108 14 if (isRunScan()) {
- 109 4 validatePathExists(getScanFiles(), ARGUMENT.SCAN);
- 110 2 validatePathExists(getReportDirectory(), ARGUMENT.OUT);
- 111 2 if (getPathToMono() != null ) {
+ 108 7 if (isRunScan()) {
+ 109 2 validatePathExists(getScanFiles(), ARGUMENT.SCAN);
+ 110 1 validatePathExists(getReportDirectory(), ARGUMENT.OUT);
+ 111 1 if (getPathToMono() != null ) {
112 0 validatePathExists(getPathToMono(), ARGUMENT.PATH_TO_MONO);
113
}
- 114 2 if (!line.hasOption(ARGUMENT.APP_NAME) && !line.hasOption(ARGUMENT.PROJECT)) {
+ 114 1 if (!line.hasOption(ARGUMENT.APP_NAME) && !line.hasOption(ARGUMENT.PROJECT)) {
115 0 throw new ParseException("Missing '" + ARGUMENT.PROJECT + "' argument; the scan cannot be run without the an project name." );
116
}
- 117 2 if (line.hasOption(ARGUMENT.OUTPUT_FORMAT)) {
+ 117 1 if (line.hasOption(ARGUMENT.OUTPUT_FORMAT)) {
118 0 final String format = line.getOptionValue(ARGUMENT.OUTPUT_FORMAT);
119
try {
@@ -237,13 +237,13 @@
125 0 }
126
}
- 127 2 if ((getBaseCve12Url() != null || getBaseCve20Url() != null || getModifiedCve12Url() != null || getModifiedCve20Url() != null )
+ 127 1 if ((getBaseCve12Url() != null || getBaseCve20Url() != null || getModifiedCve12Url() != null || getModifiedCve20Url() != null )
128 0 && (getBaseCve12Url() == null || getBaseCve20Url() == null || getModifiedCve12Url() == null || getModifiedCve20Url() == null )) {
129 0 final String msg = "If one of the CVE URLs is specified they must all be specified; please add the missing CVE URL." ;
130 0 throw new ParseException(msg);
131
}
- 132 2 if (line.hasOption((ARGUMENT.SYM_LINK_DEPTH))) {
+ 132 1 if (line.hasOption((ARGUMENT.SYM_LINK_DEPTH))) {
133
try {
134 0 final int i = Integer.parseInt(line.getOptionValue(ARGUMENT.SYM_LINK_DEPTH));
@@ -258,7 +258,7 @@
}
142
}
- 143 12 }
+ 143 6 }
144
145
@@ -283,11 +283,11 @@
155
private void validatePathExists(String[] paths, String optType) throws FileNotFoundException {
- 156 6 for (String path : paths) {
- 157 4 validatePathExists(path, optType);
+ 156 3 for (String path : paths) {
+ 157 2 validatePathExists(path, optType);
158
}
- 159 2 }
+ 159 1 }
160
161
@@ -312,15 +312,15 @@
171
private void validatePathExists(String path, String argumentName) throws FileNotFoundException {
- 172 6 if (path == null ) {
+ 172 3 if (path == null ) {
173 0 isValid = false ;
174 0 final String msg = String.format("Invalid '%s' argument: null" , argumentName);
175 0 throw new FileNotFoundException(msg);
- 176 6 } else if (!path.contains("*" ) && !path.contains("?" )) {
- 177 6 File f = new File(path);
- 178 6 if ("o" .equalsIgnoreCase(argumentName.substring(0, 1)) && !"ALL" .equalsIgnoreCase(this .getReportFormat())) {
- 179 2 final String checkPath = path.toLowerCase();
- 180 2 if (checkPath.endsWith(".html" ) || checkPath.endsWith(".xml" ) || checkPath.endsWith(".htm" )) {
+ 176 3 } else if (!path.contains("*" ) && !path.contains("?" )) {
+ 177 3 File f = new File(path);
+ 178 3 if ("o" .equalsIgnoreCase(argumentName.substring(0, 1)) && !"ALL" .equalsIgnoreCase(this .getReportFormat())) {
+ 179 1 final String checkPath = path.toLowerCase();
+ 180 1 if (checkPath.endsWith(".html" ) || checkPath.endsWith(".xml" ) || checkPath.endsWith(".htm" )) {
181 0 if (f.getParentFile() == null ) {
182 0 f = new File("." , path);
183
@@ -333,19 +333,19 @@
}
189
}
- 190 2 } else if (!f.exists()) {
- 191 2 isValid = false ;
- 192 2 final String msg = String.format("Invalid '%s' argument: '%s'" , argumentName, path);
- 193 2 throw new FileNotFoundException(msg);
+ 190 1 } else if (!f.exists()) {
+ 191 1 isValid = false ;
+ 192 1 final String msg = String.format("Invalid '%s' argument: '%s'" , argumentName, path);
+ 193 1 throw new FileNotFoundException(msg);
194
}
- 195 4 } else if (path.startsWith("//" ) || path.startsWith("\\\\" )) {
+ 195 2 } else if (path.startsWith("//" ) || path.startsWith("\\\\" )) {
196 0 isValid = false ;
197 0 final String msg = String.format("Invalid '%s' argument: '%s'%nUnable to scan paths that start with '//'." , argumentName, path);
198 0 throw new FileNotFoundException(msg);
199
}
- 200 4 }
+ 200 2 }
201
202
@@ -364,11 +364,11 @@
@SuppressWarnings("static-access" )
209
private Options createCommandLineOptions() {
- 210 18 final Options options = new Options();
- 211 18 addStandardOptions(options);
- 212 18 addAdvancedOptions(options);
- 213 18 addDeprecatedOptions(options);
- 214 18 return options;
+ 210 9 final Options options = new Options();
+ 211 9 addStandardOptions(options);
+ 212 9 addAdvancedOptions(options);
+ 213 9 addDeprecatedOptions(options);
+ 214 9 return options;
215
}
216
@@ -389,112 +389,112 @@
@SuppressWarnings("static-access" )
224
private void addStandardOptions(final Options options) throws IllegalArgumentException {
- 225 22 final Option help = new Option(ARGUMENT.HELP_SHORT, ARGUMENT.HELP, false ,
+ 225 11 final Option help = new Option(ARGUMENT.HELP_SHORT, ARGUMENT.HELP, false ,
226
"Print this message." );
227
- 228 22 final Option advancedHelp = Option.builder().longOpt(ARGUMENT.ADVANCED_HELP)
- 229 22 .desc("Print the advanced help message." ).build();
+ 228 11 final Option advancedHelp = Option.builder().longOpt(ARGUMENT.ADVANCED_HELP)
+ 229 11 .desc("Print the advanced help message." ).build();
230
- 231 22 final Option version = new Option(ARGUMENT.VERSION_SHORT, ARGUMENT.VERSION,
+ 231 11 final Option version = new Option(ARGUMENT.VERSION_SHORT, ARGUMENT.VERSION,
232
false , "Print the version information." );
233
- 234 22 final Option noUpdate = new Option(ARGUMENT.DISABLE_AUTO_UPDATE_SHORT, ARGUMENT.DISABLE_AUTO_UPDATE,
+ 234 11 final Option noUpdate = new Option(ARGUMENT.DISABLE_AUTO_UPDATE_SHORT, ARGUMENT.DISABLE_AUTO_UPDATE,
235
false , "Disables the automatic updating of the CPE data." );
236
- 237 22 final Option projectName = Option.builder().hasArg().argName("name" ).longOpt(ARGUMENT.PROJECT)
- 238 22 .desc("The name of the project being scanned. This is a required argument." )
- 239 22 .build();
+ 237 11 final Option projectName = Option.builder().hasArg().argName("name" ).longOpt(ARGUMENT.PROJECT)
+ 238 11 .desc("The name of the project being scanned. This is a required argument." )
+ 239 11 .build();
240
- 241 22 final Option path = Option.builder(ARGUMENT.SCAN_SHORT).argName("path" ).hasArg().longOpt(ARGUMENT.SCAN)
- 242 22 .desc("The path to scan - this option can be specified multiple times. Ant style"
+ 241 11 final Option path = Option.builder(ARGUMENT.SCAN_SHORT).argName("path" ).hasArg().longOpt(ARGUMENT.SCAN)
+ 242 11 .desc("The path to scan - this option can be specified multiple times. Ant style"
243
+ " paths are supported (e.g. path/**/*.jar)." )
- 244 22 .build();
+ 244 11 .build();
245
- 246 22 final Option excludes = Option.builder().argName("pattern" ).hasArg().longOpt(ARGUMENT.EXCLUDE)
- 247 22 .desc("Specify and exclusion pattern. This option can be specified multiple times"
+ 246 11 final Option excludes = Option.builder().argName("pattern" ).hasArg().longOpt(ARGUMENT.EXCLUDE)
+ 247 11 .desc("Specify and exclusion pattern. This option can be specified multiple times"
248
+ " and it accepts Ant style excludsions." )
- 249 22 .build();
+ 249 11 .build();
250
- 251 22 final Option props = Option.builder(ARGUMENT.PROP_SHORT).argName("file" ).hasArg().longOpt(ARGUMENT.PROP)
- 252 22 .desc("A property file to load." )
- 253 22 .build();
+ 251 11 final Option props = Option.builder(ARGUMENT.PROP_SHORT).argName("file" ).hasArg().longOpt(ARGUMENT.PROP)
+ 252 11 .desc("A property file to load." )
+ 253 11 .build();
254
- 255 22 final Option out = Option.builder(ARGUMENT.OUT_SHORT).argName("path" ).hasArg().longOpt(ARGUMENT.OUT)
- 256 22 .desc("The folder to write reports to. This defaults to the current directory. "
+ 255 11 final Option out = Option.builder(ARGUMENT.OUT_SHORT).argName("path" ).hasArg().longOpt(ARGUMENT.OUT)
+ 256 11 .desc("The folder to write reports to. This defaults to the current directory. "
257
+ "It is possible to set this to a specific file name if the format argument is not set to ALL." )
- 258 22 .build();
+ 258 11 .build();
259
- 260 22 final Option outputFormat = Option.builder(ARGUMENT.OUTPUT_FORMAT_SHORT).argName("format" ).hasArg().longOpt(ARGUMENT.OUTPUT_FORMAT)
- 261 22 .desc("The output format to write to (XML, HTML, VULN, ALL). The default is HTML." )
- 262 22 .build();
+ 260 11 final Option outputFormat = Option.builder(ARGUMENT.OUTPUT_FORMAT_SHORT).argName("format" ).hasArg().longOpt(ARGUMENT.OUTPUT_FORMAT)
+ 261 11 .desc("The output format to write to (XML, HTML, VULN, ALL). The default is HTML." )
+ 262 11 .build();
263
- 264 22 final Option verboseLog = Option.builder(ARGUMENT.VERBOSE_LOG_SHORT).argName("file" ).hasArg().longOpt(ARGUMENT.VERBOSE_LOG)
- 265 22 .desc("The file path to write verbose logging information." )
- 266 22 .build();
+ 264 11 final Option verboseLog = Option.builder(ARGUMENT.VERBOSE_LOG_SHORT).argName("file" ).hasArg().longOpt(ARGUMENT.VERBOSE_LOG)
+ 265 11 .desc("The file path to write verbose logging information." )
+ 266 11 .build();
267
- 268 22 final Option symLinkDepth = Option.builder().argName("depth" ).hasArg().longOpt(ARGUMENT.SYM_LINK_DEPTH)
- 269 22 .desc("Sets how deep nested symbolic links will be followed; 0 indicates symbolic links will not be followed." )
- 270 22 .build();
+ 268 11 final Option symLinkDepth = Option.builder().argName("depth" ).hasArg().longOpt(ARGUMENT.SYM_LINK_DEPTH)
+ 269 11 .desc("Sets how deep nested symbolic links will be followed; 0 indicates symbolic links will not be followed." )
+ 270 11 .build();
271
- 272 22 final Option suppressionFile = Option.builder().argName("file" ).hasArg().longOpt(ARGUMENT.SUPPRESSION_FILE)
- 273 22 .desc("The file path to the suppression XML file." )
- 274 22 .build();
+ 272 11 final Option suppressionFile = Option.builder().argName("file" ).hasArg().longOpt(ARGUMENT.SUPPRESSION_FILE)
+ 273 11 .desc("The file path to the suppression XML file." )
+ 274 11 .build();
275
- 276 22 final Option cveValidForHours = Option.builder().argName("hours" ).hasArg().longOpt(ARGUMENT.CVE_VALID_FOR_HOURS)
- 277 22 .desc("The number of hours to wait before checking for new updates from the NVD." )
- 278 22 .build();
+ 276 11 final Option cveValidForHours = Option.builder().argName("hours" ).hasArg().longOpt(ARGUMENT.CVE_VALID_FOR_HOURS)
+ 277 11 .desc("The number of hours to wait before checking for new updates from the NVD." )
+ 278 11 .build();
279
- 280 22 final Option experimentalEnabled = Option.builder().longOpt(ARGUMENT.EXPERIMENTAL)
- 281 22 .desc("Enables the experimental analzers." )
- 282 22 .build();
+ 280 11 final Option experimentalEnabled = Option.builder().longOpt(ARGUMENT.EXPERIMENTAL)
+ 281 11 .desc("Enables the experimental analzers." )
+ 282 11 .build();
283
284
- 285 22 final OptionGroup og = new OptionGroup();
- 286 22 og.addOption(path);
+ 285 11 final OptionGroup og = new OptionGroup();
+ 286 11 og.addOption(path);
287
- 288 22 final OptionGroup exog = new OptionGroup();
- 289 22 exog.addOption(excludes);
+ 288 11 final OptionGroup exog = new OptionGroup();
+ 289 11 exog.addOption(excludes);
290
- 291 22 options.addOptionGroup(og)
- 292 22 .addOptionGroup(exog)
- 293 22 .addOption(projectName)
- 294 22 .addOption(out)
- 295 22 .addOption(outputFormat)
- 296 22 .addOption(version)
- 297 22 .addOption(help)
- 298 22 .addOption(advancedHelp)
- 299 22 .addOption(noUpdate)
- 300 22 .addOption(symLinkDepth)
- 301 22 .addOption(props)
- 302 22 .addOption(verboseLog)
- 303 22 .addOption(suppressionFile)
- 304 22 .addOption(cveValidForHours)
- 305 22 .addOption(experimentalEnabled);
- 306 22 }
+ 291 11 options.addOptionGroup(og)
+ 292 11 .addOptionGroup(exog)
+ 293 11 .addOption(projectName)
+ 294 11 .addOption(out)
+ 295 11 .addOption(outputFormat)
+ 296 11 .addOption(version)
+ 297 11 .addOption(help)
+ 298 11 .addOption(advancedHelp)
+ 299 11 .addOption(noUpdate)
+ 300 11 .addOption(symLinkDepth)
+ 301 11 .addOption(props)
+ 302 11 .addOption(verboseLog)
+ 303 11 .addOption(suppressionFile)
+ 304 11 .addOption(cveValidForHours)
+ 305 11 .addOption(experimentalEnabled);
+ 306 11 }
307
308
@@ -519,198 +519,198 @@
private void addAdvancedOptions(final Options options) throws IllegalArgumentException {
318
- 319 18 final Option cve12Base = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.CVE_BASE_12)
- 320 18 .desc("Base URL for each year’s CVE 1.2, the %d will be replaced with the year. " )
- 321 18 .build();
+ 319 9 final Option cve12Base = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.CVE_BASE_12)
+ 320 9 .desc("Base URL for each year’s CVE 1.2, the %d will be replaced with the year. " )
+ 321 9 .build();
322
- 323 18 final Option cve20Base = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.CVE_BASE_20)
- 324 18 .desc("Base URL for each year’s CVE 2.0, the %d will be replaced with the year." )
- 325 18 .build();
+ 323 9 final Option cve20Base = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.CVE_BASE_20)
+ 324 9 .desc("Base URL for each year’s CVE 2.0, the %d will be replaced with the year." )
+ 325 9 .build();
326
- 327 18 final Option cve12Modified = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.CVE_MOD_12)
- 328 18 .desc("URL for the modified CVE 1.2." )
- 329 18 .build();
+ 327 9 final Option cve12Modified = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.CVE_MOD_12)
+ 328 9 .desc("URL for the modified CVE 1.2." )
+ 329 9 .build();
330
- 331 18 final Option cve20Modified = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.CVE_MOD_20)
- 332 18 .desc("URL for the modified CVE 2.0." )
- 333 18 .build();
+ 331 9 final Option cve20Modified = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.CVE_MOD_20)
+ 332 9 .desc("URL for the modified CVE 2.0." )
+ 333 9 .build();
334
- 335 18 final Option updateOnly = Option.builder().longOpt(ARGUMENT.UPDATE_ONLY)
- 336 18 .desc("Only update the local NVD data cache; no scan will be executed." ).build();
+ 335 9 final Option updateOnly = Option.builder().longOpt(ARGUMENT.UPDATE_ONLY)
+ 336 9 .desc("Only update the local NVD data cache; no scan will be executed." ).build();
337
- 338 18 final Option data = Option.builder(ARGUMENT.DATA_DIRECTORY_SHORT).argName("path" ).hasArg().longOpt(ARGUMENT.DATA_DIRECTORY)
- 339 18 .desc("The location of the H2 Database file. This option should generally not be set." )
- 340 18 .build();
+ 338 9 final Option data = Option.builder(ARGUMENT.DATA_DIRECTORY_SHORT).argName("path" ).hasArg().longOpt(ARGUMENT.DATA_DIRECTORY)
+ 339 9 .desc("The location of the H2 Database file. This option should generally not be set." )
+ 340 9 .build();
341
- 342 18 final Option nexusUrl = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.NEXUS_URL)
- 343 18 .desc("The url to the Nexus Server's REST API Endpoint (http://domain/nexus/service/local). "
- 344 18 + "If not set the Nexus Analyzer will be disabled." ).build();
+ 342 9 final Option nexusUrl = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.NEXUS_URL)
+ 343 9 .desc("The url to the Nexus Server's REST API Endpoint (http://domain/nexus/service/local). "
+ 344 9 + "If not set the Nexus Analyzer will be disabled." ).build();
345
- 346 18 final Option nexusUsesProxy = Option.builder().argName("true/false" ).hasArg().longOpt(ARGUMENT.NEXUS_USES_PROXY)
- 347 18 .desc("Whether or not the configured proxy should be used when connecting to Nexus." )
- 348 18 .build();
+ 346 9 final Option nexusUsesProxy = Option.builder().argName("true/false" ).hasArg().longOpt(ARGUMENT.NEXUS_USES_PROXY)
+ 347 9 .desc("Whether or not the configured proxy should be used when connecting to Nexus." )
+ 348 9 .build();
349
- 350 18 final Option additionalZipExtensions = Option.builder().argName("extensions" ).hasArg()
- 351 18 .longOpt(ARGUMENT.ADDITIONAL_ZIP_EXTENSIONS)
- 352 18 .desc("A comma separated list of additional extensions to be scanned as ZIP files "
- 353 18 + "(ZIP, EAR, WAR are already treated as zip files)" ).build();
+ 350 9 final Option additionalZipExtensions = Option.builder().argName("extensions" ).hasArg()
+ 351 9 .longOpt(ARGUMENT.ADDITIONAL_ZIP_EXTENSIONS)
+ 352 9 .desc("A comma separated list of additional extensions to be scanned as ZIP files "
+ 353 9 + "(ZIP, EAR, WAR are already treated as zip files)" ).build();
354
- 355 18 final Option pathToMono = Option.builder().argName("path" ).hasArg().longOpt(ARGUMENT.PATH_TO_MONO)
- 356 18 .desc("The path to Mono for .NET Assembly analysis on non-windows systems." )
- 357 18 .build();
+ 355 9 final Option pathToMono = Option.builder().argName("path" ).hasArg().longOpt(ARGUMENT.PATH_TO_MONO)
+ 356 9 .desc("The path to Mono for .NET Assembly analysis on non-windows systems." )
+ 357 9 .build();
358
- 359 18 final Option pathToBundleAudit = Option.builder().argName("path" ).hasArg()
- 360 18 .longOpt(ARGUMENT.PATH_TO_BUNDLE_AUDIT)
- 361 18 .desc("The path to bundle-audit for Gem bundle analysis." ).build();
+ 359 9 final Option pathToBundleAudit = Option.builder().argName("path" ).hasArg()
+ 360 9 .longOpt(ARGUMENT.PATH_TO_BUNDLE_AUDIT)
+ 361 9 .desc("The path to bundle-audit for Gem bundle analysis." ).build();
362
- 363 18 final Option connectionTimeout = Option.builder(ARGUMENT.CONNECTION_TIMEOUT_SHORT).argName("timeout" ).hasArg()
- 364 18 .longOpt(ARGUMENT.CONNECTION_TIMEOUT).desc("The connection timeout (in milliseconds) to use when downloading resources." )
- 365 18 .build();
+ 363 9 final Option connectionTimeout = Option.builder(ARGUMENT.CONNECTION_TIMEOUT_SHORT).argName("timeout" ).hasArg()
+ 364 9 .longOpt(ARGUMENT.CONNECTION_TIMEOUT).desc("The connection timeout (in milliseconds) to use when downloading resources." )
+ 365 9 .build();
366
- 367 18 final Option proxyServer = Option.builder().argName("server" ).hasArg().longOpt(ARGUMENT.PROXY_SERVER)
- 368 18 .desc("The proxy server to use when downloading resources." ).build();
+ 367 9 final Option proxyServer = Option.builder().argName("server" ).hasArg().longOpt(ARGUMENT.PROXY_SERVER)
+ 368 9 .desc("The proxy server to use when downloading resources." ).build();
369
- 370 18 final Option proxyPort = Option.builder().argName("port" ).hasArg().longOpt(ARGUMENT.PROXY_PORT)
- 371 18 .desc("The proxy port to use when downloading resources." ).build();
+ 370 9 final Option proxyPort = Option.builder().argName("port" ).hasArg().longOpt(ARGUMENT.PROXY_PORT)
+ 371 9 .desc("The proxy port to use when downloading resources." ).build();
372
- 373 18 final Option proxyUsername = Option.builder().argName("user" ).hasArg().longOpt(ARGUMENT.PROXY_USERNAME)
- 374 18 .desc("The proxy username to use when downloading resources." ).build();
+ 373 9 final Option proxyUsername = Option.builder().argName("user" ).hasArg().longOpt(ARGUMENT.PROXY_USERNAME)
+ 374 9 .desc("The proxy username to use when downloading resources." ).build();
375
- 376 18 final Option proxyPassword = Option.builder().argName("pass" ).hasArg().longOpt(ARGUMENT.PROXY_PASSWORD)
- 377 18 .desc("The proxy password to use when downloading resources." ).build();
+ 376 9 final Option proxyPassword = Option.builder().argName("pass" ).hasArg().longOpt(ARGUMENT.PROXY_PASSWORD)
+ 377 9 .desc("The proxy password to use when downloading resources." ).build();
378
- 379 18 final Option connectionString = Option.builder().argName("connStr" ).hasArg().longOpt(ARGUMENT.CONNECTION_STRING)
- 380 18 .desc("The connection string to the database." ).build();
+ 379 9 final Option connectionString = Option.builder().argName("connStr" ).hasArg().longOpt(ARGUMENT.CONNECTION_STRING)
+ 380 9 .desc("The connection string to the database." ).build();
381
- 382 18 final Option dbUser = Option.builder().argName("user" ).hasArg().longOpt(ARGUMENT.DB_NAME)
- 383 18 .desc("The username used to connect to the database." ).build();
+ 382 9 final Option dbUser = Option.builder().argName("user" ).hasArg().longOpt(ARGUMENT.DB_NAME)
+ 383 9 .desc("The username used to connect to the database." ).build();
384
- 385 18 final Option dbPassword = Option.builder().argName("password" ).hasArg().longOpt(ARGUMENT.DB_PASSWORD)
- 386 18 .desc("The password for connecting to the database." ).build();
+ 385 9 final Option dbPassword = Option.builder().argName("password" ).hasArg().longOpt(ARGUMENT.DB_PASSWORD)
+ 386 9 .desc("The password for connecting to the database." ).build();
387
- 388 18 final Option dbDriver = Option.builder().argName("driver" ).hasArg().longOpt(ARGUMENT.DB_DRIVER)
- 389 18 .desc("The database driver name." ).build();
+ 388 9 final Option dbDriver = Option.builder().argName("driver" ).hasArg().longOpt(ARGUMENT.DB_DRIVER)
+ 389 9 .desc("The database driver name." ).build();
390
- 391 18 final Option dbDriverPath = Option.builder().argName("path" ).hasArg().longOpt(ARGUMENT.DB_DRIVER_PATH)
- 392 18 .desc("The path to the database driver; note, this does not need to be set unless the JAR is outside of the classpath." )
- 393 18 .build();
+ 391 9 final Option dbDriverPath = Option.builder().argName("path" ).hasArg().longOpt(ARGUMENT.DB_DRIVER_PATH)
+ 392 9 .desc("The path to the database driver; note, this does not need to be set unless the JAR is outside of the classpath." )
+ 393 9 .build();
394
- 395 18 final Option disableJarAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_JAR)
- 396 18 .desc("Disable the Jar Analyzer." ).build();
+ 395 9 final Option disableJarAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_JAR)
+ 396 9 .desc("Disable the Jar Analyzer." ).build();
397
- 398 18 final Option disableArchiveAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_ARCHIVE)
- 399 18 .desc("Disable the Archive Analyzer." ).build();
+ 398 9 final Option disableArchiveAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_ARCHIVE)
+ 399 9 .desc("Disable the Archive Analyzer." ).build();
400
- 401 18 final Option disableNuspecAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_NUSPEC)
- 402 18 .desc("Disable the Nuspec Analyzer." ).build();
+ 401 9 final Option disableNuspecAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_NUSPEC)
+ 402 9 .desc("Disable the Nuspec Analyzer." ).build();
403
- 404 18 final Option disableAssemblyAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_ASSEMBLY)
- 405 18 .desc("Disable the .NET Assembly Analyzer." ).build();
+ 404 9 final Option disableAssemblyAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_ASSEMBLY)
+ 405 9 .desc("Disable the .NET Assembly Analyzer." ).build();
406
- 407 18 final Option disablePythonDistributionAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_PY_DIST)
- 408 18 .desc("Disable the Python Distribution Analyzer." ).build();
+ 407 9 final Option disablePythonDistributionAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_PY_DIST)
+ 408 9 .desc("Disable the Python Distribution Analyzer." ).build();
409
- 410 18 final Option disablePythonPackageAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_PY_PKG)
- 411 18 .desc("Disable the Python Package Analyzer." ).build();
+ 410 9 final Option disablePythonPackageAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_PY_PKG)
+ 411 9 .desc("Disable the Python Package Analyzer." ).build();
412
- 413 18 final Option disableComposerAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_COMPOSER)
- 414 18 .desc("Disable the PHP Composer Analyzer." ).build();
+ 413 9 final Option disableComposerAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_COMPOSER)
+ 414 9 .desc("Disable the PHP Composer Analyzer." ).build();
415
- 416 18 final Option disableAutoconfAnalyzer = Option.builder()
- 417 18 .longOpt(ARGUMENT.DISABLE_AUTOCONF)
- 418 18 .desc("Disable the Autoconf Analyzer." ).build();
+ 416 9 final Option disableAutoconfAnalyzer = Option.builder()
+ 417 9 .longOpt(ARGUMENT.DISABLE_AUTOCONF)
+ 418 9 .desc("Disable the Autoconf Analyzer." ).build();
419
- 420 18 final Option disableOpenSSLAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_OPENSSL)
- 421 18 .desc("Disable the OpenSSL Analyzer." ).build();
- 422 18 final Option disableCmakeAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_CMAKE)
- 423 18 .desc("Disable the Cmake Analyzer." ).build();
+ 420 9 final Option disableOpenSSLAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_OPENSSL)
+ 421 9 .desc("Disable the OpenSSL Analyzer." ).build();
+ 422 9 final Option disableCmakeAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_CMAKE)
+ 423 9 .desc("Disable the Cmake Analyzer." ).build();
424
- 425 18 final Option disableCentralAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_CENTRAL)
- 426 18 .desc("Disable the Central Analyzer. If this analyzer is disabled it is likely you also want to disable "
- 427 18 + "the Nexus Analyzer." ).build();
+ 425 9 final Option disableCentralAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_CENTRAL)
+ 426 9 .desc("Disable the Central Analyzer. If this analyzer is disabled it is likely you also want to disable "
+ 427 9 + "the Nexus Analyzer." ).build();
428
- 429 18 final Option disableNexusAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_NEXUS)
- 430 18 .desc("Disable the Nexus Analyzer." ).build();
+ 429 9 final Option disableNexusAnalyzer = Option.builder().longOpt(ARGUMENT.DISABLE_NEXUS)
+ 430 9 .desc("Disable the Nexus Analyzer." ).build();
431
- 432 18 final Option purge = Option.builder().longOpt(ARGUMENT.PURGE_NVD)
- 433 18 .desc("Purges the local NVD data cache" )
- 434 18 .build();
+ 432 9 final Option purge = Option.builder().longOpt(ARGUMENT.PURGE_NVD)
+ 433 9 .desc("Purges the local NVD data cache" )
+ 434 9 .build();
435
- 436 18 options.addOption(updateOnly)
- 437 18 .addOption(cve12Base)
- 438 18 .addOption(cve20Base)
- 439 18 .addOption(cve12Modified)
- 440 18 .addOption(cve20Modified)
- 441 18 .addOption(proxyPort)
- 442 18 .addOption(proxyServer)
- 443 18 .addOption(proxyUsername)
- 444 18 .addOption(proxyPassword)
- 445 18 .addOption(connectionTimeout)
- 446 18 .addOption(connectionString)
- 447 18 .addOption(dbUser)
- 448 18 .addOption(data)
- 449 18 .addOption(dbPassword)
- 450 18 .addOption(dbDriver)
- 451 18 .addOption(dbDriverPath)
- 452 18 .addOption(disableJarAnalyzer)
- 453 18 .addOption(disableArchiveAnalyzer)
- 454 18 .addOption(disableAssemblyAnalyzer)
- 455 18 .addOption(pathToBundleAudit)
- 456 18 .addOption(disablePythonDistributionAnalyzer)
- 457 18 .addOption(disableCmakeAnalyzer)
- 458 18 .addOption(disablePythonPackageAnalyzer)
- 459 36 .addOption(Option.builder().longOpt(ARGUMENT.DISABLE_RUBYGEMS)
- 460 18 .desc("Disable the Ruby Gemspec Analyzer." ).build())
- 461 36 .addOption(Option.builder().longOpt(ARGUMENT.DISABLE_BUNDLE_AUDIT)
- 462 18 .desc("Disable the Ruby Bundler-Audit Analyzer." ).build())
- 463 18 .addOption(disableAutoconfAnalyzer)
- 464 18 .addOption(disableComposerAnalyzer)
- 465 18 .addOption(disableOpenSSLAnalyzer)
- 466 18 .addOption(disableNuspecAnalyzer)
- 467 18 .addOption(disableCentralAnalyzer)
- 468 18 .addOption(disableNexusAnalyzer)
- 469 36 .addOption(Option.builder().longOpt(ARGUMENT.DISABLE_NODE_JS)
- 470 18 .desc("Disable the Node.js Package Analyzer." ).build())
- 471 18 .addOption(nexusUrl)
- 472 18 .addOption(nexusUsesProxy)
- 473 18 .addOption(additionalZipExtensions)
- 474 18 .addOption(pathToMono)
- 475 18 .addOption(pathToBundleAudit)
- 476 18 .addOption(purge);
- 477 18 }
+ 436 9 options.addOption(updateOnly)
+ 437 9 .addOption(cve12Base)
+ 438 9 .addOption(cve20Base)
+ 439 9 .addOption(cve12Modified)
+ 440 9 .addOption(cve20Modified)
+ 441 9 .addOption(proxyPort)
+ 442 9 .addOption(proxyServer)
+ 443 9 .addOption(proxyUsername)
+ 444 9 .addOption(proxyPassword)
+ 445 9 .addOption(connectionTimeout)
+ 446 9 .addOption(connectionString)
+ 447 9 .addOption(dbUser)
+ 448 9 .addOption(data)
+ 449 9 .addOption(dbPassword)
+ 450 9 .addOption(dbDriver)
+ 451 9 .addOption(dbDriverPath)
+ 452 9 .addOption(disableJarAnalyzer)
+ 453 9 .addOption(disableArchiveAnalyzer)
+ 454 9 .addOption(disableAssemblyAnalyzer)
+ 455 9 .addOption(pathToBundleAudit)
+ 456 9 .addOption(disablePythonDistributionAnalyzer)
+ 457 9 .addOption(disableCmakeAnalyzer)
+ 458 9 .addOption(disablePythonPackageAnalyzer)
+ 459 18 .addOption(Option.builder().longOpt(ARGUMENT.DISABLE_RUBYGEMS)
+ 460 9 .desc("Disable the Ruby Gemspec Analyzer." ).build())
+ 461 18 .addOption(Option.builder().longOpt(ARGUMENT.DISABLE_BUNDLE_AUDIT)
+ 462 9 .desc("Disable the Ruby Bundler-Audit Analyzer." ).build())
+ 463 9 .addOption(disableAutoconfAnalyzer)
+ 464 9 .addOption(disableComposerAnalyzer)
+ 465 9 .addOption(disableOpenSSLAnalyzer)
+ 466 9 .addOption(disableNuspecAnalyzer)
+ 467 9 .addOption(disableCentralAnalyzer)
+ 468 9 .addOption(disableNexusAnalyzer)
+ 469 18 .addOption(Option.builder().longOpt(ARGUMENT.DISABLE_NODE_JS)
+ 470 9 .desc("Disable the Node.js Package Analyzer." ).build())
+ 471 9 .addOption(nexusUrl)
+ 472 9 .addOption(nexusUsesProxy)
+ 473 9 .addOption(additionalZipExtensions)
+ 474 9 .addOption(pathToMono)
+ 475 9 .addOption(pathToBundleAudit)
+ 476 9 .addOption(purge);
+ 477 9 }
478
479
@@ -737,17 +737,17 @@
private void addDeprecatedOptions(final Options options) throws IllegalArgumentException {
490
- 491 18 final Option proxyServer = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.PROXY_URL)
- 492 18 .desc("The proxy url argument is deprecated, use proxyserver instead." )
- 493 18 .build();
- 494 18 final Option appName = Option.builder(ARGUMENT.APP_NAME_SHORT).argName("name" ).hasArg().longOpt(ARGUMENT.APP_NAME)
- 495 18 .desc("The name of the project being scanned." )
- 496 18 .build();
+ 491 9 final Option proxyServer = Option.builder().argName("url" ).hasArg().longOpt(ARGUMENT.PROXY_URL)
+ 492 9 .desc("The proxy url argument is deprecated, use proxyserver instead." )
+ 493 9 .build();
+ 494 9 final Option appName = Option.builder(ARGUMENT.APP_NAME_SHORT).argName("name" ).hasArg().longOpt(ARGUMENT.APP_NAME)
+ 495 9 .desc("The name of the project being scanned." )
+ 496 9 .build();
497
- 498 18 options.addOption(proxyServer);
- 499 18 options.addOption(appName);
- 500 18 }
+ 498 9 options.addOption(proxyServer);
+ 499 9 options.addOption(appName);
+ 500 9 }
501
502
@@ -762,7 +762,7 @@
507
public boolean isGetVersion() {
- 508 14 return (line != null ) && line.hasOption(ARGUMENT.VERSION);
+ 508 7 return (line != null ) && line.hasOption(ARGUMENT.VERSION);
509
}
510
@@ -779,7 +779,7 @@
516
public boolean isGetHelp() {
- 517 14 return (line != null ) && line.hasOption(ARGUMENT.HELP);
+ 517 7 return (line != null ) && line.hasOption(ARGUMENT.HELP);
518
}
519
@@ -796,7 +796,7 @@
525
public boolean isRunScan() {
- 526 42 return (line != null ) && isValid && line.hasOption(ARGUMENT.SCAN);
+ 526 21 return (line != null ) && isValid && line.hasOption(ARGUMENT.SCAN);
527
}
528
@@ -1188,23 +1188,23 @@
737
public void printHelp() {
- 738 4 final HelpFormatter formatter = new HelpFormatter();
- 739 4 final Options options = new Options();
- 740 4 addStandardOptions(options);
- 741 4 if (line != null && line.hasOption(ARGUMENT.ADVANCED_HELP)) {
+ 738 2 final HelpFormatter formatter = new HelpFormatter();
+ 739 2 final Options options = new Options();
+ 740 2 addStandardOptions(options);
+ 741 2 if (line != null && line.hasOption(ARGUMENT.ADVANCED_HELP)) {
742 0 addAdvancedOptions(options);
743
}
- 744 8 final String helpMsg = String.format("%n%s"
+ 744 4 final String helpMsg = String.format("%n%s"
745
+ " can be used to identify if there are any known CVE vulnerabilities in libraries utilized by an application. "
746
+ "%s will automatically update required data from the Internet, such as the CVE and CPE data files from nvd.nist.gov.%n%n" ,
- 747 4 Settings.getString("application.name" , "DependencyCheck" ),
- 748 4 Settings.getString("application.name" , "DependencyCheck" ));
+ 747 2 Settings.getString("application.name" , "DependencyCheck" ),
+ 748 2 Settings.getString("application.name" , "DependencyCheck" ));
749
- 750 4 formatter.printHelp(Settings.getString("application.name" , "DependencyCheck" ),
+ 750 2 formatter.printHelp(Settings.getString("application.name" , "DependencyCheck" ),
751
helpMsg,
752
@@ -1213,7 +1213,7 @@
"" ,
754
true );
- 755 4 }
+ 755 2 }
756
757
@@ -1230,7 +1230,7 @@
763
public String[] getScanFiles() {
- 764 6 return line.getOptionValues(ARGUMENT.SCAN);
+ 764 3 return line.getOptionValues(ARGUMENT.SCAN);
765
}
766
@@ -1268,7 +1268,7 @@
783
public String getReportDirectory() {
- 784 2 return line.getOptionValue(ARGUMENT.OUT, "." );
+ 784 1 return line.getOptionValue(ARGUMENT.OUT, "." );
785
}
786
@@ -1287,7 +1287,7 @@
793
public String getPathToMono() {
- 794 2 return line.getOptionValue(ARGUMENT.PATH_TO_MONO);
+ 794 1 return line.getOptionValue(ARGUMENT.PATH_TO_MONO);
795
}
796
@@ -1323,7 +1323,7 @@
812
public String getReportFormat() {
- 813 2 return line.getOptionValue(ARGUMENT.OUTPUT_FORMAT, "HTML" );
+ 813 1 return line.getOptionValue(ARGUMENT.OUTPUT_FORMAT, "HTML" );
814
}
815
@@ -1364,7 +1364,7 @@
836
public String getBaseCve12Url() {
- 837 2 return line.getOptionValue(ARGUMENT.CVE_BASE_12);
+ 837 1 return line.getOptionValue(ARGUMENT.CVE_BASE_12);
838
}
839
@@ -1381,7 +1381,7 @@
845
public String getBaseCve20Url() {
- 846 2 return line.getOptionValue(ARGUMENT.CVE_BASE_20);
+ 846 1 return line.getOptionValue(ARGUMENT.CVE_BASE_20);
847
}
848
@@ -1398,7 +1398,7 @@
854
public String getModifiedCve12Url() {
- 855 2 return line.getOptionValue(ARGUMENT.CVE_MOD_12);
+ 855 1 return line.getOptionValue(ARGUMENT.CVE_MOD_12);
856
}
857
@@ -1415,7 +1415,7 @@
863
public String getModifiedCve20Url() {
- 864 2 return line.getOptionValue(ARGUMENT.CVE_MOD_20);
+ 864 1 return line.getOptionValue(ARGUMENT.CVE_MOD_20);
865
}
866
@@ -1605,11 +1605,11 @@
967
public void printVersionInfo() {
- 968 4 final String version = String.format("%s version %s" ,
- 969 2 Settings.getString(Settings.KEYS.APPLICATION_VAME, "dependency-check" ),
- 970 2 Settings.getString(Settings.KEYS.APPLICATION_VERSION, "Unknown" ));
- 971 2 System.out.println(version);
- 972 2 }
+ 968 2 final String version = String.format("%s version %s" ,
+ 969 1 Settings.getString(Settings.KEYS.APPLICATION_VAME, "dependency-check" ),
+ 970 1 Settings.getString(Settings.KEYS.APPLICATION_VERSION, "Unknown" ));
+ 971 1 System.out.println(version);
+ 972 1 }
973
974
@@ -1647,7 +1647,7 @@
991
public boolean isUpdateOnly() {
- 992 14 return line != null && line.hasOption(ARGUMENT.UPDATE_ONLY);
+ 992 7 return line != null && line.hasOption(ARGUMENT.UPDATE_ONLY);
993
}
994
@@ -2431,6 +2431,6 @@
}
-
+
diff --git a/dependency-check-cli/cobertura/org.owasp.dependencycheck.InvalidScanPathException.html b/dependency-check-cli/cobertura/org.owasp.dependencycheck.InvalidScanPathException.html
index 055f5d9b7..377cc9ad4 100644
--- a/dependency-check-cli/cobertura/org.owasp.dependencycheck.InvalidScanPathException.html
+++ b/dependency-check-cli/cobertura/org.owasp.dependencycheck.InvalidScanPathException.html
@@ -143,6 +143,6 @@
}
-
+
diff --git a/dependency-check-cli/dependency-analysis.html b/dependency-check-cli/dependency-analysis.html
index f54078dd6..ccde04a4d 100644
--- a/dependency-check-cli/dependency-analysis.html
+++ b/dependency-check-cli/dependency-analysis.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Dependencies Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Dependencies Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -254,7 +254,7 @@
org.owasp
dependency-check-core
-1.4.0
+1.4.2
compile
jar
@@ -262,7 +262,7 @@
org.owasp
dependency-check-utils
-1.4.0
+1.4.2
compile
jar
diff --git a/dependency-check-cli/dependency-updates-report.html b/dependency-check-cli/dependency-updates-report.html
index 20642290d..b7c7f82fe 100644
--- a/dependency-check-cli/dependency-updates-report.html
+++ b/dependency-check-cli/dependency-updates-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Dependency Updates Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Dependency Updates Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -237,7 +237,7 @@
# of dependencies using the latest version available
-24
+25
# of dependencies where the next version available is smaller than an incremental version update
@@ -245,7 +245,7 @@
# of dependencies where the next version available is an incremental version update
-1
+0
# of dependencies where the next version available is a minor version update
@@ -405,7 +405,7 @@
org.apache.commons
commons-compress
-1.11
+1.12
jar
@@ -585,24 +585,24 @@
org.jmockit
jmockit
-1.22
+1.24
test
jar
-1.23
+1.25
-
+
org.jsoup
jsoup
-1.9.1
+1.9.2
jar
-1.9.2
+
@@ -672,7 +672,7 @@
org.owasp
dependency-check-core
-1.4.0
+1.4.2
compile
jar
@@ -684,7 +684,7 @@
org.owasp
dependency-check-utils
-1.4.0
+1.4.2
compile
jar
@@ -991,7 +991,7 @@
commons-compress
Current Version
-1.11
+1.12
Scope
@@ -1054,7 +1054,7 @@
jar
Newer versions
-4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 6.0.06.0.1 Latest Major
+4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 5.5.2 6.0.0 6.0.16.1.0 Latest Major
org.apache.lucene:lucene-core
@@ -1081,7 +1081,7 @@
jar
Newer versions
-4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 6.0.06.0.1 Latest Major
+4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 5.5.2 6.0.0 6.0.16.1.0 Latest Major
org.apache.lucene:lucene-queryparser
@@ -1108,7 +1108,7 @@
jar
Newer versions
-4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 6.0.06.0.1 Latest Major
+4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 5.5.2 6.0.0 6.0.16.1.0 Latest Major
org.apache.lucene:lucene-test-framework
@@ -1135,7 +1135,7 @@
jar
Newer versions
-4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 6.0.06.0.1 Latest Major
+4.8.0 Next Minor 4.8.1 4.9.0 4.9.1 4.10.0 4.10.1 4.10.2 4.10.34.10.4 Latest Minor 5.0.0 Next Major 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1 5.5.0 5.5.1 5.5.2 6.0.0 6.0.16.1.0 Latest Major
org.apache.maven:maven-core
@@ -1366,7 +1366,7 @@
jmockit
Current Version
-1.22
+1.24
Scope
test
@@ -1378,13 +1378,13 @@
jar
Newer versions
-1.23 Next Minor 1.24 Latest Minor
+1.25 Next Minor
org.jsoup:jsoup
Status
- There is at least one newer incremental version available. Incremental updates are typically passive.
+ No newer versions available.
Group Id
org.jsoup
@@ -1393,7 +1393,7 @@
jsoup
Current Version
-1.9.1
+1.9.2
Scope
@@ -1402,10 +1402,7 @@
Type
-jar
-
-Newer versions
-1.9.2 Next Incremental
+jar
org.owasp:dependency-check-core
@@ -1420,7 +1417,7 @@
dependency-check-core
Current Version
-1.4.0
+1.4.2
Scope
compile
@@ -1444,7 +1441,7 @@
dependency-check-utils
Current Version
-1.4.0
+1.4.2
Scope
compile
diff --git a/dependency-check-cli/findbugs.html b/dependency-check-cli/findbugs.html
index c2380889f..510e324b9 100644
--- a/dependency-check-cli/findbugs.html
+++ b/dependency-check-cli/findbugs.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – FindBugs Bug Detector Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
FindBugs Bug Detector Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/index.html b/dependency-check-cli/index.html
index c095bd697..b20d3ce7d 100644
--- a/dependency-check-cli/index.html
+++ b/dependency-check-cli/index.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – About
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
About
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -147,7 +147,7 @@
About
OWASP dependency-check-cli is an command line tool that uses dependency-check-core to detect publicly disclosed vulnerabilities associated with the scanned project dependencies. The tool will generate a report listing the dependency, any identified Common Platform Enumeration (CPE) identifiers, and the associated Common Vulnerability and Exposure (CVE) entries.
Installation & Usage
-Download the dependency-check command line tool here . Extract the zip file to a location on your computer and put the ‘bin’ directory into the path environment variable. On *nix systems you will likely need to make the shell script executable:
+Download the dependency-check command line tool here . Extract the zip file to a location on your computer and put the ‘bin’ directory into the path environment variable. On *nix systems you will likely need to make the shell script executable:
$ chmod +777 dependency-check.sh
diff --git a/dependency-check-cli/integration.html b/dependency-check-cli/integration.html
index 053b9fc48..f0eb2ab2c 100644
--- a/dependency-check-cli/integration.html
+++ b/dependency-check-cli/integration.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – CI Management
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
CI Management
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/issue-tracking.html b/dependency-check-cli/issue-tracking.html
index e3f5076a2..5744c112e 100644
--- a/dependency-check-cli/issue-tracking.html
+++ b/dependency-check-cli/issue-tracking.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Issue Management
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Issue Management
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/license.html b/dependency-check-cli/license.html
index ee36f8926..0a539e996 100644
--- a/dependency-check-cli/license.html
+++ b/dependency-check-cli/license.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Project Licenses
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Licenses
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/mail-lists.html b/dependency-check-cli/mail-lists.html
index 68da4564e..44d190e02 100644
--- a/dependency-check-cli/mail-lists.html
+++ b/dependency-check-cli/mail-lists.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Project Mailing Lists
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Mailing Lists
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/plugin-updates-report.html b/dependency-check-cli/plugin-updates-report.html
index 871aed4a8..b852bab4d 100644
--- a/dependency-check-cli/plugin-updates-report.html
+++ b/dependency-check-cli/plugin-updates-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Plugin Updates Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Plugin Updates Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -237,7 +237,7 @@
# of plugins using the latest version available
-18
+
19
# of plugins where the next version available is smaller than an incremental version update
@@ -253,7 +253,7 @@
# of plugins where the next version available is a major version update
-1
+
0
# of plugins where a dependencies section containes a dependency with an updated version
@@ -375,7 +375,7 @@
org.apache.maven.plugins
maven-jar-plugin
-3.0.0
+3.0.2
@@ -385,7 +385,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
-2.10.3
+2.10.4
@@ -422,14 +422,14 @@
-
+
org.apache.maven.plugins
maven-source-plugin
-2.4
+3.0.1
+
-3.0.0
@@ -641,7 +641,7 @@
maven-jar-plugin
Current Version
-3.0.0
+3.0.2
Plugin org.apache.maven.plugins:maven-javadoc-plugin
@@ -656,7 +656,7 @@
maven-javadoc-plugin
Current Version
-2.10.3
+2.10.4
Plugin org.apache.maven.plugins:maven-release-plugin
@@ -707,7 +707,7 @@
Status
- There is at least one newer major version available. Major updates are rarely passive.
+ No newer versions available.
Group Id
org.apache.maven.plugins
@@ -716,10 +716,7 @@
maven-source-plugin
Current Version
-2.4
-
-Newer versions
-3.0.0 Next Major
+3.0.1
Plugin org.apache.maven.plugins:maven-surefire-plugin
diff --git a/dependency-check-cli/pmd.html b/dependency-check-cli/pmd.html
index 966973c7a..90153773a 100644
--- a/dependency-check-cli/pmd.html
+++ b/dependency-check-cli/pmd.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – PMD Results
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
PMD Results
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -243,7 +243,7 @@
Line
Useless parentheses.
-169
+235
org/owasp/dependencycheck/CliParser.java
diff --git a/dependency-check-cli/project-info.html b/dependency-check-cli/project-info.html
index 54ed9c99d..a98130d78 100644
--- a/dependency-check-cli/project-info.html
+++ b/dependency-check-cli/project-info.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Project Information
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Information
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/project-reports.html b/dependency-check-cli/project-reports.html
index 46fb80e5d..af61c73a6 100644
--- a/dependency-check-cli/project-reports.html
+++ b/dependency-check-cli/project-reports.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Generated Reports
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Generated Reports
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/project-summary.html b/dependency-check-cli/project-summary.html
index f3beb1f65..550d35be5 100644
--- a/dependency-check-cli/project-summary.html
+++ b/dependency-check-cli/project-summary.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Project Summary
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Summary
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -238,7 +238,7 @@
dependency-check-cli
Version
-1.4.0
+1.4.2
Type
jar
diff --git a/dependency-check-cli/source-repository.html b/dependency-check-cli/source-repository.html
index 4431274fc..7321eb37e 100644
--- a/dependency-check-cli/source-repository.html
+++ b/dependency-check-cli/source-repository.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Source Code Management
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Source Code Management
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/surefire-report.html b/dependency-check-cli/surefire-report.html
index faee48224..5fbe2ccbe 100644
--- a/dependency-check-cli/surefire-report.html
+++ b/dependency-check-cli/surefire-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Surefire Report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Surefire Report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
@@ -266,7 +266,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.384
+
0.497
Note: failures are anticipated and checked for with assertions while errors are unanticipated.
Package List
@@ -287,7 +287,7 @@ function toggleDisplay(elementId) {
0
0
100%
-
0.384
+
0.497
Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.
org.owasp.dependencycheck
@@ -309,7 +309,7 @@ function toggleDisplay(elementId) {
0
0
100%
-
0.383
+
0.497
CliParserTest
@@ -318,7 +318,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.001
+0
Test Cases
[Summary ] [Package List ] [Test Cases ]
@@ -328,7 +328,7 @@ function toggleDisplay(elementId) {
testEnsureCanonicalPath2
-0.32
+
0.428
testEnsureCanonicalPath
diff --git a/dependency-check-cli/taglist.html b/dependency-check-cli/taglist.html
index ae001dd8b..877490858 100644
--- a/dependency-check-cli/taglist.html
+++ b/dependency-check-cli/taglist.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Tag List report
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Tag List report
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/team-list.html b/dependency-check-cli/team-list.html
index be910782e..0cfebe53c 100644
--- a/dependency-check-cli/team-list.html
+++ b/dependency-check-cli/team-list.html
@@ -1,13 +1,13 @@
-
+
dependency-check-cli – Project Team
@@ -52,7 +52,7 @@
-
+
/
@@ -64,9 +64,9 @@
Project Team
- | Last Published: 2016-06-16
+ | Last Published: 2016-07-31
- Version: 1.4.0
+ Version: 1.4.2
diff --git a/dependency-check-cli/xref-test/index.html b/dependency-check-cli/xref-test/index.html
index 314aaf90b..985be0807 100644
--- a/dependency-check-cli/xref-test/index.html
+++ b/dependency-check-cli/xref-test/index.html
@@ -4,7 +4,7 @@
- Dependency-Check Command Line 1.4.0 Reference
+ Dependency-Check Command Line 1.4.2 Reference
diff --git a/dependency-check-cli/xref-test/org/owasp/dependencycheck/package-frame.html b/dependency-check-cli/xref-test/org/owasp/dependencycheck/package-frame.html
index 94b087be3..0f6e05577 100644
--- a/dependency-check-cli/xref-test/org/owasp/dependencycheck/package-frame.html
+++ b/dependency-check-cli/xref-test/org/owasp/dependencycheck/package-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Command Line 1.4.0 Reference Package org.owasp.dependencycheck
+ Dependency-Check Command Line 1.4.2 Reference Package org.owasp.dependencycheck
diff --git a/dependency-check-cli/xref-test/org/owasp/dependencycheck/package-summary.html b/dependency-check-cli/xref-test/org/owasp/dependencycheck/package-summary.html
index 9b1fe3dc1..4071821a5 100644
--- a/dependency-check-cli/xref-test/org/owasp/dependencycheck/package-summary.html
+++ b/dependency-check-cli/xref-test/org/owasp/dependencycheck/package-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Command Line 1.4.0 Reference Package org.owasp.dependencycheck
+ Dependency-Check Command Line 1.4.2 Reference Package org.owasp.dependencycheck
diff --git a/dependency-check-cli/xref-test/overview-frame.html b/dependency-check-cli/xref-test/overview-frame.html
index 6b5043647..587d5b4bc 100644
--- a/dependency-check-cli/xref-test/overview-frame.html
+++ b/dependency-check-cli/xref-test/overview-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Command Line 1.4.0 Reference
+ Dependency-Check Command Line 1.4.2 Reference
diff --git a/dependency-check-cli/xref-test/overview-summary.html b/dependency-check-cli/xref-test/overview-summary.html
index c3857e7bb..49ca818ac 100644
--- a/dependency-check-cli/xref-test/overview-summary.html
+++ b/dependency-check-cli/xref-test/overview-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Command Line 1.4.0 Reference
+ Dependency-Check Command Line 1.4.2 Reference
@@ -24,7 +24,7 @@
- Dependency-Check Command Line 1.4.0 Reference
+ Dependency-Check Command Line 1.4.2 Reference
diff --git a/dependency-check-cli/xref/index.html b/dependency-check-cli/xref/index.html
index 314aaf90b..985be0807 100644
--- a/dependency-check-cli/xref/index.html
+++ b/dependency-check-cli/xref/index.html
@@ -4,7 +4,7 @@
- Dependency-Check Command Line 1.4.0 Reference
+ Dependency-Check Command Line 1.4.2 Reference
diff --git a/dependency-check-cli/xref/org/owasp/dependencycheck/App.html b/dependency-check-cli/xref/org/owasp/dependencycheck/App.html
index 06ae04ae2..a20d1cd0e 100644
--- a/dependency-check-cli/xref/org/owasp/dependencycheck/App.html
+++ b/dependency-check-cli/xref/org/owasp/dependencycheck/App.html
@@ -45,411 +45,485 @@
37 import org.slf4j.Logger;
38 import org.slf4j.LoggerFactory;
39 import ch.qos.logback.core.FileAppender;
-40 import org.slf4j.impl.StaticLoggerBinder;
-41
-42
-43
-44
-45
-46
-47 public class App {
-48
-49
-50
-51
-52 private static final Logger LOGGER = LoggerFactory.getLogger(App.class );
-53
-54
-55
-56
-57
-58
-59 public static void main(String[] args) {
-60 try {
-61 Settings.initialize();
-62 final App app = new App ();
-63 app.run(args);
-64 } finally {
-65 Settings.cleanup(true );
-66 }
-67 }
-68
-69
-70
-71
-72
-73
-74 public void run(String[] args) {
-75 final CliParser cli = new CliParser ();
-76
-77 try {
-78 cli.parse(args);
-79 } catch (FileNotFoundException ex) {
-80 System.err.println(ex.getMessage());
-81 cli.printHelp();
-82 return ;
-83 } catch (ParseException ex) {
-84 System.err.println(ex.getMessage());
-85 cli.printHelp();
-86 return ;
-87 }
-88
-89 if (cli.getVerboseLog() != null ) {
-90 prepareLogger(cli.getVerboseLog());
-91 }
-92
-93 if (cli.isPurge()) {
-94 if (cli.getConnectionString() != null ) {
-95 LOGGER.error("Unable to purge the database when using a non-default connection string" );
-96 } else {
-97 populateSettings(cli);
-98 File db;
-99 try {
-100 db = new File(Settings.getDataDirectory(), "dc.h2.db" );
-101 if (db.exists()) {
-102 if (db.delete()) {
-103 LOGGER.info("Database file purged; local copy of the NVD has been removed" );
-104 } else {
-105 LOGGER.error("Unable to delete '{}'; please delete the file manually" , db.getAbsolutePath());
-106 }
-107 } else {
-108 LOGGER.error("Unable to purge database; the database file does not exists: {}" , db.getAbsolutePath());
-109 }
-110 } catch (IOException ex) {
-111 LOGGER.error("Unable to delete the database" );
-112 }
-113 }
-114 } else if (cli.isGetVersion()) {
-115 cli.printVersionInfo();
-116 } else if (cli.isUpdateOnly()) {
-117 populateSettings(cli);
-118 runUpdateOnly();
-119 } else if (cli.isRunScan()) {
-120 populateSettings(cli);
-121 try {
-122 runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getProjectName(), cli.getScanFiles(),
-123 cli.getExcludeList(), cli.getSymLinkDepth());
-124 } catch (InvalidScanPathException ex) {
-125 LOGGER.error("An invalid scan path was detected; unable to scan '//*' paths" );
-126 }
-127 } else {
-128 cli.printHelp();
-129 }
-130 }
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144 private void runScan(String reportDirectory, String outputFormat, String applicationName, String[] files,
-145 String[] excludes, int symLinkDepth) throws InvalidScanPathException {
-146 Engine engine = null ;
-147 try {
-148 engine = new Engine();
-149 final List<String> antStylePaths = new ArrayList<String>();
-150 for (String file : files) {
-151 final String antPath = ensureCanonicalPath(file);
-152 antStylePaths.add(antPath);
-153 }
-154
-155 final Set<File> paths = new HashSet<File>();
-156 for (String file : antStylePaths) {
-157 LOGGER.debug("Scanning {}" , file);
-158 final DirectoryScanner scanner = new DirectoryScanner();
-159 String include = file.replace('\\', '/');
-160 File baseDir;
-161
-162 if (include.startsWith("//" )) {
-163 throw new InvalidScanPathException ("Unable to scan paths specified by //" );
-164 } else {
-165 final int pos = getLastFileSeparator(include);
-166 final String tmpBase = include.substring(0, pos);
-167 final String tmpInclude = include.substring(pos + 1);
-168 if (tmpInclude.indexOf('*') >= 0 || tmpInclude.indexOf('?') >= 0
-169 || (new File(include)).isFile()) {
-170 baseDir = new File(tmpBase);
-171 include = tmpInclude;
-172 } else {
-173 baseDir = new File(tmpBase, tmpInclude);
-174 include = "**/*" ;
-175 }
-176 }
-177
-178
-179 scanner.setBasedir(baseDir);
-180 final String[] includes = {include};
-181 scanner.setIncludes(includes);
-182 scanner.setMaxLevelsOfSymlinks(symLinkDepth);
-183 if (symLinkDepth <= 0) {
-184 scanner.setFollowSymlinks(false);
-185 }
-186 if (excludes != null && excludes.length > 0) {
-187 scanner.addExcludes(excludes);
-188 }
-189 scanner.scan();
-190 if (scanner.getIncludedFilesCount() > 0) {
-191 for (String s : scanner.getIncludedFiles()) {
-192 final File f = new File(baseDir, s);
-193 LOGGER.debug("Found file {}" , f.toString());
-194 paths.add(f);
-195 }
-196 }
-197 }
-198 engine.scan(paths);
-199
-200 engine.analyzeDependencies();
-201 final List<Dependency> dependencies = engine.getDependencies();
-202 DatabaseProperties prop = null ;
-203 CveDB cve = null ;
-204 try {
-205 cve = new CveDB();
-206 cve.open();
-207 prop = cve.getDatabaseProperties();
-208 } catch (DatabaseException ex) {
-209 LOGGER.debug("Unable to retrieve DB Properties" , ex);
-210 } finally {
-211 if (cve != null ) {
-212 cve.close();
-213 }
-214 }
-215 final ReportGenerator report = new ReportGenerator(applicationName, dependencies, engine.getAnalyzers(), prop);
-216 try {
-217 report.generateReports(reportDirectory, outputFormat);
-218 } catch (IOException ex) {
-219 LOGGER.error("There was an IO error while attempting to generate the report." );
-220 LOGGER.debug("" , ex);
-221 } catch (Throwable ex) {
-222 LOGGER.error("There was an error while attempting to generate the report." );
-223 LOGGER.debug("" , ex);
-224 }
-225 } catch (DatabaseException ex) {
-226 LOGGER.error("Unable to connect to the dependency-check database; analysis has stopped" );
-227 LOGGER.debug("" , ex);
-228 } finally {
-229 if (engine != null ) {
-230 engine.cleanup();
-231 }
-232 }
-233 }
-234
-235
-236
-237
-238 private void runUpdateOnly() {
-239 Engine engine = null ;
-240 try {
-241 engine = new Engine();
-242 engine.doUpdates();
-243 } catch (DatabaseException ex) {
-244 LOGGER.error("Unable to connect to the dependency-check database; analysis has stopped" );
-245 LOGGER.debug("" , ex);
-246 } finally {
-247 if (engine != null ) {
-248 engine.cleanup();
-249 }
-250 }
-251 }
-252
-253
-254
-255
-256
-257
-258
-259 private void populateSettings(CliParser cli) {
-260
-261 final boolean autoUpdate = cli.isAutoUpdate();
-262 final String connectionTimeout = cli.getConnectionTimeout();
-263 final String proxyServer = cli.getProxyServer();
-264 final String proxyPort = cli.getProxyPort();
-265 final String proxyUser = cli.getProxyUsername();
-266 final String proxyPass = cli.getProxyPassword();
-267 final String dataDirectory = cli.getDataDirectory();
-268 final File propertiesFile = cli.getPropertiesFile();
-269 final String suppressionFile = cli.getSuppressionFile();
-270 final String nexusUrl = cli.getNexusUrl();
-271 final String databaseDriverName = cli.getDatabaseDriverName();
-272 final String databaseDriverPath = cli.getDatabaseDriverPath();
-273 final String connectionString = cli.getConnectionString();
-274 final String databaseUser = cli.getDatabaseUser();
-275 final String databasePassword = cli.getDatabasePassword();
-276 final String additionalZipExtensions = cli.getAdditionalZipExtensions();
-277 final String pathToMono = cli.getPathToMono();
-278 final String cveMod12 = cli.getModifiedCve12Url();
-279 final String cveMod20 = cli.getModifiedCve20Url();
-280 final String cveBase12 = cli.getBaseCve12Url();
-281 final String cveBase20 = cli.getBaseCve20Url();
-282 final Integer cveValidForHours = cli.getCveValidForHours();
-283 final boolean experimentalEnabled = cli.isExperimentalEnabled();
-284
-285 if (propertiesFile != null ) {
+40 import org.owasp.dependencycheck.data.update.exception.UpdateException;
+41 import org.owasp.dependencycheck.exception.ExceptionCollection;
+42 import org.owasp.dependencycheck.exception.ReportException;
+43 import org.owasp.dependencycheck.utils.InvalidSettingException;
+44 import org.slf4j.impl.StaticLoggerBinder;
+45
+46
+47
+48
+49
+50
+51 public class App {
+52
+53
+54
+55
+56 private static final Logger LOGGER = LoggerFactory.getLogger(App.class );
+57
+58
+59
+60
+61
+62
+63 public static void main(String[] args) {
+64 int exitCode = 0;
+65 try {
+66 Settings.initialize();
+67 final App app = new App ();
+68 exitCode = app.run(args);
+69 LOGGER.debug("Exit code: " + exitCode);
+70 } finally {
+71 Settings.cleanup(true );
+72 }
+73 System.exit(exitCode);
+74 }
+75
+76
+77
+78
+79
+80
+81
+82 public int run(String[] args) {
+83 int exitCode = 0;
+84 final CliParser cli = new CliParser ();
+85
+86 try {
+87 cli.parse(args);
+88 } catch (FileNotFoundException ex) {
+89 System.err.println(ex.getMessage());
+90 cli.printHelp();
+91 return -1;
+92 } catch (ParseException ex) {
+93 System.err.println(ex.getMessage());
+94 cli.printHelp();
+95 return -2;
+96 }
+97
+98 if (cli.getVerboseLog() != null ) {
+99 prepareLogger(cli.getVerboseLog());
+100 }
+101
+102 if (cli.isPurge()) {
+103 if (cli.getConnectionString() != null ) {
+104 LOGGER.error("Unable to purge the database when using a non-default connection string" );
+105 exitCode = -3;
+106 } else {
+107 try {
+108 populateSettings(cli);
+109 } catch (InvalidSettingException ex) {
+110 LOGGER.error(ex.getMessage());
+111 LOGGER.debug("Error loading properties file" , ex);
+112 exitCode = -4;
+113 }
+114 File db;
+115 try {
+116 db = new File(Settings.getDataDirectory(), "dc.h2.db" );
+117 if (db.exists()) {
+118 if (db.delete()) {
+119 LOGGER.info("Database file purged; local copy of the NVD has been removed" );
+120 } else {
+121 LOGGER.error("Unable to delete '{}'; please delete the file manually" , db.getAbsolutePath());
+122 exitCode = -5;
+123 }
+124 } else {
+125 LOGGER.error("Unable to purge database; the database file does not exists: {}" , db.getAbsolutePath());
+126 exitCode = -6;
+127 }
+128 } catch (IOException ex) {
+129 LOGGER.error("Unable to delete the database" );
+130 exitCode = -7;
+131 }
+132 }
+133 } else if (cli.isGetVersion()) {
+134 cli.printVersionInfo();
+135 } else if (cli.isUpdateOnly()) {
+136 try {
+137 populateSettings(cli);
+138 } catch (InvalidSettingException ex) {
+139 LOGGER.error(ex.getMessage());
+140 LOGGER.debug("Error loading properties file" , ex);
+141 exitCode = -4;
+142 }
+143 try {
+144 runUpdateOnly();
+145 } catch (UpdateException ex) {
+146 LOGGER.error(ex.getMessage());
+147 exitCode = -8;
+148 } catch (DatabaseException ex) {
+149 LOGGER.error(ex.getMessage());
+150 exitCode = -9;
+151 }
+152 } else if (cli.isRunScan()) {
+153 try {
+154 populateSettings(cli);
+155 } catch (InvalidSettingException ex) {
+156 LOGGER.error(ex.getMessage());
+157 LOGGER.debug("Error loading properties file" , ex);
+158 exitCode = -4;
+159 }
+160 try {
+161 runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getProjectName(), cli.getScanFiles(),
+162 cli.getExcludeList(), cli.getSymLinkDepth());
+163 } catch (InvalidScanPathException ex) {
+164 LOGGER.error("An invalid scan path was detected; unable to scan '//*' paths" );
+165 exitCode = -10;
+166 } catch (DatabaseException ex) {
+167 LOGGER.error(ex.getMessage());
+168 exitCode = -11;
+169 } catch (ReportException ex) {
+170 LOGGER.error(ex.getMessage());
+171 exitCode = -12;
+172 } catch (ExceptionCollection ex) {
+173 if (ex.isFatal()) {
+174 exitCode = -13;
+175 LOGGER.error("One or more fatal errors occured" );
+176 } else {
+177 exitCode = -14;
+178 }
+179 for (Throwable e : ex.getExceptions()) {
+180 LOGGER.error(e.getMessage());
+181 }
+182 }
+183 } else {
+184 cli.printHelp();
+185 }
+186 return exitCode;
+187 }
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210 private void runScan(String reportDirectory, String outputFormat, String applicationName, String[] files,
+211 String[] excludes, int symLinkDepth) throws InvalidScanPathException, DatabaseException, ExceptionCollection, ReportException {
+212 Engine engine = null ;
+213 try {
+214 engine = new Engine();
+215 final List<String> antStylePaths = new ArrayList<String>();
+216 for (String file : files) {
+217 final String antPath = ensureCanonicalPath(file);
+218 antStylePaths.add(antPath);
+219 }
+220
+221 final Set<File> paths = new HashSet<File>();
+222 for (String file : antStylePaths) {
+223 LOGGER.debug("Scanning {}" , file);
+224 final DirectoryScanner scanner = new DirectoryScanner();
+225 String include = file.replace('\\', '/');
+226 File baseDir;
+227
+228 if (include.startsWith("//" )) {
+229 throw new InvalidScanPathException ("Unable to scan paths specified by //" );
+230 } else {
+231 final int pos = getLastFileSeparator(include);
+232 final String tmpBase = include.substring(0, pos);
+233 final String tmpInclude = include.substring(pos + 1);
+234 if (tmpInclude.indexOf('*') >= 0 || tmpInclude.indexOf('?') >= 0
+235 || (new File(include)).isFile()) {
+236 baseDir = new File(tmpBase);
+237 include = tmpInclude;
+238 } else {
+239 baseDir = new File(tmpBase, tmpInclude);
+240 include = "**/*" ;
+241 }
+242 }
+243 scanner.setBasedir(baseDir);
+244 final String[] includes = {include};
+245 scanner.setIncludes(includes);
+246 scanner.setMaxLevelsOfSymlinks(symLinkDepth);
+247 if (symLinkDepth <= 0) {
+248 scanner.setFollowSymlinks(false);
+249 }
+250 if (excludes != null && excludes.length > 0) {
+251 scanner.addExcludes(excludes);
+252 }
+253 scanner.scan();
+254 if (scanner.getIncludedFilesCount() > 0) {
+255 for (String s : scanner.getIncludedFiles()) {
+256 final File f = new File(baseDir, s);
+257 LOGGER.debug("Found file {}" , f.toString());
+258 paths.add(f);
+259 }
+260 }
+261 }
+262 engine.scan(paths);
+263
+264 ExceptionCollection exCol = null ;
+265 try {
+266 engine.analyzeDependencies();
+267 } catch (ExceptionCollection ex) {
+268 if (ex.isFatal()) {
+269 throw ex;
+270 }
+271 exCol = ex;
+272 }
+273 final List<Dependency> dependencies = engine.getDependencies();
+274 DatabaseProperties prop = null ;
+275 CveDB cve = null ;
+276 try {
+277 cve = new CveDB();
+278 cve.open();
+279 prop = cve.getDatabaseProperties();
+280 } finally {
+281 if (cve != null ) {
+282 cve.close();
+283 }
+284 }
+285 final ReportGenerator report = new ReportGenerator(applicationName, dependencies, engine.getAnalyzers(), prop);
286 try {
-287 Settings.mergeProperties(propertiesFile);
-288 } catch (FileNotFoundException ex) {
-289 LOGGER.error("Unable to load properties file '{}'" , propertiesFile.getPath());
-290 LOGGER.debug("" , ex);
-291 } catch (IOException ex) {
-292 LOGGER.error("Unable to find properties file '{}'" , propertiesFile.getPath());
-293 LOGGER.debug("" , ex);
-294 }
-295 }
-296
-297
-298
-299 final boolean nexusUsesProxy = cli.isNexusUsesProxy();
-300 if (dataDirectory != null ) {
-301 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
-302 } else if (System.getProperty("basedir" ) != null ) {
-303 final File dataDir = new File(System.getProperty("basedir" ), "data" );
-304 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
-305 } else {
-306 final File jarPath = new File(App.class .getProtectionDomain().getCodeSource().getLocation().getPath());
-307 final File base = jarPath.getParentFile();
-308 final String sub = Settings.getString(Settings.KEYS.DATA_DIRECTORY);
-309 final File dataDir = new File(base, sub);
-310 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
-311 }
-312 Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
-313 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_SERVER, proxyServer);
-314 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PORT, proxyPort);
-315 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_USERNAME, proxyUser);
-316 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPass);
-317 Settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
-318 Settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
-319 Settings.setIntIfNotNull(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours);
-320
-321
-322 Settings.setBoolean(Settings.KEYS.ANALYZER_EXPERIMENTAL_ENABLED, experimentalEnabled);
-323 Settings.setBoolean(Settings.KEYS.ANALYZER_JAR_ENABLED, !cli.isJarDisabled());
-324 Settings.setBoolean(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, !cli.isArchiveDisabled());
-325 Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, !cli.isPythonDistributionDisabled());
-326 Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, !cli.isPythonPackageDisabled());
-327 Settings.setBoolean(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, !cli.isAutoconfDisabled());
-328 Settings.setBoolean(Settings.KEYS.ANALYZER_CMAKE_ENABLED, !cli.isCmakeDisabled());
-329 Settings.setBoolean(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, !cli.isNuspecDisabled());
-330 Settings.setBoolean(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, !cli.isAssemblyDisabled());
-331 Settings.setBoolean(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_ENABLED, !cli.isBundleAuditDisabled());
-332 Settings.setBoolean(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, !cli.isOpenSSLDisabled());
-333 Settings.setBoolean(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, !cli.isComposerDisabled());
-334 Settings.setBoolean(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, !cli.isNodeJsDisabled());
-335 Settings.setBoolean(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, !cli.isRubyGemspecDisabled());
-336 Settings.setBoolean(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, !cli.isCentralDisabled());
-337 Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED, !cli.isNexusDisabled());
-338
-339 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_PATH, cli.getPathToBundleAudit());
-340 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
-341 Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY, nexusUsesProxy);
-342 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName);
-343 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath);
-344 Settings.setStringIfNotEmpty(Settings.KEYS.DB_CONNECTION_STRING, connectionString);
-345 Settings.setStringIfNotEmpty(Settings.KEYS.DB_USER, databaseUser);
-346 Settings.setStringIfNotEmpty(Settings.KEYS.DB_PASSWORD, databasePassword);
-347 Settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, additionalZipExtensions);
-348 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH, pathToMono);
-349 if (cveBase12 != null && !cveBase12.isEmpty()) {
-350 Settings.setString(Settings.KEYS.CVE_SCHEMA_1_2, cveBase12);
-351 Settings.setString(Settings.KEYS.CVE_SCHEMA_2_0, cveBase20);
-352 Settings.setString(Settings.KEYS.CVE_MODIFIED_12_URL, cveMod12);
-353 Settings.setString(Settings.KEYS.CVE_MODIFIED_20_URL, cveMod20);
-354 }
-355 }
-356
-357
-358
-359
-360
-361
-362 private void prepareLogger(String verboseLog) {
-363 final StaticLoggerBinder loggerBinder = StaticLoggerBinder.getSingleton();
-364 final LoggerContext context = (LoggerContext) loggerBinder.getLoggerFactory();
-365
-366 final PatternLayoutEncoder encoder = new PatternLayoutEncoder();
-367 encoder.setPattern("%d %C:%L%n%-5level - %msg%n" );
-368 encoder.setContext(context);
-369 encoder.start();
-370 final FileAppender fa = new FileAppender();
-371 fa.setAppend(true );
-372 fa.setEncoder(encoder);
-373 fa.setContext(context);
-374 fa.setFile(verboseLog);
-375 final File f = new File(verboseLog);
-376 String name = f.getName();
-377 final int i = name.lastIndexOf('.');
-378 if (i > 1) {
-379 name = name.substring(0, i);
-380 }
-381 fa.setName(name);
-382 fa.start();
-383 final ch.qos.logback.classic.Logger rootLogger = context.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
-384 rootLogger.addAppender(fa);
-385 }
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395 protected String ensureCanonicalPath(String path) {
-396 String basePath = null ;
-397 String wildCards = null ;
-398 final String file = path.replace('\\', '/');
-399 if (file.contains("*" ) || file.contains("?" )) {
-400
-401 int pos = getLastFileSeparator(file);
-402 if (pos < 0) {
-403 return file;
-404 }
-405 pos += 1;
-406 basePath = file.substring(0, pos);
-407 wildCards = file.substring(pos);
-408 } else {
-409 basePath = file;
-410 }
+287 report.generateReports(reportDirectory, outputFormat);
+288 } catch (ReportException ex) {
+289 if (exCol != null ) {
+290 exCol.addException(ex);
+291 throw exCol;
+292 } else {
+293 throw ex;
+294 }
+295 }
+296 if (exCol != null && exCol.getExceptions().size()>0) {
+297 throw exCol;
+298 }
+299 } finally {
+300 if (engine != null ) {
+301 engine.cleanup();
+302 }
+303 }
+304
+305 }
+306
+307
+308
+309
+310
+311
+312
+313
+314 private void runUpdateOnly() throws UpdateException, DatabaseException {
+315 Engine engine = null ;
+316 try {
+317 engine = new Engine();
+318 engine.doUpdates();
+319 } finally {
+320 if (engine != null ) {
+321 engine.cleanup();
+322 }
+323 }
+324 }
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335 private void populateSettings(CliParser cli) throws InvalidSettingException {
+336 final boolean autoUpdate = cli.isAutoUpdate();
+337 final String connectionTimeout = cli.getConnectionTimeout();
+338 final String proxyServer = cli.getProxyServer();
+339 final String proxyPort = cli.getProxyPort();
+340 final String proxyUser = cli.getProxyUsername();
+341 final String proxyPass = cli.getProxyPassword();
+342 final String dataDirectory = cli.getDataDirectory();
+343 final File propertiesFile = cli.getPropertiesFile();
+344 final String suppressionFile = cli.getSuppressionFile();
+345 final String nexusUrl = cli.getNexusUrl();
+346 final String databaseDriverName = cli.getDatabaseDriverName();
+347 final String databaseDriverPath = cli.getDatabaseDriverPath();
+348 final String connectionString = cli.getConnectionString();
+349 final String databaseUser = cli.getDatabaseUser();
+350 final String databasePassword = cli.getDatabasePassword();
+351 final String additionalZipExtensions = cli.getAdditionalZipExtensions();
+352 final String pathToMono = cli.getPathToMono();
+353 final String cveMod12 = cli.getModifiedCve12Url();
+354 final String cveMod20 = cli.getModifiedCve20Url();
+355 final String cveBase12 = cli.getBaseCve12Url();
+356 final String cveBase20 = cli.getBaseCve20Url();
+357 final Integer cveValidForHours = cli.getCveValidForHours();
+358 final boolean experimentalEnabled = cli.isExperimentalEnabled();
+359
+360 if (propertiesFile != null ) {
+361 try {
+362 Settings.mergeProperties(propertiesFile);
+363 } catch (FileNotFoundException ex) {
+364 throw new InvalidSettingException("Unable to find properties file '" + propertiesFile.getPath() + "'" , ex);
+365 } catch (IOException ex) {
+366 throw new InvalidSettingException("Error reading properties file '" + propertiesFile.getPath() + "'" , ex);
+367 }
+368 }
+369
+370
+371
+372 final boolean nexusUsesProxy = cli.isNexusUsesProxy();
+373 if (dataDirectory != null ) {
+374 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDirectory);
+375 } else if (System.getProperty("basedir" ) != null ) {
+376 final File dataDir = new File(System.getProperty("basedir" ), "data" );
+377 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
+378 } else {
+379 final File jarPath = new File(App.class .getProtectionDomain().getCodeSource().getLocation().getPath());
+380 final File base = jarPath.getParentFile();
+381 final String sub = Settings.getString(Settings.KEYS.DATA_DIRECTORY);
+382 final File dataDir = new File(base, sub);
+383 Settings.setString(Settings.KEYS.DATA_DIRECTORY, dataDir.getAbsolutePath());
+384 }
+385 Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
+386 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_SERVER, proxyServer);
+387 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PORT, proxyPort);
+388 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_USERNAME, proxyUser);
+389 Settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPass);
+390 Settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
+391 Settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
+392 Settings.setIntIfNotNull(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours);
+393
+394
+395 Settings.setBoolean(Settings.KEYS.ANALYZER_EXPERIMENTAL_ENABLED, experimentalEnabled);
+396 Settings.setBoolean(Settings.KEYS.ANALYZER_JAR_ENABLED, !cli.isJarDisabled());
+397 Settings.setBoolean(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, !cli.isArchiveDisabled());
+398 Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, !cli.isPythonDistributionDisabled());
+399 Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, !cli.isPythonPackageDisabled());
+400 Settings.setBoolean(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, !cli.isAutoconfDisabled());
+401 Settings.setBoolean(Settings.KEYS.ANALYZER_CMAKE_ENABLED, !cli.isCmakeDisabled());
+402 Settings.setBoolean(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, !cli.isNuspecDisabled());
+403 Settings.setBoolean(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, !cli.isAssemblyDisabled());
+404 Settings.setBoolean(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_ENABLED, !cli.isBundleAuditDisabled());
+405 Settings.setBoolean(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, !cli.isOpenSSLDisabled());
+406 Settings.setBoolean(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, !cli.isComposerDisabled());
+407 Settings.setBoolean(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, !cli.isNodeJsDisabled());
+408 Settings.setBoolean(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, !cli.isRubyGemspecDisabled());
+409 Settings.setBoolean(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, !cli.isCentralDisabled());
+410 Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED, !cli.isNexusDisabled());
411
-412 File f = new File(basePath);
-413 try {
-414 f = f.getCanonicalFile();
-415 if (wildCards != null ) {
-416 f = new File(f, wildCards);
-417 }
-418 } catch (IOException ex) {
-419 LOGGER.warn("Invalid path '{}' was provided." , path);
-420 LOGGER.debug("Invalid path provided" , ex);
-421 }
-422 return f.getAbsolutePath().replace('\\', '/');
-423 }
-424
-425
-426
-427
-428
-429
-430
-431 private int getLastFileSeparator(String file) {
-432 if (file.contains("*" ) || file.contains("?" )) {
-433 int p1 = file.indexOf('*');
-434 int p2 = file.indexOf('?');
-435 p1 = p1 > 0 ? p1 : file.length();
-436 p2 = p2 > 0 ? p2 : file.length();
-437 int pos = p1 < p2 ? p1 : p2;
-438 pos = file.lastIndexOf('/', pos);
-439 return pos;
-440 } else {
-441 return file.lastIndexOf('/');
-442 }
-443 }
-444 }
+412 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_PATH, cli.getPathToBundleAudit());
+413 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
+414 Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY, nexusUsesProxy);
+415 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName);
+416 Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath);
+417 Settings.setStringIfNotEmpty(Settings.KEYS.DB_CONNECTION_STRING, connectionString);
+418 Settings.setStringIfNotEmpty(Settings.KEYS.DB_USER, databaseUser);
+419 Settings.setStringIfNotEmpty(Settings.KEYS.DB_PASSWORD, databasePassword);
+420 Settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, additionalZipExtensions);
+421 Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH, pathToMono);
+422 if (cveBase12 != null && !cveBase12.isEmpty()) {
+423 Settings.setString(Settings.KEYS.CVE_SCHEMA_1_2, cveBase12);
+424 Settings.setString(Settings.KEYS.CVE_SCHEMA_2_0, cveBase20);
+425 Settings.setString(Settings.KEYS.CVE_MODIFIED_12_URL, cveMod12);
+426 Settings.setString(Settings.KEYS.CVE_MODIFIED_20_URL, cveMod20);
+427 }
+428 }
+429
+430
+431
+432
+433
+434
+435 private void prepareLogger(String verboseLog) {
+436 final StaticLoggerBinder loggerBinder = StaticLoggerBinder.getSingleton();
+437 final LoggerContext context = (LoggerContext) loggerBinder.getLoggerFactory();
+438
+439 final PatternLayoutEncoder encoder = new PatternLayoutEncoder();
+440 encoder.setPattern("%d %C:%L%n%-5level - %msg%n" );
+441 encoder.setContext(context);
+442 encoder.start();
+443 final FileAppender fa = new FileAppender();
+444 fa.setAppend(true );
+445 fa.setEncoder(encoder);
+446 fa.setContext(context);
+447 fa.setFile(verboseLog);
+448 final File f = new File(verboseLog);
+449 String name = f.getName();
+450 final int i = name.lastIndexOf('.');
+451 if (i > 1) {
+452 name = name.substring(0, i);
+453 }
+454 fa.setName(name);
+455 fa.start();
+456 final ch.qos.logback.classic.Logger rootLogger = context.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
+457 rootLogger.addAppender(fa);
+458 }
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469 protected String ensureCanonicalPath(String path) {
+470 String basePath;
+471 String wildCards = null ;
+472 final String file = path.replace('\\', '/');
+473 if (file.contains("*" ) || file.contains("?" )) {
+474
+475 int pos = getLastFileSeparator(file);
+476 if (pos < 0) {
+477 return file;
+478 }
+479 pos += 1;
+480 basePath = file.substring(0, pos);
+481 wildCards = file.substring(pos);
+482 } else {
+483 basePath = file;
+484 }
+485
+486 File f = new File(basePath);
+487 try {
+488 f = f.getCanonicalFile();
+489 if (wildCards != null ) {
+490 f = new File(f, wildCards);
+491 }
+492 } catch (IOException ex) {
+493 LOGGER.warn("Invalid path '{}' was provided." , path);
+494 LOGGER.debug("Invalid path provided" , ex);
+495 }
+496 return f.getAbsolutePath().replace('\\', '/');
+497 }
+498
+499
+500
+501
+502
+503
+504
+505 private int getLastFileSeparator(String file) {
+506 if (file.contains("*" ) || file.contains("?" )) {
+507 int p1 = file.indexOf('*');
+508 int p2 = file.indexOf('?');
+509 p1 = p1 > 0 ? p1 : file.length();
+510 p2 = p2 > 0 ? p2 : file.length();
+511 int pos = p1 < p2 ? p1 : p2;
+512 pos = file.lastIndexOf('/', pos);
+513 return pos;
+514 } else {
+515 return file.lastIndexOf('/');
+516 }
+517 }
+518 }
diff --git a/dependency-check-cli/xref/org/owasp/dependencycheck/package-frame.html b/dependency-check-cli/xref/org/owasp/dependencycheck/package-frame.html
index 8d0a7cf67..359edacfb 100644
--- a/dependency-check-cli/xref/org/owasp/dependencycheck/package-frame.html
+++ b/dependency-check-cli/xref/org/owasp/dependencycheck/package-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Command Line 1.4.0 Reference Package org.owasp.dependencycheck
+ Dependency-Check Command Line 1.4.2 Reference Package org.owasp.dependencycheck
diff --git a/dependency-check-cli/xref/org/owasp/dependencycheck/package-summary.html b/dependency-check-cli/xref/org/owasp/dependencycheck/package-summary.html
index 2ee075147..74598f9ec 100644
--- a/dependency-check-cli/xref/org/owasp/dependencycheck/package-summary.html
+++ b/dependency-check-cli/xref/org/owasp/dependencycheck/package-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Command Line 1.4.0 Reference Package org.owasp.dependencycheck
+ Dependency-Check Command Line 1.4.2 Reference Package org.owasp.dependencycheck
diff --git a/dependency-check-cli/xref/overview-frame.html b/dependency-check-cli/xref/overview-frame.html
index 6b5043647..587d5b4bc 100644
--- a/dependency-check-cli/xref/overview-frame.html
+++ b/dependency-check-cli/xref/overview-frame.html
@@ -3,7 +3,7 @@
- Dependency-Check Command Line 1.4.0 Reference
+ Dependency-Check Command Line 1.4.2 Reference
diff --git a/dependency-check-cli/xref/overview-summary.html b/dependency-check-cli/xref/overview-summary.html
index c3857e7bb..49ca818ac 100644
--- a/dependency-check-cli/xref/overview-summary.html
+++ b/dependency-check-cli/xref/overview-summary.html
@@ -3,7 +3,7 @@
- Dependency-Check Command Line 1.4.0 Reference
+ Dependency-Check Command Line 1.4.2 Reference
@@ -24,7 +24,7 @@
- Dependency-Check Command Line 1.4.0 Reference
+ Dependency-Check Command Line 1.4.2 Reference
diff --git a/dependency-check-core/apidocs/allclasses-frame.html b/dependency-check-core/apidocs/allclasses-frame.html
index 05755dd79..96aae0fc8 100644
--- a/dependency-check-core/apidocs/allclasses-frame.html
+++ b/dependency-check-core/apidocs/allclasses-frame.html
@@ -2,10 +2,10 @@
-
+
-All Classes (Dependency-Check Core 1.4.0 API)
-
+All Classes (Dependency-Check Core 1.4.2 API)
+
@@ -66,6 +66,7 @@
EscapeTool
Evidence
EvidenceCollection
+ExceptionCollection
Experimental
ExtractionUtil
FalsePositiveAnalyzer
@@ -76,9 +77,16 @@
FileTypeAnalyzer
Filter
HintAnalyzer
+HintErrorHandler
+HintHandler
+HintParseException
+HintParser
+HintRule
+Hints
Identifier
IndexEntry
IndexException
+InitializationException
InvalidDataException
JarAnalyzer
JarAnalyzer.ClassNameInformation
@@ -108,10 +116,11 @@
PomParser
PomUtils
ProcessTask
-PropertyType
+PropertyType
PythonDistributionAnalyzer
PythonPackageAnalyzer
Reference
+ReportException
ReportGenerator
ReportGenerator.Format
RubyBundleAuditAnalyzer
@@ -119,11 +128,11 @@
RubyGemspecAnalyzer
ScanAgentException
SearchFieldAnalyzer
-SuppressionErrorHandler
-SuppressionHandler
-SuppressionParseException
-SuppressionParser
-SuppressionRule
+SuppressionErrorHandler
+SuppressionHandler
+SuppressionParseException
+SuppressionParser
+SuppressionRule
TokenPairConcatenatingFilter
UpdateableNvdCve
UpdateException
@@ -131,6 +140,7 @@
UrlStringUtils
UrlTokenizingFilter
VelocityLoggerRedirect
+VendorDuplicatingHintRule
Vulnerability
VulnerabilityComparator
VulnerabilitySuppressionAnalyzer
diff --git a/dependency-check-core/apidocs/allclasses-noframe.html b/dependency-check-core/apidocs/allclasses-noframe.html
index b19fee50c..05bcb92e1 100644
--- a/dependency-check-core/apidocs/allclasses-noframe.html
+++ b/dependency-check-core/apidocs/allclasses-noframe.html
@@ -2,10 +2,10 @@
-
+
-All Classes (Dependency-Check Core 1.4.0 API)
-
+All Classes (Dependency-Check Core 1.4.2 API)
+
@@ -66,6 +66,7 @@
EscapeTool
Evidence
EvidenceCollection
+ExceptionCollection
Experimental
ExtractionUtil
FalsePositiveAnalyzer
@@ -76,9 +77,16 @@
FileTypeAnalyzer
Filter
HintAnalyzer
+HintErrorHandler
+HintHandler
+HintParseException
+HintParser
+HintRule
+Hints
Identifier
IndexEntry
IndexException
+InitializationException
InvalidDataException
JarAnalyzer
JarAnalyzer.ClassNameInformation
@@ -108,10 +116,11 @@
PomParser
PomUtils
ProcessTask
-PropertyType
+PropertyType
PythonDistributionAnalyzer
PythonPackageAnalyzer
Reference
+ReportException
ReportGenerator
ReportGenerator.Format
RubyBundleAuditAnalyzer
@@ -119,11 +128,11 @@
RubyGemspecAnalyzer
ScanAgentException
SearchFieldAnalyzer
-SuppressionErrorHandler
-SuppressionHandler
-SuppressionParseException
-SuppressionParser
-SuppressionRule
+SuppressionErrorHandler
+SuppressionHandler
+SuppressionParseException
+SuppressionParser
+SuppressionRule
TokenPairConcatenatingFilter
UpdateableNvdCve
UpdateException
@@ -131,6 +140,7 @@
UrlStringUtils
UrlTokenizingFilter
VelocityLoggerRedirect
+VendorDuplicatingHintRule
Vulnerability
VulnerabilityComparator
VulnerabilitySuppressionAnalyzer
diff --git a/dependency-check-core/apidocs/constant-values.html b/dependency-check-core/apidocs/constant-values.html
index 769130ba9..3e89fa51d 100644
--- a/dependency-check-core/apidocs/constant-values.html
+++ b/dependency-check-core/apidocs/constant-values.html
@@ -2,10 +2,10 @@
-
+
-Constant Field Values (Dependency-Check Core 1.4.0 API)
-
+Constant Field Values (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/agent/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/agent/package-summary.html
index e7f15ede6..f420cff1f 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/agent/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/agent/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.agent (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.agent (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,13 +13,13 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/analyzer/exception/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/analyzer/exception/package-summary.html
index e172a63bf..a7fd53a4a 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/analyzer/exception/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/analyzer/exception/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.analyzer.exception (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.analyzer.exception (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/analyzer/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/analyzer/package-summary.html
index e0ab00959..579152a90 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/analyzer/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/analyzer/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.analyzer (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.analyzer (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/central/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/central/package-summary.html
index d1e4b5caa..7f5e888e6 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/central/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/central/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.central (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.central (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/composer/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/composer/package-summary.html
index e754ceed8..034f92e81 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/composer/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/composer/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.composer (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.composer (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/cpe/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/cpe/package-summary.html
index 40ffd1f1c..1c0021853 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/cpe/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/cpe/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.cpe (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.cpe (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/cwe/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/cwe/package-summary.html
index e0e083652..5656722b9 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/cwe/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/cwe/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.cwe (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.cwe (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,14 +13,14 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/lucene/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/lucene/package-summary.html
index 14cac647f..9ade01397 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/lucene/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/lucene/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.lucene (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.lucene (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nexus/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nexus/package-summary.html
index 1854d8a78..04f0bf987 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nexus/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nexus/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.nexus (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.nexus (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nuget/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nuget/package-summary.html
index 0ad06a42a..ab2403406 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nuget/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nuget/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.nuget (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.nuget (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nvdcve/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nvdcve/package-summary.html
index 245317dfa..58dcfdab8 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nvdcve/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/nvdcve/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.nvdcve (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.nvdcve (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/cpe/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/cpe/package-summary.html
index 2d76f5c19..1e84874a7 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/cpe/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/cpe/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.update.cpe (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.update.cpe (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/exception/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/exception/package-summary.html
index 1ae11af6d..ca602850d 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/exception/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/exception/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.update.exception (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.update.exception (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/nvd/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/nvd/package-summary.html
index a3d290d99..5b5df8ac5 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/nvd/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/nvd/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.update.nvd (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.update.nvd (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/package-summary.html
index 3934485fe..4b792a5a8 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/data/update/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.data.update (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.data.update (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
diff --git a/dependency-check-core/apidocs/org/owasp/dependencycheck/dependency/package-summary.html b/dependency-check-core/apidocs/org/owasp/dependencycheck/dependency/package-summary.html
index 1c0ed11f0..58d53a845 100644
--- a/dependency-check-core/apidocs/org/owasp/dependencycheck/dependency/package-summary.html
+++ b/dependency-check-core/apidocs/org/owasp/dependencycheck/dependency/package-summary.html
@@ -2,10 +2,10 @@
-
+
-org.owasp.dependencycheck.dependency (Dependency-Check Core 1.4.0 API)
-
+org.owasp.dependencycheck.dependency (Dependency-Check Core 1.4.2 API)
+
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
@@ -13,7 +13,7 @@
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Detail
+
+
+
+
+
+
+
+
+
+ExceptionCollection
+public ExceptionCollection(String msg,
+ List <Throwable > exceptions)
+Instantiates a new exception collection.
+
+Parameters:
+msg - the exception message
+exceptions - a list of exceptions
+
+
+
+
+
+
+
+
+ExceptionCollection
+public ExceptionCollection(List <Throwable > exceptions,
+ boolean fatal)
+Instantiates a new exception collection.
+
+Parameters:
+exceptions - a list of exceptions
+fatal - indicates if the exception that occurred is fatal - meaning
+ that no analysis was performed.
+
+
+
+
+
+
+
+
+ExceptionCollection
+public ExceptionCollection(String msg,
+ List <Throwable > exceptions,
+ boolean fatal)
+Instantiates a new exception collection.
+
+Parameters:
+msg - the exception message
+exceptions - a list of exceptions
+fatal - indicates if the exception that occurred is fatal - meaning
+ that no analysis was performed.
+
+
+
+
+
+
+
+
+ExceptionCollection
+public ExceptionCollection(Throwable exceptions,
+ boolean fatal)
+Instantiates a new exception collection.
+
+Parameters:
+exceptions - a list of exceptions
+fatal - indicates if the exception that occurred is fatal - meaning
+ that no analysis was performed.
+
+
+
+
+
+
+
+
+ExceptionCollection
+public ExceptionCollection(String msg,
+ Throwable exception)
+Instantiates a new exception collection.
+
+Parameters:
+msg - the exception message
+exception - a list of exceptions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+isFatal
+public boolean isFatal()
+Get the value of fatal.
+
+Returns:
+the value of fatal
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Copyright? 2012-15 Jeremy Long. All Rights Reserved.
+
+