File: 202,
- Errors: 6,
+ File: 183,
+ Errors: 20,
Warnings: 0,
Infos: 0
@@ -46,7 +46,7 @@ under the License.
- org/owasp/dependencycheck/data/update/StandardUpdate.java
+ org/owasp/dependencycheck/data/lucene/package-info.java
0
@@ -71,1434 +71,6 @@ under the License.
0
-
-
-
- org/owasp/dependencycheck/data/nexus/NexusSearch.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/HintAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/exception/ScanAgentException.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/update/CachedWebDataSource.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-ant/target/generated-classes/cobertura/cobertura.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/utils/DependencyVersion.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Dependency.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/dependency/Dependency.java
-
-
- 0
-
-
- 0
-
-
- 1
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/IssueManagement.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-ant/target/generated-classes/cobertura/task.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/utils/Pair.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/FileTypeAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/nexus/MavenArtifact.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/CpeSuppressionAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/exception/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/dependency/EvidenceCollection.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Parent.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-ant/target/classes/task.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-maven/target/generated-classes/cobertura/log.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/RepositoryPolicy.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/utils/NonClosingStream.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/cwe/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/nvdcve/CorruptDatabaseException.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Exclusion.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Build.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/utils/DBUtils.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Relocation.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-ant/target/generated-classes/cobertura/taskdefs.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Developer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/dependency/VulnerableSoftware.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Notifier.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/cpe/CpeMemoryIndex.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/lucene/DependencySimilarity.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/suppression/PropertyType.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/AbstractFileTypeAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/cpe/Fields.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/suppression/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-cli/target/maven-archiver/pom.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/dependency/VulnerabilityComparator.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/CiManagement.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/update/exception/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/dependency/Identifier.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-core/src/main/resources/dependencycheck.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-ant/target/classes/log.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/NexusAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/update/task/DownloadTask.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/nvdcve/DriverLoader.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-utils/src/test/resources/dependencycheck.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/lucene/TokenPairConcatenatingFilter.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Reporting.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-cli/target/generated-classes/cobertura/log.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-core/src/test/resources/dependencycheck.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-core/target/generated-classes/cobertura/dependencycheck-resources.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/lucene/FieldAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/dependency/Confidence.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 2
-
-
-
-
- org/owasp/dependencycheck/dependency/Evidence.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Prerequisites.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-core/target/test-classes/log.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/dependency/Reference.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-cli/src/main/resources/log.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/nvdcve/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/PluginManagement.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/update/exception/UpdateException.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-utils/src/test/resources/test.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-maven/target/generated-classes/cobertura/cobertura.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/cwe/CweHandler.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/lucene/LuceneUtils.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/utils/Filter.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/cwe/CweDB.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/utils/ExtractionUtil.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/nvdcve/CveDB.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Profile.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/ActivationFile.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/reporting/VelocityLoggerRedirect.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/Organization.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-cli/target/generated-classes/cobertura/cobertura.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-ant/target/generated-classes/cobertura/log.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/nuget/NuspecParseException.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/cpe/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/suppression/SuppressionParseException.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-core/target/generated-classes/cobertura/dependencycheck.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/AbstractSuppressionAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/lucene/SearchFieldAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/exception/ArchiveExtractionException.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/lucene/VersionTokenizingFilter.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/exception/NoDataException.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/update/task/ProcessTask.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/DistributionManagement.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/nvdcve/DriverShim.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/dependency/Vulnerability.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/generated/MailingList.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/jaxb/pom/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/analyzer/JavaScriptAnalyzer.java
-
-
- 0
-
-
- 0
-
-
- 2
-
-
-
-
- dependency-check-maven/src/main/resources/log.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/update/xml/package-info.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/nuget/NugetPackage.java
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-core/target/classes/dependencycheck.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- org/owasp/dependencycheck/data/update/NvdCveUpdater.java
-
-
- 0
-
-
- 0
-
-
- 0
-
@@ -1516,7 +88,7 @@ under the License.
- org/owasp/dependencycheck/data/lucene/package-info.java
+ org/owasp/dependencycheck/data/update/StandardUpdate.java
0
@@ -1530,21 +102,7 @@ under the License.
- dependency-check-maven/target/classes/log.properties
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- dependency-check-maven/target/generated-classes/cobertura/mojo.properties
+ org/owasp/dependencycheck/data/nexus/NexusSearch.java
0
@@ -1569,6 +127,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/analyzer/HintAnalyzer.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1583,6 +155,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/exception/ScanAgentException.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1614,7 +200,7 @@ under the License.
- org/owasp/dependencycheck/jaxb/pom/generated/BuildBase.java
+ org/owasp/dependencycheck/data/update/CachedWebDataSource.java
0
@@ -1625,6 +211,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/utils/DependencyVersion.java
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
@@ -1639,6 +239,34 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/BuildBase.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Dependency.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1653,6 +281,34 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/dependency/Dependency.java
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/IssueManagement.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1679,12 +335,12 @@ under the License.
0
- 0
+ 2
- dependency-check-maven/target/maven-archiver/pom.properties
+ org/owasp/dependencycheck/utils/Pair.java
0
@@ -1709,6 +365,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/analyzer/FileTypeAnalyzer.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1740,7 +410,7 @@ under the License.
- dependency-check-maven/target/maven-plugin-help.properties
+ org/owasp/dependencycheck/data/nexus/MavenArtifact.java
0
@@ -1768,7 +438,21 @@ under the License.
- org/owasp/dependencycheck/jaxb/pom/generated/Model.java
+ org/owasp/dependencycheck/analyzer/CpeSuppressionAnalyzer.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/analyzer/exception/package-info.java
0
@@ -1793,6 +477,48 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Parent.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Model.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/dependency/EvidenceCollection.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1821,6 +547,76 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/utils/NonClosingStream.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/RepositoryPolicy.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/cwe/package-info.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Exclusion.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/nvdcve/CorruptDatabaseException.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1863,6 +659,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Build.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1891,6 +701,76 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/utils/DBUtils.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Relocation.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Developer.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Notifier.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/dependency/VulnerableSoftware.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1905,6 +785,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/cpe/CpeMemoryIndex.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1947,6 +841,34 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/suppression/PropertyType.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/lucene/DependencySimilarity.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -1978,7 +900,7 @@ under the License.
- dependency-check-ant/target/maven-archiver/pom.properties
+ org/owasp/dependencycheck/analyzer/AbstractFileTypeAnalyzer.java
0
@@ -2003,6 +925,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/cpe/Fields.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2076,7 +1012,7 @@ under the License.
- org/owasp/dependencycheck/data/lucene/VersionAnalyzer.java
+ org/owasp/dependencycheck/suppression/package-info.java
0
@@ -2090,7 +1026,7 @@ under the License.
- org/owasp/dependencycheck/data/nuget/package-info.java
+ org/owasp/dependencycheck/data/lucene/VersionAnalyzer.java
0
@@ -2115,6 +1051,48 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/nuget/package-info.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/dependency/VulnerabilityComparator.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/CiManagement.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2129,6 +1107,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/update/exception/package-info.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2143,6 +1135,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/dependency/Identifier.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2154,6 +1160,20 @@ under the License.
0
+
+ 4
+
+
+
+
+ dependency-check-core/src/main/resources/dependencycheck.properties
+
+
+ 0
+
+
+ 0
+
0
@@ -2185,6 +1205,34 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/analyzer/NexusAnalyzer.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/update/task/DownloadTask.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2199,6 +1247,90 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/nvdcve/DriverLoader.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ dependency-check-utils/src/test/resources/dependencycheck.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/lucene/TokenPairConcatenatingFilter.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Reporting.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ dependency-check-core/src/test/resources/dependencycheck.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ dependency-check-core/target/generated-classes/cobertura/dependencycheck-resources.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2213,6 +1345,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/lucene/FieldAnalyzer.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2227,6 +1373,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/dependency/Confidence.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2244,7 +1404,7 @@ under the License.
- dependency-check-ant/target/classes/taskdefs.properties
+ org/owasp/dependencycheck/jaxb/pom/generated/Scm.java
0
@@ -2258,7 +1418,7 @@ under the License.
- org/owasp/dependencycheck/jaxb/pom/generated/Scm.java
+ org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java
0
@@ -2267,7 +1427,7 @@ under the License.
0
- 0
+ 2
@@ -2325,6 +1485,76 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/dependency/Evidence.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ dependency-check-core/target/test-classes/log.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Prerequisites.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/analyzer/package-info.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ dependency-check-cli/src/main/resources/log.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2339,6 +1569,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/dependency/Reference.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2353,6 +1597,62 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/PluginManagement.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/nvdcve/package-info.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/update/exception/UpdateException.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/package-info.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2367,6 +1667,20 @@ under the License.
0
+
+
+
+ dependency-check-utils/src/test/resources/test.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2379,7 +1693,7 @@ under the License.
0
- 0
+ 3
@@ -2409,6 +1723,34 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/lucene/LuceneUtils.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/cwe/CweHandler.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2435,7 +1777,7 @@ under the License.
0
- 0
+ 3
@@ -2451,6 +1793,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/utils/Filter.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2465,6 +1821,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/cwe/CweDB.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2479,6 +1849,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2493,6 +1877,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/utils/ExtractionUtil.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2510,7 +1908,7 @@ under the License.
- org/owasp/dependencycheck/analyzer/VulnerabilitySuppressionAnalyzer.java
+ org/owasp/dependencycheck/jaxb/pom/generated/Extension.java
0
@@ -2524,7 +1922,7 @@ under the License.
- org/owasp/dependencycheck/jaxb/pom/generated/Extension.java
+ org/owasp/dependencycheck/analyzer/VulnerabilitySuppressionAnalyzer.java
0
@@ -2577,6 +1975,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/nvdcve/CveDB.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2591,6 +2003,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Profile.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2605,6 +2031,48 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/ActivationFile.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/reporting/VelocityLoggerRedirect.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/Organization.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2619,6 +2087,62 @@ under the License.
0
+
+
+
+ dependency-check-core/target/generated-classes/cobertura/dependencycheck.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/suppression/SuppressionParseException.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/cpe/package-info.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/nuget/NuspecParseException.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2650,7 +2174,35 @@ under the License.
- dependency-check-cli/target/classes/log.properties
+ org/owasp/dependencycheck/analyzer/AbstractSuppressionAnalyzer.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/lucene/SearchFieldAnalyzer.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/analyzer/exception/ArchiveExtractionException.java
0
@@ -2675,6 +2227,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/lucene/VersionTokenizingFilter.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2703,6 +2269,20 @@ under the License.
1
+
+
+
+ org/owasp/dependencycheck/exception/NoDataException.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2745,6 +2325,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/update/task/ProcessTask.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2762,7 +2356,21 @@ under the License.
- dependency-check-maven/target/classes/mojo.properties
+ org/owasp/dependencycheck/jaxb/pom/generated/DistributionManagement.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/nvdcve/DriverShim.java
0
@@ -2787,6 +2395,20 @@ under the License.
0
+
+
+
+ dependency-check-core/target/test-classes/test.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2804,7 +2426,35 @@ under the License.
- dependency-check-core/target/test-classes/test.properties
+ org/owasp/dependencycheck/dependency/Vulnerability.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/package-info.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/jaxb/pom/generated/MailingList.java
0
@@ -2829,6 +2479,20 @@ under the License.
0
+
+
+
+ dependency-check-maven/src/main/resources/log.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2843,6 +2507,62 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/analyzer/JavaScriptAnalyzer.java
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ org/owasp/dependencycheck/data/nuget/NugetPackage.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ org/owasp/dependencycheck/data/update/xml/package-info.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ dependency-check-core/target/classes/dependencycheck.properties
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
@@ -2857,6 +2577,20 @@ under the License.
0
+
+
+
+ org/owasp/dependencycheck/data/update/NvdCveUpdater.java
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
diff --git a/dependency-check-core/cobertura/frame-sourcefiles-org.owasp.dependencycheck.analyzer.html b/dependency-check-core/cobertura/frame-sourcefiles-org.owasp.dependencycheck.analyzer.html
index 5b0072870..cf200ff8d 100644
--- a/dependency-check-core/cobertura/frame-sourcefiles-org.owasp.dependencycheck.analyzer.html
+++ b/dependency-check-core/cobertura/frame-sourcefiles-org.owasp.dependencycheck.analyzer.html
@@ -39,7 +39,7 @@ org.owasp.dependencycheck.analyzer
AssemblyAnalyzer (66%)
-CPEAnalyzer (80%)
+CPEAnalyzer (77%)
CpeSuppressionAnalyzer (88%)
@@ -48,7 +48,7 @@ org.owasp.dependencycheck.analyzer
DependencyBundlingAnalyzer (34%)
-FalsePositiveAnalyzer (50%)
+FalsePositiveAnalyzer (49%)
FileNameAnalyzer (85%)
diff --git a/dependency-check-core/cobertura/frame-sourcefiles-org.owasp.dependencycheck.suppression.html b/dependency-check-core/cobertura/frame-sourcefiles-org.owasp.dependencycheck.suppression.html
index 16e427e64..80041ce8a 100644
--- a/dependency-check-core/cobertura/frame-sourcefiles-org.owasp.dependencycheck.suppression.html
+++ b/dependency-check-core/cobertura/frame-sourcefiles-org.owasp.dependencycheck.suppression.html
@@ -21,7 +21,7 @@ org.owasp.dependencycheck.suppression
SuppressionErrorHandler (6%)
-SuppressionHandler (97%)
+SuppressionHandler (95%)
SuppressionParseException (N/A)
@@ -30,7 +30,7 @@ org.owasp.dependencycheck.suppression
SuppressionParser (64%)
-SuppressionRule (70%)
+SuppressionRule (71%)
diff --git a/dependency-check-core/cobertura/frame-sourcefiles.html b/dependency-check-core/cobertura/frame-sourcefiles.html
index 3c6f149a6..a71e3f6cc 100644
--- a/dependency-check-core/cobertura/frame-sourcefiles.html
+++ b/dependency-check-core/cobertura/frame-sourcefiles.html
@@ -69,7 +69,7 @@ All Packages
BuildBase (0%)
-CPEAnalyzer (80%)
+CPEAnalyzer (77%)
CachedWebDataSource (N/A)
@@ -177,7 +177,7 @@ All Packages
ExtractionUtil (0%)
-FalsePositiveAnalyzer (50%)
+FalsePositiveAnalyzer (49%)
FieldAnalyzer (100%)
@@ -360,7 +360,7 @@ All Packages
SuppressionErrorHandler (6%)
-SuppressionHandler (97%)
+SuppressionHandler (95%)
SuppressionParseException (N/A)
@@ -369,7 +369,7 @@ All Packages
SuppressionParser (64%)
-SuppressionRule (70%)
+SuppressionRule (71%)
TokenPairConcatenatingFilter (100%)
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.agent.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.agent.html
index 4c3efe33f..9d2d0e514 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.agent.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.agent.html
@@ -37,6 +37,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.analyzer.exception.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.analyzer.exception.html
index 197c2cb8a..e420823ff 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.analyzer.exception.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.analyzer.exception.html
@@ -39,6 +39,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.analyzer.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.analyzer.html
index a96a379d5..5099403a3 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.analyzer.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.analyzer.html
@@ -16,7 +16,7 @@
@@ -45,15 +45,15 @@ packageTable.sort(0);
AssemblyAnalyzer 6.875; 6.875
- CPEAnalyzer 4.428571428571429; 4.429
- CPEAnalyzer$IdentifierConfidence 4.428571428571429; 4.429
- CPEAnalyzer$IdentifierMatch 4.428571428571429; 4.429
+ CPEAnalyzer 4.444444444444445; 4.444
+ CPEAnalyzer$IdentifierConfidence 4.444444444444445; 4.444
+ CPEAnalyzer$IdentifierMatch 4.444444444444445; 4.444
CpeSuppressionAnalyzer 2.3333333333333335; 2.333
DependencyBundlingAnalyzer 9.090909090909092; 9.091
- FalsePositiveAnalyzer 9.5; 9.5
+ FalsePositiveAnalyzer 9.692307692307692; 9.692
FileNameAnalyzer 2.6666666666666665; 2.667
@@ -81,6 +81,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.cpe.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.cpe.html
index f695794bf..aeb7d7443 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.cpe.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.cpe.html
@@ -43,6 +43,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.cwe.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.cwe.html
index 65a5ba90d..19bea5141 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.cwe.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.cwe.html
@@ -39,6 +39,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.lucene.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.lucene.html
index 8b3cd7a9c..c4377deb2 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.lucene.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.lucene.html
@@ -57,6 +57,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nexus.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nexus.html
index efdb40c49..608707a0e 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nexus.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nexus.html
@@ -39,6 +39,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nuget.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nuget.html
index 80a5cac20..7c5283b42 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nuget.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nuget.html
@@ -43,6 +43,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nvdcve.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nvdcve.html
index 3c8fe5b1c..608975787 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nvdcve.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.nvdcve.html
@@ -50,6 +50,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.exception.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.exception.html
index 1867b043e..4db3b1007 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.exception.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.exception.html
@@ -39,6 +39,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.html
index 6c707e11c..f84567de5 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.html
@@ -50,6 +50,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.task.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.task.html
index 22b06cc0b..4e6dec3b1 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.task.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.task.html
@@ -39,6 +39,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.xml.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.xml.html
index 4fff7a9d0..d77bec16e 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.xml.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.data.update.xml.html
@@ -41,6 +41,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.dependency.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.dependency.html
index e53423137..5a88ead8b 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.dependency.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.dependency.html
@@ -58,6 +58,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.exception.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.exception.html
index 2008fe076..006954f79 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.exception.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.exception.html
@@ -39,6 +39,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.html
index 210860204..42cf42e2d 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.html
@@ -18,7 +18,7 @@
org.owasp.dependencycheck 1 3.1818181818181817; 3.182
org.owasp.dependencycheck.agent 1 1.878787878787879; 1.879
- org.owasp.dependencycheck.analyzer 24 5.145348837209302; 5.145
+ org.owasp.dependencycheck.analyzer 24 5.191860465116279; 5.192
org.owasp.dependencycheck.analyzer.exception 2 1.0; 1
org.owasp.dependencycheck.data.cpe 4 2.4516129032258065; 2.452
org.owasp.dependencycheck.data.cwe 2 2.8; 2.8
@@ -35,8 +35,8 @@
org.owasp.dependencycheck.jaxb.pom 1 1.25; 1.25
org.owasp.dependencycheck.jaxb.pom.generated 87 1.0907407407407408; 1.091
org.owasp.dependencycheck.reporting 4 3.7142857142857144; 3.714
- org.owasp.dependencycheck.suppression 6 3.0943396226415096; 3.094
- org.owasp.dependencycheck.utils 10 3.5813953488372094; 3.581
+ org.owasp.dependencycheck.suppression 6 3.0727272727272728; 3.073
+ org.owasp.dependencycheck.utils 10 3.627906976744186; 3.628
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.jaxb.pom.generated.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.jaxb.pom.generated.html
index 2e1be7240..d8b64411d 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.jaxb.pom.generated.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.jaxb.pom.generated.html
@@ -160,6 +160,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.jaxb.pom.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.jaxb.pom.html
index b7c9ca628..48fb4fd95 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.jaxb.pom.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.jaxb.pom.html
@@ -38,6 +38,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.reporting.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.reporting.html
index fbca1aebe..4694a646c 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.reporting.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.reporting.html
@@ -42,6 +42,6 @@ var classTable = new SortableTable(document.getElementById("classResults"),
["String", "Percentage", "Percentage", "FormattedNumber"]);
classTable.sort(0);
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.suppression.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.suppression.html
index c0650945b..9098c771f 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.suppression.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.suppression.html
@@ -16,7 +16,7 @@
-
+
diff --git a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.utils.html b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.utils.html
index c953edb47..735f9e6da 100644
--- a/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.utils.html
+++ b/dependency-check-core/cobertura/frame-summary-org.owasp.dependencycheck.utils.html
@@ -16,7 +16,7 @@
-
+
diff --git a/dependency-check-core/cobertura/frame-summary.html b/dependency-check-core/cobertura/frame-summary.html
index e5957221e..452423c2a 100644
--- a/dependency-check-core/cobertura/frame-summary.html
+++ b/dependency-check-core/cobertura/frame-summary.html
@@ -16,10 +16,10 @@
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.Engine.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.Engine.html
index f59974417..bdc810e6c 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.Engine.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.Engine.html
@@ -58,781 +58,783 @@
20
import java.io.File;
21
- import java.util.ArrayList;
+ import java.io.Serializable;
22
- import java.util.EnumMap;
+ import java.util.ArrayList;
23
- import java.util.HashSet;
+ import java.util.EnumMap;
24
- import java.util.Iterator;
+ import java.util.HashSet;
25
- import java.util.List;
+ import java.util.Iterator;
26
- import java.util.Set;
+ import java.util.List;
27
- import java.util.logging.Level;
+ import java.util.Set;
28
- import java.util.logging.Logger;
+ import java.util.logging.Level;
29
- import org.owasp.dependencycheck.analyzer.AnalysisPhase;
+ import java.util.logging.Logger;
30
- import org.owasp.dependencycheck.analyzer.Analyzer;
+ import org.owasp.dependencycheck.analyzer.AnalysisPhase;
31
- import org.owasp.dependencycheck.analyzer.AnalyzerService;
+ import org.owasp.dependencycheck.analyzer.Analyzer;
32
- import org.owasp.dependencycheck.analyzer.FileTypeAnalyzer;
+ import org.owasp.dependencycheck.analyzer.AnalyzerService;
33
- import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
+ import org.owasp.dependencycheck.analyzer.FileTypeAnalyzer;
34
- import org.owasp.dependencycheck.data.cpe.CpeMemoryIndex;
+ import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
35
- import org.owasp.dependencycheck.data.cpe.IndexException;
+ import org.owasp.dependencycheck.data.cpe.CpeMemoryIndex;
36
- import org.owasp.dependencycheck.data.nvdcve.ConnectionFactory;
+ import org.owasp.dependencycheck.data.cpe.IndexException;
37
- import org.owasp.dependencycheck.data.nvdcve.CveDB;
+ import org.owasp.dependencycheck.data.nvdcve.ConnectionFactory;
38
- import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
+ import org.owasp.dependencycheck.data.nvdcve.CveDB;
39
- import org.owasp.dependencycheck.data.update.CachedWebDataSource;
+ import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
40
- import org.owasp.dependencycheck.data.update.UpdateService;
+ import org.owasp.dependencycheck.data.update.CachedWebDataSource;
41
- import org.owasp.dependencycheck.data.update.exception.UpdateException;
+ import org.owasp.dependencycheck.data.update.UpdateService;
42
- import org.owasp.dependencycheck.dependency.Dependency;
+ import org.owasp.dependencycheck.data.update.exception.UpdateException;
43
- import org.owasp.dependencycheck.exception.NoDataException;
+ import org.owasp.dependencycheck.dependency.Dependency;
44
- import org.owasp.dependencycheck.utils.FileUtils;
+ import org.owasp.dependencycheck.exception.NoDataException;
45
- import org.owasp.dependencycheck.utils.InvalidSettingException;
+ import org.owasp.dependencycheck.utils.FileUtils;
46
- import org.owasp.dependencycheck.utils.Settings;
+ import org.owasp.dependencycheck.utils.InvalidSettingException;
47
-
+ import org.owasp.dependencycheck.utils.Settings;
48
-
+
49
-
+
50
-
+
51
-
+
52
-
+
53
-
+
54
-
+
55
- public class Engine {
+
56
-
+ public class Engine implements Serializable {
57
-
+
58
-
+
59
-
+
60
- private List<Dependency> dependencies;
+
61
-
+ private List<Dependency> dependencies;
62
-
+
63
-
- 64
- private final EnumMap<AnalysisPhase, List<Analyzer>> analyzers;
- 65
-
- 66
+ 64
+
+ 65
+ private transient final EnumMap<AnalysisPhase, List<Analyzer>> analyzers;
+ 66
+
67
-
+
68
- private final Set<FileTypeAnalyzer> fileTypeAnalyzers;
+
69
-
+ private transient final Set<FileTypeAnalyzer> fileTypeAnalyzers;
70
-
+
71
-
+
72
- private ClassLoader serviceClassLoader;
+
73
-
+ private transient ClassLoader serviceClassLoader;
74
-
+
75
+
+ 76
- 76 4 private static final Logger LOGGER = Logger.getLogger(Engine.class .getName());
- 77
-
+ 77 1 private transient static final Logger LOGGER = Logger.getLogger(Engine.class .getName());
78
-
+
79
-
+
80
-
+
81
-
+
82
-
- 83
- public Engine() throws DatabaseException {
- 84 4 this (Thread.currentThread().getContextClassLoader());
- 85 4 }
- 86
-
- 87
-
- 88
-
- 89
-
- 90
-
- 91
+ 83
+
+ 84
+ public Engine() throws DatabaseException {
+ 85 1 this (Thread.currentThread().getContextClassLoader());
+ 86 1 }
+ 87
+
+ 88
+
+ 89
+
+ 90
+
+ 91
+
92
+
+ 93
- 93 4 public Engine(ClassLoader serviceClassLoader) throws DatabaseException {
- 94 4 this .dependencies = new ArrayList<Dependency>();
- 95 4 this .analyzers = new EnumMap<AnalysisPhase, List<Analyzer>>(AnalysisPhase.class );
- 96 4 this .fileTypeAnalyzers = new HashSet<FileTypeAnalyzer>();
- 97 4 this .serviceClassLoader = serviceClassLoader;
- 98
+ 94 1 public Engine(ClassLoader serviceClassLoader) throws DatabaseException {
+ 95 1 this .dependencies = new ArrayList<Dependency>();
+ 96 1 this .analyzers = new EnumMap<AnalysisPhase, List<Analyzer>>(AnalysisPhase.class );
+ 97 1 this .fileTypeAnalyzers = new HashSet<FileTypeAnalyzer>();
+ 98 1 this .serviceClassLoader = serviceClassLoader;
+ 99
- 99 4 ConnectionFactory.initialize();
- 100
+ 100 1 ConnectionFactory.initialize();
+ 101
- 101 4 boolean autoUpdate = true ;
- 102
+ 102 1 boolean autoUpdate = true ;
+ 103
try {
- 103 4 autoUpdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
- 104 0 } catch (InvalidSettingException ex) {
- 105 0 LOGGER.log(Level.FINE, "Invalid setting for auto-update; using true." );
- 106 4 }
- 107 4 if (autoUpdate) {
- 108 0 doUpdates();
- 109
+ 104 1 autoUpdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
+ 105 0 } catch (InvalidSettingException ex) {
+ 106 0 LOGGER.log(Level.FINE, "Invalid setting for auto-update; using true." );
+ 107 1 }
+ 108 1 if (autoUpdate) {
+ 109 0 doUpdates();
+ 110
}
- 110 4 loadAnalyzers();
- 111 4 }
- 112
-
+ 111 1 loadAnalyzers();
+ 112 1 }
113
-
+
114
-
+
115
-
+
116
+
+ 117
public void cleanup() {
- 117 0 ConnectionFactory.cleanup();
- 118 0 }
- 119
-
+ 118 0 ConnectionFactory.cleanup();
+ 119 0 }
120
-
+
121
-
+
122
-
+
123
- private void loadAnalyzers() {
+
124
+ private void loadAnalyzers() {
+ 125
- 125 40 for (AnalysisPhase phase : AnalysisPhase.values()) {
- 126 36 analyzers.put(phase, new ArrayList<Analyzer>());
- 127
- }
+ 126 10 for (AnalysisPhase phase : AnalysisPhase.values()) {
+ 127 9 analyzers.put(phase, new ArrayList<Analyzer>());
128
+ }
+ 129
- 129 4 final AnalyzerService service = new AnalyzerService(serviceClassLoader);
- 130 4 final Iterator<Analyzer> iterator = service.getAnalyzers();
- 131 56 while (iterator.hasNext()) {
- 132 52 final Analyzer a = iterator.next();
- 133 52 analyzers.get(a.getAnalysisPhase()).add(a);
- 134 52 if (a instanceof FileTypeAnalyzer) {
- 135 20 this .fileTypeAnalyzers.add((FileTypeAnalyzer) a);
- 136
+ 130 1 final AnalyzerService service = new AnalyzerService(serviceClassLoader);
+ 131 1 final Iterator<Analyzer> iterator = service.getAnalyzers();
+ 132 14 while (iterator.hasNext()) {
+ 133 13 final Analyzer a = iterator.next();
+ 134 13 analyzers.get(a.getAnalysisPhase()).add(a);
+ 135 13 if (a instanceof FileTypeAnalyzer) {
+ 136 5 this .fileTypeAnalyzers.add((FileTypeAnalyzer) a);
+ 137
}
- 137 52 }
- 138 4 }
- 139
-
+ 138 13 }
+ 139 1 }
140
-
+
141
-
+
142
-
+
143
-
+
144
-
+
145
-
+
146
+
+ 147
public List<Analyzer> getAnalyzers(AnalysisPhase phase) {
- 147 0 return analyzers.get(phase);
- 148
- }
+ 148 0 return analyzers.get(phase);
149
-
+ }
150
-
+
151
-
+
152
-
+
153
-
+
154
-
+
155
- public List<Dependency> getDependencies() {
+
156
- return dependencies;
+ public List<Dependency> getDependencies() {
157
- }
+ return dependencies;
158
-
+ }
159
- public void setDependencies(List<Dependency> dependencies) {
+
160
- this .dependencies = dependencies;
+ public void setDependencies(List<Dependency> dependencies) {
161
-
+ this .dependencies = dependencies;
162
-
+
163
-
+
164
- }
+
165
-
+ }
166
-
+
167
-
+
168
-
- 169
-
- 170
-
- 171
-
- 172
-
- 173
-
- 174
- public void scan(String[] paths) {
- 175 0 for (String path : paths) {
- 176 0 final File file = new File(path);
- 177 0 scan(file);
- 178
- }
- 179 0 }
- 180
-
- 181
-
- 182
-
- 183
-
- 184
-
- 185
-
- 186
-
- 187
- public void scan(String path) {
- 188 0 if (path.matches("^.*[\\/]\\*\\.[^\\/:*|?<>\"]+$" )) {
- 189 0 final String[] parts = path.split("\\*\\." );
- 190 0 final String[] ext = new String[]{parts[parts.length - 1]};
- 191 0 final File dir = new File(path.substring(0, path.length() - ext[0].length() - 2));
- 192 0 if (dir.isDirectory()) {
- 193 0 final List<File> files = (List<File>) org.apache.commons.io.FileUtils.listFiles(dir, ext, true );
- 194 0 scan(files);
- 195 0 } else {
- 196 0 final String msg = String.format("Invalid file path provided to scan '%s'" , path);
- 197 0 LOGGER.log(Level.SEVERE, msg);
- 198
- }
- 199 0 } else {
- 200 0 final File file = new File(path);
- 201 0 scan(file);
- 202
- }
- 203 0 }
- 204
-
- 205
-
- 206
- 207
+ 169
- 208
+ 170
- 209
+ 171
- 210
+ 172
- 211
-
- 212
+ 173
+
+ 174
- 213
- public void scan(File[] files) {
- 214 0 for (File file : files) {
- 215 0 scan(file);
- 216
+ 175
+ public void scan(String[] paths) {
+ 176 0 for (String path : paths) {
+ 177 0 final File file = new File(path);
+ 178 0 scan(file);
+ 179
}
- 217 0 }
- 218
+ 180 0 }
+ 181
- 219
+ 182
- 220
-
- 221
-
- 222
-
- 223
-
- 224
-
- 225
-
- 226
-
- 227
- public void scan(Set<File> files) {
- 228 0 for (File file : files) {
- 229 0 scan(file);
- 230 0 }
- 231 0 }
- 232
-
- 233
-
- 234
-
- 235
-
- 236
-
- 237
-
- 238
-
- 239
-
- 240
-
- 241
- public void scan(List<File> files) {
- 242 0 for (File file : files) {
- 243 0 scan(file);
- 244 0 }
- 245 0 }
- 246
-
- 247
-
- 248
+ 183
- 249
+ 184
+ 185
+
+ 186
+
+ 187
+
+ 188
+ public void scan(String path) {
+ 189 0 if (path.matches("^.*[\\/]\\*\\.[^\\/:*|?<>\"]+$" )) {
+ 190 0 final String[] parts = path.split("\\*\\." );
+ 191 0 final String[] ext = new String[]{parts[parts.length - 1]};
+ 192 0 final File dir = new File(path.substring(0, path.length() - ext[0].length() - 2));
+ 193 0 if (dir.isDirectory()) {
+ 194 0 final List<File> files = (List<File>) org.apache.commons.io.FileUtils.listFiles(dir, ext, true );
+ 195 0 scan(files);
+ 196 0 } else {
+ 197 0 final String msg = String.format("Invalid file path provided to scan '%s'" , path);
+ 198 0 LOGGER.log(Level.SEVERE, msg);
+ 199
+ }
+ 200 0 } else {
+ 201 0 final File file = new File(path);
+ 202 0 scan(file);
+ 203
+ }
+ 204 0 }
+ 205
+
+ 206
+
+ 207
+
+ 208
+
+ 209
+
+ 210
+
+ 211
+
+ 212
+
+ 213
+
+ 214
+ public void scan(File[] files) {
+ 215 0 for (File file : files) {
+ 216 0 scan(file);
+ 217
+ }
+ 218 0 }
+ 219
+
+ 220
+
+ 221
+
+ 222
+
+ 223
+
+ 224
+
+ 225
+
+ 226
+
+ 227
+
+ 228
+ public void scan(Set<File> files) {
+ 229 0 for (File file : files) {
+ 230 0 scan(file);
+ 231 0 }
+ 232 0 }
+ 233
+
+ 234
+
+ 235
+
+ 236
+
+ 237
+
+ 238
+
+ 239
+
+ 240
+
+ 241
+
+ 242
+ public void scan(List<File> files) {
+ 243 0 for (File file : files) {
+ 244 0 scan(file);
+ 245 0 }
+ 246 0 }
+ 247
+
+ 248
+
+ 249
+
250
-
+
251
-
+
252
-
+
253
-
+
254
-
+
255
+
+ 256
public void scan(File file) {
- 256 16 if (file.exists()) {
- 257 16 if (file.isDirectory()) {
- 258 8 scanDirectory(file);
- 259
+ 257 4 if (file.exists()) {
+ 258 4 if (file.isDirectory()) {
+ 259 2 scanDirectory(file);
+ 260
} else {
- 260 8 scanFile(file);
- 261
- }
+ 261 2 scanFile(file);
262
- }
- 263 16 }
- 264
-
- 265
-
- 266
-
- 267
-
- 268
-
- 269
-
- 270
- protected void scanDirectory(File dir) {
- 271 152 final File[] files = dir.listFiles();
- 272 152 if (files != null ) {
- 273 296 for (File f : files) {
- 274 144 if (f.isDirectory()) {
- 275 144 scanDirectory(f);
- 276
- } else {
- 277 0 scanFile(f);
- 278
- }
- 279
}
+ 263
+ }
+ 264 4 }
+ 265
+
+ 266
+
+ 267
+
+ 268
+
+ 269
+
+ 270
+
+ 271
+ protected void scanDirectory(File dir) {
+ 272 38 final File[] files = dir.listFiles();
+ 273 38 if (files != null ) {
+ 274 74 for (File f : files) {
+ 275 36 if (f.isDirectory()) {
+ 276 36 scanDirectory(f);
+ 277
+ } else {
+ 278 0 scanFile(f);
+ 279
+ }
280
+ }
+ 281
}
- 281 152 }
- 282
-
+ 282 38 }
283
-
+
284
-
+
285
-
+
286
-
+
287
-
+
288
+
+ 289
protected void scanFile(File file) {
- 289 8 if (!file.isFile()) {
- 290 0 final String msg = String.format("Path passed to scanFile(File) is not a file: %s. Skipping the file." , file.toString());
- 291 0 LOGGER.log(Level.FINE, msg);
- 292 0 return ;
- 293
+ 290 2 if (!file.isFile()) {
+ 291 0 final String msg = String.format("Path passed to scanFile(File) is not a file: %s. Skipping the file." , file.toString());
+ 292 0 LOGGER.log(Level.FINE, msg);
+ 293 0 return ;
+ 294
}
- 294 8 final String fileName = file.getName();
- 295 8 final String extension = FileUtils.getFileExtension(fileName);
- 296 8 if (extension != null ) {
- 297 8 if (supportsExtension(extension)) {
- 298 8 final Dependency dependency = new Dependency(file);
- 299 8 dependencies.add(dependency);
- 300 8 }
- 301
+ 295 2 final String fileName = file.getName();
+ 296 2 final String extension = FileUtils.getFileExtension(fileName);
+ 297 2 if (extension != null ) {
+ 298 2 if (supportsExtension(extension)) {
+ 299 2 final Dependency dependency = new Dependency(file);
+ 300 2 dependencies.add(dependency);
+ 301 2 }
+ 302
} else {
- 302 0 final String msg = String.format("No file extension found on file '%s'. The file was not analyzed." ,
- 303
+ 303 0 final String msg = String.format("No file extension found on file '%s'. The file was not analyzed." ,
+ 304
file.toString());
- 304 0 LOGGER.log(Level.FINEST, msg);
- 305
+ 305 0 LOGGER.log(Level.FINEST, msg);
+ 306
}
- 306 8 }
- 307
-
+ 307 2 }
308
-
+
309
-
+
310
-
+
311
- public void analyzeDependencies() {
+
312
-
+ public void analyzeDependencies() {
313
+
+ 314
try {
- 314 4 ensureDataExists();
- 315 0 } catch (NoDataException ex) {
- 316 0 final String msg = String.format("%s%n%nUnable to continue dependency-check analysis." , ex.getMessage());
- 317 0 LOGGER.log(Level.SEVERE, msg);
- 318 0 LOGGER.log(Level.FINE, null , ex);
- 319 0 return ;
- 320 0 } catch (DatabaseException ex) {
- 321 0 final String msg = String.format("%s%n%nUnable to continue dependency-check analysis." , ex.getMessage());
- 322 0 LOGGER.log(Level.SEVERE, msg);
- 323 0 LOGGER.log(Level.FINE, null , ex);
- 324 0 return ;
- 325
+ 315 1 ensureDataExists();
+ 316 0 } catch (NoDataException ex) {
+ 317 0 final String msg = String.format("%s%n%nUnable to continue dependency-check analysis." , ex.getMessage());
+ 318 0 LOGGER.log(Level.SEVERE, msg);
+ 319 0 LOGGER.log(Level.FINE, null , ex);
+ 320 0 return ;
+ 321 0 } catch (DatabaseException ex) {
+ 322 0 final String msg = String.format("%s%n%nUnable to continue dependency-check analysis." , ex.getMessage());
+ 323 0 LOGGER.log(Level.SEVERE, msg);
+ 324 0 LOGGER.log(Level.FINE, null , ex);
+ 325 0 return ;
+ 326
- 326 4 }
- 327
+ 327 1 }
+ 328
- 328 4 final String logHeader = String.format("%n"
- 329
- + "----------------------------------------------------%n"
+ 329 1 final String logHeader = String.format("%n"
330
- + "BEGIN ANALYSIS%n"
- 331
- + "----------------------------------------------------" );
- 332 4 LOGGER.log(Level.FINE, logHeader);
- 333 4 LOGGER.log(Level.INFO, "Analysis Starting" );
- 334
-
- 335
-
- 336 40 for (AnalysisPhase phase : AnalysisPhase.values()) {
- 337 36 final List<Analyzer> analyzerList = analyzers.get(phase);
- 338
-
- 339 36 for (Analyzer a : analyzerList) {
- 340 52 initializeAnalyzer(a);
- 341
-
- 342
-
- 343
-
- 344
-
- 345
-
- 346 52 final String msg = String.format("Begin Analyzer '%s'" , a.getName());
- 347 52 LOGGER.log(Level.FINE, msg);
- 348 52 final Set<Dependency> dependencySet = new HashSet<Dependency>();
- 349 52 dependencySet.addAll(dependencies);
- 350 52 for (Dependency d : dependencySet) {
- 351 104 boolean shouldAnalyze = true ;
- 352 104 if (a instanceof FileTypeAnalyzer) {
- 353 40 final FileTypeAnalyzer fAnalyzer = (FileTypeAnalyzer) a;
- 354 40 shouldAnalyze = fAnalyzer.supportsExtension(d.getFileExtension());
- 355
- }
- 356 104 if (shouldAnalyze) {
- 357 80 final String msgFile = String.format("Begin Analysis of '%s'" , d.getActualFilePath());
- 358 80 LOGGER.log(Level.FINE, msgFile);
- 359
- try {
- 360 80 a.analyze(d, this );
- 361 0 } catch (AnalysisException ex) {
- 362 0 final String exMsg = String.format("An error occurred while analyzing '%s'." , d.getActualFilePath());
- 363 0 LOGGER.log(Level.WARNING, exMsg);
- 364 0 LOGGER.log(Level.FINE, "" , ex);
- 365 0 } catch (Throwable ex) {
- 366 0 final String axMsg = String.format("An unexpected error occurred during analysis of '%s'" , d.getActualFilePath());
- 367
-
- 368 0 LOGGER.log(Level.WARNING, axMsg);
- 369 0 LOGGER.log(Level.FINE, "" , ex);
- 370 80 }
- 371
- }
- 372 104 }
- 373 52 }
- 374
- }
- 375 40 for (AnalysisPhase phase : AnalysisPhase.values()) {
- 376 36 final List<Analyzer> analyzerList = analyzers.get(phase);
- 377
-
- 378 36 for (Analyzer a : analyzerList) {
- 379 52 closeAnalyzer(a);
- 380 52 }
- 381
- }
- 382
-
- 383 4 final String logFooter = String.format("%n"
- 384
+ "----------------------------------------------------%n"
- 385
- + "END ANALYSIS%n"
- 386
+ 331
+ + "BEGIN ANALYSIS%n"
+ 332
+ "----------------------------------------------------" );
- 387 4 LOGGER.log(Level.FINE, logFooter);
- 388 4 LOGGER.log(Level.INFO, "Analysis Complete" );
- 389 4 }
- 390
+ 333 1 LOGGER.log(Level.FINE, logHeader);
+ 334 1 LOGGER.log(Level.INFO, "Analysis Starting" );
+ 335
+ 336
+
+ 337 10 for (AnalysisPhase phase : AnalysisPhase.values()) {
+ 338 9 final List<Analyzer> analyzerList = analyzers.get(phase);
+ 339
+
+ 340 9 for (Analyzer a : analyzerList) {
+ 341 13 initializeAnalyzer(a);
+ 342
+
+ 343
+
+ 344
+
+ 345
+
+ 346
+
+ 347 13 final String msg = String.format("Begin Analyzer '%s'" , a.getName());
+ 348 13 LOGGER.log(Level.FINE, msg);
+ 349 13 final Set<Dependency> dependencySet = new HashSet<Dependency>();
+ 350 13 dependencySet.addAll(dependencies);
+ 351 13 for (Dependency d : dependencySet) {
+ 352 26 boolean shouldAnalyze = true ;
+ 353 26 if (a instanceof FileTypeAnalyzer) {
+ 354 10 final FileTypeAnalyzer fAnalyzer = (FileTypeAnalyzer) a;
+ 355 10 shouldAnalyze = fAnalyzer.supportsExtension(d.getFileExtension());
+ 356
+ }
+ 357 26 if (shouldAnalyze) {
+ 358 20 final String msgFile = String.format("Begin Analysis of '%s'" , d.getActualFilePath());
+ 359 20 LOGGER.log(Level.FINE, msgFile);
+ 360
+ try {
+ 361 20 a.analyze(d, this );
+ 362 0 } catch (AnalysisException ex) {
+ 363 0 final String exMsg = String.format("An error occurred while analyzing '%s'." , d.getActualFilePath());
+ 364 0 LOGGER.log(Level.WARNING, exMsg);
+ 365 0 LOGGER.log(Level.FINE, "" , ex);
+ 366 0 } catch (Throwable ex) {
+ 367 0 final String axMsg = String.format("An unexpected error occurred during analysis of '%s'" , d.getActualFilePath());
+ 368
+
+ 369 0 LOGGER.log(Level.WARNING, axMsg);
+ 370 0 LOGGER.log(Level.FINE, "" , ex);
+ 371 20 }
+ 372
+ }
+ 373 26 }
+ 374 13 }
+ 375
+ }
+ 376 10 for (AnalysisPhase phase : AnalysisPhase.values()) {
+ 377 9 final List<Analyzer> analyzerList = analyzers.get(phase);
+ 378
+
+ 379 9 for (Analyzer a : analyzerList) {
+ 380 13 closeAnalyzer(a);
+ 381 13 }
+ 382
+ }
+ 383
+
+ 384 1 final String logFooter = String.format("%n"
+ 385
+ + "----------------------------------------------------%n"
+ 386
+ + "END ANALYSIS%n"
+ 387
+ + "----------------------------------------------------" );
+ 388 1 LOGGER.log(Level.FINE, logFooter);
+ 389 1 LOGGER.log(Level.INFO, "Analysis Complete" );
+ 390 1 }
391
-
+
392
-
+
393
-
+
394
-
+
395
-
+
396
- private void initializeAnalyzer(Analyzer analyzer) {
+
397
+ private void initializeAnalyzer(Analyzer analyzer) {
+ 398
try {
- 398 52 final String msg = String.format("Initializing %s" , analyzer.getName());
- 399 52 LOGGER.log(Level.FINE, msg);
- 400 52 analyzer.initialize();
- 401 0 } catch (Throwable ex) {
- 402 0 final String msg = String.format("Exception occurred initializing %s." , analyzer.getName());
- 403 0 LOGGER.log(Level.SEVERE, msg);
- 404 0 LOGGER.log(Level.FINE, null , ex);
- 405
+ 399 13 final String msg = String.format("Initializing %s" , analyzer.getName());
+ 400 13 LOGGER.log(Level.FINE, msg);
+ 401 13 analyzer.initialize();
+ 402 0 } catch (Throwable ex) {
+ 403 0 final String msg = String.format("Exception occurred initializing %s." , analyzer.getName());
+ 404 0 LOGGER.log(Level.SEVERE, msg);
+ 405 0 LOGGER.log(Level.FINE, null , ex);
+ 406
try {
- 406 0 analyzer.close();
- 407 0 } catch (Throwable ex1) {
- 408 0 LOGGER.log(Level.FINEST, null , ex1);
- 409 0 }
- 410 52 }
- 411 52 }
- 412
-
+ 407 0 analyzer.close();
+ 408 0 } catch (Throwable ex1) {
+ 409 0 LOGGER.log(Level.FINEST, null , ex1);
+ 410 0 }
+ 411 13 }
+ 412 13 }
413
-
+
414
-
+
415
-
+
416
-
+
417
-
+
418
+
+ 419
private void closeAnalyzer(Analyzer analyzer) {
- 419 52 final String msg = String.format("Closing Analyzer '%s'" , analyzer.getName());
- 420 52 LOGGER.log(Level.FINE, msg);
- 421
+ 420 13 final String msg = String.format("Closing Analyzer '%s'" , analyzer.getName());
+ 421 13 LOGGER.log(Level.FINE, msg);
+ 422
try {
- 422 52 analyzer.close();
- 423 0 } catch (Throwable ex) {
- 424 0 LOGGER.log(Level.FINEST, null , ex);
- 425 52 }
- 426 52 }
- 427
-
+ 423 13 analyzer.close();
+ 424 0 } catch (Throwable ex) {
+ 425 0 LOGGER.log(Level.FINEST, null , ex);
+ 426 13 }
+ 427 13 }
428
-
+
429
-
+
430
-
+
431
+
+ 432
private void doUpdates() {
- 432 0 final UpdateService service = new UpdateService(serviceClassLoader);
- 433 0 final Iterator<CachedWebDataSource> iterator = service.getDataSources();
- 434 0 while (iterator.hasNext()) {
- 435 0 final CachedWebDataSource source = iterator.next();
- 436
+ 433 0 final UpdateService service = new UpdateService(serviceClassLoader);
+ 434 0 final Iterator<CachedWebDataSource> iterator = service.getDataSources();
+ 435 0 while (iterator.hasNext()) {
+ 436 0 final CachedWebDataSource source = iterator.next();
+ 437
try {
- 437 0 source.update();
- 438 0 } catch (UpdateException ex) {
- 439 0 LOGGER.log(Level.WARNING,
- 440
+ 438 0 source.update();
+ 439 0 } catch (UpdateException ex) {
+ 440 0 LOGGER.log(Level.WARNING,
+ 441
"Unable to update Cached Web DataSource, using local data instead. Results may not include recent vulnerabilities." );
- 441 0 LOGGER.log(Level.FINE,
- 442
+ 442 0 LOGGER.log(Level.FINE,
+ 443
String.format("Unable to update details for %s" , source.getClass().getName()), ex);
- 443 0 }
- 444 0 }
- 445 0 }
- 446
-
+ 444 0 }
+ 445 0 }
+ 446 0 }
447
-
+
448
-
+
449
-
+
450
-
+
451
-
+
452
+
+ 453
public List<Analyzer> getAnalyzers() {
- 453 0 final List<Analyzer> ret = new ArrayList<Analyzer>();
- 454 0 for (AnalysisPhase phase : AnalysisPhase.values()) {
- 455 0 final List<Analyzer> analyzerList = analyzers.get(phase);
- 456 0 ret.addAll(analyzerList);
- 457
+ 454 0 final List<Analyzer> ret = new ArrayList<Analyzer>();
+ 455 0 for (AnalysisPhase phase : AnalysisPhase.values()) {
+ 456 0 final List<Analyzer> analyzerList = analyzers.get(phase);
+ 457 0 ret.addAll(analyzerList);
+ 458
}
- 458 0 return ret;
- 459
- }
+ 459 0 return ret;
460
-
- 461
-
- 462
-
- 463
-
- 464
-
- 465
-
- 466
-
- 467
- public boolean supportsExtension(String ext) {
- 468 3404 if (ext == null ) {
- 469 12 return false ;
- 470
- }
- 471 3392 boolean scan = false ;
- 472 3392 for (FileTypeAnalyzer a : this .fileTypeAnalyzers) {
- 473
-
- 474
-
- 475 16960 scan |= a.supportsExtension(ext);
- 476 16960 }
- 477 3392 return scan;
- 478
}
- 479
+ 461
- 480
+ 462
- 481
-
- 482
+ 463
+
+ 464
- 483
-
- 484
-
- 485
+ 465
+
+ 466
+
+ 467
- 486
- private void ensureDataExists() throws NoDataException, DatabaseException {
- 487 4 final CpeMemoryIndex cpe = CpeMemoryIndex.getInstance();
- 488 4 final CveDB cve = new CveDB();
- 489
-
- 490
- try {
- 491 4 cve.open();
- 492 4 cpe.open(cve);
- 493 0 } catch (IndexException ex) {
- 494 0 throw new NoDataException(ex.getMessage(), ex);
- 495 0 } catch (DatabaseException ex) {
- 496 0 throw new NoDataException(ex.getMessage(), ex);
- 497
- } finally {
- 498 4 cve.close();
- 499 4 }
- 500 4 if (cpe.numDocs() <= 0) {
- 501 0 cpe.close();
- 502 0 throw new NoDataException("No documents exist" );
- 503
+ 468
+ public boolean supportsExtension(String ext) {
+ 469 851 if (ext == null ) {
+ 470 3 return false ;
+ 471
}
- 504 4 }
- 505
+ 472 848 boolean scan = false ;
+ 473 848 for (FileTypeAnalyzer a : this .fileTypeAnalyzers) {
+ 474
+
+ 475
+
+ 476 4240 scan |= a.supportsExtension(ext);
+ 477 4240 }
+ 478 848 return scan;
+ 479
+ }
+ 480
+
+ 481
+
+ 482
+
+ 483
+
+ 484
+
+ 485
+
+ 486
+
+ 487
+ private void ensureDataExists() throws NoDataException, DatabaseException {
+ 488 1 final CpeMemoryIndex cpe = CpeMemoryIndex.getInstance();
+ 489 1 final CveDB cve = new CveDB();
+ 490
+
+ 491
+ try {
+ 492 1 cve.open();
+ 493 1 cpe.open(cve);
+ 494 0 } catch (IndexException ex) {
+ 495 0 throw new NoDataException(ex.getMessage(), ex);
+ 496 0 } catch (DatabaseException ex) {
+ 497 0 throw new NoDataException(ex.getMessage(), ex);
+ 498
+ } finally {
+ 499 1 cve.close();
+ 500 1 }
+ 501 1 if (cpe.numDocs() <= 0) {
+ 502 0 cpe.close();
+ 503 0 throw new NoDataException("No documents exist" );
+ 504
+ }
+ 505 1 }
+ 506
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.agent.DependencyCheckScanAgent.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.agent.DependencyCheckScanAgent.html
index fcab2f605..1a2ea361d 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.agent.DependencyCheckScanAgent.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.agent.DependencyCheckScanAgent.html
@@ -1867,6 +1867,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractAnalyzer.html
index 9960059cb..e64632f4f 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractAnalyzer.html
@@ -83,7 +83,7 @@
public void initialize() throws Exception {
33
- 34 40 }
+ 34 10 }
35
36
@@ -102,11 +102,11 @@
public void close() throws Exception {
43
- 44 60 }
+ 44 15 }
45
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractFileTypeAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractFileTypeAnalyzer.html
index 8966899b7..b78c0cb9e 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractFileTypeAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractFileTypeAnalyzer.html
@@ -101,19 +101,19 @@
42
- 43 116 public AbstractFileTypeAnalyzer() {
- 44 116 final String key = getAnalyzerEnabledSettingKey();
+ 43 29 public AbstractFileTypeAnalyzer() {
+ 44 29 final String key = getAnalyzerEnabledSettingKey();
45
try {
- 46 116 enabled = Settings.getBoolean(key, true );
+ 46 29 enabled = Settings.getBoolean(key, true );
47 0 } catch (InvalidSettingException ex) {
48 0 String msg = String.format("Invalid setting for property '%s'" , key);
49 0 LOGGER.log(Level.WARNING, msg);
50 0 LOGGER.log(Level.FINE, "" , ex);
51 0 msg = String.format("%s has been disabled" , getName());
52 0 LOGGER.log(Level.WARNING, msg);
- 53 116 }
- 54 116 }
+ 53 29 }
+ 54 29 }
55
56
@@ -126,14 +126,14 @@
60
- 61 4 private static final Logger LOGGER = Logger.getLogger(AbstractFileTypeAnalyzer.class .getName());
+ 61 1 private static final Logger LOGGER = Logger.getLogger(AbstractFileTypeAnalyzer.class .getName());
62
63
64
- 65 116 private boolean filesMatched = false ;
+ 65 29 private boolean filesMatched = false ;
66
67
@@ -178,7 +178,7 @@
87
- 88 116 private boolean enabled = true ;
+ 88 29 private boolean enabled = true ;
89
90
@@ -321,14 +321,14 @@
@Override
159
public final void initialize() throws Exception {
- 160 40 if (filesMatched) {
- 161 28 initializeFileTypeAnalyzer();
+ 160 10 if (filesMatched) {
+ 161 7 initializeFileTypeAnalyzer();
162
} else {
- 163 12 enabled = false ;
+ 163 3 enabled = false ;
164
}
- 165 40 }
+ 165 10 }
166
167
@@ -351,11 +351,11 @@
@Override
176
public final void analyze(Dependency dependency, Engine engine) throws AnalysisException {
- 177 40 if (enabled) {
- 178 40 analyzeFileType(dependency, engine);
+ 177 10 if (enabled) {
+ 178 10 analyzeFileType(dependency, engine);
179
}
- 180 36 }
+ 180 9 }
181
182
@@ -374,12 +374,12 @@
@Override
189
public final boolean supportsExtension(String extension) {
- 190 17036 if (!enabled) {
- 191 3416 return false ;
+ 190 4259 if (!enabled) {
+ 191 854 return false ;
192
}
- 193 13620 final Set<String> ext = getSupportedExtensions();
- 194 13620 if (ext == null ) {
+ 193 3405 final Set<String> ext = getSupportedExtensions();
+ 194 3405 if (ext == null ) {
195 0 final String msg = String.format("The '%s' analyzer is misconfigured and does not have any file extensions;"
196
+ " it will be disabled" , getName());
@@ -387,12 +387,12 @@
198 0 return false ;
199
} else {
- 200 13620 final boolean match = ext.contains(extension);
- 201 13620 if (match) {
- 202 64 filesMatched = match;
+ 200 3405 final boolean match = ext.contains(extension);
+ 201 3405 if (match) {
+ 202 16 filesMatched = match;
203
}
- 204 13620 return match;
+ 204 3405 return match;
205
}
206
@@ -429,11 +429,11 @@
222
protected static Set<String> newHashSet(String... strings) {
- 223 44 final Set<String> set = new HashSet<String>();
+ 223 11 final Set<String> set = new HashSet<String>();
224
- 225 44 Collections.addAll(set, strings);
- 226 44 return set;
+ 225 11 Collections.addAll(set, strings);
+ 226 11 return set;
227
}
228
@@ -442,6 +442,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractSuppressionAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractSuppressionAnalyzer.html
index 3c1d40a28..75b8720d0 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractSuppressionAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AbstractSuppressionAnalyzer.html
@@ -111,7 +111,7 @@
47
- 48 4 private static final Logger LOGGER = Logger.getLogger(AbstractSuppressionAnalyzer.class .getName());
+ 48 1 private static final Logger LOGGER = Logger.getLogger(AbstractSuppressionAnalyzer.class .getName());
49
50
@@ -150,9 +150,9 @@
@Override
67
public void initialize() throws Exception {
- 68 20 super .initialize();
- 69 20 loadSuppressionData();
- 70 16 }
+ 68 5 super .initialize();
+ 69 5 loadSuppressionData();
+ 70 4 }
71
72
@@ -213,46 +213,46 @@
100
private void loadSuppressionData() throws SuppressionParseException {
- 101 20 final SuppressionParser parser = new SuppressionParser();
- 102 20 File file = null ;
+ 101 5 final SuppressionParser parser = new SuppressionParser();
+ 102 5 File file = null ;
103
try {
- 104 20 rules = parser.parseSuppressionRules(this .getClass().getClassLoader().getResourceAsStream("dependencycheck-base-suppression.xml" ));
+ 104 5 rules = parser.parseSuppressionRules(this .getClass().getClassLoader().getResourceAsStream("dependencycheck-base-suppression.xml" ));
105 0 } catch (SuppressionParseException ex) {
106 0 LOGGER.log(Level.FINE, "Unable to parse the base suppression data file" , ex);
- 107 20 }
- 108 20 final String suppressionFilePath = Settings.getString(Settings.KEYS.SUPPRESSION_FILE);
- 109 20 if (suppressionFilePath == null ) {
- 110 8 return ;
+ 107 5 }
+ 108 5 final String suppressionFilePath = Settings.getString(Settings.KEYS.SUPPRESSION_FILE);
+ 109 5 if (suppressionFilePath == null ) {
+ 110 2 return ;
111
}
- 112 12 boolean deleteTempFile = false ;
+ 112 3 boolean deleteTempFile = false ;
113
try {
- 114 12 final Pattern uriRx = Pattern.compile("^(https?|file)\\:.*" , Pattern.CASE_INSENSITIVE);
- 115 12 if (uriRx.matcher(suppressionFilePath).matches()) {
- 116 4 deleteTempFile = true ;
- 117 4 file = FileUtils.getTempFile("suppression" , "xml" );
- 118 4 final URL url = new URL(suppressionFilePath);
+ 114 3 final Pattern uriRx = Pattern.compile("^(https?|file)\\:.*" , Pattern.CASE_INSENSITIVE);
+ 115 3 if (uriRx.matcher(suppressionFilePath).matches()) {
+ 116 1 deleteTempFile = true ;
+ 117 1 file = FileUtils.getTempFile("suppression" , "xml" );
+ 118 1 final URL url = new URL(suppressionFilePath);
119
try {
- 120 4 Downloader.fetchFile(url, file, false );
+ 120 1 Downloader.fetchFile(url, file, false );
121 0 } catch (DownloadFailedException ex) {
122 0 Downloader.fetchFile(url, file, true );
- 123 4 }
- 124 4 } else {
- 125 8 file = new File(suppressionFilePath);
- 126 8 if (!file.exists()) {
- 127 8 final InputStream suppressionsFromClasspath = this .getClass().getClassLoader().getResourceAsStream(suppressionFilePath);
- 128 8 if (suppressionsFromClasspath != null ) {
- 129 4 deleteTempFile = true ;
- 130 4 file = FileUtils.getTempFile("suppression" , "xml" );
+ 123 1 }
+ 124 1 } else {
+ 125 2 file = new File(suppressionFilePath);
+ 126 2 if (!file.exists()) {
+ 127 2 final InputStream suppressionsFromClasspath = this .getClass().getClassLoader().getResourceAsStream(suppressionFilePath);
+ 128 2 if (suppressionsFromClasspath != null ) {
+ 129 1 deleteTempFile = true ;
+ 130 1 file = FileUtils.getTempFile("suppression" , "xml" );
131
try {
- 132 4 org.apache.commons.io.FileUtils.copyInputStreamToFile(suppressionsFromClasspath, file);
+ 132 1 org.apache.commons.io.FileUtils.copyInputStreamToFile(suppressionsFromClasspath, file);
133 0 } catch (IOException ex) {
134 0 throwSuppressionParseException("Unable to locate suppressions file in classpath" , ex);
- 135 4 }
+ 135 1 }
136
}
137
@@ -261,37 +261,37 @@
}
139
- 140 12 if (file != null ) {
+ 140 3 if (file != null ) {
141
try {
142
- 143 12 rules.addAll(parser.parseSuppressionRules(file));
- 144 8 LOGGER.log(Level.FINE, rules.size() + " suppression rules were loaded." );
- 145 4 } catch (SuppressionParseException ex) {
- 146 4 final String msg = String.format("Unable to parse suppression xml file '%s'" , file.getPath());
- 147 4 LOGGER.log(Level.WARNING, msg);
- 148 4 LOGGER.log(Level.WARNING, ex.getMessage());
- 149 4 LOGGER.log(Level.FINE, "" , ex);
- 150 4 throw ex;
- 151 8 }
+ 143 3 rules.addAll(parser.parseSuppressionRules(file));
+ 144 2 LOGGER.log(Level.FINE, rules.size() + " suppression rules were loaded." );
+ 145 1 } catch (SuppressionParseException ex) {
+ 146 1 final String msg = String.format("Unable to parse suppression xml file '%s'" , file.getPath());
+ 147 1 LOGGER.log(Level.WARNING, msg);
+ 148 1 LOGGER.log(Level.WARNING, ex.getMessage());
+ 149 1 LOGGER.log(Level.FINE, "" , ex);
+ 150 1 throw ex;
+ 151 2 }
152
}
153 0 } catch (DownloadFailedException ex) {
154 0 throwSuppressionParseException("Unable to fetch the configured suppression file" , ex);
155 0 } catch (MalformedURLException ex) {
156 0 throwSuppressionParseException("Configured suppression file has an invalid URL" , ex);
- 157 4 } catch (IOException ex) {
- 158 4 throwSuppressionParseException("Unable to create temp file for suppressions" , ex);
+ 157 1 } catch (IOException ex) {
+ 158 1 throwSuppressionParseException("Unable to create temp file for suppressions" , ex);
159
} finally {
- 160 12 if (deleteTempFile && file != null ) {
- 161 8 FileUtils.delete(file);
+ 160 3 if (deleteTempFile && file != null ) {
+ 161 2 FileUtils.delete(file);
162
}
163
}
- 164 8 }
+ 164 2 }
165
166
@@ -310,15 +310,15 @@
173
private void throwSuppressionParseException(String message, Exception exception) throws SuppressionParseException {
- 174 4 LOGGER.log(Level.WARNING, message);
- 175 4 LOGGER.log(Level.FINE, "" , exception);
- 176 4 throw new SuppressionParseException(message, exception);
+ 174 1 LOGGER.log(Level.WARNING, message);
+ 175 1 LOGGER.log(Level.FINE, "" , exception);
+ 176 1 throw new SuppressionParseException(message, exception);
177
}
178
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AnalysisPhase.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AnalysisPhase.html
index a80249bea..09ec25094 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AnalysisPhase.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AnalysisPhase.html
@@ -65,7 +65,7 @@
24
- 25 20 public enum AnalysisPhase {
+ 25 5 public enum AnalysisPhase {
26
27
@@ -74,67 +74,67 @@
29
- 30 4 INITIAL,
+ 30 1 INITIAL,
31
32
33
- 34 4 INFORMATION_COLLECTION,
+ 34 1 INFORMATION_COLLECTION,
35
36
37
- 38 4 PRE_IDENTIFIER_ANALYSIS,
+ 38 1 PRE_IDENTIFIER_ANALYSIS,
39
40
41
- 42 4 IDENTIFIER_ANALYSIS,
+ 42 1 IDENTIFIER_ANALYSIS,
43
44
45
- 46 4 POST_IDENTIFIER_ANALYSIS,
+ 46 1 POST_IDENTIFIER_ANALYSIS,
47
48
49
- 50 4 PRE_FINDING_ANALYSIS,
+ 50 1 PRE_FINDING_ANALYSIS,
51
52
53
- 54 4 FINDING_ANALYSIS,
+ 54 1 FINDING_ANALYSIS,
55
56
57
- 58 4 POST_FINDING_ANALYSIS,
+ 58 1 POST_FINDING_ANALYSIS,
59
60
61
- 62 4 FINAL
+ 62 1 FINAL
63
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.Analyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.Analyzer.html
index 81828e277..69b3164e0 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.Analyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.Analyzer.html
@@ -161,6 +161,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AnalyzerService.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AnalyzerService.html
index 4c4acf08c..0010080a1 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AnalyzerService.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AnalyzerService.html
@@ -97,9 +97,9 @@
40
- 41 8 public AnalyzerService(ClassLoader classLoader) {
- 42 8 loader = ServiceLoader.load(Analyzer.class , classLoader);
- 43 8 }
+ 41 2 public AnalyzerService(ClassLoader classLoader) {
+ 42 2 loader = ServiceLoader.load(Analyzer.class , classLoader);
+ 43 2 }
44
45
@@ -114,13 +114,13 @@
50
public Iterator<Analyzer> getAnalyzers() {
- 51 8 return loader.iterator();
+ 51 2 return loader.iterator();
52
}
53
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.ArchiveAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.ArchiveAnalyzer.html
index b0be520fd..0ac42c1d0 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.ArchiveAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.ArchiveAnalyzer.html
@@ -143,7 +143,7 @@
63
- 64 4 private static final Logger LOGGER = Logger.getLogger(ArchiveAnalyzer.class .getName());
+ 64 1 private static final Logger LOGGER = Logger.getLogger(ArchiveAnalyzer.class .getName());
65
66
@@ -158,7 +158,7 @@
71
- 72 4 private static int dirCount = 0;
+ 72 1 private static int dirCount = 0;
73
74
@@ -173,7 +173,7 @@
79
- 80 4 private static final int MAX_SCAN_DEPTH = Settings.getInt("archive.scan.depth" , 3);
+ 80 1 private static final int MAX_SCAN_DEPTH = Settings.getInt("archive.scan.depth" , 3);
81
82
@@ -200,14 +200,14 @@
93
- 94 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INITIAL;
+ 94 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INITIAL;
95
96
97
- 98 4 private static final Set<String> ZIPPABLES = newHashSet("zip" , "ear" , "war" , "jar" , "sar" , "apk" , "nupkg" );
+ 98 1 private static final Set<String> ZIPPABLES = newHashSet("zip" , "ear" , "war" , "jar" , "sar" , "apk" , "nupkg" );
99
100
@@ -216,7 +216,7 @@
102
- 103 4 private static final Set<String> EXTENSIONS = newHashSet("tar" , "gz" , "tgz" );
+ 103 1 private static final Set<String> EXTENSIONS = newHashSet("tar" , "gz" , "tgz" );
104
105
@@ -225,19 +225,19 @@
107
- 108 4 private static final Set<String> REMOVE_FROM_ANALYSIS = newHashSet("zip" , "tar" , "gz" , "tgz" );
+ 108 1 private static final Set<String> REMOVE_FROM_ANALYSIS = newHashSet("zip" , "tar" , "gz" , "tgz" );
109
110
static {
- 111 4 final String additionalZipExt = Settings.getString(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS);
- 112 4 if (additionalZipExt != null ) {
+ 111 1 final String additionalZipExt = Settings.getString(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS);
+ 112 1 if (additionalZipExt != null ) {
113 0 final HashSet ext = new HashSet<String>(Arrays.asList(additionalZipExt));
114 0 ZIPPABLES.addAll(ext);
115
}
- 116 4 EXTENSIONS.addAll(ZIPPABLES);
- 117 4 }
+ 116 1 EXTENSIONS.addAll(ZIPPABLES);
+ 117 1 }
118
119
@@ -254,7 +254,7 @@
@Override
125
public Set<String> getSupportedExtensions() {
- 126 3400 return EXTENSIONS;
+ 126 850 return EXTENSIONS;
127
}
128
@@ -273,7 +273,7 @@
@Override
135
public String getName() {
- 136 16 return ANALYZER_NAME;
+ 136 4 return ANALYZER_NAME;
137
}
138
@@ -292,7 +292,7 @@
@Override
145
public AnalysisPhase getAnalysisPhase() {
- 146 4 return ANALYSIS_PHASE;
+ 146 1 return ANALYSIS_PHASE;
147
}
148
@@ -313,7 +313,7 @@
@Override
156
protected String getAnalyzerEnabledSettingKey() {
- 157 8 return Settings.KEYS.ANALYZER_ARCHIVE_ENABLED;
+ 157 2 return Settings.KEYS.ANALYZER_ARCHIVE_ENABLED;
158
}
159
@@ -332,19 +332,19 @@
@Override
166
public void initializeFileTypeAnalyzer() throws Exception {
- 167 4 final File baseDir = Settings.getTempDirectory();
- 168 4 tempFileLocation = File.createTempFile("check" , "tmp" , baseDir);
- 169 4 if (!tempFileLocation.delete()) {
+ 167 1 final File baseDir = Settings.getTempDirectory();
+ 168 1 tempFileLocation = File.createTempFile("check" , "tmp" , baseDir);
+ 169 1 if (!tempFileLocation.delete()) {
170 0 final String msg = String.format("Unable to delete temporary file '%s'." , tempFileLocation.getAbsolutePath());
171 0 throw new AnalysisException(msg);
172
}
- 173 4 if (!tempFileLocation.mkdirs()) {
+ 173 1 if (!tempFileLocation.mkdirs()) {
174 0 final String msg = String.format("Unable to create directory '%s'." , tempFileLocation.getAbsolutePath());
175 0 throw new AnalysisException(msg);
176
}
- 177 4 }
+ 177 1 }
178
179
@@ -361,16 +361,16 @@
@Override
185
public void close() throws Exception {
- 186 4 if (tempFileLocation != null && tempFileLocation.exists()) {
- 187 4 LOGGER.log(Level.FINE, "Attempting to delete temporary files" );
- 188 4 final boolean success = FileUtils.delete(tempFileLocation);
- 189 4 if (!success && tempFileLocation != null & tempFileLocation.exists()) {
+ 186 1 if (tempFileLocation != null && tempFileLocation.exists()) {
+ 187 1 LOGGER.log(Level.FINE, "Attempting to delete temporary files" );
+ 188 1 final boolean success = FileUtils.delete(tempFileLocation);
+ 189 1 if (!success && tempFileLocation != null & tempFileLocation.exists()) {
190 0 LOGGER.log(Level.WARNING, "Failed to delete some temporary files, see the log for more details" );
191
}
192
}
- 193 4 }
+ 193 1 }
194
195
@@ -393,17 +393,17 @@
@Override
204
public void analyzeFileType(Dependency dependency, Engine engine) throws AnalysisException {
- 205 8 final File f = new File(dependency.getActualFilePath());
- 206 8 final File tmpDir = getNextTempDirectory();
- 207 8 extractFiles(f, tmpDir, engine);
+ 205 2 final File f = new File(dependency.getActualFilePath());
+ 206 2 final File tmpDir = getNextTempDirectory();
+ 207 2 extractFiles(f, tmpDir, engine);
208
209
- 210 8 List<Dependency> dependencies = new ArrayList<Dependency>(engine.getDependencies());
- 211 8 engine.scan(tmpDir);
- 212 8 List<Dependency> newDependencies = engine.getDependencies();
- 213 8 if (dependencies.size() != newDependencies.size()) {
+ 210 2 List<Dependency> dependencies = new ArrayList<Dependency>(engine.getDependencies());
+ 211 2 engine.scan(tmpDir);
+ 212 2 List<Dependency> newDependencies = engine.getDependencies();
+ 213 2 if (dependencies.size() != newDependencies.size()) {
214
215 0 final Set<Dependency> dependencySet = new HashSet<Dependency>();
@@ -443,7 +443,7 @@
238 0 }
239
}
- 240 8 if (this .REMOVE_FROM_ANALYSIS.contains(dependency.getFileExtension())) {
+ 240 2 if (this .REMOVE_FROM_ANALYSIS.contains(dependency.getFileExtension())) {
241 0 if ("zip" .equals(dependency.getFileExtension()) && isZipFileActuallyJarFile(dependency)) {
242 0 final File tdir = getNextTempDirectory();
243 0 final String fileName = dependency.getFileName();
@@ -486,8 +486,8 @@
272 0 engine.getDependencies().remove(dependency);
273
}
- 274 8 Collections.sort(engine.getDependencies());
- 275 8 }
+ 274 2 Collections.sort(engine.getDependencies());
+ 275 2 }
276
277
@@ -504,20 +504,20 @@
283
private File getNextTempDirectory() throws AnalysisException {
- 284 8 dirCount += 1;
- 285 8 final File directory = new File(tempFileLocation, String.valueOf(dirCount));
+ 284 2 dirCount += 1;
+ 285 2 final File directory = new File(tempFileLocation, String.valueOf(dirCount));
286
- 287 8 if (directory.exists()) {
+ 287 2 if (directory.exists()) {
288 0 return getNextTempDirectory();
289
}
- 290 8 if (!directory.mkdirs()) {
+ 290 2 if (!directory.mkdirs()) {
291 0 final String msg = String.format("Unable to create temp directory '%s'." , directory.getAbsolutePath());
292 0 throw new AnalysisException(msg);
293
}
- 294 8 return directory;
+ 294 2 return directory;
295
}
296
@@ -540,25 +540,25 @@
305
private void extractFiles(File archive, File destination, Engine engine) throws AnalysisException {
- 306 8 if (archive == null || destination == null ) {
+ 306 2 if (archive == null || destination == null ) {
307 0 return ;
308
}
309
- 310 8 FileInputStream fis = null ;
+ 310 2 FileInputStream fis = null ;
311
try {
- 312 8 fis = new FileInputStream(archive);
+ 312 2 fis = new FileInputStream(archive);
313 0 } catch (FileNotFoundException ex) {
314 0 LOGGER.log(Level.FINE, null , ex);
315 0 throw new AnalysisException("Archive file was not found." , ex);
- 316 8 }
- 317 8 final String archiveExt = FileUtils.getFileExtension(archive.getName()).toLowerCase();
+ 316 2 }
+ 317 2 final String archiveExt = FileUtils.getFileExtension(archive.getName()).toLowerCase();
318
try {
- 319 8 if (ZIPPABLES.contains(archiveExt)) {
- 320 8 extractArchive(new ZipArchiveInputStream(new BufferedInputStream(fis)), destination, engine);
+ 319 2 if (ZIPPABLES.contains(archiveExt)) {
+ 320 2 extractArchive(new ZipArchiveInputStream(new BufferedInputStream(fis)), destination, engine);
321 0 } else if ("tar" .equals(archiveExt)) {
322 0 extractArchive(new TarArchiveInputStream(new BufferedInputStream(fis)), destination, engine);
323 0 } else if ("gz" .equals(archiveExt) || "tgz" .equals(archiveExt)) {
@@ -581,12 +581,12 @@
338
} finally {
339 0 try {
- 340 8 fis.close();
+ 340 2 fis.close();
341 0 } catch (IOException ex) {
342 0 LOGGER.log(Level.FINEST, null , ex);
- 343 8 }
+ 343 2 }
344 0 }
- 345 8 }
+ 345 2 }
346
347
@@ -611,21 +611,21 @@
ArchiveEntry entry;
357
try {
- 358 3548 while ((entry = input.getNextEntry()) != null ) {
- 359 3540 if (entry.isDirectory()) {
- 360 144 final File d = new File(destination, entry.getName());
- 361 144 if (!d.exists()) {
- 362 144 if (!d.mkdirs()) {
+ 358 887 while ((entry = input.getNextEntry()) != null ) {
+ 359 885 if (entry.isDirectory()) {
+ 360 36 final File d = new File(destination, entry.getName());
+ 361 36 if (!d.exists()) {
+ 362 36 if (!d.mkdirs()) {
363 0 final String msg = String.format("Unable to create directory '%s'." , d.getAbsolutePath());
364 0 throw new AnalysisException(msg);
365
}
366
}
- 367 144 } else {
- 368 3396 final File file = new File(destination, entry.getName());
- 369 3396 final String ext = FileUtils.getFileExtension(file.getName());
- 370 3396 if (engine.supportsExtension(ext)) {
+ 367 36 } else {
+ 368 849 final File file = new File(destination, entry.getName());
+ 369 849 final String ext = FileUtils.getFileExtension(file.getName());
+ 370 849 if (engine.supportsExtension(ext)) {
371 0 BufferedOutputStream bos = null ;
372
FileOutputStream fos;
@@ -673,7 +673,7 @@
}
406
}
- 407 3396 }
+ 407 849 }
408
}
409 0 } catch (IOException ex) {
@@ -682,18 +682,18 @@
412 0 throw new ArchiveExtractionException(ex);
413
} finally {
- 414 8 if (input != null ) {
+ 414 2 if (input != null ) {
415
try {
- 416 8 input.close();
+ 416 2 input.close();
417 0 } catch (IOException ex) {
418 0 LOGGER.log(Level.FINEST, null , ex);
- 419 8 }
+ 419 2 }
420
}
421
}
- 422 8 }
+ 422 2 }
423
424
@@ -796,6 +796,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AssemblyAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AssemblyAnalyzer.html
index 160332252..098d9f500 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AssemblyAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.AssemblyAnalyzer.html
@@ -135,14 +135,14 @@
59
- 60 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
+ 60 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
61
62
63
- 64 4 private static final Set<String> SUPPORTED_EXTENSIONS = newHashSet("dll" , "exe" );
+ 64 1 private static final Set<String> SUPPORTED_EXTENSIONS = newHashSet("dll" , "exe" );
65
66
@@ -165,7 +165,7 @@
75
- 76 4 private static final Logger LOGGER = Logger.getLogger(AssemblyAnalyzer.class .getName(), "dependencycheck-resources" );
+ 76 1 private static final Logger LOGGER = Logger.getLogger(AssemblyAnalyzer.class .getName(), "dependencycheck-resources" );
77
78
@@ -182,8 +182,8 @@
private List<String> buildArgumentList() {
84
- 85 32 final List<String> args = new ArrayList<String>();
- 86 32 if (!"\\" .equals(System.getProperty("file.separator" ))) {
+ 85 8 final List<String> args = new ArrayList<String>();
+ 86 8 if (!"\\" .equals(System.getProperty("file.separator" ))) {
87 0 if (Settings.getString(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH) != null ) {
88 0 args.add(Settings.getString(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH));
89
@@ -193,10 +193,10 @@
}
92
}
- 93 32 args.add(grokAssemblyExe.getPath());
+ 93 8 args.add(grokAssemblyExe.getPath());
94
- 95 32 return args;
+ 95 8 return args;
96
}
97
@@ -221,83 +221,83 @@
public void analyzeFileType(Dependency dependency, Engine engine)
107
throws AnalysisException {
- 108 12 if (grokAssemblyExe == null ) {
+ 108 3 if (grokAssemblyExe == null ) {
109 0 LOGGER.warning("analyzer.AssemblyAnalyzer.notdeployed" );
110 0 return ;
111
}
112
- 113 12 final List<String> args = buildArgumentList();
- 114 12 args.add(dependency.getActualFilePath());
- 115 12 final ProcessBuilder pb = new ProcessBuilder(args);
- 116 12 BufferedReader rdr = null ;
- 117 12 Document doc = null ;
+ 113 3 final List<String> args = buildArgumentList();
+ 114 3 args.add(dependency.getActualFilePath());
+ 115 3 final ProcessBuilder pb = new ProcessBuilder(args);
+ 116 3 BufferedReader rdr = null ;
+ 117 3 Document doc = null ;
118
try {
- 119 12 final Process proc = pb.start();
+ 119 3 final Process proc = pb.start();
120
- 121 12 rdr = new BufferedReader(new InputStreamReader(proc.getErrorStream(), "UTF-8" ));
- 122 12 String line = null ;
- 123 12 while (rdr.ready() && (line = rdr.readLine()) != null ) {
+ 121 3 rdr = new BufferedReader(new InputStreamReader(proc.getErrorStream(), "UTF-8" ));
+ 122 3 String line = null ;
+ 123 3 while (rdr.ready() && (line = rdr.readLine()) != null ) {
124 0 LOGGER.log(Level.WARNING, "analyzer.AssemblyAnalyzer.grokassembly.stderr" , line);
125
}
- 126 12 int rc = 0;
- 127 12 doc = builder.parse(proc.getInputStream());
+ 126 3 int rc = 0;
+ 127 3 doc = builder.parse(proc.getInputStream());
128
129
try {
- 130 12 rc = proc.waitFor();
+ 130 3 rc = proc.waitFor();
131 0 } catch (InterruptedException ie) {
132
return ;
- 133 12 }
- 134 12 if (rc == 3) {
+ 133 3 }
+ 134 3 if (rc == 3) {
135 0 LOGGER.log(Level.FINE, "analyzer.AssemblyAnalyzer.notassembly" , dependency.getActualFilePath());
136
return ;
- 137 12 } else if (rc != 0) {
- 138 4 LOGGER.log(Level.WARNING, "analyzer.AssemblyAnalyzer.grokassembly.rc" , rc);
+ 137 3 } else if (rc != 0) {
+ 138 1 LOGGER.log(Level.WARNING, "analyzer.AssemblyAnalyzer.grokassembly.rc" , rc);
139
}
140
- 141 12 final XPath xpath = XPathFactory.newInstance().newXPath();
+ 141 3 final XPath xpath = XPathFactory.newInstance().newXPath();
142
143
- 144 12 final String error = xpath.evaluate("/assembly/error" , doc);
- 145 12 if (error != null && !"" .equals(error)) {
- 146 4 throw new AnalysisException(error);
+ 144 3 final String error = xpath.evaluate("/assembly/error" , doc);
+ 145 3 if (error != null && !"" .equals(error)) {
+ 146 1 throw new AnalysisException(error);
147
}
148
- 149 8 final String version = xpath.evaluate("/assembly/version" , doc);
- 150 8 if (version != null ) {
- 151 8 dependency.getVersionEvidence().addEvidence(new Evidence("grokassembly" , "version" ,
+ 149 2 final String version = xpath.evaluate("/assembly/version" , doc);
+ 150 2 if (version != null ) {
+ 151 2 dependency.getVersionEvidence().addEvidence(new Evidence("grokassembly" , "version" ,
152
version, Confidence.HIGHEST));
153
}
154
- 155 8 final String vendor = xpath.evaluate("/assembly/company" , doc);
- 156 8 if (vendor != null ) {
- 157 8 dependency.getVendorEvidence().addEvidence(new Evidence("grokassembly" , "vendor" ,
+ 155 2 final String vendor = xpath.evaluate("/assembly/company" , doc);
+ 156 2 if (vendor != null ) {
+ 157 2 dependency.getVendorEvidence().addEvidence(new Evidence("grokassembly" , "vendor" ,
158
vendor, Confidence.HIGH));
159
}
160
- 161 8 final String product = xpath.evaluate("/assembly/product" , doc);
- 162 8 if (product != null ) {
- 163 8 dependency.getProductEvidence().addEvidence(new Evidence("grokassembly" , "product" ,
+ 161 2 final String product = xpath.evaluate("/assembly/product" , doc);
+ 162 2 if (product != null ) {
+ 163 2 dependency.getProductEvidence().addEvidence(new Evidence("grokassembly" , "product" ,
164
product, Confidence.HIGH));
165
@@ -314,18 +314,18 @@
173 0 throw new AnalysisException(xpe);
174
} finally {
- 175 12 if (rdr != null ) {
+ 175 3 if (rdr != null ) {
176
try {
- 177 12 rdr.close();
+ 177 3 rdr.close();
178 0 } catch (IOException ex) {
179 0 LOGGER.log(Level.FINEST, "ignore" , ex);
- 180 16 }
+ 180 4 }
181
}
182
}
- 183 8 }
+ 183 2 }
184
185
@@ -342,46 +342,46 @@
@Override
191
public void initializeFileTypeAnalyzer() throws Exception {
- 192 20 final File tempFile = File.createTempFile("GKA" , ".exe" , Settings.getTempDirectory());
- 193 20 FileOutputStream fos = null ;
- 194 20 InputStream is = null ;
+ 192 5 final File tempFile = File.createTempFile("GKA" , ".exe" , Settings.getTempDirectory());
+ 193 5 FileOutputStream fos = null ;
+ 194 5 InputStream is = null ;
195
try {
- 196 20 fos = new FileOutputStream(tempFile);
- 197 20 is = AssemblyAnalyzer.class .getClassLoader().getResourceAsStream("GrokAssembly.exe" );
- 198 20 final byte [] buff = new byte [4096];
- 199 20 int bread = -1;
- 200 60 while ((bread = is.read(buff)) >= 0) {
- 201 40 fos.write(buff, 0, bread);
+ 196 5 fos = new FileOutputStream(tempFile);
+ 197 5 is = AssemblyAnalyzer.class .getClassLoader().getResourceAsStream("GrokAssembly.exe" );
+ 198 5 final byte [] buff = new byte [4096];
+ 199 5 int bread = -1;
+ 200 15 while ((bread = is.read(buff)) >= 0) {
+ 201 10 fos.write(buff, 0, bread);
202
}
- 203 20 grokAssemblyExe = tempFile;
+ 203 5 grokAssemblyExe = tempFile;
204
- 205 20 grokAssemblyExe.deleteOnExit();
- 206 20 LOGGER.log(Level.FINE, "analyzer.AssemblyAnalyzer.grokassembly.deployed" , grokAssemblyExe.getPath());
+ 205 5 grokAssemblyExe.deleteOnExit();
+ 206 5 LOGGER.log(Level.FINE, "analyzer.AssemblyAnalyzer.grokassembly.deployed" , grokAssemblyExe.getPath());
207 0 } catch (IOException ioe) {
208 0 this .setEnabled(false );
209 0 LOGGER.log(Level.WARNING, "analyzer.AssemblyAnalyzer.grokassembly.notdeployed" , ioe.getMessage());
210 0 throw new AnalysisException("Could not extract GrokAssembly.exe" , ioe);
211
} finally {
- 212 20 if (fos != null ) {
+ 212 5 if (fos != null ) {
213
try {
- 214 20 fos.close();
+ 214 5 fos.close();
215 0 } catch (Throwable e) {
216 0 LOGGER.fine("Error closing output stream" );
- 217 20 }
+ 217 5 }
218
}
- 219 20 if (is != null ) {
+ 219 5 if (is != null ) {
220
try {
- 221 20 is.close();
+ 221 5 is.close();
222 0 } catch (Throwable e) {
223 0 LOGGER.fine("Error closing input stream" );
- 224 20 }
+ 224 5 }
225
}
226
@@ -390,24 +390,24 @@
228
- 229 20 final List<String> args = buildArgumentList();
- 230 20 BufferedReader rdr = null ;
+ 229 5 final List<String> args = buildArgumentList();
+ 230 5 BufferedReader rdr = null ;
231
try {
- 232 20 final ProcessBuilder pb = new ProcessBuilder(args);
- 233 20 final Process p = pb.start();
+ 232 5 final ProcessBuilder pb = new ProcessBuilder(args);
+ 233 5 final Process p = pb.start();
234
- 235 20 rdr = new BufferedReader(new InputStreamReader(p.getErrorStream(), "UTF-8" ));
- 236 20 while (rdr.ready() && rdr.readLine() != null ) {
+ 235 5 rdr = new BufferedReader(new InputStreamReader(p.getErrorStream(), "UTF-8" ));
+ 236 5 while (rdr.ready() && rdr.readLine() != null ) {
237
238
}
- 239 20 final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(p.getInputStream());
- 240 20 final XPath xpath = XPathFactory.newInstance().newXPath();
- 241 20 final String error = xpath.evaluate("/assembly/error" , doc);
- 242 20 if (p.waitFor() != 1 || error == null || "" .equals(error)) {
+ 239 5 final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(p.getInputStream());
+ 240 5 final XPath xpath = XPathFactory.newInstance().newXPath();
+ 241 5 final String error = xpath.evaluate("/assembly/error" , doc);
+ 242 5 if (p.waitFor() != 1 || error == null || "" .equals(error)) {
243 0 LOGGER.warning("An error occurred with the .NET AssemblyAnalyzer, please see the log for more details." );
244 0 LOGGER.fine("GrokAssembly.exe is not working properly" );
245 0 grokAssemblyExe = null ;
@@ -428,36 +428,36 @@
}
258
} finally {
- 259 20 if (rdr != null ) {
+ 259 5 if (rdr != null ) {
260
try {
- 261 20 rdr.close();
+ 261 5 rdr.close();
262 0 } catch (IOException ex) {
263 0 LOGGER.log(Level.FINEST, "ignore" , ex);
- 264 20 }
+ 264 5 }
265
}
266
}
- 267 20 builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- 268 20 }
+ 267 5 builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ 268 5 }
269
270
@Override
271
public void close() throws Exception {
- 272 24 super .close();
+ 272 6 super .close();
273
try {
- 274 24 if (grokAssemblyExe != null && !grokAssemblyExe.delete()) {
+ 274 6 if (grokAssemblyExe != null && !grokAssemblyExe.delete()) {
275 0 grokAssemblyExe.deleteOnExit();
276
}
277 0 } catch (SecurityException se) {
278 0 LOGGER.fine("analyzer.AssemblyAnalyzer.grokassembly.notdeleted" );
- 279 24 }
- 280 24 }
+ 279 6 }
+ 280 6 }
281
282
@@ -474,7 +474,7 @@
@Override
288
public Set<String> getSupportedExtensions() {
- 289 3412 return SUPPORTED_EXTENSIONS;
+ 289 853 return SUPPORTED_EXTENSIONS;
290
}
291
@@ -493,7 +493,7 @@
@Override
298
public String getName() {
- 299 20 return ANALYZER_NAME;
+ 299 5 return ANALYZER_NAME;
300
}
301
@@ -512,7 +512,7 @@
@Override
308
public AnalysisPhase getAnalysisPhase() {
- 309 4 return ANALYSIS_PHASE;
+ 309 1 return ANALYSIS_PHASE;
310
}
311
@@ -531,13 +531,13 @@
@Override
318
protected String getAnalyzerEnabledSettingKey() {
- 319 28 return Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED;
+ 319 7 return Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED;
320
}
321
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.CPEAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.CPEAnalyzer.html
index be1d574b7..8a9b7fc3f 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.CPEAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.CPEAnalyzer.html
@@ -12,9 +12,9 @@
@@ -145,7 +145,7 @@
63
- 64 4 private static final Logger LOGGER = Logger.getLogger(CPEAnalyzer.class .getName());
+ 64 1 private static final Logger LOGGER = Logger.getLogger(CPEAnalyzer.class .getName());
65
66
@@ -228,7 +228,7 @@
@Override
105
public String getName() {
- 106 16 return "CPE Analyzer" ;
+ 106 4 return "CPE Analyzer" ;
107
}
108
@@ -247,7 +247,7 @@
@Override
115
public AnalysisPhase getAnalysisPhase() {
- 116 4 return AnalysisPhase.IDENTIFIER_ANALYSIS;
+ 116 1 return AnalysisPhase.IDENTIFIER_ANALYSIS;
117
}
118
@@ -266,8 +266,8 @@
@Override
125
public void initialize() throws Exception {
- 126 4 this .open();
- 127 4 }
+ 126 1 this .open();
+ 127 1 }
128
129
@@ -286,19 +286,19 @@
136
public void open() throws IOException, DatabaseException {
- 137 4 LOGGER.log(Level.FINE, "Opening the CVE Database" );
- 138 4 cve = new CveDB();
- 139 4 cve.open();
- 140 4 LOGGER.log(Level.FINE, "Creating the Lucene CPE Index" );
- 141 4 cpe = CpeMemoryIndex.getInstance();
+ 137 1 LOGGER.log(Level.FINE, "Opening the CVE Database" );
+ 138 1 cve = new CveDB();
+ 139 1 cve.open();
+ 140 1 LOGGER.log(Level.FINE, "Creating the Lucene CPE Index" );
+ 141 1 cpe = CpeMemoryIndex.getInstance();
142
try {
- 143 4 cpe.open(cve);
+ 143 1 cpe.open(cve);
144 0 } catch (IndexException ex) {
145 0 LOGGER.log(Level.FINE, "IndexException" , ex);
146 0 throw new DatabaseException(ex);
- 147 4 }
- 148 4 }
+ 147 1 }
+ 148 1 }
149
150
@@ -311,15 +311,15 @@
@Override
154
public void close() {
- 155 4 if (cpe != null ) {
- 156 4 cpe.close();
+ 155 1 if (cpe != null ) {
+ 156 1 cpe.close();
157
}
- 158 4 if (cve != null ) {
- 159 4 cve.close();
+ 158 1 if (cve != null ) {
+ 159 1 cve.close();
160
}
- 161 4 }
+ 161 1 }
162
163
@@ -342,389 +342,393 @@
172
protected void determineCPE(Dependency dependency) throws CorruptIndexException, IOException, ParseException {
- 173 8 Confidence confidence = Confidence.HIGHEST;
- 174
-
- 175 8 String vendors = addEvidenceWithoutDuplicateTerms("" , dependency.getVendorEvidence(), confidence);
- 176 8 String products = addEvidenceWithoutDuplicateTerms("" , dependency.getProductEvidence(), confidence);
- 177
-
- 178
-
- 179 8 addEvidenceWithoutDuplicateTerms("" , dependency.getVersionEvidence(), confidence);
- 180
-
- 181 8 int ctr = 0;
+ 173
+
+ 174 2 String vendors = "" ;
+ 175 2 String products = "" ;
+ 176 7 for (Confidence confidence : Confidence.values()) {
+ 177 6 if (dependency.getVendorEvidence().contains(confidence)) {
+ 178 6 vendors = addEvidenceWithoutDuplicateTerms(vendors, dependency.getVendorEvidence(), confidence);
+ 179
+ }
+ 180 6 if (dependency.getProductEvidence().contains(confidence)) {
+ 181 5 products = addEvidenceWithoutDuplicateTerms(products, dependency.getProductEvidence(), confidence);
182
- do {
- 183 32 if (!vendors.isEmpty() && !products.isEmpty()) {
- 184 32 final List<IndexEntry> entries = searchCPE(vendors, products, dependency.getProductEvidence().getWeighting(),
- 185
- dependency.getVendorEvidence().getWeighting());
- 186
-
- 187 32 for (IndexEntry e : entries) {
- 188 216 if (verifyEntry(e, dependency)) {
- 189 16 final String vendor = e.getVendor();
- 190 16 final String product = e.getProduct();
- 191 16 determineIdentifiers(dependency, vendor, product);
- 192
- }
- 193 216 }
- 194
}
- 195 32 confidence = reduceConfidence(confidence);
- 196 32 if (dependency.getVendorEvidence().contains(confidence)) {
- 197 32 vendors = addEvidenceWithoutDuplicateTerms(vendors, dependency.getVendorEvidence(), confidence);
- 198
- }
- 199 32 if (dependency.getProductEvidence().contains(confidence)) {
- 200 28 products = addEvidenceWithoutDuplicateTerms(products, dependency.getProductEvidence(), confidence);
- 201
- }
- 202
+ 183
- 203
+ 184
- 204 32 if (dependency.getVersionEvidence().contains(confidence)) {
- 205 24 addEvidenceWithoutDuplicateTerms("" , dependency.getVersionEvidence(), confidence);
- 206
+ 185
+
+ 186
+
+ 187
+
+ 188 6 if (!vendors.isEmpty() && !products.isEmpty()) {
+ 189 6 final List<IndexEntry> entries = searchCPE(vendors, products, dependency.getProductEvidence().getWeighting(),
+ 190
+ dependency.getVendorEvidence().getWeighting());
+ 191
+
+ 192 6 boolean identifierAdded = false ;
+ 193 6 for (IndexEntry e : entries) {
+ 194 23 if (verifyEntry(e, dependency)) {
+ 195 2 final String vendor = e.getVendor();
+ 196 2 final String product = e.getProduct();
+ 197 2 identifierAdded |= determineIdentifiers(dependency, vendor, product, confidence);
+ 198
+ }
+ 199 23 }
+ 200 6 if (identifierAdded) {
+ 201 1 break ;
+ 202
+ }
+ 203
}
- 207 32 } while ((++ctr) < 4);
- 208 8 }
- 209
+ 204
+ }
+ 205 2 }
+ 206
- 210
+ 207
- 211
+ 208
- 212
+ 209
- 213
+ 210
- 214
+ 211
- 215
+ 212
- 216
+ 213
- 217
+ 214
- 218
+ 215
- 219
+ 216
- 220
+ 217
private String addEvidenceWithoutDuplicateTerms(final String text, final EvidenceCollection ec, Confidence confidenceFilter) {
- 221 108 final String txt = (text == null ) ? "" : text;
- 222 108 final StringBuilder sb = new StringBuilder(txt.length() + (20 * ec.size()));
- 223 108 sb.append(' ' ).append(txt).append(' ' );
- 224 108 for (Evidence e : ec.iterator(confidenceFilter)) {
- 225 304 String value = e.getValue();
- 226
+ 218 11 final String txt = (text == null ) ? "" : text;
+ 219 11 final StringBuilder sb = new StringBuilder(txt.length() + (20 * ec.size()));
+ 220 11 sb.append(' ' ).append(txt).append(' ' );
+ 221 11 for (Evidence e : ec.iterator(confidenceFilter)) {
+ 222 39 String value = e.getValue();
+ 223
- 227
+ 224
- 228
+ 225
- 229 304 if (value.startsWith("http://" )) {
- 230 16 value = value.substring(7).replaceAll("\\." , " " );
+ 226 39 if (value.startsWith("http://" )) {
+ 227 2 value = value.substring(7).replaceAll("\\." , " " );
+ 228
+ }
+ 229 39 if (value.startsWith("https://" )) {
+ 230 0 value = value.substring(8).replaceAll("\\." , " " );
231
}
- 232 304 if (value.startsWith("https://" )) {
- 233 0 value = value.substring(8).replaceAll("\\." , " " );
+ 232 39 if (sb.indexOf(" " + value + " " ) < 0) {
+ 233 34 sb.append(value).append(' ' );
234
}
- 235 304 if (sb.indexOf(" " + value + " " ) < 0) {
- 236 192 sb.append(value).append(' ' );
+ 235 39 }
+ 236 11 return sb.toString().trim();
237
- }
- 238 304 }
- 239 108 return sb.toString().trim();
+ }
+ 238
+
+ 239
+
240
- }
+
241
-
- 242
-
- 243
-
- 244
-
- 245
-
- 246
-
- 247
-
- 248
- private Confidence reduceConfidence(final Confidence c) {
- 249 32 if (c == Confidence.HIGHEST) {
- 250 8 return Confidence.HIGH;
- 251 24 } else if (c == Confidence.HIGH) {
- 252 8 return Confidence.MEDIUM;
- 253
- } else {
- 254 16 return Confidence.LOW;
- 255
- }
- 256
- }
- 257
-
- 258
-
- 259
-
- 260
- 261
+ 242
- 262
+ 243
- 263
+ 244
- 264
+ 245
- 265
+ 246
- 266
+ 247
- 267
+ 248
- 268
+ 249
- 269
+ 250
- 270
+ 251
- 271
+ 252
- 272
+ 253
- 273
+ 254
- 274
+ 255
- 275
+ 256
- 276
+ 257
protected List<IndexEntry> searchCPE(String vendor, String product,
- 277
+ 258
Set<String> vendorWeightings, Set<String> productWeightings)
- 278
+ 259
throws CorruptIndexException, IOException, ParseException {
- 279 32 final ArrayList<IndexEntry> ret = new ArrayList<IndexEntry>(MAX_QUERY_RESULTS);
- 280
+ 260 6 final ArrayList<IndexEntry> ret = new ArrayList<IndexEntry>(MAX_QUERY_RESULTS);
+ 261
- 281 32 final String searchString = buildSearch(vendor, product, vendorWeightings, productWeightings);
- 282 32 if (searchString == null ) {
- 283 0 return ret;
- 284
+ 262 6 final String searchString = buildSearch(vendor, product, vendorWeightings, productWeightings);
+ 263 6 if (searchString == null ) {
+ 264 0 return ret;
+ 265
}
- 285
+ 266
- 286 32 final TopDocs docs = cpe.search(searchString, MAX_QUERY_RESULTS);
- 287 832 for (ScoreDoc d : docs.scoreDocs) {
- 288 800 if (d.score >= 0.08) {
- 289 216 final Document doc = cpe.getDocument(d.doc);
- 290 216 final IndexEntry entry = new IndexEntry();
- 291 216 entry.setVendor(doc.get(Fields.VENDOR));
- 292 216 entry.setProduct(doc.get(Fields.PRODUCT));
- 293
+ 267 6 final TopDocs docs = cpe.search(searchString, MAX_QUERY_RESULTS);
+ 268 156 for (ScoreDoc d : docs.scoreDocs) {
+ 269 150 if (d.score >= 0.08) {
+ 270 23 final Document doc = cpe.getDocument(d.doc);
+ 271 23 final IndexEntry entry = new IndexEntry();
+ 272 23 entry.setVendor(doc.get(Fields.VENDOR));
+ 273 23 entry.setProduct(doc.get(Fields.PRODUCT));
+ 274
- 294
+ 275
- 295
+ 276
- 296
+ 277
- 297
+ 278
- 298
+ 279
- 299
+ 280
- 300 216 entry.setSearchScore(d.score);
- 301 216 if (!ret.contains(entry)) {
- 302 216 ret.add(entry);
- 303
+ 281 23 entry.setSearchScore(d.score);
+ 282 23 if (!ret.contains(entry)) {
+ 283 23 ret.add(entry);
+ 284
}
- 304
+ 285
}
- 305
+ 286
}
- 306 32 return ret;
- 307
+ 287 6 return ret;
+ 288
}
- 308
+ 289
- 309
+ 290
- 310
+ 291
- 311
+ 292
- 312
+ 293
- 313
+ 294
- 314
+ 295
- 315
+ 296
- 316
+ 297
- 317
+ 298
- 318
+ 299
- 319
+ 300
- 320
+ 301
- 321
+ 302
- 322
+ 303
- 323
+ 304
protected String buildSearch(String vendor, String product,
- 324
+ 305
Set<String> vendorWeighting, Set<String> productWeightings) {
- 325 32 final String v = vendor;
- 326 32 final String p = product;
- 327 32 final StringBuilder sb = new StringBuilder(v.length() + p.length()
- 328
+ 306 6 final String v = vendor;
+ 307 6 final String p = product;
+ 308 6 final StringBuilder sb = new StringBuilder(v.length() + p.length()
+ 309
+ Fields.PRODUCT.length() + Fields.VENDOR.length() + STRING_BUILDER_BUFFER);
- 329
+ 310
- 330 32 if (!appendWeightedSearch(sb, Fields.PRODUCT, p, productWeightings)) {
- 331 0 return null ;
- 332
+ 311 6 if (!appendWeightedSearch(sb, Fields.PRODUCT, p, productWeightings)) {
+ 312 0 return null ;
+ 313
}
- 333 32 sb.append(" AND " );
- 334 32 if (!appendWeightedSearch(sb, Fields.VENDOR, v, vendorWeighting)) {
- 335 0 return null ;
- 336
+ 314 6 sb.append(" AND " );
+ 315 6 if (!appendWeightedSearch(sb, Fields.VENDOR, v, vendorWeighting)) {
+ 316 0 return null ;
+ 317
}
- 337 32 return sb.toString();
- 338
+ 318 6 return sb.toString();
+ 319
}
- 339
+ 320
- 340
+ 321
- 341
+ 322
- 342
+ 323
- 343
+ 324
- 344
+ 325
- 345
+ 326
- 346
+ 327
- 347
+ 328
- 348
+ 329
- 349
+ 330
- 350
+ 331
- 351
+ 332
private boolean appendWeightedSearch(StringBuilder sb, String field, String searchText, Set<String> weightedText) {
- 352 64 sb.append(" " ).append(field).append(":( " );
- 353
+ 333 12 sb.append(" " ).append(field).append(":( " );
+ 334
- 354 64 final String cleanText = cleanseText(searchText);
- 355
+ 335 12 final String cleanText = cleanseText(searchText);
+ 336
- 356 64 if ("" .equals(cleanText)) {
- 357 0 return false ;
- 358
+ 337 12 if ("" .equals(cleanText)) {
+ 338 0 return false ;
+ 339
}
- 359
+ 340
- 360 64 if (weightedText == null || weightedText.isEmpty()) {
- 361 0 LuceneUtils.appendEscapedLuceneQuery(sb, cleanText);
- 362
+ 341 12 if (weightedText == null || weightedText.isEmpty()) {
+ 342 0 LuceneUtils.appendEscapedLuceneQuery(sb, cleanText);
+ 343
} else {
- 363 64 final StringTokenizer tokens = new StringTokenizer(cleanText);
- 364 960 while (tokens.hasMoreElements()) {
- 365 896 final String word = tokens.nextToken();
- 366 896 String temp = null ;
- 367 896 for (String weighted : weightedText) {
- 368 1632 final String weightedStr = cleanseText(weighted);
- 369 1632 if (equalsIgnoreCaseAndNonAlpha(word, weightedStr)) {
- 370 120 temp = LuceneUtils.escapeLuceneQuery(word) + WEIGHTING_BOOST;
- 371 120 if (!word.equalsIgnoreCase(weightedStr)) {
- 372 0 temp += " " + LuceneUtils.escapeLuceneQuery(weightedStr) + WEIGHTING_BOOST;
- 373
+ 344 12 final StringTokenizer tokens = new StringTokenizer(cleanText);
+ 345 108 while (tokens.hasMoreElements()) {
+ 346 96 final String word = tokens.nextToken();
+ 347 96 String temp = null ;
+ 348 96 for (String weighted : weightedText) {
+ 349 215 final String weightedStr = cleanseText(weighted);
+ 350 215 if (equalsIgnoreCaseAndNonAlpha(word, weightedStr)) {
+ 351 22 temp = LuceneUtils.escapeLuceneQuery(word) + WEIGHTING_BOOST;
+ 352 22 if (!word.equalsIgnoreCase(weightedStr)) {
+ 353 0 temp += " " + LuceneUtils.escapeLuceneQuery(weightedStr) + WEIGHTING_BOOST;
+ 354
}
- 374
+ 355
}
- 375 1632 }
- 376 896 if (temp == null ) {
- 377 776 temp = LuceneUtils.escapeLuceneQuery(word);
- 378
+ 356 215 }
+ 357 96 if (temp == null ) {
+ 358 74 temp = LuceneUtils.escapeLuceneQuery(word);
+ 359
}
- 379 896 sb.append(" " ).append(temp);
- 380 896 }
- 381
+ 360 96 sb.append(" " ).append(temp);
+ 361 96 }
+ 362
}
- 382 64 sb.append(" ) " );
- 383 64 return true ;
- 384
+ 363 12 sb.append(" ) " );
+ 364 12 return true ;
+ 365
}
- 385
+ 366
- 386
+ 367
- 387
+ 368
- 388
+ 369
- 389
+ 370
- 390
+ 371
- 391
+ 372
- 392
+ 373
private String cleanseText(String text) {
- 393 1696 return text.replaceAll(CLEANSE_CHARACTER_RX, " " );
- 394
+ 374 227 return text.replaceAll(CLEANSE_CHARACTER_RX, " " );
+ 375
}
- 395
+ 376
- 396
+ 377
- 397
+ 378
- 398
+ 379
- 399
+ 380
- 400
+ 381
- 401
+ 382
- 402
+ 383
- 403
+ 384
private boolean equalsIgnoreCaseAndNonAlpha(String l, String r) {
- 404 1632 if (l == null || r == null ) {
- 405 0 return false ;
- 406
+ 385 215 if (l == null || r == null ) {
+ 386 0 return false ;
+ 387
}
- 407
+ 388
- 408 1632 final String left = l.replaceAll(CLEANSE_NONALPHA_RX, "" );
- 409 1632 final String right = r.replaceAll(CLEANSE_NONALPHA_RX, "" );
- 410 1632 return left.equalsIgnoreCase(right);
+ 389 215 final String left = l.replaceAll(CLEANSE_NONALPHA_RX, "" );
+ 390 215 final String right = r.replaceAll(CLEANSE_NONALPHA_RX, "" );
+ 391 215 return left.equalsIgnoreCase(right);
+ 392
+ }
+ 393
+
+ 394
+
+ 395
+
+ 396
+
+ 397
+
+ 398
+
+ 399
+
+ 400
+
+ 401
+
+ 402
+ private boolean verifyEntry(final IndexEntry entry, final Dependency dependency) {
+ 403 23 boolean isValid = false ;
+ 404
+
+ 405 23 if (collectionContainsString(dependency.getProductEvidence(), entry.getProduct())
+ 406
+ && collectionContainsString(dependency.getVendorEvidence(), entry.getVendor())) {
+ 407
+
+ 408 2 isValid = true ;
+ 409
+ }
+ 410 23 return isValid;
411
}
412
@@ -732,586 +736,580 @@
413
414
-
- 415
-
- 416
-
- 417
-
- 418
-
- 419
-
- 420
-
- 421
- private boolean verifyEntry(final IndexEntry entry, final Dependency dependency) {
- 422 216 boolean isValid = false ;
- 423
-
- 424 216 if (collectionContainsString(dependency.getProductEvidence(), entry.getProduct())
- 425
- && collectionContainsString(dependency.getVendorEvidence(), entry.getVendor())) {
- 426
-
- 427 16 isValid = true ;
- 428
- }
- 429 216 return isValid;
- 430
- }
- 431
-
- 432
-
- 433
- 434
+ 415
- 435
+ 416
- 436
+ 417
- 437
+ 418
- 438
+ 419
- 439
+ 420
private boolean collectionContainsString(EvidenceCollection ec, String text) {
- 440
+ 421
- 441
+ 422
- 442
+ 423
- 443
+ 424
- 444
+ 425
- 445
+ 426
- 446
+ 427
- 447
+ 428
- 448
+ 429
- 449
+ 430
- 450
+ 431
- 451
+ 432
- 452 236 if (text == null ) {
- 453 0 return false ;
- 454
+ 433 25 if (text == null ) {
+ 434 0 return false ;
+ 435
}
- 455 236 final String[] words = text.split("[\\s_-]" );
- 456 236 final List<String> list = new ArrayList<String>();
- 457 236 String tempWord = null ;
- 458 696 for (String word : words) {
- 459
+ 436 25 final String[] words = text.split("[\\s_-]" );
+ 437 25 final List<String> list = new ArrayList<String>();
+ 438 25 String tempWord = null ;
+ 439 83 for (String word : words) {
+ 440
- 460
+ 441
- 461
+ 442
- 462
+ 443
- 463 460 if (tempWord != null ) {
- 464 16 list.add(tempWord + word);
- 465 16 tempWord = null ;
- 466 444 } else if (word.length() <= 2) {
- 467 16 tempWord = word;
- 468
+ 444 58 if (tempWord != null ) {
+ 445 2 list.add(tempWord + word);
+ 446 2 tempWord = null ;
+ 447 56 } else if (word.length() <= 2) {
+ 448 2 tempWord = word;
+ 449
} else {
- 469 428 list.add(word);
- 470
+ 450 54 list.add(word);
+ 451
}
- 471
+ 452
}
- 472 236 if (tempWord != null && !list.isEmpty()) {
- 473 0 final String tmp = list.get(list.size() - 1) + tempWord;
- 474 0 list.add(tmp);
- 475
+ 453 25 if (tempWord != null && !list.isEmpty()) {
+ 454 0 final String tmp = list.get(list.size() - 1) + tempWord;
+ 455 0 list.add(tmp);
+ 456
}
- 476 236 boolean contains = true ;
- 477 236 for (String word : list) {
- 478 444 contains &= ec.containsUsedString(word);
- 479 444 }
- 480 236 return contains;
- 481
+ 457 25 boolean contains = true ;
+ 458 25 for (String word : list) {
+ 459 56 contains &= ec.containsUsedString(word);
+ 460 56 }
+ 461 25 return contains;
+ 462
}
- 482
+ 463
- 483
+ 464
- 484
+ 465
- 485
+ 466
- 486
+ 467
- 487
+ 468
- 488
+ 469
- 489
+ 470
- 490
+ 471
@Override
- 491
+ 472
public void analyze(Dependency dependency, Engine engine) throws AnalysisException {
- 492
+ 473
try {
- 493 8 determineCPE(dependency);
- 494 0 } catch (CorruptIndexException ex) {
- 495 0 throw new AnalysisException("CPE Index is corrupt." , ex);
- 496 0 } catch (IOException ex) {
- 497 0 throw new AnalysisException("Failure opening the CPE Index." , ex);
- 498 0 } catch (ParseException ex) {
- 499 0 throw new AnalysisException("Unable to parse the generated Lucene query for this dependency." , ex);
- 500 8 }
- 501 8 }
- 502
+ 474 2 determineCPE(dependency);
+ 475 0 } catch (CorruptIndexException ex) {
+ 476 0 throw new AnalysisException("CPE Index is corrupt." , ex);
+ 477 0 } catch (IOException ex) {
+ 478 0 throw new AnalysisException("Failure opening the CPE Index." , ex);
+ 479 0 } catch (ParseException ex) {
+ 480 0 throw new AnalysisException("Unable to parse the generated Lucene query for this dependency." , ex);
+ 481 2 }
+ 482 2 }
+ 483
- 503
+ 484
- 504
+ 485
- 505
+ 486
- 506
+ 487
- 507
+ 488
- 508
+ 489
- 509
+ 490
- 510
+ 491
- 511
+ 492
+
+ 493
- 512
+ 494
- 513
- private void determineIdentifiers(Dependency dependency, String vendor, String product) throws UnsupportedEncodingException {
- 514 16 final Set<VulnerableSoftware> cpes = cve.getCPEs(vendor, product);
- 515 16 DependencyVersion bestGuess = new DependencyVersion("-" );
- 516 16 Confidence bestGuessConf = null ;
- 517 16 final List<IdentifierMatch> collected = new ArrayList<IdentifierMatch>();
- 518 80 for (Confidence conf : Confidence.values()) {
- 519 64 for (Evidence evidence : dependency.getVersionEvidence().iterator(conf)) {
- 520 64 final DependencyVersion evVer = DependencyVersionUtil.parseVersion(evidence.getValue());
- 521 64 if (evVer == null ) {
- 522 0 continue ;
- 523
+ 495
+ private boolean determineIdentifiers(Dependency dependency, String vendor, String product, Confidence currentConfidence) throws UnsupportedEncodingException {
+ 496 2 final Set<VulnerableSoftware> cpes = cve.getCPEs(vendor, product);
+ 497 2 DependencyVersion bestGuess = new DependencyVersion("-" );
+ 498 2 Confidence bestGuessConf = null ;
+ 499 2 boolean hasBroadMatch = false ;
+ 500 2 final List<IdentifierMatch> collected = new ArrayList<IdentifierMatch>();
+ 501 10 for (Confidence conf : Confidence.values()) {
+ 502
+
+ 503
+
+ 504
+
+ 505 8 for (Evidence evidence : dependency.getVersionEvidence().iterator(conf)) {
+ 506 8 final DependencyVersion evVer = DependencyVersionUtil.parseVersion(evidence.getValue());
+ 507 8 if (evVer == null ) {
+ 508 0 continue ;
+ 509
}
- 524 64 for (VulnerableSoftware vs : cpes) {
- 525
+ 510 8 for (VulnerableSoftware vs : cpes) {
+ 511
DependencyVersion dbVer;
- 526 2496 if (vs.getRevision() != null && !vs.getRevision().isEmpty()) {
- 527 1024 dbVer = DependencyVersionUtil.parseVersion(vs.getVersion() + "." + vs.getRevision());
- 528
+ 512 312 if (vs.getRevision() != null && !vs.getRevision().isEmpty()) {
+ 513 128 dbVer = DependencyVersionUtil.parseVersion(vs.getVersion() + "." + vs.getRevision());
+ 514
} else {
- 529 1472 dbVer = DependencyVersionUtil.parseVersion(vs.getVersion());
- 530
+ 515 184 dbVer = DependencyVersionUtil.parseVersion(vs.getVersion());
+ 516
}
- 531 2496 if (dbVer == null
- 532
- || evVer.equals(dbVer)) {
- 533
-
- 534 64 final String url = String.format(NVD_SEARCH_URL, URLEncoder.encode(vs.getName(), "UTF-8" ));
- 535 64 final IdentifierMatch match = new IdentifierMatch("cpe" , vs.getName(), url, IdentifierConfidence.EXACT_MATCH, conf);
- 536 64 collected.add(match);
- 537 64 } else {
- 538
+ 517 312 if (dbVer == null ) {
+ 518 0 hasBroadMatch = true ;
+ 519 0 final String url = String.format(NVD_SEARCH_URL, URLEncoder.encode(vs.getName(), "UTF-8" ));
+ 520 0 final IdentifierMatch match = new IdentifierMatch("cpe" , vs.getName(), url, IdentifierConfidence.BROAD_MATCH, conf);
+ 521 0 collected.add(match);
+ 522 0 } else if (evVer.equals(dbVer)) {
+ 523 8 final String url = String.format(NVD_SEARCH_URL, URLEncoder.encode(vs.getName(), "UTF-8" ));
+ 524 8 final IdentifierMatch match = new IdentifierMatch("cpe" , vs.getName(), url, IdentifierConfidence.EXACT_MATCH, conf);
+ 525 8 collected.add(match);
+ 526 8 } else {
+ 527
- 539 2432 if (evVer.getVersionParts().size() <= dbVer.getVersionParts().size()
- 540
+ 528 304 if (evVer.getVersionParts().size() <= dbVer.getVersionParts().size()
+ 529
&& evVer.matchesAtLeastThreeLevels(dbVer)) {
- 541 512 if (bestGuessConf == null || bestGuessConf.compareTo(conf) > 0) {
- 542 16 if (bestGuess.getVersionParts().size() < dbVer.getVersionParts().size()) {
- 543 16 bestGuess = dbVer;
- 544 16 bestGuessConf = conf;
- 545
+ 530 64 if (bestGuessConf == null || bestGuessConf.compareTo(conf) > 0) {
+ 531 2 if (bestGuess.getVersionParts().size() < dbVer.getVersionParts().size()) {
+ 532 2 bestGuess = dbVer;
+ 533 2 bestGuessConf = conf;
+ 534
}
- 546
+ 535
}
- 547
+ 536
}
- 548
+ 537
}
- 549 2496 }
- 550 64 if (bestGuessConf == null || bestGuessConf.compareTo(conf) > 0) {
- 551 0 if (bestGuess.getVersionParts().size() < evVer.getVersionParts().size()) {
- 552 0 bestGuess = evVer;
- 553 0 bestGuessConf = conf;
- 554
+ 538 312 }
+ 539 8 if (bestGuessConf == null || bestGuessConf.compareTo(conf) > 0) {
+ 540 0 if (bestGuess.getVersionParts().size() < evVer.getVersionParts().size()) {
+ 541 0 bestGuess = evVer;
+ 542 0 bestGuessConf = conf;
+ 543
}
+ 544
+ }
+ 545 8 }
+ 546
+ }
+ 547 2 final String cpeName = String.format("cpe:/a:%s:%s:%s" , vendor, product, bestGuess.toString());
+ 548 2 String url = null ;
+ 549 2 if (hasBroadMatch) {
+ 550 0 final String cpeUrlName = String.format("cpe:/a:%s:%s" , vendor, product);
+ 551 0 url = String.format(NVD_SEARCH_URL, URLEncoder.encode(cpeUrlName, "UTF-8" ));
+ 552
+ }
+ 553 2 if (bestGuessConf == null ) {
+ 554 0 bestGuessConf = Confidence.LOW;
555
- }
- 556 64 }
- 557
}
- 558 16 final String cpeName = String.format("cpe:/a:%s:%s:%s" , vendor, product, bestGuess.toString());
- 559 16 final String url = null ;
- 560 16 if (bestGuessConf == null ) {
- 561 0 bestGuessConf = Confidence.LOW;
- 562
- }
- 563 16 final IdentifierMatch match = new IdentifierMatch("cpe" , cpeName, url, IdentifierConfidence.BEST_GUESS, bestGuessConf);
- 564 16 collected.add(match);
+ 556 2 final IdentifierMatch match = new IdentifierMatch("cpe" , cpeName, url, IdentifierConfidence.BEST_GUESS, bestGuessConf);
+ 557 2 collected.add(match);
+ 558
+
+ 559 2 Collections.sort(collected);
+ 560 2 final IdentifierConfidence bestIdentifierQuality = collected.get(0).getConfidence();
+ 561 2 final Confidence bestEvidenceQuality = collected.get(0).getEvidenceConfidence();
+ 562 2 boolean identifierAdded = false ;
+ 563 2 for (IdentifierMatch m : collected) {
+ 564 10 if (bestIdentifierQuality.equals(m.getConfidence())
565
-
- 566 16 Collections.sort(collected);
- 567 16 final IdentifierConfidence bestIdentifierQuality = collected.get(0).getConfidence();
- 568 16 final Confidence bestEvidenceQuality = collected.get(0).getEvidenceConfidence();
- 569 16 for (IdentifierMatch m : collected) {
- 570 80 if (bestIdentifierQuality.equals(m.getConfidence())
- 571
&& bestEvidenceQuality.equals(m.getEvidenceConfidence())) {
- 572 16 final Identifier i = m.getIdentifier();
- 573 16 if (bestIdentifierQuality == IdentifierConfidence.BEST_GUESS) {
- 574 0 i.setConfidence(Confidence.LOW);
- 575
+ 566 2 final Identifier i = m.getIdentifier();
+ 567 2 if (bestIdentifierQuality == IdentifierConfidence.BEST_GUESS) {
+ 568 0 i.setConfidence(Confidence.LOW);
+ 569
} else {
- 576 16 i.setConfidence(bestEvidenceQuality);
- 577
+ 570 2 i.setConfidence(bestEvidenceQuality);
+ 571
}
- 578 16 dependency.addIdentifier(i);
- 579
+ 572 2 dependency.addIdentifier(i);
+ 573 2 identifierAdded = true ;
+ 574
}
- 580 80 }
- 581 16 }
- 582
+ 575 10 }
+ 576 2 return identifierAdded;
+ 577
+ }
+ 578
- 583
+ 579
- 584
+ 580
- 585
+ 581
- 586 4 private enum IdentifierConfidence {
- 587
+ 582 1 private enum IdentifierConfidence {
+ 583
+ 584
+
+ 585
+
+ 586
+
+ 587 1 EXACT_MATCH,
588
589
-
+
590
- 591 4 EXACT_MATCH,
+ 591 1 BEST_GUESS,
592
593
-
+
594
+
+ 595
- 595 4 BEST_GUESS
- 596
- }
+ 596 1 BROAD_MATCH
597
-
- 598
-
- 599
-
- 600
-
- 601 64 private static class IdentifierMatch implements Comparable<IdentifierMatch> {
- 602
-
- 603
-
- 604
-
- 605
-
- 606
-
- 607
-
- 608
-
- 609
-
- 610
-
- 611
-
- 612 80 IdentifierMatch(String type, String value, String url, IdentifierConfidence identifierConfidence, Confidence evidenceConfidence) {
- 613 80 this .identifier = new Identifier(type, value, url);
- 614 80 this .confidence = identifierConfidence;
- 615 80 this .evidenceConfidence = evidenceConfidence;
- 616 80 }
- 617
-
- 618
-
- 619
-
- 620
-
- 621
- private Confidence evidenceConfidence;
- 622
-
- 623
-
- 624
-
- 625
-
- 626
-
- 627
-
- 628
- public Confidence getEvidenceConfidence() {
- 629
- return evidenceConfidence;
- 630
- }
- 631
-
- 632
-
- 633
-
- 634
-
- 635
-
- 636
-
- 637
- public void setEvidenceConfidence(Confidence evidenceConfidence) {
- 638
- this .evidenceConfidence = evidenceConfidence;
- 639
- }
- 640
-
- 641
-
- 642
-
- 643
- private IdentifierConfidence confidence;
- 644
-
- 645
-
- 646
-
- 647
-
- 648
-
- 649
-
- 650
- public IdentifierConfidence getConfidence() {
- 651
- return confidence;
- 652
- }
- 653
-
- 654
-
- 655
-
- 656
-
- 657
-
- 658
-
- 659
- public void setConfidence(IdentifierConfidence confidence) {
- 660
- this .confidence = confidence;
- 661
- }
- 662
-
- 663
-
- 664
-
- 665
- private Identifier identifier;
- 666
-
- 667
-
- 668
-
- 669
-
- 670
-
- 671
-
- 672
- public Identifier getIdentifier() {
- 673
- return identifier;
- 674
- }
- 675
-
- 676
-
- 677
-
- 678
-
- 679
-
- 680
-
- 681
- public void setIdentifier(Identifier identifier) {
- 682
- this .identifier = identifier;
- 683
- }
- 684
-
- 685
-
- 686
-
- 687
-
- 688
-
- 689
-
- 690
-
- 691
-
- 692
- @Override
- 693
- public String toString() {
- 694 0 return "IdentifierMatch{" + "evidenceConfidence=" + evidenceConfidence
- 695
- + ", confidence=" + confidence + ", identifier=" + identifier + '}' ;
- 696
- }
- 697
-
- 698
-
- 699
-
- 700
-
- 701
-
- 702
-
- 703
- @Override
- 704
- public int hashCode() {
- 705 0 int hash = 5;
- 706 0 hash = 97 * hash + (this .evidenceConfidence != null ? this .evidenceConfidence.hashCode() : 0);
- 707 0 hash = 97 * hash + (this .confidence != null ? this .confidence.hashCode() : 0);
- 708 0 hash = 97 * hash + (this .identifier != null ? this .identifier.hashCode() : 0);
- 709 0 return hash;
- 710
- }
- 711
-
- 712
-
- 713
-
- 714
-
- 715
-
- 716
-
- 717
-
- 718
- @Override
- 719
- public boolean equals(Object obj) {
- 720 0 if (obj == null ) {
- 721 0 return false ;
- 722
- }
- 723 0 if (getClass() != obj.getClass()) {
- 724 0 return false ;
- 725
- }
- 726 0 final IdentifierMatch other = (IdentifierMatch) obj;
- 727 0 if (this .evidenceConfidence != other.evidenceConfidence) {
- 728 0 return false ;
- 729
- }
- 730 0 if (this .confidence != other.confidence) {
- 731 0 return false ;
- 732
- }
- 733 0 if (this .identifier != other.identifier && (this .identifier == null || !this .identifier.equals(other.identifier))) {
- 734 0 return false ;
- 735
- }
- 736 0 return true ;
- 737
- }
- 738
-
- 739
-
- 740
-
- 741
-
- 742
-
- 743
-
- 744
-
- 745
-
- 746
-
- 747
- @Override
- 748
- public int compareTo(IdentifierMatch o) {
- 749 64 int conf = this .confidence.compareTo(o.confidence);
- 750 64 if (conf == 0) {
- 751 48 conf = this .evidenceConfidence.compareTo(o.evidenceConfidence);
- 752 48 if (conf == 0) {
- 753 16 conf = identifier.compareTo(o.identifier);
- 754
- }
- 755
- }
- 756 64 return conf;
- 757
- }
- 758
}
+ 598
+
+ 599
+
+ 600
+
+ 601
+
+ 602 8 private static class IdentifierMatch implements Comparable<IdentifierMatch> {
+ 603
+
+ 604
+
+ 605
+
+ 606
+
+ 607
+
+ 608
+
+ 609
+
+ 610
+
+ 611
+
+ 612
+
+ 613 10 IdentifierMatch(String type, String value, String url, IdentifierConfidence identifierConfidence, Confidence evidenceConfidence) {
+ 614 10 this .identifier = new Identifier(type, value, url);
+ 615 10 this .confidence = identifierConfidence;
+ 616 10 this .evidenceConfidence = evidenceConfidence;
+ 617 10 }
+ 618
+
+ 619
+
+ 620
+
+ 621
+
+ 622
+ private Confidence evidenceConfidence;
+ 623
+
+ 624
+
+ 625
+
+ 626
+
+ 627
+
+ 628
+
+ 629
+ public Confidence getEvidenceConfidence() {
+ 630
+ return evidenceConfidence;
+ 631
+ }
+ 632
+
+ 633
+
+ 634
+
+ 635
+
+ 636
+
+ 637
+
+ 638
+ public void setEvidenceConfidence(Confidence evidenceConfidence) {
+ 639
+ this .evidenceConfidence = evidenceConfidence;
+ 640
+ }
+ 641
+
+ 642
+
+ 643
+
+ 644
+ private IdentifierConfidence confidence;
+ 645
+
+ 646
+
+ 647
+
+ 648
+
+ 649
+
+ 650
+
+ 651
+ public IdentifierConfidence getConfidence() {
+ 652
+ return confidence;
+ 653
+ }
+ 654
+
+ 655
+
+ 656
+
+ 657
+
+ 658
+
+ 659
+
+ 660
+ public void setConfidence(IdentifierConfidence confidence) {
+ 661
+ this .confidence = confidence;
+ 662
+ }
+ 663
+
+ 664
+
+ 665
+
+ 666
+ private Identifier identifier;
+ 667
+
+ 668
+
+ 669
+
+ 670
+
+ 671
+
+ 672
+
+ 673
+ public Identifier getIdentifier() {
+ 674
+ return identifier;
+ 675
+ }
+ 676
+
+ 677
+
+ 678
+
+ 679
+
+ 680
+
+ 681
+
+ 682
+ public void setIdentifier(Identifier identifier) {
+ 683
+ this .identifier = identifier;
+ 684
+ }
+ 685
+
+ 686
+
+ 687
+
+ 688
+
+ 689
+
+ 690
+
+ 691
+
+ 692
+
+ 693
+ @Override
+ 694
+ public String toString() {
+ 695 0 return "IdentifierMatch{" + "evidenceConfidence=" + evidenceConfidence
+ 696
+ + ", confidence=" + confidence + ", identifier=" + identifier + '}' ;
+ 697
+ }
+ 698
+
+ 699
+
+ 700
+
+ 701
+
+ 702
+
+ 703
+
+ 704
+ @Override
+ 705
+ public int hashCode() {
+ 706 0 int hash = 5;
+ 707 0 hash = 97 * hash + (this .evidenceConfidence != null ? this .evidenceConfidence.hashCode() : 0);
+ 708 0 hash = 97 * hash + (this .confidence != null ? this .confidence.hashCode() : 0);
+ 709 0 hash = 97 * hash + (this .identifier != null ? this .identifier.hashCode() : 0);
+ 710 0 return hash;
+ 711
+ }
+ 712
+
+ 713
+
+ 714
+
+ 715
+
+ 716
+
+ 717
+
+ 718
+
+ 719
+ @Override
+ 720
+ public boolean equals(Object obj) {
+ 721 0 if (obj == null ) {
+ 722 0 return false ;
+ 723
+ }
+ 724 0 if (getClass() != obj.getClass()) {
+ 725 0 return false ;
+ 726
+ }
+ 727 0 final IdentifierMatch other = (IdentifierMatch) obj;
+ 728 0 if (this .evidenceConfidence != other.evidenceConfidence) {
+ 729 0 return false ;
+ 730
+ }
+ 731 0 if (this .confidence != other.confidence) {
+ 732 0 return false ;
+ 733
+ }
+ 734 0 if (this .identifier != other.identifier && (this .identifier == null || !this .identifier.equals(other.identifier))) {
+ 735 0 return false ;
+ 736
+ }
+ 737 0 return true ;
+ 738
+ }
+ 739
+
+ 740
+
+ 741
+
+ 742
+
+ 743
+
+ 744
+
+ 745
+
+ 746
+
+ 747
+
+ 748
+ @Override
+ 749
+ public int compareTo(IdentifierMatch o) {
+ 750 8 int conf = this .confidence.compareTo(o.confidence);
+ 751 8 if (conf == 0) {
+ 752 6 conf = this .evidenceConfidence.compareTo(o.evidenceConfidence);
+ 753 6 if (conf == 0) {
+ 754 2 conf = identifier.compareTo(o.identifier);
+ 755
+ }
+ 756
+ }
+ 757 8 return conf;
+ 758
+ }
759
+ }
+ 760
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.CpeSuppressionAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.CpeSuppressionAnalyzer.html
index 89ed1ae36..dfb58a235 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.CpeSuppressionAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.CpeSuppressionAnalyzer.html
@@ -97,7 +97,7 @@
40
- 41 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.POST_IDENTIFIER_ANALYSIS;
+ 41 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.POST_IDENTIFIER_ANALYSIS;
42
43
@@ -114,7 +114,7 @@
@Override
49
public String getName() {
- 50 16 return ANALYZER_NAME;
+ 50 4 return ANALYZER_NAME;
51
}
52
@@ -133,7 +133,7 @@
@Override
59
public AnalysisPhase getAnalysisPhase() {
- 60 4 return ANALYSIS_PHASE;
+ 60 1 return ANALYSIS_PHASE;
61
}
62
@@ -146,20 +146,20 @@
public void analyze(final Dependency dependency, final Engine engine) throws AnalysisException {
66
- 67 8 if (getRules() == null || getRules().size() <= 0) {
+ 67 2 if (getRules() == null || getRules().size() <= 0) {
68 0 return ;
69
}
70
- 71 8 for (final SuppressionRule rule : getRules()) {
- 72 16 rule.process(dependency);
- 73 16 }
- 74 8 }
+ 71 2 for (final SuppressionRule rule : getRules()) {
+ 72 10 rule.process(dependency);
+ 73 10 }
+ 74 2 }
75
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.DependencyBundlingAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.DependencyBundlingAnalyzer.html
index 6c07903a6..be7714e7d 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.DependencyBundlingAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.DependencyBundlingAnalyzer.html
@@ -119,7 +119,7 @@
51
- 52 4 private static final Logger LOGGER = Logger.getLogger(DependencyBundlingAnalyzer.class .getName());
+ 52 1 private static final Logger LOGGER = Logger.getLogger(DependencyBundlingAnalyzer.class .getName());
53
54
@@ -130,7 +130,7 @@
57
- 58 4 private static final Pattern STARTING_TEXT_PATTERN = Pattern.compile("^[a-zA-Z]*" );
+ 58 1 private static final Pattern STARTING_TEXT_PATTERN = Pattern.compile("^[a-zA-Z]*" );
59
60
@@ -157,7 +157,7 @@
71
- 72 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.PRE_FINDING_ANALYSIS;
+ 72 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.PRE_FINDING_ANALYSIS;
73
74
@@ -172,7 +172,7 @@
79
public String getName() {
- 80 20 return ANALYZER_NAME;
+ 80 5 return ANALYZER_NAME;
81
}
82
@@ -189,7 +189,7 @@
88
public AnalysisPhase getAnalysisPhase() {
- 89 8 return ANALYSIS_PHASE;
+ 89 2 return ANALYSIS_PHASE;
90
}
91
@@ -216,19 +216,19 @@
@Override
102
public void analyze(Dependency ignore, Engine engine) throws AnalysisException {
- 103 8 if (!analyzed) {
- 104 4 analyzed = true ;
- 105 4 final Set<Dependency> dependenciesToRemove = new HashSet<Dependency>();
- 106 4 final ListIterator<Dependency> mainIterator = engine.getDependencies().listIterator();
+ 103 2 if (!analyzed) {
+ 104 1 analyzed = true ;
+ 105 1 final Set<Dependency> dependenciesToRemove = new HashSet<Dependency>();
+ 106 1 final ListIterator<Dependency> mainIterator = engine.getDependencies().listIterator();
107
- 108 12 while (mainIterator.hasNext()) {
- 109 8 final Dependency dependency = mainIterator.next();
- 110 8 if (mainIterator.hasNext()) {
- 111 4 final ListIterator<Dependency> subIterator = engine.getDependencies().listIterator(mainIterator.nextIndex());
- 112 8 while (subIterator.hasNext()) {
- 113 4 final Dependency nextDependency = subIterator.next();
- 114 4 if (hashesMatch(dependency, nextDependency)) {
+ 108 3 while (mainIterator.hasNext()) {
+ 109 2 final Dependency dependency = mainIterator.next();
+ 110 2 if (mainIterator.hasNext()) {
+ 111 1 final ListIterator<Dependency> subIterator = engine.getDependencies().listIterator(mainIterator.nextIndex());
+ 112 2 while (subIterator.hasNext()) {
+ 113 1 final Dependency nextDependency = subIterator.next();
+ 114 1 if (hashesMatch(dependency, nextDependency)) {
115 0 if (isCore(dependency, nextDependency)) {
116 0 mergeDependencies(dependency, nextDependency, dependenciesToRemove);
117
@@ -236,7 +236,7 @@
118 0 mergeDependencies(nextDependency, dependency, dependenciesToRemove);
119
}
- 120 4 } else if (isShadedJar(dependency, nextDependency)) {
+ 120 1 } else if (isShadedJar(dependency, nextDependency)) {
121 0 if (dependency.getFileName().toLowerCase().endsWith("pom.xml" )) {
122 0 dependenciesToRemove.add(dependency);
123
@@ -244,7 +244,7 @@
124 0 dependenciesToRemove.add(nextDependency);
125
}
- 126 4 } else if (cpeIdentifiersMatch(dependency, nextDependency)
+ 126 1 } else if (cpeIdentifiersMatch(dependency, nextDependency)
127
&& hasSameBasePath(dependency, nextDependency)
128
@@ -260,20 +260,20 @@
}
135
}
- 136 4 }
+ 136 1 }
137
}
- 138 8 }
+ 138 2 }
139
140
- 141 4 for (Dependency d : dependenciesToRemove) {
+ 141 1 for (Dependency d : dependenciesToRemove) {
142 0 engine.getDependencies().remove(d);
143 0 }
144
}
- 145 8 }
+ 145 2 }
146
147
@@ -440,28 +440,28 @@
250
private boolean cpeIdentifiersMatch(Dependency dependency1, Dependency dependency2) {
- 251 4 if (dependency1 == null || dependency1.getIdentifiers() == null
+ 251 1 if (dependency1 == null || dependency1.getIdentifiers() == null
252
|| dependency2 == null || dependency2.getIdentifiers() == null ) {
253 0 return false ;
254
}
- 255 4 boolean matches = false ;
- 256 4 int cpeCount1 = 0;
- 257 4 int cpeCount2 = 0;
- 258 4 for (Identifier i : dependency1.getIdentifiers()) {
+ 255 1 boolean matches = false ;
+ 256 1 int cpeCount1 = 0;
+ 257 1 int cpeCount2 = 0;
+ 258 1 for (Identifier i : dependency1.getIdentifiers()) {
259 0 if ("cpe" .equals(i.getType())) {
260 0 cpeCount1 += 1;
261
}
262 0 }
- 263 4 for (Identifier i : dependency2.getIdentifiers()) {
- 264 8 if ("cpe" .equals(i.getType())) {
- 265 8 cpeCount2 += 1;
+ 263 1 for (Identifier i : dependency2.getIdentifiers()) {
+ 264 2 if ("cpe" .equals(i.getType())) {
+ 265 2 cpeCount2 += 1;
266
}
- 267 8 }
- 268 4 if (cpeCount1 > 0 && cpeCount1 == cpeCount2) {
+ 267 2 }
+ 268 1 if (cpeCount1 > 0 && cpeCount1 == cpeCount2) {
269 0 for (Identifier i : dependency1.getIdentifiers()) {
270 0 matches |= dependency2.getIdentifiers().contains(i);
271 0 if (!matches) {
@@ -471,12 +471,12 @@
274 0 }
275
}
- 276 4 if (LogUtils.isVerboseLoggingEnabled()) {
+ 276 1 if (LogUtils.isVerboseLoggingEnabled()) {
277 0 final String msg = String.format("IdentifiersMatch=%s (%s, %s)" , matches, dependency1.getFileName(), dependency2.getFileName());
278 0 LOGGER.log(Level.FINE, msg);
279
}
- 280 4 return matches;
+ 280 1 return matches;
281
}
282
@@ -553,24 +553,24 @@
328
boolean isCore(Dependency left, Dependency right) {
- 329 8 final String leftName = left.getFileName().toLowerCase();
- 330 8 final String rightName = right.getFileName().toLowerCase();
+ 329 2 final String leftName = left.getFileName().toLowerCase();
+ 330 2 final String rightName = right.getFileName().toLowerCase();
331
332
final boolean returnVal;
- 333 8 if (!rightName.matches(".*\\.(tar|tgz|gz|zip|ear|war).+" ) && leftName.matches(".*\\.(tar|tgz|gz|zip|ear|war).+" )
+ 333 2 if (!rightName.matches(".*\\.(tar|tgz|gz|zip|ear|war).+" ) && leftName.matches(".*\\.(tar|tgz|gz|zip|ear|war).+" )
334
|| rightName.contains("core" ) && !leftName.contains("core" )
335
|| rightName.contains("kernel" ) && !leftName.contains("kernel" )) {
336 0 returnVal = false ;
- 337 8 } else if (rightName.matches(".*\\.(tar|tgz|gz|zip|ear|war).+" ) && !leftName.matches(".*\\.(tar|tgz|gz|zip|ear|war).+" )
+ 337 2 } else if (rightName.matches(".*\\.(tar|tgz|gz|zip|ear|war).+" ) && !leftName.matches(".*\\.(tar|tgz|gz|zip|ear|war).+" )
338
|| !rightName.contains("core" ) && leftName.contains("core" )
339
|| !rightName.contains("kernel" ) && leftName.contains("kernel" )) {
- 340 8 returnVal = true ;
+ 340 2 returnVal = true ;
341
} else {
342
@@ -594,12 +594,12 @@
351 0 returnVal = leftName.length() <= rightName.length();
352
}
- 353 8 if (LogUtils.isVerboseLoggingEnabled()) {
+ 353 2 if (LogUtils.isVerboseLoggingEnabled()) {
354 0 final String msg = String.format("IsCore=%s (%s, %s)" , returnVal, left.getFileName(), right.getFileName());
355 0 LOGGER.log(Level.FINE, msg);
356
}
- 357 8 return returnVal;
+ 357 2 return returnVal;
358
}
359
@@ -620,11 +620,11 @@
367
private boolean hashesMatch(Dependency dependency1, Dependency dependency2) {
- 368 4 if (dependency1 == null || dependency2 == null || dependency1.getSha1sum() == null || dependency2.getSha1sum() == null ) {
+ 368 1 if (dependency1 == null || dependency2 == null || dependency1.getSha1sum() == null || dependency2.getSha1sum() == null ) {
369 0 return false ;
370
}
- 371 4 return dependency1.getSha1sum().equals(dependency2.getSha1sum());
+ 371 1 return dependency1.getSha1sum().equals(dependency2.getSha1sum());
372
}
373
@@ -649,21 +649,21 @@
383
private boolean isShadedJar(Dependency dependency, Dependency nextDependency) {
- 384 4 final String mainName = dependency.getFileName().toLowerCase();
- 385 4 final String nextName = nextDependency.getFileName().toLowerCase();
- 386 4 if (mainName.endsWith(".jar" ) && nextName.endsWith("pom.xml" )) {
+ 384 1 final String mainName = dependency.getFileName().toLowerCase();
+ 385 1 final String nextName = nextDependency.getFileName().toLowerCase();
+ 386 1 if (mainName.endsWith(".jar" ) && nextName.endsWith("pom.xml" )) {
387 0 return dependency.getIdentifiers().containsAll(nextDependency.getIdentifiers());
- 388 4 } else if (nextName.endsWith(".jar" ) && mainName.endsWith("pom.xml" )) {
+ 388 1 } else if (nextName.endsWith(".jar" ) && mainName.endsWith("pom.xml" )) {
389 0 return nextDependency.getIdentifiers().containsAll(dependency.getIdentifiers());
390
}
- 391 4 return false ;
+ 391 1 return false ;
392
}
393
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer.html
index 65fa9d187..eba8da819 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer.html
@@ -12,7 +12,7 @@
@@ -111,7 +111,7 @@
47
- 48 4 private static final Logger LOGGER = Logger.getLogger(FalsePositiveAnalyzer.class .getName());
+ 48 1 private static final Logger LOGGER = Logger.getLogger(FalsePositiveAnalyzer.class .getName());
49
50
@@ -128,7 +128,7 @@
56
- 57 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.POST_IDENTIFIER_ANALYSIS;
+ 57 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.POST_IDENTIFIER_ANALYSIS;
58
59
@@ -143,7 +143,7 @@
64
public String getName() {
- 65 20 return ANALYZER_NAME;
+ 65 5 return ANALYZER_NAME;
66
}
67
@@ -160,7 +160,7 @@
73
public AnalysisPhase getAnalysisPhase() {
- 74 8 return ANALYSIS_PHASE;
+ 74 2 return ANALYSIS_PHASE;
75
}
76
@@ -185,551 +185,593 @@
@Override
86
public void analyze(Dependency dependency, Engine engine) throws AnalysisException {
- 87 12 removeJreEntries(dependency);
- 88 12 removeBadMatches(dependency);
- 89 12 removeWrongVersionMatches(dependency);
- 90 12 removeSpuriousCPE(dependency);
- 91 12 removeDuplicativeEntriesFromJar(dependency, engine);
- 92 12 addFalseNegativeCPEs(dependency);
- 93 12 }
- 94
-
+ 87 3 removeJreEntries(dependency);
+ 88 3 removeBadMatches(dependency);
+ 89 3 removeBadSpringMatches(dependency);
+ 90 3 removeWrongVersionMatches(dependency);
+ 91 3 removeSpuriousCPE(dependency);
+ 92 3 removeDuplicativeEntriesFromJar(dependency, engine);
+ 93 3 addFalseNegativeCPEs(dependency);
+ 94 3 }
95
-
+
96
-
- 97
-
- 98
-
- 99
-
- 100
-
- 101
-
- 102
-
- 103
-
- 104
-
+ private void removeBadSpringMatches(Dependency dependency) {
+ 97 3 String mustContain = null ;
+ 98 3 for (Identifier i : dependency.getIdentifiers()) {
+ 99 2 if ("maven" .contains(i.getType())) {
+ 100 0 if (i.getValue() != null && i.getValue().startsWith("org.springframework." )) {
+ 101 0 int endPoint = i.getValue().indexOf(":" , 19);
+ 102 0 if (endPoint >= 0) {
+ 103 0 mustContain = i.getValue().substring(19, endPoint).toLowerCase();
+ 104 0 break ;
105
-
+ }
106
-
+ }
107
-
- 108
-
- 109
-
- 110
-
- 111
-
- 112
-
- 113
- @SuppressWarnings("null" )
+ }
+ 108 2 }
+ 109 3 if (mustContain != null ) {
+ 110 0 Iterator<Identifier> itr = dependency.getIdentifiers().iterator();
+ 111 0 while (itr.hasNext()) {
+ 112 0 Identifier i = itr.next();
+ 113 0 if ("cpe" .contains(i.getType())
114
- private void removeSpuriousCPE(Dependency dependency) {
- 115 12 final List<Identifier> ids = new ArrayList<Identifier>();
- 116 12 ids.addAll(dependency.getIdentifiers());
- 117 12 Collections.sort(ids);
- 118 12 final ListIterator<Identifier> mainItr = ids.listIterator();
- 119 20 while (mainItr.hasNext()) {
- 120 8 final Identifier currentId = mainItr.next();
- 121 8 final VulnerableSoftware currentCpe = parseCpe(currentId.getType(), currentId.getValue());
- 122 8 if (currentCpe == null ) {
- 123 0 continue ;
+ && i.getValue() != null
+ 115
+ && i.getValue().startsWith("cpe:/a:springsource:" )
+ 116
+ && !i.getValue().toLowerCase().contains(mustContain)) {
+ 117 0 itr.remove();
+ 118
+
+ 119
+ }
+ 120
+
+ 121 0 }
+ 122
+ }
+ 123 3 }
124
- }
- 125 8 final ListIterator<Identifier> subItr = ids.listIterator(mainItr.nextIndex());
- 126 12 while (subItr.hasNext()) {
- 127 4 final Identifier nextId = subItr.next();
- 128 4 final VulnerableSoftware nextCpe = parseCpe(nextId.getType(), nextId.getValue());
- 129 4 if (nextCpe == null ) {
- 130 0 continue ;
+
+ 125
+
+ 126
+
+ 127
+
+ 128
+
+ 129
+
+ 130
+
131
- }
+
132
-
- 133 4 if (currentCpe.getVendor().equals(nextCpe.getVendor())) {
- 134 0 if (currentCpe.getProduct().equals(nextCpe.getProduct())) {
+
+ 133
+
+ 134
+
135
-
- 136 0 final String currentVersion = currentCpe.getVersion();
- 137 0 final String nextVersion = nextCpe.getVersion();
- 138 0 if (currentVersion == null && nextVersion == null ) {
+
+ 136
+
+ 137
+
+ 138
+
139
-
- 140 0 LOGGER.log(Level.FINE, "currentVersion and nextVersion are both null?" );
- 141 0 } else if (currentVersion == null && nextVersion != null ) {
- 142 0 dependency.getIdentifiers().remove(currentId);
- 143 0 } else if (nextVersion == null && currentVersion != null ) {
- 144 0 dependency.getIdentifiers().remove(nextId);
- 145 0 } else if (currentVersion.length() < nextVersion.length()) {
- 146 0 if (nextVersion.startsWith(currentVersion) || "-" .equals(currentVersion)) {
- 147 0 dependency.getIdentifiers().remove(currentId);
- 148
- }
- 149
- } else {
- 150 0 if (currentVersion.startsWith(nextVersion) || "-" .equals(nextVersion)) {
- 151 0 dependency.getIdentifiers().remove(nextId);
- 152
- }
- 153
- }
- 154
- }
- 155
- }
- 156 4 }
- 157 8 }
- 158 12 }
- 159
-
- 160
-
- 161
-
- 162 4 public static final Pattern CORE_JAVA = Pattern.compile("^cpe:/a:(sun|oracle|ibm):(j2[ems]e|"
- 163
- + "java(_platform_micro_edition|_runtime_environment|_se|virtual_machine|se_development_kit|fx)?|"
- 164
- + "jdk|jre|jsse)($|:.*)" );
- 165
-
- 166
-
- 167
-
- 168
-
- 169 4 public static final Pattern CORE_JAVA_JSF = Pattern.compile("^cpe:/a:(sun|oracle|ibm):jsf($|:.*)" );
- 170
-
- 171
-
- 172
-
- 173 4 public static final Pattern CORE_FILES = Pattern.compile("(^|/)((alt[-])?rt|jsse|jfxrt|jfr|jce|javaws|deploy|charsets)\\.jar$" );
- 174
-
- 175
-
- 176
-
- 177 4 public static final Pattern CORE_JSF_FILES = Pattern.compile("(^|/)jsf[-][^/]*\\.jar$" );
- 178
-
- 179
-
- 180
-
- 181
+
+ 140
- 182
-
- 183
-
- 184
- private void removeJreEntries(Dependency dependency) {
- 185 12 final Set<Identifier> identifiers = dependency.getIdentifiers();
- 186 12 final Iterator<Identifier> itr = identifiers.iterator();
- 187 24 while (itr.hasNext()) {
- 188 12 final Identifier i = itr.next();
- 189 12 final Matcher coreCPE = CORE_JAVA.matcher(i.getValue());
- 190 12 final Matcher coreFiles = CORE_FILES.matcher(dependency.getFileName());
- 191 12 if (coreCPE.matches() && !coreFiles.matches()) {
- 192 0 itr.remove();
- 193
- }
- 194 12 final Matcher coreJsfCPE = CORE_JAVA_JSF.matcher(i.getValue());
- 195 12 final Matcher coreJsfFiles = CORE_JSF_FILES.matcher(dependency.getFileName());
- 196 12 if (coreJsfCPE.matches() && !coreJsfFiles.matches()) {
- 197 0 itr.remove();
- 198
- }
- 199 12 }
- 200 12 }
- 201
-
- 202
-
- 203
-
- 204
-
- 205
-
- 206
-
- 207
-
- 208
-
- 209
- private VulnerableSoftware parseCpe(String type, String value) {
- 210 12 if (!"cpe" .equals(type)) {
- 211 0 return null ;
- 212
- }
- 213 12 final VulnerableSoftware cpe = new VulnerableSoftware();
- 214
- try {
- 215 12 cpe.parseName(value);
- 216 0 } catch (UnsupportedEncodingException ex) {
- 217 0 LOGGER.log(Level.FINEST, null , ex);
- 218 0 return null ;
- 219 12 }
- 220 12 return cpe;
- 221
- }
- 222
-
- 223
-
- 224
-
- 225
-
- 226
-
- 227
-
- 228
-
- 229
- private void removeBadMatches(Dependency dependency) {
- 230 12 final Set<Identifier> identifiers = dependency.getIdentifiers();
- 231 12 final Iterator<Identifier> itr = identifiers.iterator();
- 232
-
- 233
-
- 234
-
- 235
-
- 236
-
- 237
-
- 238
-
- 239
-
- 240 24 while (itr.hasNext()) {
- 241 12 final Identifier i = itr.next();
- 242
-
- 243 12 if ("cpe" .equals(i.getType())) {
- 244 12 if ((i.getValue().matches(".*c\\+\\+.*" )
- 245
- || i.getValue().startsWith("cpe:/a:file:file" )
- 246
- || i.getValue().startsWith("cpe:/a:mozilla:mozilla" )
- 247
- || i.getValue().startsWith("cpe:/a:cvs:cvs" )
- 248
- || i.getValue().startsWith("cpe:/a:ftp:ftp" )
- 249
- || i.getValue().startsWith("cpe:/a:tcp:tcp" )
- 250
- || i.getValue().startsWith("cpe:/a:ssh:ssh" )
- 251
- || i.getValue().startsWith("cpe:/a:lookup:lookup" ))
- 252
- && (dependency.getFileName().toLowerCase().endsWith(".jar" )
- 253
- || dependency.getFileName().toLowerCase().endsWith("pom.xml" )
- 254
- || dependency.getFileName().toLowerCase().endsWith(".dll" )
- 255
- || dependency.getFileName().toLowerCase().endsWith(".exe" )
- 256
- || dependency.getFileName().toLowerCase().endsWith(".nuspec" )
- 257
- || dependency.getFileName().toLowerCase().endsWith(".nupkg" ))) {
- 258 4 itr.remove();
- 259 8 } else if ((i.getValue().startsWith("cpe:/a:jquery:jquery" )
- 260
- || i.getValue().startsWith("cpe:/a:prototypejs:prototype" )
- 261
- || i.getValue().startsWith("cpe:/a:yahoo:yui" ))
- 262
- && (dependency.getFileName().toLowerCase().endsWith(".jar" )
- 263
- || dependency.getFileName().toLowerCase().endsWith("pom.xml" )
- 264
- || dependency.getFileName().toLowerCase().endsWith(".dll" )
- 265
- || dependency.getFileName().toLowerCase().endsWith(".exe" ))) {
- 266 0 itr.remove();
- 267 8 } else if ((i.getValue().startsWith("cpe:/a:microsoft:excel" )
- 268
- || i.getValue().startsWith("cpe:/a:microsoft:word" )
- 269
- || i.getValue().startsWith("cpe:/a:microsoft:visio" )
- 270
- || i.getValue().startsWith("cpe:/a:microsoft:powerpoint" )
- 271
- || i.getValue().startsWith("cpe:/a:microsoft:office" ))
- 272
- && (dependency.getFileName().toLowerCase().endsWith(".jar" )
- 273
- || dependency.getFileName().toLowerCase().endsWith("pom.xml" ))) {
- 274 0 itr.remove();
- 275 8 } else if (i.getValue().startsWith("cpe:/a:apache:maven" )
- 276
- && !dependency.getFileName().toLowerCase().matches("maven-core-[\\d\\.]+\\.jar" )) {
- 277 0 itr.remove();
- 278 8 } else if (i.getValue().startsWith("cpe:/a:m-core:m-core" )
- 279
- && !dependency.getEvidenceUsed().containsUsedString("m-core" )) {
- 280 0 itr.remove();
- 281 8 } else if (i.getValue().startsWith("cpe:/a:jboss:jboss" )
- 282
- && !dependency.getFileName().toLowerCase().matches("jboss-?[\\d\\.-]+(GA)?\\.jar" )) {
- 283 0 itr.remove();
- 284
- }
- 285
- }
- 286 12 }
- 287 12 }
- 288
-
- 289
-
- 290
-
- 291
-
- 292
-
- 293
-
- 294
- private void removeWrongVersionMatches(Dependency dependency) {
- 295 12 final Set<Identifier> identifiers = dependency.getIdentifiers();
- 296 12 final Iterator<Identifier> itr = identifiers.iterator();
- 297
-
- 298 12 final String fileName = dependency.getFileName();
- 299 12 if (fileName != null && fileName.contains("axis2" )) {
- 300 0 while (itr.hasNext()) {
- 301 0 final Identifier i = itr.next();
- 302 0 if ("cpe" .equals(i.getType())) {
- 303 0 final String cpe = i.getValue();
- 304 0 if (cpe != null && (cpe.startsWith("cpe:/a:apache:axis:" ) || "cpe:/a:apache:axis" .equals(cpe))) {
- 305 0 itr.remove();
- 306
- }
- 307
- }
- 308 0 }
- 309 12 } else if (fileName != null && fileName.contains("axis" )) {
- 310 0 while (itr.hasNext()) {
- 311 0 final Identifier i = itr.next();
- 312 0 if ("cpe" .equals(i.getType())) {
- 313 0 final String cpe = i.getValue();
- 314 0 if (cpe != null && (cpe.startsWith("cpe:/a:apache:axis2:" ) || "cpe:/a:apache:axis2" .equals(cpe))) {
- 315 0 itr.remove();
- 316
- }
- 317
- }
- 318 0 }
- 319
- }
- 320 12 }
- 321
-
- 322
-
- 323
-
- 324
-
- 325
-
- 326
-
- 327
+ 141
- 328
+ 142
- 329
- private void addFalseNegativeCPEs(Dependency dependency) {
- 330
-
- 331 12 final Iterator<Identifier> itr = dependency.getIdentifiers().iterator();
- 332 20 while (itr.hasNext()) {
- 333 8 final Identifier i = itr.next();
- 334 8 if ("cpe" .equals(i.getType()) && i.getValue() != null
- 335
- && (i.getValue().startsWith("cpe:/a:oracle:opensso:" )
- 336
- || i.getValue().startsWith("cpe:/a:oracle:opensso_enterprise:" )
- 337
- || i.getValue().startsWith("cpe:/a:sun:opensso_enterprise:" )
- 338
- || i.getValue().startsWith("cpe:/a:sun:opensso:" ))) {
- 339 0 final String newCpe = String.format("cpe:/a:sun:opensso_enterprise:%s" , i.getValue().substring(22));
- 340 0 final String newCpe2 = String.format("cpe:/a:oracle:opensso_enterprise:%s" , i.getValue().substring(22));
- 341 0 final String newCpe3 = String.format("cpe:/a:sun:opensso:%s" , i.getValue().substring(22));
- 342 0 final String newCpe4 = String.format("cpe:/a:oracle:opensso:%s" , i.getValue().substring(22));
- 343
- try {
- 344 0 dependency.addIdentifier("cpe" ,
- 345
- newCpe,
- 346
- String.format(CPEAnalyzer.NVD_SEARCH_URL, URLEncoder.encode(newCpe, "UTF-8" )));
- 347 0 dependency.addIdentifier("cpe" ,
- 348
- newCpe2,
- 349
- String.format(CPEAnalyzer.NVD_SEARCH_URL, URLEncoder.encode(newCpe2, "UTF-8" )));
- 350 0 dependency.addIdentifier("cpe" ,
- 351
- newCpe3,
- 352
- String.format(CPEAnalyzer.NVD_SEARCH_URL, URLEncoder.encode(newCpe3, "UTF-8" )));
- 353 0 dependency.addIdentifier("cpe" ,
- 354
- newCpe4,
- 355
- String.format(CPEAnalyzer.NVD_SEARCH_URL, URLEncoder.encode(newCpe4, "UTF-8" )));
- 356 0 } catch (UnsupportedEncodingException ex) {
- 357 0 LOGGER.log(Level.FINE, null , ex);
- 358 0 }
- 359
+ 143
+ @SuppressWarnings("null" )
+ 144
+ private void removeSpuriousCPE(Dependency dependency) {
+ 145 3 final List<Identifier> ids = new ArrayList<Identifier>();
+ 146 3 ids.addAll(dependency.getIdentifiers());
+ 147 3 Collections.sort(ids);
+ 148 3 final ListIterator<Identifier> mainItr = ids.listIterator();
+ 149 5 while (mainItr.hasNext()) {
+ 150 2 final Identifier currentId = mainItr.next();
+ 151 2 final VulnerableSoftware currentCpe = parseCpe(currentId.getType(), currentId.getValue());
+ 152 2 if (currentCpe == null ) {
+ 153 0 continue ;
+ 154
}
- 360 8 }
- 361 12 }
- 362
-
- 363
-
- 364
-
- 365
-
- 366
-
- 367
-
- 368
-
- 369
-
- 370
- private void removeDuplicativeEntriesFromJar(Dependency dependency, Engine engine) {
- 371 12 if (dependency.getFileName().toLowerCase().endsWith("pom.xml" )
- 372
- || "dll" .equals(dependency.getFileExtension())
- 373
- || "exe" .equals(dependency.getFileExtension())) {
- 374 4 String parentPath = dependency.getFilePath().toLowerCase();
- 375 4 if (parentPath.contains(".jar" )) {
- 376 0 parentPath = parentPath.substring(0, parentPath.indexOf(".jar" ) + 4);
- 377 0 final Dependency parent = findDependency(parentPath, engine.getDependencies());
- 378 0 if (parent != null ) {
- 379 0 boolean remove = false ;
- 380 0 for (Identifier i : dependency.getIdentifiers()) {
- 381 0 if ("cpe" .equals(i.getType())) {
- 382 0 final String trimmedCPE = trimCpeToVendor(i.getValue());
- 383 0 for (Identifier parentId : parent.getIdentifiers()) {
- 384 0 if ("cpe" .equals(parentId.getType()) && parentId.getValue().startsWith(trimmedCPE)) {
- 385 0 remove |= true ;
- 386
- }
- 387 0 }
- 388
- }
- 389 0 if (!remove) {
- 390 0 return ;
- 391
- }
- 392 0 }
- 393 0 if (remove) {
- 394 0 engine.getDependencies().remove(dependency);
- 395
- }
- 396
+ 155 2 final ListIterator<Identifier> subItr = ids.listIterator(mainItr.nextIndex());
+ 156 3 while (subItr.hasNext()) {
+ 157 1 final Identifier nextId = subItr.next();
+ 158 1 final VulnerableSoftware nextCpe = parseCpe(nextId.getType(), nextId.getValue());
+ 159 1 if (nextCpe == null ) {
+ 160 0 continue ;
+ 161
}
+ 162
+
+ 163 1 if (currentCpe.getVendor().equals(nextCpe.getVendor())) {
+ 164 0 if (currentCpe.getProduct().equals(nextCpe.getProduct())) {
+ 165
+
+ 166 0 final String currentVersion = currentCpe.getVersion();
+ 167 0 final String nextVersion = nextCpe.getVersion();
+ 168 0 if (currentVersion == null && nextVersion == null ) {
+ 169
+
+ 170 0 LOGGER.log(Level.FINE, "currentVersion and nextVersion are both null?" );
+ 171 0 } else if (currentVersion == null && nextVersion != null ) {
+ 172 0 dependency.getIdentifiers().remove(currentId);
+ 173 0 } else if (nextVersion == null && currentVersion != null ) {
+ 174 0 dependency.getIdentifiers().remove(nextId);
+ 175 0 } else if (currentVersion.length() < nextVersion.length()) {
+ 176 0 if (nextVersion.startsWith(currentVersion) || "-" .equals(currentVersion)) {
+ 177 0 dependency.getIdentifiers().remove(currentId);
+ 178
+ }
+ 179
+ } else {
+ 180 0 if (currentVersion.startsWith(nextVersion) || "-" .equals(nextVersion)) {
+ 181 0 dependency.getIdentifiers().remove(nextId);
+ 182
+ }
+ 183
+ }
+ 184
+ }
+ 185
+ }
+ 186 1 }
+ 187 2 }
+ 188 3 }
+ 189
+
+ 190
+
+ 191
+
+ 192 1 public static final Pattern CORE_JAVA = Pattern.compile("^cpe:/a:(sun|oracle|ibm):(j2[ems]e|"
+ 193
+ + "java(_platform_micro_edition|_runtime_environment|_se|virtual_machine|se_development_kit|fx)?|"
+ 194
+ + "jdk|jre|jsse)($|:.*)" );
+ 195
+
+ 196
+
+ 197
+
+ 198
+
+ 199 1 public static final Pattern CORE_JAVA_JSF = Pattern.compile("^cpe:/a:(sun|oracle|ibm):jsf($|:.*)" );
+ 200
+
+ 201
+
+ 202
+
+ 203 1 public static final Pattern CORE_FILES = Pattern.compile("(^|/)((alt[-])?rt|jsse|jfxrt|jfr|jce|javaws|deploy|charsets)\\.jar$" );
+ 204
+
+ 205
+
+ 206
+
+ 207 1 public static final Pattern CORE_JSF_FILES = Pattern.compile("(^|/)jsf[-][^/]*\\.jar$" );
+ 208
+
+ 209
+
+ 210
+
+ 211
+
+ 212
+
+ 213
+
+ 214
+ private void removeJreEntries(Dependency dependency) {
+ 215 3 final Set<Identifier> identifiers = dependency.getIdentifiers();
+ 216 3 final Iterator<Identifier> itr = identifiers.iterator();
+ 217 6 while (itr.hasNext()) {
+ 218 3 final Identifier i = itr.next();
+ 219 3 final Matcher coreCPE = CORE_JAVA.matcher(i.getValue());
+ 220 3 final Matcher coreFiles = CORE_FILES.matcher(dependency.getFileName());
+ 221 3 if (coreCPE.matches() && !coreFiles.matches()) {
+ 222 0 itr.remove();
+ 223
+ }
+ 224 3 final Matcher coreJsfCPE = CORE_JAVA_JSF.matcher(i.getValue());
+ 225 3 final Matcher coreJsfFiles = CORE_JSF_FILES.matcher(dependency.getFileName());
+ 226 3 if (coreJsfCPE.matches() && !coreJsfFiles.matches()) {
+ 227 0 itr.remove();
+ 228
+ }
+ 229 3 }
+ 230 3 }
+ 231
+
+ 232
+
+ 233
+
+ 234
+
+ 235
+
+ 236
+
+ 237
+
+ 238
+
+ 239
+ private VulnerableSoftware parseCpe(String type, String value) {
+ 240 3 if (!"cpe" .equals(type)) {
+ 241 0 return null ;
+ 242
+ }
+ 243 3 final VulnerableSoftware cpe = new VulnerableSoftware();
+ 244
+ try {
+ 245 3 cpe.parseName(value);
+ 246 0 } catch (UnsupportedEncodingException ex) {
+ 247 0 LOGGER.log(Level.FINEST, null , ex);
+ 248 0 return null ;
+ 249 3 }
+ 250 3 return cpe;
+ 251
+ }
+ 252
+
+ 253
+
+ 254
+
+ 255
+
+ 256
+
+ 257
+
+ 258
+
+ 259
+ private void removeBadMatches(Dependency dependency) {
+ 260 3 final Set<Identifier> identifiers = dependency.getIdentifiers();
+ 261 3 final Iterator<Identifier> itr = identifiers.iterator();
+ 262
+
+ 263
+
+ 264
+
+ 265
+
+ 266
+
+ 267
+
+ 268
+
+ 269
+
+ 270 6 while (itr.hasNext()) {
+ 271 3 final Identifier i = itr.next();
+ 272
+
+ 273 3 if ("cpe" .equals(i.getType())) {
+ 274 3 if ((i.getValue().matches(".*c\\+\\+.*" )
+ 275
+ || i.getValue().startsWith("cpe:/a:file:file" )
+ 276
+ || i.getValue().startsWith("cpe:/a:mozilla:mozilla" )
+ 277
+ || i.getValue().startsWith("cpe:/a:cvs:cvs" )
+ 278
+ || i.getValue().startsWith("cpe:/a:ftp:ftp" )
+ 279
+ || i.getValue().startsWith("cpe:/a:tcp:tcp" )
+ 280
+ || i.getValue().startsWith("cpe:/a:ssh:ssh" )
+ 281
+ || i.getValue().startsWith("cpe:/a:lookup:lookup" ))
+ 282
+ && (dependency.getFileName().toLowerCase().endsWith(".jar" )
+ 283
+ || dependency.getFileName().toLowerCase().endsWith("pom.xml" )
+ 284
+ || dependency.getFileName().toLowerCase().endsWith(".dll" )
+ 285
+ || dependency.getFileName().toLowerCase().endsWith(".exe" )
+ 286
+ || dependency.getFileName().toLowerCase().endsWith(".nuspec" )
+ 287
+ || dependency.getFileName().toLowerCase().endsWith(".nupkg" ))) {
+ 288 1 itr.remove();
+ 289 2 } else if ((i.getValue().startsWith("cpe:/a:jquery:jquery" )
+ 290
+ || i.getValue().startsWith("cpe:/a:prototypejs:prototype" )
+ 291
+ || i.getValue().startsWith("cpe:/a:yahoo:yui" ))
+ 292
+ && (dependency.getFileName().toLowerCase().endsWith(".jar" )
+ 293
+ || dependency.getFileName().toLowerCase().endsWith("pom.xml" )
+ 294
+ || dependency.getFileName().toLowerCase().endsWith(".dll" )
+ 295
+ || dependency.getFileName().toLowerCase().endsWith(".exe" ))) {
+ 296 0 itr.remove();
+ 297 2 } else if ((i.getValue().startsWith("cpe:/a:microsoft:excel" )
+ 298
+ || i.getValue().startsWith("cpe:/a:microsoft:word" )
+ 299
+ || i.getValue().startsWith("cpe:/a:microsoft:visio" )
+ 300
+ || i.getValue().startsWith("cpe:/a:microsoft:powerpoint" )
+ 301
+ || i.getValue().startsWith("cpe:/a:microsoft:office" ))
+ 302
+ && (dependency.getFileName().toLowerCase().endsWith(".jar" )
+ 303
+ || dependency.getFileName().toLowerCase().endsWith("pom.xml" ))) {
+ 304 0 itr.remove();
+ 305 2 } else if (i.getValue().startsWith("cpe:/a:apache:maven" )
+ 306
+ && !dependency.getFileName().toLowerCase().matches("maven-core-[\\d\\.]+\\.jar" )) {
+ 307 0 itr.remove();
+ 308 2 } else if (i.getValue().startsWith("cpe:/a:m-core:m-core" )
+ 309
+ && !dependency.getEvidenceUsed().containsUsedString("m-core" )) {
+ 310 0 itr.remove();
+ 311 2 } else if (i.getValue().startsWith("cpe:/a:jboss:jboss" )
+ 312
+ && !dependency.getFileName().toLowerCase().matches("jboss-?[\\d\\.-]+(GA)?\\.jar" )) {
+ 313 0 itr.remove();
+ 314
+ }
+ 315
+ }
+ 316 3 }
+ 317 3 }
+ 318
+
+ 319
+
+ 320
+
+ 321
+
+ 322
+
+ 323
+
+ 324
+ private void removeWrongVersionMatches(Dependency dependency) {
+ 325 3 final Set<Identifier> identifiers = dependency.getIdentifiers();
+ 326 3 final Iterator<Identifier> itr = identifiers.iterator();
+ 327
+
+ 328 3 final String fileName = dependency.getFileName();
+ 329 3 if (fileName != null && fileName.contains("axis2" )) {
+ 330 0 while (itr.hasNext()) {
+ 331 0 final Identifier i = itr.next();
+ 332 0 if ("cpe" .equals(i.getType())) {
+ 333 0 final String cpe = i.getValue();
+ 334 0 if (cpe != null && (cpe.startsWith("cpe:/a:apache:axis:" ) || "cpe:/a:apache:axis" .equals(cpe))) {
+ 335 0 itr.remove();
+ 336
+ }
+ 337
+ }
+ 338 0 }
+ 339 3 } else if (fileName != null && fileName.contains("axis" )) {
+ 340 0 while (itr.hasNext()) {
+ 341 0 final Identifier i = itr.next();
+ 342 0 if ("cpe" .equals(i.getType())) {
+ 343 0 final String cpe = i.getValue();
+ 344 0 if (cpe != null && (cpe.startsWith("cpe:/a:apache:axis2:" ) || "cpe:/a:apache:axis2" .equals(cpe))) {
+ 345 0 itr.remove();
+ 346
+ }
+ 347
+ }
+ 348 0 }
+ 349
+ }
+ 350 3 }
+ 351
+
+ 352
+
+ 353
+
+ 354
+
+ 355
+
+ 356
+
+ 357
+
+ 358
+
+ 359
+ private void addFalseNegativeCPEs(Dependency dependency) {
+ 360
+
+ 361 3 final Iterator<Identifier> itr = dependency.getIdentifiers().iterator();
+ 362 5 while (itr.hasNext()) {
+ 363 2 final Identifier i = itr.next();
+ 364 2 if ("cpe" .equals(i.getType()) && i.getValue() != null
+ 365
+ && (i.getValue().startsWith("cpe:/a:oracle:opensso:" )
+ 366
+ || i.getValue().startsWith("cpe:/a:oracle:opensso_enterprise:" )
+ 367
+ || i.getValue().startsWith("cpe:/a:sun:opensso_enterprise:" )
+ 368
+ || i.getValue().startsWith("cpe:/a:sun:opensso:" ))) {
+ 369 0 final String newCpe = String.format("cpe:/a:sun:opensso_enterprise:%s" , i.getValue().substring(22));
+ 370 0 final String newCpe2 = String.format("cpe:/a:oracle:opensso_enterprise:%s" , i.getValue().substring(22));
+ 371 0 final String newCpe3 = String.format("cpe:/a:sun:opensso:%s" , i.getValue().substring(22));
+ 372 0 final String newCpe4 = String.format("cpe:/a:oracle:opensso:%s" , i.getValue().substring(22));
+ 373
+ try {
+ 374 0 dependency.addIdentifier("cpe" ,
+ 375
+ newCpe,
+ 376
+ String.format(CPEAnalyzer.NVD_SEARCH_URL, URLEncoder.encode(newCpe, "UTF-8" )));
+ 377 0 dependency.addIdentifier("cpe" ,
+ 378
+ newCpe2,
+ 379
+ String.format(CPEAnalyzer.NVD_SEARCH_URL, URLEncoder.encode(newCpe2, "UTF-8" )));
+ 380 0 dependency.addIdentifier("cpe" ,
+ 381
+ newCpe3,
+ 382
+ String.format(CPEAnalyzer.NVD_SEARCH_URL, URLEncoder.encode(newCpe3, "UTF-8" )));
+ 383 0 dependency.addIdentifier("cpe" ,
+ 384
+ newCpe4,
+ 385
+ String.format(CPEAnalyzer.NVD_SEARCH_URL, URLEncoder.encode(newCpe4, "UTF-8" )));
+ 386 0 } catch (UnsupportedEncodingException ex) {
+ 387 0 LOGGER.log(Level.FINE, null , ex);
+ 388 0 }
+ 389
+ }
+ 390 2 }
+ 391 3 }
+ 392
+
+ 393
+
+ 394
+
+ 395
+
+ 396
+
397
- }
+
398
-
+
399
- }
- 400 12 }
- 401
-
+
+ 400
+ private void removeDuplicativeEntriesFromJar(Dependency dependency, Engine engine) {
+ 401 3 if (dependency.getFileName().toLowerCase().endsWith("pom.xml" )
402
-
+ || "dll" .equals(dependency.getFileExtension())
403
-
- 404
-
- 405
-
- 406
-
- 407
-
- 408
-
- 409
- private Dependency findDependency(String dependencyPath, List<Dependency> dependencies) {
- 410 0 for (Dependency d : dependencies) {
- 411 0 if (d.getFilePath().equalsIgnoreCase(dependencyPath)) {
- 412 0 return d;
- 413
- }
- 414 0 }
- 415 0 return null ;
+ || "exe" .equals(dependency.getFileExtension())) {
+ 404 1 String parentPath = dependency.getFilePath().toLowerCase();
+ 405 1 if (parentPath.contains(".jar" )) {
+ 406 0 parentPath = parentPath.substring(0, parentPath.indexOf(".jar" ) + 4);
+ 407 0 final Dependency parent = findDependency(parentPath, engine.getDependencies());
+ 408 0 if (parent != null ) {
+ 409 0 boolean remove = false ;
+ 410 0 for (Identifier i : dependency.getIdentifiers()) {
+ 411 0 if ("cpe" .equals(i.getType())) {
+ 412 0 final String trimmedCPE = trimCpeToVendor(i.getValue());
+ 413 0 for (Identifier parentId : parent.getIdentifiers()) {
+ 414 0 if ("cpe" .equals(parentId.getType()) && parentId.getValue().startsWith(trimmedCPE)) {
+ 415 0 remove |= true ;
416
- }
- 417
-
+ }
+ 417 0 }
418
-
- 419
-
- 420
-
+ }
+ 419 0 if (!remove) {
+ 420 0 return ;
421
-
- 422
-
- 423
-
- 424
- private String trimCpeToVendor(String value) {
+ }
+ 422 0 }
+ 423 0 if (remove) {
+ 424 0 engine.getDependencies().remove(dependency);
425
-
- 426 0 final int pos1 = value.indexOf(":" , 7);
- 427 0 final int pos2 = value.indexOf(":" , pos1 + 1);
- 428 0 if (pos2 < 0) {
- 429 0 return value;
- 430
- } else {
- 431 0 return value.substring(0, pos2);
- 432
+ }
+ 426
+ }
+ 427
+ }
+ 428
+
+ 429
}
+ 430 3 }
+ 431
+
+ 432
+
433
- }
+
434
+
+ 435
+
+ 436
+
+ 437
+
+ 438
+
+ 439
+ private Dependency findDependency(String dependencyPath, List<Dependency> dependencies) {
+ 440 0 for (Dependency d : dependencies) {
+ 441 0 if (d.getFilePath().equalsIgnoreCase(dependencyPath)) {
+ 442 0 return d;
+ 443
+ }
+ 444 0 }
+ 445 0 return null ;
+ 446
+ }
+ 447
+
+ 448
+
+ 449
+
+ 450
+
+ 451
+
+ 452
+
+ 453
+
+ 454
+ private String trimCpeToVendor(String value) {
+ 455
+
+ 456 0 final int pos1 = value.indexOf(":" , 7);
+ 457 0 final int pos2 = value.indexOf(":" , pos1 + 1);
+ 458 0 if (pos2 < 0) {
+ 459 0 return value;
+ 460
+ } else {
+ 461 0 return value.substring(0, pos2);
+ 462
+ }
+ 463
+ }
+ 464
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FileNameAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FileNameAnalyzer.html
index a3474c103..b6a078400 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FileNameAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FileNameAnalyzer.html
@@ -103,7 +103,7 @@
43
- 44 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
+ 44 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
45
46
@@ -118,7 +118,7 @@
51
public String getName() {
- 52 20 return ANALYZER_NAME;
+ 52 5 return ANALYZER_NAME;
53
}
54
@@ -135,7 +135,7 @@
60
public AnalysisPhase getAnalysisPhase() {
- 61 8 return ANALYSIS_PHASE;
+ 61 2 return ANALYSIS_PHASE;
62
}
63
@@ -164,41 +164,41 @@
75
- 76 16 final File f = new File(dependency.getFileName());
- 77 16 String fileName = f.getName();
+ 76 4 final File f = new File(dependency.getFileName());
+ 77 4 String fileName = f.getName();
78
79
- 80 16 final int pos = fileName.lastIndexOf("." );
- 81 16 if (pos > 0) {
- 82 16 fileName = fileName.substring(0, pos);
+ 80 4 final int pos = fileName.lastIndexOf("." );
+ 81 4 if (pos > 0) {
+ 82 4 fileName = fileName.substring(0, pos);
83
}
84
85
- 86 16 final DependencyVersion version = DependencyVersionUtil.parseVersion(fileName);
- 87 16 if (version != null ) {
+ 86 4 final DependencyVersion version = DependencyVersionUtil.parseVersion(fileName);
+ 87 4 if (version != null ) {
88
89
90
- 91 16 if (version.getVersionParts() == null || version.getVersionParts().size() < 2) {
+ 91 4 if (version.getVersionParts() == null || version.getVersionParts().size() < 2) {
92 0 dependency.getVersionEvidence().addEvidence("file" , "name" ,
93
version.toString(), Confidence.MEDIUM);
94
} else {
- 95 16 dependency.getVersionEvidence().addEvidence("file" , "name" ,
+ 95 4 dependency.getVersionEvidence().addEvidence("file" , "name" ,
96
version.toString(), Confidence.HIGHEST);
97
}
- 98 16 dependency.getVersionEvidence().addEvidence("file" , "name" ,
+ 98 4 dependency.getVersionEvidence().addEvidence("file" , "name" ,
99
fileName, Confidence.MEDIUM);
100
@@ -207,11 +207,11 @@
102
- 103 16 if (fileName.contains("-" )) {
- 104 16 dependency.getProductEvidence().addEvidence("file" , "name" ,
+ 103 4 if (fileName.contains("-" )) {
+ 104 4 dependency.getProductEvidence().addEvidence("file" , "name" ,
105
fileName, Confidence.HIGHEST);
- 106 16 dependency.getVendorEvidence().addEvidence("file" , "name" ,
+ 106 4 dependency.getVendorEvidence().addEvidence("file" , "name" ,
107
fileName, Confidence.HIGHEST);
108
@@ -224,11 +224,11 @@
fileName, Confidence.HIGH);
113
}
- 114 16 }
+ 114 4 }
115
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FileTypeAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FileTypeAnalyzer.html
index 47ea44d30..4c76a4635 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FileTypeAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.FileTypeAnalyzer.html
@@ -87,6 +87,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.HintAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.HintAnalyzer.html
index 8ee8d8308..f8e4a49c2 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.HintAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.HintAnalyzer.html
@@ -101,7 +101,7 @@
42
- 43 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.PRE_IDENTIFIER_ANALYSIS;
+ 43 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.PRE_IDENTIFIER_ANALYSIS;
44
45
@@ -118,7 +118,7 @@
@Override
51
public String getName() {
- 52 20 return ANALYZER_NAME;
+ 52 5 return ANALYZER_NAME;
53
}
54
@@ -137,7 +137,7 @@
@Override
61
public AnalysisPhase getAnalysisPhase() {
- 62 8 return ANALYSIS_PHASE;
+ 62 2 return ANALYSIS_PHASE;
63
}
64
@@ -164,7 +164,7 @@
@Override
75
public void analyze(Dependency dependency, Engine engine) throws AnalysisException {
- 76 8 final Evidence springTest1 = new Evidence("Manifest" ,
+ 76 2 final Evidence springTest1 = new Evidence("Manifest" ,
77
"Implementation-Title" ,
78
@@ -173,7 +173,7 @@
Confidence.HIGH);
80
- 81 8 final Evidence springTest2 = new Evidence("Manifest" ,
+ 81 2 final Evidence springTest2 = new Evidence("Manifest" ,
82
"Implementation-Title" ,
83
@@ -182,7 +182,7 @@
Confidence.HIGH);
85
- 86 8 final Evidence springTest3 = new Evidence("Manifest" ,
+ 86 2 final Evidence springTest3 = new Evidence("Manifest" ,
87
"Bundle-Vendor" ,
88
@@ -191,26 +191,26 @@
Confidence.HIGH);
90
- 91 8 Set<Evidence> evidence = dependency.getProductEvidence().getEvidence();
- 92 8 if (evidence.contains(springTest1) || evidence.contains(springTest2)) {
- 93 4 dependency.getProductEvidence().addEvidence("hint analyzer" , "product" , "springsource_spring_framework" , Confidence.HIGH);
- 94 4 dependency.getVendorEvidence().addEvidence("hint analyzer" , "vendor" , "SpringSource" , Confidence.HIGH);
- 95 4 dependency.getVendorEvidence().addEvidence("hint analyzer" , "vendor" , "vmware" , Confidence.HIGH);
+ 91 2 Set<Evidence> evidence = dependency.getProductEvidence().getEvidence();
+ 92 2 if (evidence.contains(springTest1) || evidence.contains(springTest2)) {
+ 93 1 dependency.getProductEvidence().addEvidence("hint analyzer" , "product" , "springsource_spring_framework" , Confidence.HIGH);
+ 94 1 dependency.getVendorEvidence().addEvidence("hint analyzer" , "vendor" , "SpringSource" , Confidence.HIGH);
+ 95 1 dependency.getVendorEvidence().addEvidence("hint analyzer" , "vendor" , "vmware" , Confidence.HIGH);
96
}
97
- 98 8 evidence = dependency.getVendorEvidence().getEvidence();
- 99 8 if (evidence.contains(springTest3)) {
- 100 4 dependency.getProductEvidence().addEvidence("hint analyzer" , "product" , "springsource_spring_framework" , Confidence.HIGH);
- 101 4 dependency.getVendorEvidence().addEvidence("hint analyzer" , "vendor" , "vmware" , Confidence.HIGH);
+ 98 2 evidence = dependency.getVendorEvidence().getEvidence();
+ 99 2 if (evidence.contains(springTest3)) {
+ 100 1 dependency.getProductEvidence().addEvidence("hint analyzer" , "product" , "springsource_spring_framework" , Confidence.HIGH);
+ 101 1 dependency.getVendorEvidence().addEvidence("hint analyzer" , "vendor" , "vmware" , Confidence.HIGH);
102
}
- 103 8 final Iterator<Evidence> itr = dependency.getVendorEvidence().iterator();
- 104 8 final ArrayList<Evidence> newEntries = new ArrayList<Evidence>();
- 105 108 while (itr.hasNext()) {
- 106 100 final Evidence e = itr.next();
- 107 100 if ("sun" .equalsIgnoreCase(e.getValue(false ))) {
+ 103 2 final Iterator<Evidence> itr = dependency.getVendorEvidence().iterator();
+ 104 2 final ArrayList<Evidence> newEntries = new ArrayList<Evidence>();
+ 105 27 while (itr.hasNext()) {
+ 106 25 final Evidence e = itr.next();
+ 107 25 if ("sun" .equalsIgnoreCase(e.getValue(false ))) {
108 0 final Evidence newEvidence = new Evidence(e.getSource() + " (hint)" , e.getName(), "oracle" , e.getConfidence());
109 0 newEntries.add(newEvidence);
110 0 } else if ("oracle" .equalsIgnoreCase(e.getValue(false ))) {
@@ -218,17 +218,17 @@
112 0 newEntries.add(newEvidence);
113
}
- 114 100 }
- 115 8 for (Evidence e : newEntries) {
+ 114 25 }
+ 115 2 for (Evidence e : newEntries) {
116 0 dependency.getVendorEvidence().addEvidence(e);
117 0 }
118
- 119 8 }
+ 119 2 }
120
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.JarAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.JarAnalyzer.html
index 69d4edf2b..7d7f8ffcc 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.JarAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.JarAnalyzer.html
@@ -188,7 +188,7 @@
85
- 86 4 private static final Logger LOGGER = Logger.getLogger(JarAnalyzer.class .getName());
+ 86 1 private static final Logger LOGGER = Logger.getLogger(JarAnalyzer.class .getName());
87
88
@@ -203,21 +203,21 @@
93
- 94 4 private static int dirCount = 0;
+ 94 1 private static int dirCount = 0;
95
96
97
- 98 4 private static final String NEWLINE = System.getProperty("line.separator" );
+ 98 1 private static final String NEWLINE = System.getProperty("line.separator" );
99
100
101
- 102 4 private static final Set<String> IGNORE_VALUES = newHashSet(
+ 102 1 private static final Set<String> IGNORE_VALUES = newHashSet(
103
"Sun Java System Application Server" );
104
@@ -226,7 +226,7 @@
106
- 107 4 private static final Set<String> IGNORE_KEYS = newHashSet(
+ 107 1 private static final Set<String> IGNORE_KEYS = newHashSet(
108
"built-by" ,
109
@@ -331,7 +331,7 @@
159
- 160 4 private static final Pattern HTML_DETECTION_PATTERN = Pattern.compile("\\<[a-z]+.*/?\\>" , Pattern.CASE_INSENSITIVE);
+ 160 1 private static final Pattern HTML_DETECTION_PATTERN = Pattern.compile("\\<[a-z]+.*/?\\>" , Pattern.CASE_INSENSITIVE);
161
162
@@ -350,18 +350,18 @@
169
- 170 28 public JarAnalyzer() {
+ 170 7 public JarAnalyzer() {
171
try {
172
- 173 28 final JAXBContext jaxbContext = JAXBContext.newInstance(Model.class );
- 174 28 pomUnmarshaller = jaxbContext.createUnmarshaller();
+ 173 7 final JAXBContext jaxbContext = JAXBContext.newInstance(Model.class );
+ 174 7 pomUnmarshaller = jaxbContext.createUnmarshaller();
175 0 } catch (JAXBException ex) {
176 0 LOGGER.log(Level.SEVERE, "Unable to load parser. See the log for more details." );
177 0 LOGGER.log(Level.FINE, null , ex);
- 178 28 }
- 179 28 }
+ 178 7 }
+ 179 7 }
180
181
@@ -380,14 +380,14 @@
188
- 189 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
+ 189 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
190
191
192
- 193 4 private static final Set<String> EXTENSIONS = newHashSet("jar" , "war" );
+ 193 1 private static final Set<String> EXTENSIONS = newHashSet("jar" , "war" );
194
195
@@ -404,7 +404,7 @@
@Override
201
public Set<String> getSupportedExtensions() {
- 202 3408 return EXTENSIONS;
+ 202 852 return EXTENSIONS;
203
}
204
@@ -423,7 +423,7 @@
@Override
211
public String getName() {
- 212 20 return ANALYZER_NAME;
+ 212 5 return ANALYZER_NAME;
213
}
214
@@ -440,7 +440,7 @@
220
public AnalysisPhase getAnalysisPhase() {
- 221 4 return ANALYSIS_PHASE;
+ 221 1 return ANALYSIS_PHASE;
222
}
223
@@ -461,7 +461,7 @@
@Override
231
protected String getAnalyzerEnabledSettingKey() {
- 232 28 return Settings.KEYS.ANALYZER_JAR_ENABLED;
+ 232 7 return Settings.KEYS.ANALYZER_JAR_ENABLED;
233
}
234
@@ -488,9 +488,9 @@
public void analyzeFileType(Dependency dependency, Engine engine) throws AnalysisException {
245
try {
- 246 20 final ArrayList<ClassNameInformation> classNames = collectClassNames(dependency);
- 247 20 final String fileName = dependency.getFileName().toLowerCase();
- 248 20 if (classNames.isEmpty()
+ 246 5 final ArrayList<ClassNameInformation> classNames = collectClassNames(dependency);
+ 247 5 final String fileName = dependency.getFileName().toLowerCase();
+ 248 5 if (classNames.isEmpty()
249
&& (fileName.endsWith("-sources.jar" )
250
@@ -502,14 +502,14 @@
253 0 engine.getDependencies().remove(dependency);
254
}
- 255 20 final boolean hasManifest = parseManifest(dependency, classNames);
- 256 20 final boolean hasPOM = analyzePOM(dependency, classNames, engine);
- 257 20 final boolean addPackagesAsEvidence = !(hasManifest && hasPOM);
- 258 20 analyzePackageNames(classNames, dependency, addPackagesAsEvidence);
+ 255 5 final boolean hasManifest = parseManifest(dependency, classNames);
+ 256 5 final boolean hasPOM = analyzePOM(dependency, classNames, engine);
+ 257 5 final boolean addPackagesAsEvidence = !(hasManifest && hasPOM);
+ 258 5 analyzePackageNames(classNames, dependency, addPackagesAsEvidence);
259 0 } catch (IOException ex) {
260 0 throw new AnalysisException("Exception occurred reading the JAR file." , ex);
- 261 20 }
- 262 20 }
+ 261 5 }
+ 262 5 }
263
264
@@ -534,12 +534,12 @@
274
protected boolean analyzePOM(Dependency dependency, ArrayList<ClassNameInformation> classes, Engine engine) throws AnalysisException {
- 275 20 boolean foundSomething = false ;
+ 275 5 boolean foundSomething = false ;
276
final JarFile jar;
277
try {
- 278 20 jar = new JarFile(dependency.getActualFilePath());
+ 278 5 jar = new JarFile(dependency.getActualFilePath());
279 0 } catch (IOException ex) {
280 0 final String msg = String.format("Unable to read JarFile '%s'." , dependency.getActualFilePath());
281
@@ -547,12 +547,12 @@
282 0 LOGGER.log(Level.WARNING, msg);
283 0 LOGGER.log(Level.FINE, "" , ex);
284 0 return false ;
- 285 20 }
+ 285 5 }
286
List<String> pomEntries;
287
try {
- 288 20 pomEntries = retrievePomListing(jar);
+ 288 5 pomEntries = retrievePomListing(jar);
289 0 } catch (IOException ex) {
290 0 final String msg = String.format("Unable to read Jar file entries in '%s'." , dependency.getActualFilePath());
291
@@ -560,23 +560,23 @@
292 0 LOGGER.log(Level.WARNING, msg);
293 0 LOGGER.log(Level.FINE, msg, ex);
294 0 return false ;
- 295 20 }
- 296 20 if (pomEntries.isEmpty()) {
- 297 16 return false ;
+ 295 5 }
+ 296 5 if (pomEntries.isEmpty()) {
+ 297 4 return false ;
298
}
- 299 4 for (String path : pomEntries) {
- 300 4 Properties pomProperties = null ;
+ 299 1 for (String path : pomEntries) {
+ 300 1 Properties pomProperties = null ;
301
try {
- 302 4 pomProperties = retrievePomProperties(path, jar);
+ 302 1 pomProperties = retrievePomProperties(path, jar);
303 0 } catch (IOException ex) {
304 0 LOGGER.log(Level.FINEST, "ignore this, failed reading a non-existent pom.properties" , ex);
- 305 4 }
- 306 4 Model pom = null ;
+ 305 1 }
+ 306 1 Model pom = null ;
307
try {
- 308 4 if (pomEntries.size() > 1) {
+ 308 1 if (pomEntries.size() > 1) {
309
310 0 final Dependency newDependency = new Dependency();
@@ -605,17 +605,17 @@
325 0 engine.getDependencies().add(newDependency);
326 0 Collections.sort(engine.getDependencies());
327 0 } else {
- 328 4 pom = retrievePom(path, jar);
- 329 4 foundSomething |= setPomEvidence(dependency, pom, pomProperties, classes);
+ 328 1 pom = retrievePom(path, jar);
+ 329 1 foundSomething |= setPomEvidence(dependency, pom, pomProperties, classes);
330
}
331 0 } catch (AnalysisException ex) {
332 0 final String msg = String.format("An error occured while analyzing '%s'." , dependency.getActualFilePath());
333 0 LOGGER.log(Level.WARNING, msg);
334 0 LOGGER.log(Level.FINE, "" , ex);
- 335 4 }
- 336 4 }
- 337 4 return foundSomething;
+ 335 1 }
+ 336 1 }
+ 337 1 return foundSomething;
338
}
339
@@ -638,10 +638,10 @@
348
private Properties retrievePomProperties(String path, final JarFile jar) throws IOException {
- 349 4 Properties pomProperties = null ;
- 350 4 final String propPath = path.substring(0, path.length() - 7) + "pom.properies" ;
- 351 4 final ZipEntry propEntry = jar.getEntry(propPath);
- 352 4 if (propEntry != null ) {
+ 349 1 Properties pomProperties = null ;
+ 350 1 final String propPath = path.substring(0, path.length() - 7) + "pom.properies" ;
+ 351 1 final ZipEntry propEntry = jar.getEntry(propPath);
+ 352 1 if (propEntry != null ) {
353 0 Reader reader = null ;
354
try {
@@ -663,7 +663,7 @@
}
367
}
- 368 4 return pomProperties;
+ 368 1 return pomProperties;
369
}
370
@@ -684,17 +684,17 @@
378
private List<String> retrievePomListing(final JarFile jar) throws IOException {
- 379 20 final List<String> pomEntries = new ArrayList<String>();
- 380 20 final Enumeration<JarEntry> entries = jar.entries();
- 381 7392 while (entries.hasMoreElements()) {
- 382 7372 final JarEntry entry = entries.nextElement();
- 383 7372 final String entryName = (new File(entry.getName())).getName().toLowerCase();
- 384 7372 if (!entry.isDirectory() && "pom.xml" .equals(entryName)) {
- 385 4 pomEntries.add(entry.getName());
+ 379 5 final List<String> pomEntries = new ArrayList<String>();
+ 380 5 final Enumeration<JarEntry> entries = jar.entries();
+ 381 1848 while (entries.hasMoreElements()) {
+ 382 1843 final JarEntry entry = entries.nextElement();
+ 383 1843 final String entryName = (new File(entry.getName())).getName().toLowerCase();
+ 384 1843 if (!entry.isDirectory() && "pom.xml" .equals(entryName)) {
+ 385 1 pomEntries.add(entry.getName());
386
}
- 387 7372 }
- 388 20 return pomEntries;
+ 387 1843 }
+ 388 5 return pomEntries;
389
}
390
@@ -852,16 +852,16 @@
496
private Model retrievePom(String path, JarFile jar) throws AnalysisException {
- 497 4 final ZipEntry entry = jar.getEntry(path);
- 498 4 Model model = null ;
- 499 4 if (entry != null ) {
+ 497 1 final ZipEntry entry = jar.getEntry(path);
+ 498 1 Model model = null ;
+ 499 1 if (entry != null ) {
500
try {
- 501 4 final NonClosingStream stream = new NonClosingStream(jar.getInputStream(entry));
- 502 4 final InputStreamReader reader = new InputStreamReader(stream, "UTF-8" );
- 503 4 final InputSource xml = new InputSource(reader);
- 504 4 final SAXSource source = new SAXSource(xml);
- 505 4 model = readPom(source);
+ 501 1 final NonClosingStream stream = new NonClosingStream(jar.getInputStream(entry));
+ 502 1 final InputStreamReader reader = new InputStreamReader(stream, "UTF-8" );
+ 503 1 final InputSource xml = new InputSource(reader);
+ 504 1 final SAXSource source = new SAXSource(xml);
+ 505 1 model = readPom(source);
506 0 } catch (SecurityException ex) {
507 0 final String msg = String.format("Unable to parse pom '%s' in jar '%s'; invalid signature" , path, jar.getName());
508 0 LOGGER.log(Level.WARNING, msg);
@@ -877,10 +877,10 @@
518 0 LOGGER.log(Level.WARNING, msg);
519 0 LOGGER.log(Level.FINE, "" , ex);
520 0 throw new AnalysisException(ex);
- 521 4 }
+ 521 1 }
522
}
- 523 4 return model;
+ 523 1 return model;
524
}
525
@@ -903,16 +903,16 @@
534
private Model readPom(SAXSource source) throws AnalysisException {
- 535 4 Model model = null ;
+ 535 1 Model model = null ;
536
try {
- 537 4 final XMLFilter filter = new MavenNamespaceFilter();
- 538 4 final SAXParserFactory spf = SAXParserFactory.newInstance();
- 539 4 final SAXParser sp = spf.newSAXParser();
- 540 4 final XMLReader xr = sp.getXMLReader();
- 541 4 filter.setParent(xr);
- 542 4 final JAXBElement<Model> el = pomUnmarshaller.unmarshal(source, Model.class );
- 543 4 model = el.getValue();
+ 537 1 final XMLFilter filter = new MavenNamespaceFilter();
+ 538 1 final SAXParserFactory spf = SAXParserFactory.newInstance();
+ 539 1 final SAXParser sp = spf.newSAXParser();
+ 540 1 final XMLReader xr = sp.getXMLReader();
+ 541 1 filter.setParent(xr);
+ 542 1 final JAXBElement<Model> el = pomUnmarshaller.unmarshal(source, Model.class );
+ 543 1 model = el.getValue();
544 0 } catch (SecurityException ex) {
545 0 throw new AnalysisException(ex);
546 0 } catch (ParserConfigurationException ex) {
@@ -923,8 +923,8 @@
551 0 throw new AnalysisException(ex);
552 0 } catch (Throwable ex) {
553 0 throw new AnalysisException(ex);
- 554 4 }
- 555 4 return model;
+ 554 1 }
+ 555 1 return model;
556
}
557
@@ -951,42 +951,42 @@
568
private boolean setPomEvidence(Dependency dependency, Model pom, Properties pomProperties, ArrayList<ClassNameInformation> classes) {
- 569 4 boolean foundSomething = false ;
- 570 4 boolean addAsIdentifier = true ;
- 571 4 if (pom == null ) {
+ 569 1 boolean foundSomething = false ;
+ 570 1 boolean addAsIdentifier = true ;
+ 571 1 if (pom == null ) {
572 0 return foundSomething;
573
}
- 574 4 String groupid = interpolateString(pom.getGroupId(), pomProperties);
- 575 4 String parentGroupId = null ;
+ 574 1 String groupid = interpolateString(pom.getGroupId(), pomProperties);
+ 575 1 String parentGroupId = null ;
576
- 577 4 if (pom.getParent() != null ) {
- 578 4 parentGroupId = interpolateString(pom.getParent().getGroupId(), pomProperties);
- 579 4 if ((groupid == null || groupid.isEmpty()) && parentGroupId != null && !parentGroupId.isEmpty()) {
+ 577 1 if (pom.getParent() != null ) {
+ 578 1 parentGroupId = interpolateString(pom.getParent().getGroupId(), pomProperties);
+ 579 1 if ((groupid == null || groupid.isEmpty()) && parentGroupId != null && !parentGroupId.isEmpty()) {
580 0 groupid = parentGroupId;
581
}
582
}
- 583 4 final String originalGroupID = groupid;
+ 583 1 final String originalGroupID = groupid;
584
- 585 4 if (groupid != null && !groupid.isEmpty()) {
- 586 4 if (groupid.startsWith("org." ) || groupid.startsWith("com." )) {
- 587 4 groupid = groupid.substring(4);
+ 585 1 if (groupid != null && !groupid.isEmpty()) {
+ 586 1 if (groupid.startsWith("org." ) || groupid.startsWith("com." )) {
+ 587 1 groupid = groupid.substring(4);
588
}
- 589 4 foundSomething = true ;
- 590 4 dependency.getVendorEvidence().addEvidence("pom" , "groupid" , groupid, Confidence.HIGH);
- 591 4 dependency.getProductEvidence().addEvidence("pom" , "groupid" , groupid, Confidence.LOW);
- 592 4 addMatchingValues(classes, groupid, dependency.getVendorEvidence());
- 593 4 addMatchingValues(classes, groupid, dependency.getProductEvidence());
- 594 4 if (parentGroupId != null && !parentGroupId.isEmpty() && !parentGroupId.equals(groupid)) {
- 595 4 dependency.getVendorEvidence().addEvidence("pom" , "parent-groupid" , parentGroupId, Confidence.MEDIUM);
- 596 4 dependency.getProductEvidence().addEvidence("pom" , "parent-groupid" , parentGroupId, Confidence.LOW);
- 597 4 addMatchingValues(classes, parentGroupId, dependency.getVendorEvidence());
- 598 4 addMatchingValues(classes, parentGroupId, dependency.getProductEvidence());
+ 589 1 foundSomething = true ;
+ 590 1 dependency.getVendorEvidence().addEvidence("pom" , "groupid" , groupid, Confidence.HIGHEST);
+ 591 1 dependency.getProductEvidence().addEvidence("pom" , "groupid" , groupid, Confidence.LOW);
+ 592 1 addMatchingValues(classes, groupid, dependency.getVendorEvidence());
+ 593 1 addMatchingValues(classes, groupid, dependency.getProductEvidence());
+ 594 1 if (parentGroupId != null && !parentGroupId.isEmpty() && !parentGroupId.equals(groupid)) {
+ 595 1 dependency.getVendorEvidence().addEvidence("pom" , "parent-groupid" , parentGroupId, Confidence.MEDIUM);
+ 596 1 dependency.getProductEvidence().addEvidence("pom" , "parent-groupid" , parentGroupId, Confidence.LOW);
+ 597 1 addMatchingValues(classes, parentGroupId, dependency.getVendorEvidence());
+ 598 1 addMatchingValues(classes, parentGroupId, dependency.getProductEvidence());
599
}
600
@@ -996,34 +996,34 @@
}
603
- 604 4 String artifactid = interpolateString(pom.getArtifactId(), pomProperties);
- 605 4 String parentArtifactId = null ;
+ 604 1 String artifactid = interpolateString(pom.getArtifactId(), pomProperties);
+ 605 1 String parentArtifactId = null ;
606
- 607 4 if (pom.getParent() != null ) {
- 608 4 parentArtifactId = interpolateString(pom.getParent().getArtifactId(), pomProperties);
- 609 4 if ((artifactid == null || artifactid.isEmpty()) && parentArtifactId != null && !parentArtifactId.isEmpty()) {
+ 607 1 if (pom.getParent() != null ) {
+ 608 1 parentArtifactId = interpolateString(pom.getParent().getArtifactId(), pomProperties);
+ 609 1 if ((artifactid == null || artifactid.isEmpty()) && parentArtifactId != null && !parentArtifactId.isEmpty()) {
610 0 artifactid = parentArtifactId;
611
}
612
}
- 613 4 final String originalArtifactID = artifactid;
- 614 4 if (artifactid != null && !artifactid.isEmpty()) {
- 615 4 if (artifactid.startsWith("org." ) || artifactid.startsWith("com." )) {
+ 613 1 final String originalArtifactID = artifactid;
+ 614 1 if (artifactid != null && !artifactid.isEmpty()) {
+ 615 1 if (artifactid.startsWith("org." ) || artifactid.startsWith("com." )) {
616 0 artifactid = artifactid.substring(4);
617
}
- 618 4 foundSomething = true ;
- 619 4 dependency.getProductEvidence().addEvidence("pom" , "artifactid" , artifactid, Confidence.HIGH);
- 620 4 dependency.getVendorEvidence().addEvidence("pom" , "artifactid" , artifactid, Confidence.LOW);
- 621 4 addMatchingValues(classes, artifactid, dependency.getVendorEvidence());
- 622 4 addMatchingValues(classes, artifactid, dependency.getProductEvidence());
- 623 4 if (parentArtifactId != null && !parentArtifactId.isEmpty() && !parentArtifactId.equals(artifactid)) {
- 624 4 dependency.getProductEvidence().addEvidence("pom" , "parent-artifactid" , parentArtifactId, Confidence.MEDIUM);
- 625 4 dependency.getVendorEvidence().addEvidence("pom" , "parent-artifactid" , parentArtifactId, Confidence.LOW);
- 626 4 addMatchingValues(classes, parentArtifactId, dependency.getVendorEvidence());
- 627 4 addMatchingValues(classes, parentArtifactId, dependency.getProductEvidence());
+ 618 1 foundSomething = true ;
+ 619 1 dependency.getProductEvidence().addEvidence("pom" , "artifactid" , artifactid, Confidence.HIGHEST);
+ 620 1 dependency.getVendorEvidence().addEvidence("pom" , "artifactid" , artifactid, Confidence.LOW);
+ 621 1 addMatchingValues(classes, artifactid, dependency.getVendorEvidence());
+ 622 1 addMatchingValues(classes, artifactid, dependency.getProductEvidence());
+ 623 1 if (parentArtifactId != null && !parentArtifactId.isEmpty() && !parentArtifactId.equals(artifactid)) {
+ 624 1 dependency.getProductEvidence().addEvidence("pom" , "parent-artifactid" , parentArtifactId, Confidence.MEDIUM);
+ 625 1 dependency.getVendorEvidence().addEvidence("pom" , "parent-artifactid" , parentArtifactId, Confidence.LOW);
+ 626 1 addMatchingValues(classes, parentArtifactId, dependency.getVendorEvidence());
+ 627 1 addMatchingValues(classes, parentArtifactId, dependency.getProductEvidence());
628
}
629
@@ -1033,24 +1033,24 @@
}
632
- 633 4 String version = interpolateString(pom.getVersion(), pomProperties);
- 634 4 String parentVersion = null ;
+ 633 1 String version = interpolateString(pom.getVersion(), pomProperties);
+ 634 1 String parentVersion = null ;
635
- 636 4 if (pom.getParent() != null ) {
- 637 4 parentVersion = interpolateString(pom.getParent().getVersion(), pomProperties);
- 638 4 if ((version == null || version.isEmpty()) && parentVersion != null && !parentVersion.isEmpty()) {
- 639 4 version = parentVersion;
+ 636 1 if (pom.getParent() != null ) {
+ 637 1 parentVersion = interpolateString(pom.getParent().getVersion(), pomProperties);
+ 638 1 if ((version == null || version.isEmpty()) && parentVersion != null && !parentVersion.isEmpty()) {
+ 639 1 version = parentVersion;
640
}
641
}
642
- 643 4 if (version != null && !version.isEmpty()) {
- 644 4 foundSomething = true ;
- 645 4 dependency.getVersionEvidence().addEvidence("pom" , "version" , version, Confidence.HIGHEST);
- 646 4 if (parentVersion != null && !parentVersion.isEmpty() && !parentVersion.equals(version)) {
+ 643 1 if (version != null && !version.isEmpty()) {
+ 644 1 foundSomething = true ;
+ 645 1 dependency.getVersionEvidence().addEvidence("pom" , "version" , version, Confidence.HIGHEST);
+ 646 1 if (parentVersion != null && !parentVersion.isEmpty() && !parentVersion.equals(version)) {
647 0 dependency.getVersionEvidence().addEvidence("pom" , "parent-version" , version, Confidence.LOW);
648
}
@@ -1061,16 +1061,16 @@
}
652
- 653 4 if (addAsIdentifier) {
- 654 4 dependency.addIdentifier("maven" , String.format("%s:%s:%s" , originalGroupID, originalArtifactID, version), null , Confidence.LOW);
+ 653 1 if (addAsIdentifier) {
+ 654 1 dependency.addIdentifier("maven" , String.format("%s:%s:%s" , originalGroupID, originalArtifactID, version), null , Confidence.LOW);
655
}
656
657
- 658 4 final Organization org = pom.getOrganization();
- 659 4 if (org != null && org.getName() != null ) {
+ 658 1 final Organization org = pom.getOrganization();
+ 659 1 if (org != null && org.getName() != null ) {
660 0 foundSomething = true ;
661 0 final String orgName = interpolateString(org.getName(), pomProperties);
662 0 if (orgName != null && !orgName.isEmpty()) {
@@ -1082,20 +1082,20 @@
}
667
- 668 4 final String pomName = interpolateString(pom.getName(), pomProperties);
- 669 4 if (pomName != null && !pomName.isEmpty()) {
- 670 4 foundSomething = true ;
- 671 4 dependency.getProductEvidence().addEvidence("pom" , "name" , pomName, Confidence.HIGH);
- 672 4 dependency.getVendorEvidence().addEvidence("pom" , "name" , pomName, Confidence.HIGH);
- 673 4 addMatchingValues(classes, pomName, dependency.getVendorEvidence());
- 674 4 addMatchingValues(classes, pomName, dependency.getProductEvidence());
+ 668 1 final String pomName = interpolateString(pom.getName(), pomProperties);
+ 669 1 if (pomName != null && !pomName.isEmpty()) {
+ 670 1 foundSomething = true ;
+ 671 1 dependency.getProductEvidence().addEvidence("pom" , "name" , pomName, Confidence.HIGH);
+ 672 1 dependency.getVendorEvidence().addEvidence("pom" , "name" , pomName, Confidence.HIGH);
+ 673 1 addMatchingValues(classes, pomName, dependency.getVendorEvidence());
+ 674 1 addMatchingValues(classes, pomName, dependency.getProductEvidence());
675
}
676
677
- 678 4 if (pom.getDescription() != null ) {
+ 678 1 if (pom.getDescription() != null ) {
679 0 foundSomething = true ;
680 0 final String description = interpolateString(pom.getDescription(), pomProperties);
681 0 if (description != null && !description.isEmpty()) {
@@ -1106,8 +1106,8 @@
}
686
}
- 687 4 extractLicense(pom, pomProperties, dependency);
- 688 4 return foundSomething;
+ 687 1 extractLicense(pom, pomProperties, dependency);
+ 688 1 return foundSomething;
689
}
690
@@ -1132,41 +1132,41 @@
protected void analyzePackageNames(ArrayList<ClassNameInformation> classNames,
700
Dependency dependency, boolean addPackagesAsEvidence) {
- 701 20 final HashMap<String, Integer> vendorIdentifiers = new HashMap<String, Integer>();
- 702 20 final HashMap<String, Integer> productIdentifiers = new HashMap<String, Integer>();
- 703 20 analyzeFullyQualifiedClassNames(classNames, vendorIdentifiers, productIdentifiers);
+ 701 5 final HashMap<String, Integer> vendorIdentifiers = new HashMap<String, Integer>();
+ 702 5 final HashMap<String, Integer> productIdentifiers = new HashMap<String, Integer>();
+ 703 5 analyzeFullyQualifiedClassNames(classNames, vendorIdentifiers, productIdentifiers);
704
- 705 20 final int classCount = classNames.size();
- 706 20 final EvidenceCollection vendor = dependency.getVendorEvidence();
- 707 20 final EvidenceCollection product = dependency.getProductEvidence();
+ 705 5 final int classCount = classNames.size();
+ 706 5 final EvidenceCollection vendor = dependency.getVendorEvidence();
+ 707 5 final EvidenceCollection product = dependency.getProductEvidence();
708
- 709 20 for (Map.Entry<String, Integer> entry : vendorIdentifiers.entrySet()) {
- 710 192 final float ratio = entry.getValue() / (float ) classCount;
- 711 192 if (ratio > 0.5) {
+ 709 5 for (Map.Entry<String, Integer> entry : vendorIdentifiers.entrySet()) {
+ 710 48 final float ratio = entry.getValue() / (float ) classCount;
+ 711 48 if (ratio > 0.5) {
712
- 713 40 vendor.addWeighting(entry.getKey());
- 714 40 if (addPackagesAsEvidence && entry.getKey().length() > 1) {
- 715 32 vendor.addEvidence("jar" , "package name" , entry.getKey(), Confidence.LOW);
+ 713 10 vendor.addWeighting(entry.getKey());
+ 714 10 if (addPackagesAsEvidence && entry.getKey().length() > 1) {
+ 715 8 vendor.addEvidence("jar" , "package name" , entry.getKey(), Confidence.LOW);
716
}
717
}
- 718 192 }
- 719 20 for (Map.Entry<String, Integer> entry : productIdentifiers.entrySet()) {
- 720 3940 final float ratio = entry.getValue() / (float ) classCount;
- 721 3940 if (ratio > 0.5) {
- 722 20 product.addWeighting(entry.getKey());
- 723 20 if (addPackagesAsEvidence && entry.getKey().length() > 1) {
- 724 16 product.addEvidence("jar" , "package name" , entry.getKey(), Confidence.LOW);
+ 718 48 }
+ 719 5 for (Map.Entry<String, Integer> entry : productIdentifiers.entrySet()) {
+ 720 985 final float ratio = entry.getValue() / (float ) classCount;
+ 721 985 if (ratio > 0.5) {
+ 722 5 product.addWeighting(entry.getKey());
+ 723 5 if (addPackagesAsEvidence && entry.getKey().length() > 1) {
+ 724 4 product.addEvidence("jar" , "package name" , entry.getKey(), Confidence.LOW);
725
}
726
}
- 727 3940 }
- 728 20 }
+ 727 985 }
+ 728 5 }
729
730
@@ -1199,17 +1199,17 @@
744
protected boolean parseManifest(Dependency dependency, ArrayList<ClassNameInformation> classInformation) throws IOException {
- 745 20 boolean foundSomething = false ;
- 746 20 JarFile jar = null ;
+ 745 5 boolean foundSomething = false ;
+ 746 5 JarFile jar = null ;
747
try {
- 748 20 jar = new JarFile(dependency.getActualFilePath());
+ 748 5 jar = new JarFile(dependency.getActualFilePath());
749
- 750 20 final Manifest manifest = jar.getManifest();
+ 750 5 final Manifest manifest = jar.getManifest();
751
- 752 20 if (manifest == null ) {
+ 752 5 if (manifest == null ) {
753
754 0 if (!dependency.getFileName().toLowerCase().endsWith("-sources.jar" )
@@ -1229,60 +1229,60 @@
762 0 return false ;
763
}
- 764 20 final Attributes atts = manifest.getMainAttributes();
+ 764 5 final Attributes atts = manifest.getMainAttributes();
765
- 766 20 final EvidenceCollection vendorEvidence = dependency.getVendorEvidence();
- 767 20 final EvidenceCollection productEvidence = dependency.getProductEvidence();
- 768 20 final EvidenceCollection versionEvidence = dependency.getVersionEvidence();
+ 766 5 final EvidenceCollection vendorEvidence = dependency.getVendorEvidence();
+ 767 5 final EvidenceCollection productEvidence = dependency.getProductEvidence();
+ 768 5 final EvidenceCollection versionEvidence = dependency.getVersionEvidence();
769
- 770 20 final String source = "Manifest" ;
+ 770 5 final String source = "Manifest" ;
771
- 772 20 for (Entry<Object, Object> entry : atts.entrySet()) {
- 773 260 String key = entry.getKey().toString();
- 774 260 String value = atts.getValue(key);
- 775 260 if (HTML_DETECTION_PATTERN.matcher(value).find()) {
+ 772 5 for (Entry<Object, Object> entry : atts.entrySet()) {
+ 773 65 String key = entry.getKey().toString();
+ 774 65 String value = atts.getValue(key);
+ 775 65 if (HTML_DETECTION_PATTERN.matcher(value).find()) {
776 0 value = Jsoup.parse(value).text();
777
}
- 778 260 if (IGNORE_VALUES.contains(value)) {
+ 778 65 if (IGNORE_VALUES.contains(value)) {
779 0 continue ;
- 780 260 } else if (key.equalsIgnoreCase(Attributes.Name.IMPLEMENTATION_TITLE.toString())) {
- 781 4 foundSomething = true ;
- 782 4 productEvidence.addEvidence(source, key, value, Confidence.HIGH);
- 783 4 addMatchingValues(classInformation, value, productEvidence);
- 784 256 } else if (key.equalsIgnoreCase(Attributes.Name.IMPLEMENTATION_VERSION.toString())) {
- 785 8 foundSomething = true ;
- 786 8 versionEvidence.addEvidence(source, key, value, Confidence.HIGH);
- 787 248 } else if (key.equalsIgnoreCase(Attributes.Name.IMPLEMENTATION_VENDOR.toString())) {
- 788 4 foundSomething = true ;
- 789 4 vendorEvidence.addEvidence(source, key, value, Confidence.HIGH);
- 790 4 addMatchingValues(classInformation, value, vendorEvidence);
- 791 244 } else if (key.equalsIgnoreCase(Attributes.Name.IMPLEMENTATION_VENDOR_ID.toString())) {
+ 780 65 } else if (key.equalsIgnoreCase(Attributes.Name.IMPLEMENTATION_TITLE.toString())) {
+ 781 1 foundSomething = true ;
+ 782 1 productEvidence.addEvidence(source, key, value, Confidence.HIGH);
+ 783 1 addMatchingValues(classInformation, value, productEvidence);
+ 784 64 } else if (key.equalsIgnoreCase(Attributes.Name.IMPLEMENTATION_VERSION.toString())) {
+ 785 2 foundSomething = true ;
+ 786 2 versionEvidence.addEvidence(source, key, value, Confidence.HIGH);
+ 787 62 } else if (key.equalsIgnoreCase(Attributes.Name.IMPLEMENTATION_VENDOR.toString())) {
+ 788 1 foundSomething = true ;
+ 789 1 vendorEvidence.addEvidence(source, key, value, Confidence.HIGH);
+ 790 1 addMatchingValues(classInformation, value, vendorEvidence);
+ 791 61 } else if (key.equalsIgnoreCase(Attributes.Name.IMPLEMENTATION_VENDOR_ID.toString())) {
792 0 foundSomething = true ;
793 0 vendorEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
794 0 addMatchingValues(classInformation, value, vendorEvidence);
- 795 244 } else if (key.equalsIgnoreCase(BUNDLE_DESCRIPTION)) {
- 796 8 foundSomething = true ;
- 797 8 addDescription(dependency, value, "manifest" , key);
+ 795 61 } else if (key.equalsIgnoreCase(BUNDLE_DESCRIPTION)) {
+ 796 2 foundSomething = true ;
+ 797 2 addDescription(dependency, value, "manifest" , key);
798
- 799 8 addMatchingValues(classInformation, value, productEvidence);
- 800 236 } else if (key.equalsIgnoreCase(BUNDLE_NAME)) {
- 801 12 foundSomething = true ;
- 802 12 productEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
- 803 12 addMatchingValues(classInformation, value, productEvidence);
- 804 224 } else if (key.equalsIgnoreCase(BUNDLE_VENDOR)) {
- 805 12 foundSomething = true ;
- 806 12 vendorEvidence.addEvidence(source, key, value, Confidence.HIGH);
- 807 12 addMatchingValues(classInformation, value, vendorEvidence);
- 808 212 } else if (key.equalsIgnoreCase(BUNDLE_VERSION)) {
- 809 12 foundSomething = true ;
- 810 12 versionEvidence.addEvidence(source, key, value, Confidence.HIGH);
- 811 200 } else if (key.equalsIgnoreCase(Attributes.Name.MAIN_CLASS.toString())) {
- 812 8 continue ;
+ 799 2 addMatchingValues(classInformation, value, productEvidence);
+ 800 59 } else if (key.equalsIgnoreCase(BUNDLE_NAME)) {
+ 801 3 foundSomething = true ;
+ 802 3 productEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
+ 803 3 addMatchingValues(classInformation, value, productEvidence);
+ 804 56 } else if (key.equalsIgnoreCase(BUNDLE_VENDOR)) {
+ 805 3 foundSomething = true ;
+ 806 3 vendorEvidence.addEvidence(source, key, value, Confidence.HIGH);
+ 807 3 addMatchingValues(classInformation, value, vendorEvidence);
+ 808 53 } else if (key.equalsIgnoreCase(BUNDLE_VERSION)) {
+ 809 3 foundSomething = true ;
+ 810 3 versionEvidence.addEvidence(source, key, value, Confidence.HIGH);
+ 811 50 } else if (key.equalsIgnoreCase(Attributes.Name.MAIN_CLASS.toString())) {
+ 812 2 continue ;
813
814
@@ -1301,10 +1301,10 @@
821
} else {
- 822 192 key = key.toLowerCase();
+ 822 48 key = key.toLowerCase();
823
- 824 192 if (!IGNORE_KEYS.contains(key)
+ 824 48 if (!IGNORE_KEYS.contains(key)
825
&& !key.endsWith("jdk" )
826
@@ -1327,16 +1327,16 @@
&& !isPackage(key, value)) {
835
- 836 56 foundSomething = true ;
- 837 56 if (key.contains("version" )) {
- 838 4 if (key.contains("specification" )) {
- 839 4 versionEvidence.addEvidence(source, key, value, Confidence.LOW);
+ 836 14 foundSomething = true ;
+ 837 14 if (key.contains("version" )) {
+ 838 1 if (key.contains("specification" )) {
+ 839 1 versionEvidence.addEvidence(source, key, value, Confidence.LOW);
840
} else {
841 0 versionEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
842
}
- 843 52 } else if ("build-id" .equals(key)) {
+ 843 13 } else if ("build-id" .equals(key)) {
844 0 int pos = value.indexOf('(' );
845 0 if (pos >= 0) {
846 0 value = value.substring(0, pos - 1);
@@ -1349,9 +1349,9 @@
}
852 0 versionEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
853 0 } else if (key.contains("title" )) {
- 854 4 productEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
- 855 4 addMatchingValues(classInformation, value, productEvidence);
- 856 48 } else if (key.contains("vendor" )) {
+ 854 1 productEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
+ 855 1 addMatchingValues(classInformation, value, productEvidence);
+ 856 12 } else if (key.contains("vendor" )) {
857 0 if (key.contains("specification" )) {
858 0 vendorEvidence.addEvidence(source, key, value, Confidence.LOW);
859
@@ -1360,32 +1360,32 @@
861 0 addMatchingValues(classInformation, value, vendorEvidence);
862
}
- 863 48 } else if (key.contains("name" )) {
- 864 12 productEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
- 865 12 vendorEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
- 866 12 addMatchingValues(classInformation, value, vendorEvidence);
- 867 12 addMatchingValues(classInformation, value, productEvidence);
- 868 36 } else if (key.contains("license" )) {
- 869 8 addLicense(dependency, value);
+ 863 12 } else if (key.contains("name" )) {
+ 864 3 productEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
+ 865 3 vendorEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
+ 866 3 addMatchingValues(classInformation, value, vendorEvidence);
+ 867 3 addMatchingValues(classInformation, value, productEvidence);
+ 868 9 } else if (key.contains("license" )) {
+ 869 2 addLicense(dependency, value);
870
} else {
- 871 28 if (key.contains("description" )) {
+ 871 7 if (key.contains("description" )) {
872 0 addDescription(dependency, value, "manifest" , key);
873
} else {
- 874 28 productEvidence.addEvidence(source, key, value, Confidence.LOW);
- 875 28 vendorEvidence.addEvidence(source, key, value, Confidence.LOW);
- 876 28 addMatchingValues(classInformation, value, vendorEvidence);
- 877 28 addMatchingValues(classInformation, value, productEvidence);
- 878 28 if (value.matches(".*\\d.*" )) {
- 879 12 final StringTokenizer tokenizer = new StringTokenizer(value, " " );
- 880 60 while (tokenizer.hasMoreElements()) {
- 881 48 final String s = tokenizer.nextToken();
- 882 48 if (s.matches("^[0-9.]+$" )) {
- 883 4 versionEvidence.addEvidence(source, key, s, Confidence.LOW);
+ 874 7 productEvidence.addEvidence(source, key, value, Confidence.LOW);
+ 875 7 vendorEvidence.addEvidence(source, key, value, Confidence.LOW);
+ 876 7 addMatchingValues(classInformation, value, vendorEvidence);
+ 877 7 addMatchingValues(classInformation, value, productEvidence);
+ 878 7 if (value.matches(".*\\d.*" )) {
+ 879 3 final StringTokenizer tokenizer = new StringTokenizer(value, " " );
+ 880 15 while (tokenizer.hasMoreElements()) {
+ 881 12 final String s = tokenizer.nextToken();
+ 882 12 if (s.matches("^[0-9.]+$" )) {
+ 883 1 versionEvidence.addEvidence(source, key, s, Confidence.LOW);
884
}
- 885 48 }
+ 885 12 }
886
}
887
@@ -1396,16 +1396,16 @@
}
890
}
- 891 252 }
+ 891 63 }
892
} finally {
- 893 20 if (jar != null ) {
- 894 20 jar.close();
+ 893 5 if (jar != null ) {
+ 894 5 jar.close();
895
}
896
}
- 897 20 return foundSomething;
+ 897 5 return foundSomething;
898
}
899
@@ -1436,21 +1436,21 @@
912
private String addDescription(Dependency dependency, String description, String source, String key) {
- 913 8 if (dependency.getDescription() == null ) {
- 914 8 dependency.setDescription(description);
+ 913 2 if (dependency.getDescription() == null ) {
+ 914 2 dependency.setDescription(description);
915
}
916
String desc;
- 917 8 if (HTML_DETECTION_PATTERN.matcher(description).find()) {
+ 917 2 if (HTML_DETECTION_PATTERN.matcher(description).find()) {
918 0 desc = Jsoup.parse(description).text();
919
} else {
- 920 8 desc = description;
+ 920 2 desc = description;
921
}
- 922 8 dependency.setDescription(desc);
- 923 8 if (desc.length() > 100) {
+ 922 2 dependency.setDescription(desc);
+ 923 2 if (desc.length() > 100) {
924 0 desc = desc.replaceAll("\\s\\s+" , " " );
925 0 final int posSuchAs = desc.toLowerCase().indexOf("such as " , 100);
926 0 final int posLike = desc.toLowerCase().indexOf("like " , 100);
@@ -1491,11 +1491,11 @@
953 0 dependency.getProductEvidence().addEvidence(source, key, desc, Confidence.LOW);
954 0 dependency.getVendorEvidence().addEvidence(source, key, desc, Confidence.LOW);
955 0 } else {
- 956 8 dependency.getProductEvidence().addEvidence(source, key, desc, Confidence.MEDIUM);
- 957 8 dependency.getVendorEvidence().addEvidence(source, key, desc, Confidence.MEDIUM);
+ 956 2 dependency.getProductEvidence().addEvidence(source, key, desc, Confidence.MEDIUM);
+ 957 2 dependency.getVendorEvidence().addEvidence(source, key, desc, Confidence.MEDIUM);
958
}
- 959 8 return desc;
+ 959 2 return desc;
960
}
961
@@ -1514,13 +1514,13 @@
968
private void addLicense(Dependency d, String license) {
- 969 8 if (d.getLicense() == null ) {
- 970 8 d.setLicense(license);
+ 969 2 if (d.getLicense() == null ) {
+ 970 2 d.setLicense(license);
971 0 } else if (!d.getLicense().contains(license)) {
972 0 d.setLicense(d.getLicense() + NEWLINE + license);
973
}
- 974 8 }
+ 974 2 }
975
976
@@ -1529,7 +1529,7 @@
978
- 979 28 private File tempFileLocation = null ;
+ 979 7 private File tempFileLocation = null ;
980
981
@@ -1546,19 +1546,19 @@
@Override
987
public void initializeFileTypeAnalyzer() throws Exception {
- 988 4 final File baseDir = Settings.getTempDirectory();
- 989 4 tempFileLocation = File.createTempFile("check" , "tmp" , baseDir);
- 990 4 if (!tempFileLocation.delete()) {
+ 988 1 final File baseDir = Settings.getTempDirectory();
+ 989 1 tempFileLocation = File.createTempFile("check" , "tmp" , baseDir);
+ 990 1 if (!tempFileLocation.delete()) {
991 0 final String msg = String.format("Unable to delete temporary file '%s'." , tempFileLocation.getAbsolutePath());
992 0 throw new AnalysisException(msg);
993
}
- 994 4 if (!tempFileLocation.mkdirs()) {
+ 994 1 if (!tempFileLocation.mkdirs()) {
995 0 final String msg = String.format("Unable to create directory '%s'." , tempFileLocation.getAbsolutePath());
996 0 throw new AnalysisException(msg);
997
}
- 998 4 }
+ 998 1 }
999
1000
@@ -1571,10 +1571,10 @@
@Override
1004
public void close() {
- 1005 4 if (tempFileLocation != null && tempFileLocation.exists()) {
- 1006 4 LOGGER.log(Level.FINE, "Attempting to delete temporary files" );
- 1007 4 final boolean success = FileUtils.delete(tempFileLocation);
- 1008 4 if (!success) {
+ 1005 1 if (tempFileLocation != null && tempFileLocation.exists()) {
+ 1006 1 LOGGER.log(Level.FINE, "Attempting to delete temporary files" );
+ 1007 1 final boolean success = FileUtils.delete(tempFileLocation);
+ 1008 1 if (!success) {
1009 0 LOGGER.log(Level.WARNING,
1010
"Failed to delete some temporary files, see the log for more details" );
@@ -1582,7 +1582,7 @@
}
1012
}
- 1013 4 }
+ 1013 1 }
1014
1015
@@ -1641,40 +1641,40 @@
1042
protected String interpolateString(String text, Properties properties) {
- 1043 56 Properties props = properties;
- 1044 56 if (text == null ) {
- 1045 4 return text;
+ 1043 14 Properties props = properties;
+ 1044 14 if (text == null ) {
+ 1045 1 return text;
1046
}
- 1047 52 if (props == null ) {
- 1048 24 props = new Properties();
+ 1047 13 if (props == null ) {
+ 1048 6 props = new Properties();
1049
}
1050
- 1051 52 final int pos = text.indexOf("${" );
- 1052 52 if (pos < 0) {
- 1053 40 return text;
+ 1051 13 final int pos = text.indexOf("${" );
+ 1052 13 if (pos < 0) {
+ 1053 10 return text;
1054
}
- 1055 12 final int end = text.indexOf("}" );
- 1056 12 if (end < pos) {
+ 1055 3 final int end = text.indexOf("}" );
+ 1056 3 if (end < pos) {
1057 0 return text;
1058
}
1059
- 1060 12 final String propName = text.substring(pos + 2, end);
- 1061 12 String propValue = interpolateString(props.getProperty(propName), props);
- 1062 12 if (propValue == null ) {
+ 1060 3 final String propName = text.substring(pos + 2, end);
+ 1061 3 String propValue = interpolateString(props.getProperty(propName), props);
+ 1062 3 if (propValue == null ) {
1063 0 propValue = "" ;
1064
}
- 1065 12 final StringBuilder sb = new StringBuilder(propValue.length() + text.length());
- 1066 12 sb.append(text.subSequence(0, pos));
- 1067 12 sb.append(propValue);
- 1068 12 sb.append(text.substring(end + 1));
- 1069 12 return interpolateString(sb.toString(), props);
+ 1065 3 final StringBuilder sb = new StringBuilder(propValue.length() + text.length());
+ 1066 3 sb.append(text.subSequence(0, pos));
+ 1067 3 sb.append(propValue);
+ 1068 3 sb.append(text.substring(end + 1));
+ 1069 3 return interpolateString(sb.toString(), props);
1070
}
1071
@@ -1695,9 +1695,9 @@
1079
private boolean isImportPackage(String key, String value) {
- 1080 60 final Pattern packageRx = Pattern.compile("^([a-zA-Z0-9_#\\$\\*\\.]+\\s*[,;]\\s*)+([a-zA-Z0-9_#\\$\\*\\.]+\\s*)?$" );
- 1081 60 final boolean matches = packageRx.matcher(value).matches();
- 1082 60 return matches && (key.contains("import" ) || key.contains("include" ) || value.length() > 10);
+ 1080 15 final Pattern packageRx = Pattern.compile("^([a-zA-Z0-9_#\\$\\*\\.]+\\s*[,;]\\s*)+([a-zA-Z0-9_#\\$\\*\\.]+\\s*)?$" );
+ 1081 15 final boolean matches = packageRx.matcher(value).matches();
+ 1082 15 return matches && (key.contains("import" ) || key.contains("include" ) || value.length() > 10);
1083
}
1084
@@ -1718,41 +1718,41 @@
1092
private ArrayList<ClassNameInformation> collectClassNames(Dependency dependency) {
- 1093 20 final ArrayList<ClassNameInformation> classNames = new ArrayList<ClassNameInformation>();
- 1094 20 JarFile jar = null ;
+ 1093 5 final ArrayList<ClassNameInformation> classNames = new ArrayList<ClassNameInformation>();
+ 1094 5 JarFile jar = null ;
1095
try {
- 1096 20 jar = new JarFile(dependency.getActualFilePath());
- 1097 20 final Enumeration entries = jar.entries();
- 1098 7392 while (entries.hasMoreElements()) {
- 1099 7372 final JarEntry entry = (JarEntry) entries.nextElement();
- 1100 7372 final String name = entry.getName().toLowerCase();
+ 1096 5 jar = new JarFile(dependency.getActualFilePath());
+ 1097 5 final Enumeration entries = jar.entries();
+ 1098 1848 while (entries.hasMoreElements()) {
+ 1099 1843 final JarEntry entry = (JarEntry) entries.nextElement();
+ 1100 1843 final String name = entry.getName().toLowerCase();
1101
- 1102 7372 if (name.endsWith(".class" ) && !name.matches("^javax?\\..*$" )) {
- 1103 6140 final ClassNameInformation className = new ClassNameInformation(name.substring(0, name.length() - 6));
- 1104 6140 classNames.add(className);
+ 1102 1843 if (name.endsWith(".class" ) && !name.matches("^javax?\\..*$" )) {
+ 1103 1535 final ClassNameInformation className = new ClassNameInformation(name.substring(0, name.length() - 6));
+ 1104 1535 classNames.add(className);
1105
}
- 1106 7372 }
+ 1106 1843 }
1107 0 } catch (IOException ex) {
1108 0 final String msg = String.format("Unable to open jar file '%s'." , dependency.getFileName());
1109 0 LOGGER.log(Level.WARNING, msg);
1110 0 LOGGER.log(Level.FINE, null , ex);
1111
} finally {
- 1112 20 if (jar != null ) {
+ 1112 5 if (jar != null ) {
1113
try {
- 1114 20 jar.close();
+ 1114 5 jar.close();
1115 0 } catch (IOException ex) {
1116 0 LOGGER.log(Level.FINEST, null , ex);
- 1117 20 }
+ 1117 5 }
1118
}
1119
}
- 1120 20 return classNames;
+ 1120 5 return classNames;
1121
}
1122
@@ -1777,31 +1777,31 @@
private void analyzeFullyQualifiedClassNames(ArrayList<ClassNameInformation> classNames,
1132
HashMap<String, Integer> vendor, HashMap<String, Integer> product) {
- 1133 20 for (ClassNameInformation entry : classNames) {
- 1134 6140 final ArrayList<String> list = entry.getPackageStructure();
- 1135 6140 addEntry(vendor, list.get(0));
+ 1133 5 for (ClassNameInformation entry : classNames) {
+ 1134 1535 final ArrayList<String> list = entry.getPackageStructure();
+ 1135 1535 addEntry(vendor, list.get(0));
1136
- 1137 6140 if (list.size() == 2) {
+ 1137 1535 if (list.size() == 2) {
1138 0 addEntry(product, list.get(1));
1139
}
- 1140 6140 if (list.size() == 3) {
- 1141 1380 addEntry(vendor, list.get(1));
- 1142 1380 addEntry(product, list.get(1));
- 1143 1380 addEntry(product, list.get(2));
+ 1140 1535 if (list.size() == 3) {
+ 1141 345 addEntry(vendor, list.get(1));
+ 1142 345 addEntry(product, list.get(1));
+ 1143 345 addEntry(product, list.get(2));
1144
}
- 1145 6140 if (list.size() >= 4) {
- 1146 4760 addEntry(vendor, list.get(1));
- 1147 4760 addEntry(vendor, list.get(2));
- 1148 4760 addEntry(product, list.get(1));
- 1149 4760 addEntry(product, list.get(2));
- 1150 4760 addEntry(product, list.get(3));
+ 1145 1535 if (list.size() >= 4) {
+ 1146 1190 addEntry(vendor, list.get(1));
+ 1147 1190 addEntry(vendor, list.get(2));
+ 1148 1190 addEntry(product, list.get(1));
+ 1149 1190 addEntry(product, list.get(2));
+ 1150 1190 addEntry(product, list.get(3));
1151
}
- 1152 6140 }
- 1153 20 }
+ 1152 1535 }
+ 1153 5 }
1154
1155
@@ -1820,14 +1820,14 @@
1162
private void addEntry(HashMap<String, Integer> collection, String key) {
- 1163 34080 if (collection.containsKey(key)) {
- 1164 29948 collection.put(key, collection.get(key) + 1);
+ 1163 8520 if (collection.containsKey(key)) {
+ 1164 7487 collection.put(key, collection.get(key) + 1);
1165
} else {
- 1166 4132 collection.put(key, 1);
+ 1166 1033 collection.put(key, 1);
1167
}
- 1168 34080 }
+ 1168 8520 }
1169
1170
@@ -1850,20 +1850,20 @@
1179
private void addMatchingValues(ArrayList<ClassNameInformation> classes, String value, EvidenceCollection evidence) {
- 1180 164 if (value == null || value.isEmpty() || classes == null || classes.isEmpty()) {
+ 1180 41 if (value == null || value.isEmpty() || classes == null || classes.isEmpty()) {
1181 0 return ;
1182
}
- 1183 164 final String text = value.toLowerCase();
- 1184 164 for (ClassNameInformation cni : classes) {
- 1185 66000 for (String key : cni.getPackageStructure()) {
- 1186 255280 if (text.contains(key)) {
- 1187 61600 evidence.addEvidence("jar" , "package name" , key, Confidence.HIGHEST);
+ 1183 41 final String text = value.toLowerCase();
+ 1184 41 for (ClassNameInformation cni : classes) {
+ 1185 16500 for (String key : cni.getPackageStructure()) {
+ 1186 63820 if (text.contains(key)) {
+ 1187 15400 evidence.addEvidence("jar" , "package name" , key, Confidence.HIGHEST);
1188
}
- 1189 255280 }
- 1190 66000 }
- 1191 164 }
+ 1189 63820 }
+ 1190 16500 }
+ 1191 41 }
1192
1193
@@ -1884,7 +1884,7 @@
private boolean isPackage(String key, String value) {
1201
- 1202 60 return !key.matches(".*(version|title|vendor|name|license|description).*" )
+ 1202 15 return !key.matches(".*(version|title|vendor|name|license|description).*" )
1203
&& value.matches("^([a-zA-Z_][a-zA-Z0-9_\\$]*(\\.[a-zA-Z_][a-zA-Z0-9_\\$]*)*)?$" );
1204
@@ -1911,7 +1911,7 @@
private void extractLicense(Model pom, Properties pomProperties, Dependency dependency) {
1215
- 1216 4 if (pom.getLicenses() != null ) {
+ 1216 1 if (pom.getLicenses() != null ) {
1217 0 String license = null ;
1218 0 for (License lic : pom.getLicenses().getLicense()) {
1219 0 String tmp = null ;
@@ -1951,7 +1951,7 @@
}
1245
}
- 1246 4 }
+ 1246 1 }
1247
1248
@@ -2004,30 +2004,30 @@
1272
- 1273 6140 ClassNameInformation(String className) {
- 1274 6140 name = className;
- 1275 6140 if (name.contains("/" )) {
- 1276 6140 final String[] tmp = className.toLowerCase().split("/" );
- 1277 6140 int start = 0;
- 1278 6140 int end = 3;
- 1279 6140 if ("com" .equals(tmp[0]) || "org" .equals(tmp[0])) {
- 1280 6140 start = 1;
- 1281 6140 end = 4;
+ 1273 1535 ClassNameInformation(String className) {
+ 1274 1535 name = className;
+ 1275 1535 if (name.contains("/" )) {
+ 1276 1535 final String[] tmp = className.toLowerCase().split("/" );
+ 1277 1535 int start = 0;
+ 1278 1535 int end = 3;
+ 1279 1535 if ("com" .equals(tmp[0]) || "org" .equals(tmp[0])) {
+ 1280 1535 start = 1;
+ 1281 1535 end = 4;
1282
}
- 1283 6140 if (tmp.length <= end) {
- 1284 1380 end = tmp.length - 1;
+ 1283 1535 if (tmp.length <= end) {
+ 1284 345 end = tmp.length - 1;
1285
}
- 1286 29320 for (int i = start; i <= end; i++) {
- 1287 23180 packageStructure.add(tmp[i]);
+ 1286 7330 for (int i = start; i <= end; i++) {
+ 1287 5795 packageStructure.add(tmp[i]);
1288
}
- 1289 6140 } else {
+ 1289 1535 } else {
1290 0 packageStructure.add(name);
1291
}
- 1292 6140 }
+ 1292 1535 }
1293
1294
@@ -2078,7 +2078,7 @@
1317
- 1318 6140 private final ArrayList<String> packageStructure = new ArrayList<String>();
+ 1318 1535 private final ArrayList<String> packageStructure = new ArrayList<String>();
1319
1320
@@ -2135,6 +2135,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.JavaScriptAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.JavaScriptAnalyzer.html
index 6354be115..28df59f0b 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.JavaScriptAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.JavaScriptAnalyzer.html
@@ -105,7 +105,7 @@
44
- 45 4 private static final Logger LOGGER = Logger.getLogger(JavaScriptAnalyzer.class .getName());
+ 45 1 private static final Logger LOGGER = Logger.getLogger(JavaScriptAnalyzer.class .getName());
46
47
@@ -124,14 +124,14 @@
54
- 55 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
+ 55 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
56
57
58
- 59 4 private static final Set<String> EXTENSIONS = newHashSet("js" );
+ 59 1 private static final Set<String> EXTENSIONS = newHashSet("js" );
60
61
@@ -148,7 +148,7 @@
@Override
67
public Set<String> getSupportedExtensions() {
- 68 8 return EXTENSIONS;
+ 68 2 return EXTENSIONS;
69
}
70
@@ -167,7 +167,7 @@
@Override
77
public String getName() {
- 78 4 return ANALYZER_NAME;
+ 78 1 return ANALYZER_NAME;
79
}
80
@@ -186,7 +186,7 @@
@Override
87
public AnalysisPhase getAnalysisPhase() {
- 88 4 return ANALYSIS_PHASE;
+ 88 1 return ANALYSIS_PHASE;
89
}
90
@@ -205,7 +205,7 @@
@Override
97
protected String getAnalyzerEnabledSettingKey() {
- 98 20 return Settings.KEYS.ANALYZER_JAVASCRIPT_ENABLED;
+ 98 5 return Settings.KEYS.ANALYZER_JAVASCRIPT_ENABLED;
99
}
100
@@ -275,6 +275,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NexusAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NexusAnalyzer.html
index cc385d177..4a6ead028 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NexusAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NexusAnalyzer.html
@@ -125,7 +125,7 @@
54
- 55 4 private static final Logger LOGGER = Logger.getLogger(NexusAnalyzer.class .getName());
+ 55 1 private static final Logger LOGGER = Logger.getLogger(NexusAnalyzer.class .getName());
56
57
@@ -144,7 +144,7 @@
64
- 65 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
+ 65 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
66
67
@@ -153,7 +153,7 @@
69
- 70 4 private static final Set<String> SUPPORTED_EXTENSIONS = newHashSet("jar" );
+ 70 1 private static final Set<String> SUPPORTED_EXTENSIONS = newHashSet("jar" );
71
72
@@ -220,7 +220,7 @@
@Override
110
public String getName() {
- 111 16 return ANALYZER_NAME;
+ 111 4 return ANALYZER_NAME;
112
}
113
@@ -239,7 +239,7 @@
@Override
120
protected String getAnalyzerEnabledSettingKey() {
- 121 8 return Settings.KEYS.ANALYZER_NEXUS_ENABLED;
+ 121 2 return Settings.KEYS.ANALYZER_NEXUS_ENABLED;
122
}
123
@@ -258,7 +258,7 @@
@Override
130
public AnalysisPhase getAnalysisPhase() {
- 131 4 return ANALYSIS_PHASE;
+ 131 1 return ANALYSIS_PHASE;
132
}
133
@@ -351,6 +351,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NuspecAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NuspecAnalyzer.html
index c941998a7..c350378f6 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NuspecAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NuspecAnalyzer.html
@@ -107,7 +107,7 @@
45
- 46 4 private static final Logger LOGGER = Logger.getLogger(NuspecAnalyzer.class .getName());
+ 46 1 private static final Logger LOGGER = Logger.getLogger(NuspecAnalyzer.class .getName());
47
48
@@ -126,7 +126,7 @@
55
- 56 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
+ 56 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
57
58
@@ -135,7 +135,7 @@
60
- 61 4 private static final Set<String> SUPPORTED_EXTENSIONS = newHashSet("nuspec" );
+ 61 1 private static final Set<String> SUPPORTED_EXTENSIONS = newHashSet("nuspec" );
62
63
@@ -169,7 +169,7 @@
@Override
78
public String getName() {
- 79 20 return ANALYZER_NAME;
+ 79 5 return ANALYZER_NAME;
80
}
81
@@ -188,7 +188,7 @@
@Override
88
protected String getAnalyzerEnabledSettingKey() {
- 89 24 return Settings.KEYS.ANALYZER_NUSPEC_ENABLED;
+ 89 6 return Settings.KEYS.ANALYZER_NUSPEC_ENABLED;
90
}
91
@@ -207,7 +207,7 @@
@Override
98
public AnalysisPhase getAnalysisPhase() {
- 99 8 return ANALYSIS_PHASE;
+ 99 2 return ANALYSIS_PHASE;
100
}
101
@@ -226,7 +226,7 @@
@Override
108
public Set<String> getSupportedExtensions() {
- 109 3408 return SUPPORTED_EXTENSIONS;
+ 109 852 return SUPPORTED_EXTENSIONS;
110
}
111
@@ -297,6 +297,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NvdCveAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NvdCveAnalyzer.html
index 970540f63..64ab5b0a9 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NvdCveAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.NvdCveAnalyzer.html
@@ -129,9 +129,9 @@
56
public void open() throws SQLException, IOException, DatabaseException, ClassNotFoundException {
- 57 4 cveDB = new CveDB();
- 58 4 cveDB.open();
- 59 4 }
+ 57 1 cveDB = new CveDB();
+ 58 1 cveDB.open();
+ 59 1 }
60
61
@@ -144,9 +144,9 @@
@Override
65
public void close() {
- 66 4 cveDB.close();
- 67 4 cveDB = null ;
- 68 4 }
+ 66 1 cveDB.close();
+ 67 1 cveDB = null ;
+ 68 1 }
69
70
@@ -161,7 +161,7 @@
75
public boolean isOpen() {
- 76 4 return (cveDB != null );
+ 76 1 return (cveDB != null );
77
}
78
@@ -180,12 +180,12 @@
@Override
85
protected void finalize() throws Throwable {
- 86 4 super .finalize();
- 87 4 if (isOpen()) {
+ 86 1 super .finalize();
+ 87 1 if (isOpen()) {
88 0 close();
89
}
- 90 4 }
+ 90 1 }
91
92
@@ -206,20 +206,20 @@
@Override
100
public void analyze(Dependency dependency, Engine engine) throws AnalysisException {
- 101 8 for (Identifier id : dependency.getIdentifiers()) {
- 102 8 if ("cpe" .equals(id.getType())) {
+ 101 2 for (Identifier id : dependency.getIdentifiers()) {
+ 102 2 if ("cpe" .equals(id.getType())) {
103
try {
- 104 8 final String value = id.getValue();
- 105 8 final List<Vulnerability> vulns = cveDB.getVulnerabilities(value);
- 106 8 dependency.getVulnerabilities().addAll(vulns);
+ 104 2 final String value = id.getValue();
+ 105 2 final List<Vulnerability> vulns = cveDB.getVulnerabilities(value);
+ 106 2 dependency.getVulnerabilities().addAll(vulns);
107 0 } catch (DatabaseException ex) {
108 0 throw new AnalysisException(ex);
- 109 8 }
+ 109 2 }
110
}
- 111 8 }
- 112 8 for (Identifier id : dependency.getSuppressedIdentifiers()) {
+ 111 2 }
+ 112 2 for (Identifier id : dependency.getSuppressedIdentifiers()) {
113 0 if ("cpe" .equals(id.getType())) {
114
try {
@@ -232,7 +232,7 @@
121
}
122 0 }
- 123 8 }
+ 123 2 }
124
125
@@ -249,7 +249,7 @@
@Override
131
public String getName() {
- 132 16 return "NVD CVE Analyzer" ;
+ 132 4 return "NVD CVE Analyzer" ;
133
}
134
@@ -268,7 +268,7 @@
@Override
141
public AnalysisPhase getAnalysisPhase() {
- 142 4 return AnalysisPhase.FINDING_ANALYSIS;
+ 142 1 return AnalysisPhase.FINDING_ANALYSIS;
143
}
144
@@ -287,12 +287,12 @@
@Override
151
public void initialize() throws Exception {
- 152 4 this .open();
- 153 4 }
+ 152 1 this .open();
+ 153 1 }
154
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.VulnerabilitySuppressionAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.VulnerabilitySuppressionAnalyzer.html
index bfe0a16c1..649836cf4 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.VulnerabilitySuppressionAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.VulnerabilitySuppressionAnalyzer.html
@@ -97,7 +97,7 @@
40
- 41 4 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.POST_FINDING_ANALYSIS;
+ 41 1 private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.POST_FINDING_ANALYSIS;
42
43
@@ -114,7 +114,7 @@
@Override
49
public String getName() {
- 50 16 return ANALYZER_NAME;
+ 50 4 return ANALYZER_NAME;
51
}
52
@@ -133,7 +133,7 @@
@Override
59
public AnalysisPhase getAnalysisPhase() {
- 60 4 return ANALYSIS_PHASE;
+ 60 1 return ANALYSIS_PHASE;
61
}
62
@@ -146,20 +146,20 @@
public void analyze(final Dependency dependency, final Engine engine) throws AnalysisException {
66
- 67 8 if (getRules() == null || getRules().size() <= 0) {
+ 67 2 if (getRules() == null || getRules().size() <= 0) {
68 0 return ;
69
}
70
- 71 8 for (final SuppressionRule rule : getRules()) {
- 72 16 rule.process(dependency);
- 73 16 }
- 74 8 }
+ 71 2 for (final SuppressionRule rule : getRules()) {
+ 72 10 rule.process(dependency);
+ 73 10 }
+ 74 2 }
75
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.exception.AnalysisException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.exception.AnalysisException.html
index 17611dad0..8bb0d6f42 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.exception.AnalysisException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.exception.AnalysisException.html
@@ -151,6 +151,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.exception.ArchiveExtractionException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.exception.ArchiveExtractionException.html
index 0ae40d864..dc65720cd 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.exception.ArchiveExtractionException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.analyzer.exception.ArchiveExtractionException.html
@@ -151,6 +151,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.CpeMemoryIndex.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.CpeMemoryIndex.html
index da643cef7..a89946113 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.CpeMemoryIndex.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.CpeMemoryIndex.html
@@ -135,14 +135,14 @@
59
- 60 4 private static final Logger LOGGER = Logger.getLogger(CpeMemoryIndex.class .getName());
+ 60 1 private static final Logger LOGGER = Logger.getLogger(CpeMemoryIndex.class .getName());
61
62
63
- 64 4 private static CpeMemoryIndex instance = new CpeMemoryIndex();
+ 64 1 private static CpeMemoryIndex instance = new CpeMemoryIndex();
65
66
@@ -169,7 +169,7 @@
77
public static CpeMemoryIndex getInstance() {
- 78 8 return instance;
+ 78 2 return instance;
79
}
80
@@ -244,22 +244,22 @@
115
public void open(CveDB cve) throws IndexException {
- 116 8 if (!openState) {
- 117 4 index = new RAMDirectory();
- 118 4 buildIndex(cve);
+ 116 2 if (!openState) {
+ 117 1 index = new RAMDirectory();
+ 118 1 buildIndex(cve);
119
try {
- 120 4 indexReader = DirectoryReader.open(index);
+ 120 1 indexReader = DirectoryReader.open(index);
121 0 } catch (IOException ex) {
122 0 throw new IndexException(ex);
- 123 4 }
- 124 4 indexSearcher = new IndexSearcher(indexReader);
- 125 4 searchingAnalyzer = createSearchingAnalyzer();
- 126 4 queryParser = new QueryParser(LuceneUtils.CURRENT_VERSION, Fields.DOCUMENT_KEY, searchingAnalyzer);
- 127 4 openState = true ;
+ 123 1 }
+ 124 1 indexSearcher = new IndexSearcher(indexReader);
+ 125 1 searchingAnalyzer = createSearchingAnalyzer();
+ 126 1 queryParser = new QueryParser(LuceneUtils.CURRENT_VERSION, Fields.DOCUMENT_KEY, searchingAnalyzer);
+ 127 1 openState = true ;
128
}
- 129 8 }
+ 129 2 }
130
131
@@ -302,9 +302,9 @@
@SuppressWarnings("unchecked" )
150
private Analyzer createIndexingAnalyzer() {
- 151 4 final Map fieldAnalyzers = new HashMap();
- 152 4 fieldAnalyzers.put(Fields.DOCUMENT_KEY, new KeywordAnalyzer());
- 153 4 return new PerFieldAnalyzerWrapper(new FieldAnalyzer(LuceneUtils.CURRENT_VERSION), fieldAnalyzers);
+ 151 1 final Map fieldAnalyzers = new HashMap();
+ 152 1 fieldAnalyzers.put(Fields.DOCUMENT_KEY, new KeywordAnalyzer());
+ 153 1 return new PerFieldAnalyzerWrapper(new FieldAnalyzer(LuceneUtils.CURRENT_VERSION), fieldAnalyzers);
154
}
155
@@ -323,15 +323,15 @@
@SuppressWarnings("unchecked" )
162
private Analyzer createSearchingAnalyzer() {
- 163 4 final Map fieldAnalyzers = new HashMap();
- 164 4 fieldAnalyzers.put(Fields.DOCUMENT_KEY, new KeywordAnalyzer());
- 165 4 productSearchFieldAnalyzer = new SearchFieldAnalyzer(LuceneUtils.CURRENT_VERSION);
- 166 4 vendorSearchFieldAnalyzer = new SearchFieldAnalyzer(LuceneUtils.CURRENT_VERSION);
- 167 4 fieldAnalyzers.put(Fields.PRODUCT, productSearchFieldAnalyzer);
- 168 4 fieldAnalyzers.put(Fields.VENDOR, vendorSearchFieldAnalyzer);
+ 163 1 final Map fieldAnalyzers = new HashMap();
+ 164 1 fieldAnalyzers.put(Fields.DOCUMENT_KEY, new KeywordAnalyzer());
+ 165 1 productSearchFieldAnalyzer = new SearchFieldAnalyzer(LuceneUtils.CURRENT_VERSION);
+ 166 1 vendorSearchFieldAnalyzer = new SearchFieldAnalyzer(LuceneUtils.CURRENT_VERSION);
+ 167 1 fieldAnalyzers.put(Fields.PRODUCT, productSearchFieldAnalyzer);
+ 168 1 fieldAnalyzers.put(Fields.VENDOR, vendorSearchFieldAnalyzer);
169
- 170 4 return new PerFieldAnalyzerWrapper(new FieldAnalyzer(LuceneUtils.CURRENT_VERSION), fieldAnalyzers);
+ 170 1 return new PerFieldAnalyzerWrapper(new FieldAnalyzer(LuceneUtils.CURRENT_VERSION), fieldAnalyzers);
171
}
172
@@ -356,13 +356,13 @@
182
public void saveEntry(String vendor, String product, IndexWriter indexWriter) throws CorruptIndexException, IOException {
- 183 88708 final Document doc = new Document();
- 184 88708 final Field v = new TextField(Fields.VENDOR, vendor, Field.Store.YES);
- 185 88708 final Field p = new TextField(Fields.PRODUCT, product, Field.Store.YES);
- 186 88708 doc.add(v);
- 187 88708 doc.add(p);
- 188 88708 indexWriter.addDocument(doc);
- 189 88708 }
+ 183 22135 final Document doc = new Document();
+ 184 22135 final Field v = new TextField(Fields.VENDOR, vendor, Field.Store.YES);
+ 185 22135 final Field p = new TextField(Fields.PRODUCT, product, Field.Store.YES);
+ 186 22135 doc.add(v);
+ 187 22135 doc.add(p);
+ 188 22135 indexWriter.addDocument(doc);
+ 189 22135 }
190
191
@@ -373,30 +373,30 @@
194
public void close() {
- 195 4 if (searchingAnalyzer != null ) {
- 196 4 searchingAnalyzer.close();
- 197 4 searchingAnalyzer = null ;
+ 195 1 if (searchingAnalyzer != null ) {
+ 196 1 searchingAnalyzer.close();
+ 197 1 searchingAnalyzer = null ;
198
}
- 199 4 if (indexReader != null ) {
+ 199 1 if (indexReader != null ) {
200
try {
- 201 4 indexReader.close();
+ 201 1 indexReader.close();
202 0 } catch (IOException ex) {
203 0 LOGGER.log(Level.FINEST, null , ex);
- 204 4 }
- 205 4 indexReader = null ;
+ 204 1 }
+ 205 1 indexReader = null ;
206
}
- 207 4 queryParser = null ;
- 208 4 indexSearcher = null ;
- 209 4 if (index != null ) {
- 210 4 index.close();
- 211 4 index = null ;
+ 207 1 queryParser = null ;
+ 208 1 indexSearcher = null ;
+ 209 1 if (index != null ) {
+ 210 1 index.close();
+ 211 1 index = null ;
212
}
- 213 4 openState = false ;
- 214 4 }
+ 213 1 openState = false ;
+ 214 1 }
215
216
@@ -413,53 +413,53 @@
222
private void buildIndex(CveDB cve) throws IndexException {
- 223 4 Analyzer analyzer = null ;
- 224 4 IndexWriter indexWriter = null ;
+ 223 1 Analyzer analyzer = null ;
+ 224 1 IndexWriter indexWriter = null ;
225
try {
- 226 4 analyzer = createIndexingAnalyzer();
- 227 4 final IndexWriterConfig conf = new IndexWriterConfig(LuceneUtils.CURRENT_VERSION, analyzer);
- 228 4 indexWriter = new IndexWriter(index, conf);
+ 226 1 analyzer = createIndexingAnalyzer();
+ 227 1 final IndexWriterConfig conf = new IndexWriterConfig(LuceneUtils.CURRENT_VERSION, analyzer);
+ 228 1 indexWriter = new IndexWriter(index, conf);
229
try {
- 230 4 final Set<Pair<String, String>> data = cve.getVendorProductList();
- 231 4 for (Pair<String, String> pair : data) {
- 232 88708 saveEntry(pair.getLeft(), pair.getRight(), indexWriter);
- 233 88708 }
+ 230 1 final Set<Pair<String, String>> data = cve.getVendorProductList();
+ 231 1 for (Pair<String, String> pair : data) {
+ 232 22135 saveEntry(pair.getLeft(), pair.getRight(), indexWriter);
+ 233 22135 }
234 0 } catch (DatabaseException ex) {
235 0 LOGGER.log(Level.FINE, null , ex);
236 0 throw new IndexException("Error reading CPE data" , ex);
- 237 4 }
+ 237 1 }
238 0 } catch (CorruptIndexException ex) {
239 0 throw new IndexException("Unable to close an in-memory index" , ex);
240 0 } catch (IOException ex) {
241 0 throw new IndexException("Unable to close an in-memory index" , ex);
242
} finally {
- 243 4 if (indexWriter != null ) {
+ 243 1 if (indexWriter != null ) {
244
try {
245
try {
- 246 4 indexWriter.commit();
+ 246 1 indexWriter.commit();
247
} finally {
- 248 4 indexWriter.close(true );
- 249 4 }
+ 248 1 indexWriter.close(true );
+ 249 1 }
250 0 } catch (CorruptIndexException ex) {
251 0 throw new IndexException("Unable to close an in-memory index" , ex);
252 0 } catch (IOException ex) {
253 0 throw new IndexException("Unable to close an in-memory index" , ex);
- 254 4 }
- 255 4 if (analyzer != null ) {
- 256 4 analyzer.close();
+ 254 1 }
+ 255 1 if (analyzer != null ) {
+ 256 1 analyzer.close();
257
}
258
}
259
}
- 260 4 }
+ 260 1 }
261
262
@@ -501,12 +501,12 @@
283
public TopDocs search(String searchString, int maxQueryResults) throws ParseException, IOException {
- 284 32 if (searchString == null || searchString.trim().isEmpty()) {
+ 284 6 if (searchString == null || searchString.trim().isEmpty()) {
285 0 throw new ParseException("Query is null or empty" );
286
}
- 287 32 final Query query = queryParser.parse(searchString);
- 288 32 return indexSearcher.search(query, maxQueryResults);
+ 287 6 final Query query = queryParser.parse(searchString);
+ 288 6 return indexSearcher.search(query, maxQueryResults);
289
}
290
@@ -553,7 +553,7 @@
312
public Document getDocument(int documentId) throws IOException {
- 313 216 return indexSearcher.doc(documentId);
+ 313 23 return indexSearcher.doc(documentId);
314
}
315
@@ -570,17 +570,17 @@
321
public int numDocs() {
- 322 4 if (indexReader == null ) {
+ 322 1 if (indexReader == null ) {
323 0 return -1;
324
}
- 325 4 return indexReader.numDocs();
+ 325 1 return indexReader.numDocs();
326
}
327
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.Fields.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.Fields.html
index 45755d509..6a1987157 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.Fields.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.Fields.html
@@ -109,6 +109,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.IndexEntry.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.IndexEntry.html
index 91ed846d1..8f4ff35fd 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.IndexEntry.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.IndexEntry.html
@@ -302,19 +302,19 @@
144
public void parseName(String cpeName) throws UnsupportedEncodingException {
- 145 4 if (cpeName != null && cpeName.length() > 7) {
- 146 4 final String[] data = cpeName.substring(7).split(":" );
- 147 4 if (data.length >= 1) {
- 148 4 vendor = URLDecoder.decode(data[0].replace("+" , "%2B" ), "UTF-8" );
- 149 4 if (data.length >= 2) {
- 150 4 product = URLDecoder.decode(data[1].replace("+" , "%2B" ), "UTF-8" );
+ 145 1 if (cpeName != null && cpeName.length() > 7) {
+ 146 1 final String[] data = cpeName.substring(7).split(":" );
+ 147 1 if (data.length >= 1) {
+ 148 1 vendor = URLDecoder.decode(data[0].replace("+" , "%2B" ), "UTF-8" );
+ 149 1 if (data.length >= 2) {
+ 150 1 product = URLDecoder.decode(data[1].replace("+" , "%2B" ), "UTF-8" );
151
}
152
}
153
}
- 154 4 }
+ 154 1 }
155
156
@@ -332,21 +332,21 @@
@Override
164
public boolean equals(Object obj) {
- 165 1344 if (obj == null ) {
+ 165 39 if (obj == null ) {
166 0 return false ;
167
}
- 168 1344 if (getClass() != obj.getClass()) {
+ 168 39 if (getClass() != obj.getClass()) {
169 0 return false ;
170
}
- 171 1344 final IndexEntry other = (IndexEntry) obj;
- 172 1344 if ((this .vendor == null ) ? (other.vendor != null ) : !this .vendor.equals(other.vendor)) {
- 173 1116 return false ;
+ 171 39 final IndexEntry other = (IndexEntry) obj;
+ 172 39 if ((this .vendor == null ) ? (other.vendor != null ) : !this .vendor.equals(other.vendor)) {
+ 173 34 return false ;
174
}
- 175 228 if ((this .product == null ) ? (other.product != null ) : !this .product.equals(other.product)) {
- 176 228 return false ;
+ 175 5 if ((this .product == null ) ? (other.product != null ) : !this .product.equals(other.product)) {
+ 176 5 return false ;
177
}
178 0 return true ;
@@ -375,6 +375,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.IndexException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.IndexException.html
index 04d2fdbc0..1218b573e 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.IndexException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cpe.IndexException.html
@@ -151,6 +151,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cwe.CweDB.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cwe.CweDB.html
index 635894d05..ff179a078 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cwe.CweDB.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cwe.CweDB.html
@@ -85,7 +85,7 @@
34
- 35 4 private static final Logger LOGGER = Logger.getLogger(CweDB.class .getName());
+ 35 1 private static final Logger LOGGER = Logger.getLogger(CweDB.class .getName());
36
37
@@ -104,7 +104,7 @@
44
- 45 4 private static final HashMap<String, String> CWE = loadData();
+ 45 1 private static final HashMap<String, String> CWE = loadData();
46
47
@@ -119,13 +119,13 @@
52
private static HashMap<String, String> loadData() {
- 53 4 ObjectInputStream oin = null ;
+ 53 1 ObjectInputStream oin = null ;
54
try {
- 55 4 final String filePath = "data/cwe.hashmap.serialized" ;
- 56 4 final InputStream input = CweDB.class .getClassLoader().getResourceAsStream(filePath);
- 57 4 oin = new ObjectInputStream(input);
- 58 4 return (HashMap<String, String>) oin.readObject();
+ 55 1 final String filePath = "data/cwe.hashmap.serialized" ;
+ 56 1 final InputStream input = CweDB.class .getClassLoader().getResourceAsStream(filePath);
+ 57 1 oin = new ObjectInputStream(input);
+ 58 1 return (HashMap<String, String>) oin.readObject();
59 0 } catch (ClassNotFoundException ex) {
60 0 LOGGER.log(Level.WARNING, "Unable to load CWE data. This should not be an issue." );
61 0 LOGGER.log(Level.FINE, null , ex);
@@ -134,13 +134,13 @@
64 0 LOGGER.log(Level.FINE, null , ex);
65
} finally {
- 66 4 if (oin != null ) {
+ 66 1 if (oin != null ) {
67
try {
- 68 4 oin.close();
+ 68 1 oin.close();
69 0 } catch (IOException ex) {
70 0 LOGGER.log(Level.FINEST, null , ex);
- 71 8 }
+ 71 2 }
72
}
73
@@ -166,8 +166,8 @@
84
public static String getCweName(String cweId) {
- 85 36 if (cweId != null ) {
- 86 36 return CWE.get(cweId);
+ 85 9 if (cweId != null ) {
+ 86 9 return CWE.get(cweId);
87
}
88 0 return null ;
@@ -177,6 +177,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cwe.CweHandler.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cwe.CweHandler.html
index 45173562c..30e34d11f 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cwe.CweHandler.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.cwe.CweHandler.html
@@ -122,6 +122,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.AbstractTokenizingFilter.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.AbstractTokenizingFilter.html
index 76becf042..4e4b2ffb4 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.AbstractTokenizingFilter.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.AbstractTokenizingFilter.html
@@ -85,7 +85,7 @@
34
- 35 39 private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class );
+ 35 11 private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class );
36
37
@@ -144,9 +144,9 @@
64
public AbstractTokenizingFilter(TokenStream stream) {
- 65 39 super (stream);
- 66 39 tokens = new LinkedList<String>();
- 67 39 }
+ 65 11 super (stream);
+ 66 11 tokens = new LinkedList<String>();
+ 67 11 }
68
69
@@ -161,20 +161,20 @@
74
protected boolean addTerm() {
- 75 100347 final boolean termAdded = tokens.size() > 0;
- 76 100327 if (termAdded) {
- 77 66018 final String term = tokens.pop();
- 78 66017 clearAttributes();
- 79 66020 termAtt.append(term);
+ 75 32107 final boolean termAdded = tokens.size() > 0;
+ 76 32105 if (termAdded) {
+ 77 21685 final String term = tokens.pop();
+ 78 21679 clearAttributes();
+ 79 21672 termAtt.append(term);
80
}
- 81 100312 return termAdded;
+ 81 32084 return termAdded;
82
}
83
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.AlphaNumericTokenizer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.AlphaNumericTokenizer.html
index 4cd993b59..30996a298 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.AlphaNumericTokenizer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.AlphaNumericTokenizer.html
@@ -135,13 +135,13 @@
@Override
59
protected boolean isTokenChar(int c) {
- 60 2077740 return Character.isLetter(c) || Character.isDigit(c);
+ 60 517068 return Character.isLetter(c) || Character.isDigit(c);
61
}
62
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.DependencySimilarity.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.DependencySimilarity.html
index bb0d52b1c..02a515890 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.DependencySimilarity.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.DependencySimilarity.html
@@ -112,6 +112,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.FieldAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.FieldAnalyzer.html
index 7035c8199..ca897ee9c 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.FieldAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.FieldAnalyzer.html
@@ -139,13 +139,13 @@
@Override
61
protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
- 62 12 final Tokenizer source = new AlphaNumericTokenizer(version, reader);
+ 62 3 final Tokenizer source = new AlphaNumericTokenizer(version, reader);
63
- 64 12 TokenStream stream = source;
+ 64 3 TokenStream stream = source;
65
- 66 12 stream = new WordDelimiterFilter(stream,
+ 66 3 stream = new WordDelimiterFilter(stream,
67
WordDelimiterFilter.CATENATE_WORDS
68
@@ -162,17 +162,17 @@
| WordDelimiterFilter.STEM_ENGLISH_POSSESSIVE, null );
74
- 75 12 stream = new LowerCaseFilter(version, stream);
- 76 12 stream = new StopFilter(version, stream, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
+ 75 3 stream = new LowerCaseFilter(version, stream);
+ 76 3 stream = new StopFilter(version, stream, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
77
- 78 12 return new TokenStreamComponents(source, stream);
+ 78 3 return new TokenStreamComponents(source, stream);
79
}
80
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.LuceneUtils.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.LuceneUtils.html
index 79b75c722..45eb5729c 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.LuceneUtils.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.LuceneUtils.html
@@ -83,7 +83,7 @@
33
- 34 4 public static final Version CURRENT_VERSION = Version.LUCENE_45;
+ 34 1 public static final Version CURRENT_VERSION = Version.LUCENE_45;
35
36
@@ -124,15 +124,15 @@
final CharSequence text) {
54
- 55 908 if (text == null || buf == null ) {
- 56 4 return ;
+ 55 99 if (text == null || buf == null ) {
+ 56 1 return ;
57
}
58
- 59 9332 for (int i = 0; i < text.length(); i++) {
- 60 8428 final char c = text.charAt(i);
- 61 8428 switch (c) {
+ 59 961 for (int i = 0; i < text.length(); i++) {
+ 60 863 final char c = text.charAt(i);
+ 61 863 switch (c) {
62
case '+' :
63
@@ -169,17 +169,17 @@
case ':' :
79
case '\\' :
- 80 288 buf.append('\\' );
+ 80 58 buf.append('\\' );
81
default :
- 82 8428 buf.append(c);
+ 82 863 buf.append(c);
83
break ;
84
}
85
}
- 86 904 }
+ 86 98 }
87
88
@@ -198,27 +198,27 @@
public static String escapeLuceneQuery(final CharSequence text) {
95
- 96 904 if (text == null ) {
- 97 4 return null ;
+ 96 98 if (text == null ) {
+ 97 1 return null ;
98
}
99
- 100 900 int size = text.length();
- 101 900 size = size >> 1;
- 102 900 final StringBuilder buf = new StringBuilder(size);
+ 100 97 int size = text.length();
+ 101 97 size = size >> 1;
+ 102 97 final StringBuilder buf = new StringBuilder(size);
103
- 104 900 appendEscapedLuceneQuery(buf, text);
+ 104 97 appendEscapedLuceneQuery(buf, text);
105
- 106 900 return buf.toString();
+ 106 97 return buf.toString();
107
}
108
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.SearchFieldAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.SearchFieldAnalyzer.html
index 738eda092..bf38ad60c 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.SearchFieldAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.SearchFieldAnalyzer.html
@@ -145,13 +145,13 @@
@Override
64
protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
- 65 16 final Tokenizer source = new AlphaNumericTokenizer(version, reader);
+ 65 4 final Tokenizer source = new AlphaNumericTokenizer(version, reader);
66
- 67 16 TokenStream stream = source;
+ 67 4 TokenStream stream = source;
68
- 69 16 stream = new WordDelimiterFilter(stream,
+ 69 4 stream = new WordDelimiterFilter(stream,
70
WordDelimiterFilter.GENERATE_WORD_PARTS
71
@@ -166,14 +166,14 @@
| WordDelimiterFilter.STEM_ENGLISH_POSSESSIVE, null );
76
- 77 16 stream = new LowerCaseFilter(version, stream);
- 78 16 stream = new UrlTokenizingFilter(stream);
- 79 16 concatenatingFilter = new TokenPairConcatenatingFilter(stream);
- 80 16 stream = concatenatingFilter;
- 81 16 stream = new StopFilter(version, stream, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
+ 77 4 stream = new LowerCaseFilter(version, stream);
+ 78 4 stream = new UrlTokenizingFilter(stream);
+ 79 4 concatenatingFilter = new TokenPairConcatenatingFilter(stream);
+ 80 4 stream = concatenatingFilter;
+ 81 4 stream = new StopFilter(version, stream, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
82
- 83 16 return new TokenStreamComponents(source, stream);
+ 83 4 return new TokenStreamComponents(source, stream);
84
}
85
@@ -194,15 +194,15 @@
93
public void clear() {
- 94 8 if (concatenatingFilter != null ) {
- 95 8 concatenatingFilter.clear();
+ 94 2 if (concatenatingFilter != null ) {
+ 95 2 concatenatingFilter.clear();
96
}
- 97 8 }
+ 97 2 }
98
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.SearchVersionAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.SearchVersionAnalyzer.html
index 63da9cf98..69f5a96f0 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.SearchVersionAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.SearchVersionAnalyzer.html
@@ -158,6 +158,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.TokenPairConcatenatingFilter.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.TokenPairConcatenatingFilter.html
index bb44d56e5..d35b00238 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.TokenPairConcatenatingFilter.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.TokenPairConcatenatingFilter.html
@@ -93,7 +93,7 @@
38
- 39 24 private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class );
+ 39 6 private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class );
40
41
@@ -160,9 +160,9 @@
72
public TokenPairConcatenatingFilter(TokenStream stream) {
- 73 24 super (stream);
- 74 24 words = new LinkedList<String>();
- 75 24 }
+ 73 6 super (stream);
+ 74 6 words = new LinkedList<String>();
+ 75 6 }
76
77
@@ -187,35 +187,35 @@
87
- 88 6160 while (input.incrementToken()) {
- 89 1756 final String word = new String(termAtt.buffer(), 0, termAtt.length());
- 90 1756 words.add(word);
- 91 1756 }
+ 88 638 while (input.incrementToken()) {
+ 89 181 final String word = new String(termAtt.buffer(), 0, termAtt.length());
+ 90 181 words.add(word);
+ 91 181 }
92
93
94
- 95 4404 if (previousWord != null && words.size() > 0) {
- 96 1724 final String word = words.getFirst();
- 97 1724 clearAttributes();
- 98 1724 termAtt.append(previousWord).append(word);
- 99 1724 previousWord = null ;
- 100 1724 return true ;
+ 95 457 if (previousWord != null && words.size() > 0) {
+ 96 173 final String word = words.getFirst();
+ 97 173 clearAttributes();
+ 98 173 termAtt.append(previousWord).append(word);
+ 99 173 previousWord = null ;
+ 100 173 return true ;
101
}
102
- 103 2680 if (words.size() > 0) {
- 104 1756 final String word = words.removeFirst();
- 105 1756 clearAttributes();
- 106 1756 termAtt.append(word);
- 107 1756 previousWord = word;
- 108 1756 return true ;
+ 103 284 if (words.size() > 0) {
+ 104 181 final String word = words.removeFirst();
+ 105 181 clearAttributes();
+ 106 181 termAtt.append(word);
+ 107 181 previousWord = word;
+ 108 181 return true ;
109
}
- 110 924 return false ;
+ 110 103 return false ;
111
}
112
@@ -236,13 +236,13 @@
120
public void clear() {
- 121 12 previousWord = null ;
- 122 12 words.clear();
- 123 12 }
+ 121 3 previousWord = null ;
+ 122 3 words.clear();
+ 123 3 }
124
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.UrlTokenizingFilter.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.UrlTokenizingFilter.html
index d82f4c8fe..b86c3f9b2 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.UrlTokenizingFilter.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.UrlTokenizingFilter.html
@@ -99,7 +99,7 @@
41
- 42 4 private static final Logger LOGGER = Logger.getLogger(UrlTokenizingFilter.class .getName());
+ 42 1 private static final Logger LOGGER = Logger.getLogger(UrlTokenizingFilter.class .getName());
43
44
@@ -136,22 +136,22 @@
@Override
60
public boolean incrementToken() throws IOException {
- 61 100507 final LinkedList<String> tokens = getTokens();
- 62 100573 final CharTermAttribute termAtt = getTermAtt();
- 63 100648 if (tokens.size() == 0 && input.incrementToken()) {
- 64 66061 final String text = new String(termAtt.buffer(), 0, termAtt.length());
- 65 66050 if (UrlStringUtils.containsUrl(text)) {
- 66 8 final String[] parts = text.split("\\s" );
- 67 16 for (String part : parts) {
- 68 8 if (UrlStringUtils.isUrl(part)) {
+ 61 32140 final LinkedList<String> tokens = getTokens();
+ 62 32189 final CharTermAttribute termAtt = getTermAtt();
+ 63 32220 if (tokens.size() == 0 && input.incrementToken()) {
+ 64 21664 final String text = new String(termAtt.buffer(), 0, termAtt.length());
+ 65 21704 if (UrlStringUtils.containsUrl(text)) {
+ 66 2 final String[] parts = text.split("\\s" );
+ 67 4 for (String part : parts) {
+ 68 2 if (UrlStringUtils.isUrl(part)) {
69
try {
- 70 8 final List<String> data = UrlStringUtils.extractImportantUrlData(part);
- 71 8 tokens.addAll(data);
+ 70 2 final List<String> data = UrlStringUtils.extractImportantUrlData(part);
+ 71 2 tokens.addAll(data);
72 0 } catch (MalformedURLException ex) {
73 0 LOGGER.log(Level.FINE, "error parsing " + part, ex);
74 0 tokens.add(part);
- 75 8 }
+ 75 2 }
76
} else {
77 0 tokens.add(part);
@@ -159,19 +159,19 @@
}
79
}
- 80 8 } else {
- 81 66028 tokens.add(text);
+ 80 2 } else {
+ 81 21700 tokens.add(text);
82
}
83
}
- 84 100330 return addTerm();
+ 84 21715 return addTerm();
85
}
86
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.VersionAnalyzer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.VersionAnalyzer.html
index 11dfe1f79..2adf99e07 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.VersionAnalyzer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.VersionAnalyzer.html
@@ -157,6 +157,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.VersionTokenizingFilter.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.VersionTokenizingFilter.html
index 9e6068e08..e4d36657b 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.VersionTokenizingFilter.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.lucene.VersionTokenizingFilter.html
@@ -195,6 +195,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nexus.MavenArtifact.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nexus.MavenArtifact.html
index 749f6d55b..cc902c218 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nexus.MavenArtifact.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nexus.MavenArtifact.html
@@ -158,12 +158,12 @@
73
- 74 4 public MavenArtifact(String groupId, String artifactId, String version, String url) {
- 75 4 setGroupId(groupId);
- 76 4 setArtifactId(artifactId);
- 77 4 setVersion(version);
- 78 4 setArtifactUrl(url);
- 79 4 }
+ 74 1 public MavenArtifact(String groupId, String artifactId, String version, String url) {
+ 75 1 setGroupId(groupId);
+ 76 1 setArtifactId(artifactId);
+ 77 1 setVersion(version);
+ 78 1 setArtifactUrl(url);
+ 79 1 }
80
81
@@ -335,6 +335,6 @@
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nexus.NexusSearch.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nexus.NexusSearch.html
index 246228cbb..616f04732 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nexus.NexusSearch.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nexus.NexusSearch.html
@@ -125,7 +125,7 @@
54
- 55 4 private static final Logger LOGGER = Logger.getLogger(NexusSearch.class
+ 55 1 private static final Logger LOGGER = Logger.getLogger(NexusSearch.class
56
.getName());
57
@@ -142,25 +142,25 @@
63
- 64 16 public NexusSearch(URL rootURL) {
- 65 16 this .rootURL = rootURL;
+ 64 4 public NexusSearch(URL rootURL) {
+ 65 4 this .rootURL = rootURL;
66
try {
- 67 16 if (null != Settings.getString(Settings.KEYS.PROXY_SERVER)
+ 67 4 if (null != Settings.getString(Settings.KEYS.PROXY_SERVER)
68
&& Settings.getBoolean(Settings.KEYS.ANALYZER_NEXUS_PROXY)) {
69 0 useProxy = true ;
70 0 LOGGER.fine("Using proxy" );
71
} else {
- 72 16 useProxy = false ;
- 73 16 LOGGER.fine("Not using proxy" );
+ 72 4 useProxy = false ;
+ 73 4 LOGGER.fine("Not using proxy" );
74
}
75 0 } catch (InvalidSettingException ise) {
76 0 useProxy = false ;
- 77 16 }
- 78 16 }
+ 77 4 }
+ 78 4 }
79
80
@@ -183,18 +183,18 @@
89
public MavenArtifact searchSha1(String sha1) throws IOException {
- 90 16 if (null == sha1 || !sha1.matches("^[0-9A-Fa-f]{40}$" )) {
- 91 8 throw new IllegalArgumentException("Invalid SHA1 format" );
+ 90 4 if (null == sha1 || !sha1.matches("^[0-9A-Fa-f]{40}$" )) {
+ 91 2 throw new IllegalArgumentException("Invalid SHA1 format" );
92
}
93
- 94 8 final URL url = new URL(rootURL, String.format("identify/sha1/%s" ,
+ 94 2 final URL url = new URL(rootURL, String.format("identify/sha1/%s" ,
95
sha1.toLowerCase()));
96
- 97 8 LOGGER.fine(String.format("Searching Nexus url %s" , url.toString()));
+ 97 2 LOGGER.fine(String.format("Searching Nexus url %s" , url.toString()));
98
99
@@ -207,55 +207,55 @@
103
- 104 8 final HttpURLConnection conn = URLConnectionFactory.createHttpURLConnection(url, useProxy);
+ 104 2 final HttpURLConnection conn = URLConnectionFactory.createHttpURLConnection(url, useProxy);
105
- 106 8 conn.setDoOutput(true );
+ 106 2 conn.setDoOutput(true );
107
108
109
- 110 8 conn.addRequestProperty("Accept" , "application/xml" );
- 111 8 conn.connect();
+ 110 2 conn.addRequestProperty("Accept" , "application/xml" );
+ 111 2 conn.connect();
112
- 113 8 if (conn.getResponseCode() == 200) {
+ 113 2 if (conn.getResponseCode() == 200) {
114
try {
- 115 4 final DocumentBuilder builder = DocumentBuilderFactory
+ 115 1 final DocumentBuilder builder = DocumentBuilderFactory
116
.newInstance().newDocumentBuilder();
- 117 4 final Document doc = builder.parse(conn.getInputStream());
- 118 4 final XPath xpath = XPathFactory.newInstance().newXPath();
- 119 4 final String groupId = xpath
+ 117 1 final Document doc = builder.parse(conn.getInputStream());
+ 118 1 final XPath xpath = XPathFactory.newInstance().newXPath();
+ 119 1 final String groupId = xpath
120
.evaluate(
121
"/org.sonatype.nexus.rest.model.NexusArtifact/groupId" ,
122
doc);
- 123 4 final String artifactId = xpath.evaluate(
+ 123 1 final String artifactId = xpath.evaluate(
124
"/org.sonatype.nexus.rest.model.NexusArtifact/artifactId" ,
125
doc);
- 126 4 final String version = xpath
+ 126 1 final String version = xpath
127
.evaluate(
128
"/org.sonatype.nexus.rest.model.NexusArtifact/version" ,
129
doc);
- 130 4 final String link = xpath
+ 130 1 final String link = xpath
131
.evaluate(
132
"/org.sonatype.nexus.rest.model.NexusArtifact/artifactLink" ,
133
doc);
- 134 4 return new MavenArtifact(groupId, artifactId, version, link);
+ 134 1 return new MavenArtifact(groupId, artifactId, version, link);
135 0 } catch (Throwable e) {
136
@@ -264,8 +264,8 @@
138 0 throw new IOException(e.getMessage(), e);
139
}
- 140 4 } else if (conn.getResponseCode() == 404) {
- 141 4 throw new FileNotFoundException("Artifact not found in Nexus" );
+ 140 1 } else if (conn.getResponseCode() == 404) {
+ 141 1 throw new FileNotFoundException("Artifact not found in Nexus" );
142
} else {
143 0 final String msg = String.format("Could not connect to Nexus received response code: %d %s" ,
@@ -293,27 +293,27 @@
public boolean preflightRequest() {
156
try {
- 157 16 final HttpURLConnection conn = URLConnectionFactory.createHttpURLConnection(new URL(rootURL, "status" ), useProxy);
- 158 16 conn.addRequestProperty("Accept" , "application/xml" );
- 159 16 conn.connect();
- 160 16 if (conn.getResponseCode() != 200) {
+ 157 4 final HttpURLConnection conn = URLConnectionFactory.createHttpURLConnection(new URL(rootURL, "status" ), useProxy);
+ 158 4 conn.addRequestProperty("Accept" , "application/xml" );
+ 159 4 conn.connect();
+ 160 4 if (conn.getResponseCode() != 200) {
161 0 LOGGER.log(Level.WARNING, "Expected 200 result from Nexus, got {0}" , conn.getResponseCode());
162 0 return false ;
163
}
- 164 16 final DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- 165 16 final Document doc = builder.parse(conn.getInputStream());
- 166 16 if (!"status" .equals(doc.getDocumentElement().getNodeName())) {
+ 164 4 final DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ 165 4 final Document doc = builder.parse(conn.getInputStream());
+ 166 4 if (!"status" .equals(doc.getDocumentElement().getNodeName())) {
167 0 LOGGER.log(Level.WARNING, "Expected root node name of status, got {0}" , doc.getDocumentElement().getNodeName());
168 0 return false ;
169
}
170 0 } catch (Throwable e) {
171 0 return false ;
- 172 16 }
+ 172 4 }
173
- 174 16 return true ;
+ 174 4 return true ;
175
}
176
@@ -324,6 +324,6 @@
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NugetPackage.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NugetPackage.html
index 5c2f6fa54..d76c61072 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NugetPackage.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NugetPackage.html
@@ -377,6 +377,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NuspecParseException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NuspecParseException.html
index d6fcfd978..03417d83c 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NuspecParseException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NuspecParseException.html
@@ -153,6 +153,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NuspecParser.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NuspecParser.html
index c412d29a3..310023f47 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NuspecParser.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.NuspecParser.html
@@ -93,6 +93,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.XPathNuspecParser.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.XPathNuspecParser.html
index c90a01ac1..cb3365aa5 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.XPathNuspecParser.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nuget.XPathNuspecParser.html
@@ -99,8 +99,8 @@
41
private String getOrNull(Node n) {
- 42 12 if (n != null ) {
- 43 12 return n.getTextContent();
+ 42 3 if (n != null ) {
+ 43 3 return n.getTextContent();
44
} else {
45 0 return null ;
@@ -130,32 +130,32 @@
public NugetPackage parse(InputStream stream) throws NuspecParseException {
58
try {
- 59 12 final Document d = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(stream);
- 60 8 final XPath xpath = XPathFactory.newInstance().newXPath();
- 61 8 final NugetPackage nuspec = new NugetPackage();
+ 59 3 final Document d = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(stream);
+ 60 2 final XPath xpath = XPathFactory.newInstance().newXPath();
+ 61 2 final NugetPackage nuspec = new NugetPackage();
62
- 63 8 if (xpath.evaluate("/package/metadata/id" , d, XPathConstants.NODE) == null
+ 63 2 if (xpath.evaluate("/package/metadata/id" , d, XPathConstants.NODE) == null
64
|| xpath.evaluate("/package/metadata/version" , d, XPathConstants.NODE) == null
65
|| xpath.evaluate("/package/metadata/authors" , d, XPathConstants.NODE) == null
66
|| xpath.evaluate("/package/metadata/description" , d, XPathConstants.NODE) == null ) {
- 67 4 throw new NuspecParseException("Invalid Nuspec format" );
+ 67 1 throw new NuspecParseException("Invalid Nuspec format" );
68
}
69
- 70 4 nuspec.setId(xpath.evaluate("/package/metadata/id" , d));
- 71 4 nuspec.setVersion(xpath.evaluate("/package/metadata/version" , d));
- 72 4 nuspec.setAuthors(xpath.evaluate("/package/metadata/authors" , d));
- 73 4 nuspec.setOwners(getOrNull((Node) xpath.evaluate("/package/metadata/owners" , d, XPathConstants.NODE)));
- 74 4 nuspec.setLicenseUrl(getOrNull((Node) xpath.evaluate("/package/metadata/licenseUrl" , d, XPathConstants.NODE)));
- 75 4 nuspec.setTitle(getOrNull((Node) xpath.evaluate("/package/metadata/title" , d, XPathConstants.NODE)));
- 76 4 return nuspec;
- 77 8 } catch (Throwable e) {
- 78 8 throw new NuspecParseException("Unable to parse nuspec" , e);
+ 70 1 nuspec.setId(xpath.evaluate("/package/metadata/id" , d));
+ 71 1 nuspec.setVersion(xpath.evaluate("/package/metadata/version" , d));
+ 72 1 nuspec.setAuthors(xpath.evaluate("/package/metadata/authors" , d));
+ 73 1 nuspec.setOwners(getOrNull((Node) xpath.evaluate("/package/metadata/owners" , d, XPathConstants.NODE)));
+ 74 1 nuspec.setLicenseUrl(getOrNull((Node) xpath.evaluate("/package/metadata/licenseUrl" , d, XPathConstants.NODE)));
+ 75 1 nuspec.setTitle(getOrNull((Node) xpath.evaluate("/package/metadata/title" , d, XPathConstants.NODE)));
+ 76 1 return nuspec;
+ 77 2 } catch (Throwable e) {
+ 78 2 throw new NuspecParseException("Unable to parse nuspec" , e);
79
}
80
@@ -164,6 +164,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.ConnectionFactory.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.ConnectionFactory.html
index 9a69ad91b..c9aa561bb 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.ConnectionFactory.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.ConnectionFactory.html
@@ -113,14 +113,14 @@
48
- 49 4 private static final Logger LOGGER = Logger.getLogger(ConnectionFactory.class .getName());
+ 49 1 private static final Logger LOGGER = Logger.getLogger(ConnectionFactory.class .getName());
50
51
52
- 53 4 public static final String DB_SCHEMA_VERSION = Settings.getString(Settings.KEYS.DB_VERSION);
+ 53 1 public static final String DB_SCHEMA_VERSION = Settings.getString(Settings.KEYS.DB_VERSION);
54
55
@@ -135,28 +135,28 @@
60
- 61 4 private static Driver driver = null ;
+ 61 1 private static Driver driver = null ;
62
63
64
- 65 4 private static String connectionString = null ;
+ 65 1 private static String connectionString = null ;
66
67
68
- 69 4 private static String userName = null ;
+ 69 1 private static String userName = null ;
70
71
72
- 73 4 private static String password = null ;
+ 73 1 private static String password = null ;
74
75
@@ -187,42 +187,42 @@
public static synchronized void initialize() throws DatabaseException {
88
- 89 28 if (connectionString != null ) {
- 90 24 return ;
+ 89 7 if (connectionString != null ) {
+ 90 6 return ;
91
}
- 92 4 Connection conn = null ;
+ 92 1 Connection conn = null ;
93
try {
94
- 95 4 final String driverName = Settings.getString(Settings.KEYS.DB_DRIVER_NAME, "" );
- 96 4 if (!driverName.isEmpty()) {
- 97 4 LOGGER.log(Level.FINE, "Loading driver: {0}" , driverName);
- 98 4 final String driverPath = Settings.getString(Settings.KEYS.DB_DRIVER_PATH, "" );
+ 95 1 final String driverName = Settings.getString(Settings.KEYS.DB_DRIVER_NAME, "" );
+ 96 1 if (!driverName.isEmpty()) {
+ 97 1 LOGGER.log(Level.FINE, "Loading driver: {0}" , driverName);
+ 98 1 final String driverPath = Settings.getString(Settings.KEYS.DB_DRIVER_PATH, "" );
99
try {
- 100 4 if (!driverPath.isEmpty()) {
+ 100 1 if (!driverPath.isEmpty()) {
101 0 LOGGER.log(Level.FINE, "Loading driver from: {0}" , driverPath);
102 0 driver = DriverLoader.load(driverName, driverPath);
103
} else {
- 104 4 driver = DriverLoader.load(driverName);
+ 104 1 driver = DriverLoader.load(driverName);
105
}
106 0 } catch (DriverLoadException ex) {
107 0 LOGGER.log(Level.FINE, "Unable to load database driver" , ex);
108 0 throw new DatabaseException("Unable to load database driver" );
- 109 4 }
+ 109 1 }
110
}
- 111 4 userName = Settings.getString(Settings.KEYS.DB_USER, "dcuser" );
+ 111 1 userName = Settings.getString(Settings.KEYS.DB_USER, "dcuser" );
112
- 113 4 password = Settings.getString(Settings.KEYS.DB_PASSWORD, "DC-Pass1337!" );
+ 113 1 password = Settings.getString(Settings.KEYS.DB_PASSWORD, "DC-Pass1337!" );
114
try {
- 115 4 connectionString = Settings.getConnectionString(
+ 115 1 connectionString = Settings.getConnectionString(
116
Settings.KEYS.DB_CONNECTION_STRING,
117
@@ -234,27 +234,27 @@
121
"Unable to retrieve the database connection string" , ex);
122 0 throw new DatabaseException("Unable to retrieve the database connection string" );
- 123 4 }
- 124 4 boolean shouldCreateSchema = false ;
+ 123 1 }
+ 124 1 boolean shouldCreateSchema = false ;
125
try {
- 126 4 if (connectionString.startsWith("jdbc:h2:file:" )) {
- 127 4 shouldCreateSchema = !h2DataFileExists();
- 128 4 LOGGER.log(Level.FINE, "Need to create DB Structure: {0}" , shouldCreateSchema);
+ 126 1 if (connectionString.startsWith("jdbc:h2:file:" )) {
+ 127 1 shouldCreateSchema = !h2DataFileExists();
+ 128 1 LOGGER.log(Level.FINE, "Need to create DB Structure: {0}" , shouldCreateSchema);
129
}
130 0 } catch (IOException ioex) {
131 0 LOGGER.log(Level.FINE, "Unable to verify database exists" , ioex);
132 0 throw new DatabaseException("Unable to verify database exists" );
- 133 4 }
- 134 4 LOGGER.log(Level.FINE, "Loading database connection" );
- 135 4 LOGGER.log(Level.FINE, "Connection String: {0}" , connectionString);
- 136 4 LOGGER.log(Level.FINE, "Database User: {0}" , userName);
+ 133 1 }
+ 134 1 LOGGER.log(Level.FINE, "Loading database connection" );
+ 135 1 LOGGER.log(Level.FINE, "Connection String: {0}" , connectionString);
+ 136 1 LOGGER.log(Level.FINE, "Database User: {0}" , userName);
137
138
try {
- 139 4 conn = DriverManager.getConnection(connectionString, userName, password);
+ 139 1 conn = DriverManager.getConnection(connectionString, userName, password);
140 0 } catch (SQLException ex) {
141 0 if (ex.getMessage().contains("java.net.UnknownHostException" ) && connectionString.contains("AUTO_SERVER=TRUE;" )) {
142 0 connectionString = connectionString.replace("AUTO_SERVER=TRUE;" , "" );
@@ -275,10 +275,10 @@
154 0 throw new DatabaseException("Unable to connect to the database" );
155
}
- 156 4 }
+ 156 1 }
157
- 158 4 if (shouldCreateSchema) {
+ 158 1 if (shouldCreateSchema) {
159
try {
160 0 createTables(conn);
@@ -290,27 +290,27 @@
} else {
166
try {
- 167 4 ensureSchemaVersion(conn);
+ 167 1 ensureSchemaVersion(conn);
168 0 } catch (DatabaseException dex) {
169 0 LOGGER.log(Level.FINE, null , dex);
170 0 throw new DatabaseException("Database schema does not match this version of dependency-check" );
- 171 4 }
+ 171 1 }
172
}
173
} finally {
- 174 4 if (conn != null ) {
+ 174 1 if (conn != null ) {
175
try {
- 176 4 conn.close();
+ 176 1 conn.close();
177 0 } catch (SQLException ex) {
178 0 LOGGER.log(Level.FINE, "An error occurred closing the connection" , ex);
- 179 4 }
+ 179 1 }
180
}
181
}
- 182 4 }
+ 182 1 }
183
184
@@ -359,16 +359,16 @@
212
public static Connection getConnection() throws DatabaseException {
- 213 24 initialize();
- 214 24 Connection conn = null ;
+ 213 6 initialize();
+ 214 6 Connection conn = null ;
215
try {
- 216 24 conn = DriverManager.getConnection(connectionString, userName, password);
+ 216 6 conn = DriverManager.getConnection(connectionString, userName, password);
217 0 } catch (SQLException ex) {
218 0 LOGGER.log(Level.FINE, null , ex);
219 0 throw new DatabaseException("Unable to connect to the database" );
- 220 24 }
- 221 24 return conn;
+ 220 6 }
+ 221 6 return conn;
222
}
223
@@ -387,11 +387,11 @@
230
private static boolean h2DataFileExists() throws IOException {
- 231 4 final File dir = Settings.getDataDirectory();
- 232 4 final String name = Settings.getString(Settings.KEYS.DB_FILE_NAME);
- 233 4 final String fileName = String.format(name, DB_SCHEMA_VERSION);
- 234 4 final File file = new File(dir, fileName);
- 235 4 return file.exists();
+ 231 1 final File dir = Settings.getDataDirectory();
+ 232 1 final String name = Settings.getString(Settings.KEYS.DB_FILE_NAME);
+ 233 1 final String fileName = String.format(name, DB_SCHEMA_VERSION);
+ 234 1 final File file = new File(dir, fileName);
+ 235 1 return file.exists();
236
}
237
@@ -472,19 +472,19 @@
287
private static void ensureSchemaVersion(Connection conn) throws DatabaseException {
- 288 4 ResultSet rs = null ;
- 289 4 CallableStatement cs = null ;
+ 288 1 ResultSet rs = null ;
+ 289 1 CallableStatement cs = null ;
290
try {
- 291 4 cs = conn.prepareCall("SELECT value FROM properties WHERE id = 'version'" );
- 292 4 rs = cs.executeQuery();
- 293 4 if (rs.next()) {
- 294 4 final boolean isWrongSchema = !DB_SCHEMA_VERSION.equals(rs.getString(1));
- 295 4 if (isWrongSchema) {
+ 291 1 cs = conn.prepareCall("SELECT value FROM properties WHERE id = 'version'" );
+ 292 1 rs = cs.executeQuery();
+ 293 1 if (rs.next()) {
+ 294 1 final boolean isWrongSchema = !DB_SCHEMA_VERSION.equals(rs.getString(1));
+ 295 1 if (isWrongSchema) {
296 0 throw new DatabaseException("Incorrect database schema; unable to continue" );
297
}
- 298 4 } else {
+ 298 1 } else {
299 0 throw new DatabaseException("Database schema is missing" );
300
}
@@ -493,14 +493,14 @@
303 0 throw new DatabaseException("Unable to check the database schema version" );
304
} finally {
- 305 4 DBUtils.closeResultSet(rs);
- 306 4 DBUtils.closeStatement(cs);
- 307 4 }
- 308 4 }
+ 305 1 DBUtils.closeResultSet(rs);
+ 306 1 DBUtils.closeStatement(cs);
+ 307 1 }
+ 308 1 }
309
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.CorruptDatabaseException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.CorruptDatabaseException.html
index 47196a1f4..d76d04ac4 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.CorruptDatabaseException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.CorruptDatabaseException.html
@@ -121,6 +121,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DatabaseException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DatabaseException.html
index 0e16974ab..652cd12e7 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DatabaseException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DatabaseException.html
@@ -137,6 +137,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DatabaseProperties.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DatabaseProperties.html
index e969b9955..c1eb5db48 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DatabaseProperties.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DatabaseProperties.html
@@ -99,7 +99,7 @@
41
- 42 4 private static final Logger LOGGER = Logger.getLogger(DatabaseProperties.class .getName());
+ 42 1 private static final Logger LOGGER = Logger.getLogger(DatabaseProperties.class .getName());
43
44
@@ -158,10 +158,10 @@
71
- 72 12 DatabaseProperties(CveDB cveDB) {
- 73 12 this .cveDB = cveDB;
- 74 12 loadProperties();
- 75 12 }
+ 72 3 DatabaseProperties(CveDB cveDB) {
+ 73 3 this .cveDB = cveDB;
+ 74 3 loadProperties();
+ 75 3 }
76
77
@@ -172,8 +172,8 @@
80
private void loadProperties() {
- 81 12 this .properties = cveDB.getProperties();
- 82 12 }
+ 81 3 this .properties = cveDB.getProperties();
+ 82 3 }
83
84
@@ -323,6 +323,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverLoadException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverLoadException.html
index dd1fe3a9b..c0095c439 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverLoadException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverLoadException.html
@@ -137,6 +137,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverLoader.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverLoader.html
index cedf90405..54e1ce5ad 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverLoader.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverLoader.html
@@ -102,7 +102,7 @@
42
- 43 4 private static final Logger LOGGER = Logger.getLogger(DriverLoader.class .getName());
+ 43 1 private static final Logger LOGGER = Logger.getLogger(DriverLoader.class .getName());
44
45
@@ -133,8 +133,8 @@
58
public static Driver load(String className) throws DriverLoadException {
- 59 12 final ClassLoader loader = DriverLoader.class .getClassLoader();
- 60 12 return load(className, loader);
+ 59 3 final ClassLoader loader = DriverLoader.class .getClassLoader();
+ 60 3 return load(className, loader);
61
}
62
@@ -167,56 +167,56 @@
76
public static Driver load(String className, String pathToDriver) throws DriverLoadException {
- 77 16 final URLClassLoader parent = (URLClassLoader) ClassLoader.getSystemClassLoader();
- 78 16 final ArrayList<URL> urls = new ArrayList<URL>();
- 79 16 final String[] paths = pathToDriver.split(File.pathSeparator);
- 80 36 for (String path : paths) {
- 81 20 final File file = new File(path);
- 82 20 if (file.isDirectory()) {
- 83 8 final File[] files = file.listFiles();
+ 77 4 final URLClassLoader parent = (URLClassLoader) ClassLoader.getSystemClassLoader();
+ 78 4 final ArrayList<URL> urls = new ArrayList<URL>();
+ 79 4 final String[] paths = pathToDriver.split(File.pathSeparator);
+ 80 9 for (String path : paths) {
+ 81 5 final File file = new File(path);
+ 82 5 if (file.isDirectory()) {
+ 83 2 final File[] files = file.listFiles();
84
- 85 132 for (File f : files) {
+ 85 33 for (File f : files) {
86
try {
- 87 124 urls.add(f.toURI().toURL());
+ 87 31 urls.add(f.toURI().toURL());
88 0 } catch (MalformedURLException ex) {
89 0 final String msg = String.format("Unable to load database driver '%s'; invalid path provided '%s'" ,
90
className, f.getAbsoluteFile());
91 0 LOGGER.log(Level.FINE, msg, ex);
92 0 throw new DriverLoadException(msg, ex);
- 93 124 }
+ 93 31 }
94
}
- 95 8 } else if (file.exists()) {
+ 95 2 } else if (file.exists()) {
96
try {
- 97 8 urls.add(file.toURI().toURL());
+ 97 2 urls.add(file.toURI().toURL());
98 0 } catch (MalformedURLException ex) {
99 0 final String msg = String.format("Unable to load database driver '%s'; invalid path provided '%s'" ,
100
className, file.getAbsoluteFile());
101 0 LOGGER.log(Level.FINE, msg, ex);
102 0 throw new DriverLoadException(msg, ex);
- 103 8 }
+ 103 2 }
104
}
105
}
- 106 16 final URLClassLoader loader = AccessController.doPrivileged(new PrivilegedAction<URLClassLoader>() {
+ 106 4 final URLClassLoader loader = AccessController.doPrivileged(new PrivilegedAction<URLClassLoader>() {
107
@Override
108
public URLClassLoader run() {
- 109 16 return new URLClassLoader(urls.toArray(new URL[urls.size()]), parent);
+ 109 4 return new URLClassLoader(urls.toArray(new URL[urls.size()]), parent);
110
}
111
});
112
- 113 16 return load(className, loader);
+ 113 4 return load(className, loader);
114
}
115
@@ -241,19 +241,19 @@
private static Driver load(String className, ClassLoader loader) throws DriverLoadException {
125
try {
- 126 28 final Class c = Class.forName(className, true , loader);
+ 126 7 final Class c = Class.forName(className, true , loader);
127
- 128 16 final Driver driver = (Driver) c.newInstance();
- 129 16 final Driver shim = new DriverShim(driver);
+ 128 4 final Driver driver = (Driver) c.newInstance();
+ 129 4 final Driver shim = new DriverShim(driver);
130
- 131 16 DriverManager.registerDriver(shim);
- 132 16 return shim;
- 133 12 } catch (ClassNotFoundException ex) {
- 134 12 final String msg = String.format("Unable to load database driver '%s'" , className);
- 135 12 LOGGER.log(Level.FINE, msg, ex);
- 136 12 throw new DriverLoadException(msg, ex);
+ 131 4 DriverManager.registerDriver(shim);
+ 132 4 return shim;
+ 133 3 } catch (ClassNotFoundException ex) {
+ 134 3 final String msg = String.format("Unable to load database driver '%s'" , className);
+ 135 3 LOGGER.log(Level.FINE, msg, ex);
+ 136 3 throw new DriverLoadException(msg, ex);
137 0 } catch (InstantiationException ex) {
138 0 final String msg = String.format("Unable to load database driver '%s'" , className);
139 0 LOGGER.log(Level.FINE, msg, ex);
@@ -274,6 +274,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverShim.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverShim.html
index 3c3f94fb5..0b0e80660 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverShim.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.nvdcve.DriverShim.html
@@ -105,7 +105,7 @@
44
- 45 4 private static final Logger LOGGER = Logger.getLogger(DriverShim.class .getName());
+ 45 1 private static final Logger LOGGER = Logger.getLogger(DriverShim.class .getName());
46
47
@@ -156,7 +156,7 @@
@Override
70
public boolean acceptsURL(String url) throws SQLException {
- 71 8 return this .driver.acceptsURL(url);
+ 71 2 return this .driver.acceptsURL(url);
72
}
73
@@ -388,13 +388,13 @@
@Override
201
public String toString() {
- 202 28 return "DriverShim{" + "driver=" + driver + '}' ;
+ 202 7 return "DriverShim{" + "driver=" + driver + '}' ;
203
}
204
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.CachedWebDataSource.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.CachedWebDataSource.html
index 9346280ed..a953b95c5 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.CachedWebDataSource.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.CachedWebDataSource.html
@@ -93,6 +93,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.NvdCveInfo.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.NvdCveInfo.html
index d4f1bd8fa..4e450b4ce 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.NvdCveInfo.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.NvdCveInfo.html
@@ -293,6 +293,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.NvdCveUpdater.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.NvdCveUpdater.html
index da7590539..d34bf8901 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.NvdCveUpdater.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.NvdCveUpdater.html
@@ -137,6 +137,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.StandardUpdate.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.StandardUpdate.html
index b98e33ef3..d584cfc8d 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.StandardUpdate.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.StandardUpdate.html
@@ -546,6 +546,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.UpdateService.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.UpdateService.html
index 45123822b..ad76b6693 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.UpdateService.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.UpdateService.html
@@ -121,6 +121,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.UpdateableNvdCve.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.UpdateableNvdCve.html
index 73b4fc604..b4dc61f55 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.UpdateableNvdCve.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.UpdateableNvdCve.html
@@ -85,7 +85,7 @@
34
- 35 48 public class UpdateableNvdCve implements java.lang.Iterable<NvdCveInfo>, Iterator<NvdCveInfo> {
+ 35 12 public class UpdateableNvdCve implements java.lang.Iterable<NvdCveInfo>, Iterator<NvdCveInfo> {
36
37
@@ -94,7 +94,7 @@
39
- 40 20 private Map<String, NvdCveInfo> collection = new TreeMap<String, NvdCveInfo>();
+ 40 5 private Map<String, NvdCveInfo> collection = new TreeMap<String, NvdCveInfo>();
41
42
@@ -127,13 +127,13 @@
56
public boolean isUpdateNeeded() {
- 57 12 for (NvdCveInfo item : this ) {
- 58 16 if (item.getNeedsUpdate()) {
- 59 4 return true ;
+ 57 3 for (NvdCveInfo item : this ) {
+ 58 4 if (item.getNeedsUpdate()) {
+ 59 1 return true ;
60
}
- 61 12 }
- 62 8 return false ;
+ 61 3 }
+ 62 2 return false ;
63
}
64
@@ -160,8 +160,8 @@
75
public void add(String id, String url, String oldUrl) throws MalformedURLException, DownloadFailedException {
- 76 4 add(id, url, oldUrl, false );
- 77 4 }
+ 76 1 add(id, url, oldUrl, false );
+ 77 1 }
78
79
@@ -188,14 +188,14 @@
90
public void add(String id, String url, String oldUrl, boolean needsUpdate) throws MalformedURLException, DownloadFailedException {
- 91 36 final NvdCveInfo item = new NvdCveInfo();
- 92 36 item.setNeedsUpdate(needsUpdate);
- 93 36 item.setId(id);
- 94 36 item.setUrl(url);
- 95 36 item.setOldSchemaVersionUrl(oldUrl);
- 96 36 item.setTimestamp(Downloader.getLastModified(new URL(url)));
- 97 36 collection.put(id, item);
- 98 36 }
+ 91 9 final NvdCveInfo item = new NvdCveInfo();
+ 92 9 item.setNeedsUpdate(needsUpdate);
+ 93 9 item.setId(id);
+ 94 9 item.setUrl(url);
+ 95 9 item.setOldSchemaVersionUrl(oldUrl);
+ 96 9 item.setTimestamp(Downloader.getLastModified(new URL(url)));
+ 97 9 collection.put(id, item);
+ 98 9 }
99
100
@@ -206,8 +206,8 @@
103
public void clear() {
- 104 4 collection.clear();
- 105 4 }
+ 104 1 collection.clear();
+ 105 1 }
106
107
@@ -233,7 +233,7 @@
118
- 119 20 private Iterator<Entry<String, NvdCveInfo>> iterableContent = null ;
+ 119 5 private Iterator<Entry<String, NvdCveInfo>> iterableContent = null ;
120
121
@@ -256,8 +256,8 @@
@Override
130
public Iterator<NvdCveInfo> iterator() {
- 131 16 iterableContent = collection.entrySet().iterator();
- 132 16 return this ;
+ 131 4 iterableContent = collection.entrySet().iterator();
+ 132 4 return this ;
133
}
134
@@ -282,7 +282,7 @@
@Override
144
public boolean hasNext() {
- 145 40 return iterableContent.hasNext();
+ 145 10 return iterableContent.hasNext();
146
}
147
@@ -307,7 +307,7 @@
@Override
157
public NvdCveInfo next() {
- 158 28 return iterableContent.next().getValue();
+ 158 7 return iterableContent.next().getValue();
159
}
160
@@ -328,8 +328,8 @@
@Override
168
public void remove() {
- 169 4 iterableContent.remove();
- 170 4 }
+ 169 1 iterableContent.remove();
+ 170 1 }
171
172
@@ -346,7 +346,7 @@
178
NvdCveInfo get(String key) {
- 179 8 return collection.get(key);
+ 179 2 return collection.get(key);
180
}
181
@@ -362,6 +362,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.exception.InvalidDataException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.exception.InvalidDataException.html
index f842bff26..142eea17c 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.exception.InvalidDataException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.exception.InvalidDataException.html
@@ -119,6 +119,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.exception.UpdateException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.exception.UpdateException.html
index 7b33ecb63..272f630a4 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.exception.UpdateException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.exception.UpdateException.html
@@ -155,6 +155,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.task.DownloadTask.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.task.DownloadTask.html
index 3d7ce653b..6440622d1 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.task.DownloadTask.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.task.DownloadTask.html
@@ -445,6 +445,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.task.ProcessTask.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.task.ProcessTask.html
index 8bad2a3e0..0f808749a 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.task.ProcessTask.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.task.ProcessTask.html
@@ -343,6 +343,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.xml.NvdCve12Handler.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.xml.NvdCve12Handler.html
index 89b05370e..167cf3e83 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.xml.NvdCve12Handler.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.xml.NvdCve12Handler.html
@@ -90,7 +90,7 @@
36
- 37 4 public class NvdCve12Handler extends DefaultHandler {
+ 37 1 public class NvdCve12Handler extends DefaultHandler {
38
39
@@ -139,21 +139,21 @@
61
- 62 4 private boolean skip = false ;
+ 62 1 private boolean skip = false ;
63
64
65
- 66 4 private boolean hasPreviousVersion = false ;
+ 66 1 private boolean hasPreviousVersion = false ;
67
68
69
- 70 4 private final Element current = new Element();
+ 70 1 private final Element current = new Element();
71
72
@@ -186,33 +186,33 @@
@Override
86
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- 87 4888 current.setNode(qName);
- 88 4888 if (current.isEntryNode()) {
- 89 108 vendor = null ;
- 90 108 product = null ;
- 91 108 hasPreviousVersion = false ;
- 92 108 final String reject = attributes.getValue("reject" );
- 93 108 skip = "1" .equals(reject);
- 94 108 if (!skip) {
- 95 104 vulnerability = attributes.getValue("name" );
- 96 104 software = new ArrayList<VulnerableSoftware>();
+ 87 1222 current.setNode(qName);
+ 88 1222 if (current.isEntryNode()) {
+ 89 27 vendor = null ;
+ 90 27 product = null ;
+ 91 27 hasPreviousVersion = false ;
+ 92 27 final String reject = attributes.getValue("reject" );
+ 93 27 skip = "1" .equals(reject);
+ 94 27 if (!skip) {
+ 95 26 vulnerability = attributes.getValue("name" );
+ 96 26 software = new ArrayList<VulnerableSoftware>();
97
} else {
- 98 4 vulnerability = null ;
- 99 4 software = null ;
+ 98 1 vulnerability = null ;
+ 99 1 software = null ;
100
}
- 101 108 } else if (!skip && current.isProdNode()) {
+ 101 27 } else if (!skip && current.isProdNode()) {
102
- 103 208 vendor = attributes.getValue("vendor" );
- 104 208 product = attributes.getValue("name" );
- 105 4572 } else if (!skip && current.isVersNode()) {
- 106 3044 final String prev = attributes.getValue("prev" );
- 107 3044 if (prev != null && "1" .equals(prev)) {
- 108 4 hasPreviousVersion = true ;
- 109 4 final String edition = attributes.getValue("edition" );
- 110 4 final String num = attributes.getValue("num" );
+ 103 52 vendor = attributes.getValue("vendor" );
+ 104 52 product = attributes.getValue("name" );
+ 105 1143 } else if (!skip && current.isVersNode()) {
+ 106 761 final String prev = attributes.getValue("prev" );
+ 107 761 if (prev != null && "1" .equals(prev)) {
+ 108 1 hasPreviousVersion = true ;
+ 109 1 final String edition = attributes.getValue("edition" );
+ 110 1 final String num = attributes.getValue("num" );
111
112
@@ -221,48 +221,48 @@
114
- 115 4 String cpe = "cpe:/a:" + vendor + ":" + product;
- 116 4 if (num != null ) {
- 117 4 cpe += ":" + num;
+ 115 1 String cpe = "cpe:/a:" + vendor + ":" + product;
+ 116 1 if (num != null ) {
+ 117 1 cpe += ":" + num;
118
}
- 119 4 if (edition != null ) {
+ 119 1 if (edition != null ) {
120 0 cpe += ":" + edition;
121
}
- 122 4 final VulnerableSoftware vs = new VulnerableSoftware();
- 123 4 vs.setCpe(cpe);
- 124 4 vs.setPreviousVersion(prev);
- 125 4 software.add(vs);
+ 122 1 final VulnerableSoftware vs = new VulnerableSoftware();
+ 123 1 vs.setCpe(cpe);
+ 124 1 vs.setPreviousVersion(prev);
+ 125 1 software.add(vs);
126
}
- 127 3044 } else if (current.isNVDNode()) {
- 128 4 final String nvdVer = attributes.getValue("nvd_xml_version" );
- 129 4 if (!CURRENT_SCHEMA_VERSION.equals(nvdVer)) {
+ 127 761 } else if (current.isNVDNode()) {
+ 128 1 final String nvdVer = attributes.getValue("nvd_xml_version" );
+ 129 1 if (!CURRENT_SCHEMA_VERSION.equals(nvdVer)) {
130 0 throw new SAXNotSupportedException("Schema version " + nvdVer + " is not supported" );
131
}
- 132 4 vulnerabilities = new HashMap<String, List<VulnerableSoftware>>();
+ 132 1 vulnerabilities = new HashMap<String, List<VulnerableSoftware>>();
133
}
- 134 4888 }
+ 134 1222 }
135
136
@Override
137
public void endElement(String uri, String localName, String qName) throws SAXException {
- 138 4888 current.setNode(qName);
- 139 4888 if (current.isEntryNode()) {
- 140 108 if (!skip && hasPreviousVersion) {
- 141 4 vulnerabilities.put(vulnerability, software);
+ 138 1222 current.setNode(qName);
+ 139 1222 if (current.isEntryNode()) {
+ 140 27 if (!skip && hasPreviousVersion) {
+ 141 1 vulnerabilities.put(vulnerability, software);
142
}
- 143 108 vulnerability = null ;
- 144 108 software = null ;
+ 143 27 vulnerability = null ;
+ 144 27 software = null ;
145
}
- 146 4888 }
+ 146 1222 }
147
148
@@ -273,7 +273,7 @@
151
- 152 4 protected static class Element {
+ 152 1 protected static class Element {
153
154
@@ -374,7 +374,7 @@
202
public boolean isNVDNode() {
- 203 1528 return NVD.equals(node);
+ 203 382 return NVD.equals(node);
204
}
205
@@ -391,7 +391,7 @@
211
public boolean isEntryNode() {
- 212 9776 return ENTRY.equals(node);
+ 212 2444 return ENTRY.equals(node);
213
}
214
@@ -425,7 +425,7 @@
229
public boolean isProdNode() {
- 230 4768 return PROD.equals(node);
+ 230 1192 return PROD.equals(node);
231
}
232
@@ -442,7 +442,7 @@
238
public boolean isVersNode() {
- 239 4560 return VERS.equals(node);
+ 239 1140 return VERS.equals(node);
240
}
241
@@ -453,6 +453,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.xml.NvdCve20Handler.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.xml.NvdCve20Handler.html
index 9367ce759..71221c237 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.xml.NvdCve20Handler.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.data.update.xml.NvdCve20Handler.html
@@ -98,7 +98,7 @@
40
- 41 4 public class NvdCve20Handler extends DefaultHandler {
+ 41 1 public class NvdCve20Handler extends DefaultHandler {
42
43
@@ -107,7 +107,7 @@
45
- 46 4 private static final Logger LOGGER = Logger.getLogger(NvdCve20Handler.class .getName());
+ 46 1 private static final Logger LOGGER = Logger.getLogger(NvdCve20Handler.class .getName());
47
48
@@ -122,7 +122,7 @@
53
- 54 4 private final Element current = new Element();
+ 54 1 private final Element current = new Element();
55
56
@@ -153,7 +153,7 @@
69
- 70 4 private boolean hasApplicationCpe = false ;
+ 70 1 private boolean hasApplicationCpe = false ;
71
72
@@ -212,144 +212,144 @@
@Override
99
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- 100 9648 current.setNode(qName);
- 101 9648 if (current.isEntryNode()) {
- 102 108 hasApplicationCpe = false ;
- 103 108 vulnerability = new Vulnerability();
- 104 108 vulnerability.setName(attributes.getValue("id" ));
- 105 9540 } else if (current.isVulnProductNode()) {
- 106 2908 nodeText = new StringBuilder(100);
- 107 6632 } else if (current.isVulnReferencesNode()) {
- 108 360 final String lang = attributes.getValue("xml:lang" );
- 109 360 if ("en" .equals(lang)) {
- 110 360 reference = new Reference();
+ 100 2412 current.setNode(qName);
+ 101 2412 if (current.isEntryNode()) {
+ 102 27 hasApplicationCpe = false ;
+ 103 27 vulnerability = new Vulnerability();
+ 104 27 vulnerability.setName(attributes.getValue("id" ));
+ 105 2385 } else if (current.isVulnProductNode()) {
+ 106 727 nodeText = new StringBuilder(100);
+ 107 1658 } else if (current.isVulnReferencesNode()) {
+ 108 90 final String lang = attributes.getValue("xml:lang" );
+ 109 90 if ("en" .equals(lang)) {
+ 110 90 reference = new Reference();
111
} else {
112 0 reference = null ;
113
}
- 114 360 } else if (reference != null && current.isVulnReferenceNode()) {
- 115 360 reference.setUrl(attributes.getValue("href" ));
- 116 360 nodeText = new StringBuilder(130);
- 117 5912 } else if (reference != null && current.isVulnSourceNode()) {
- 118 360 nodeText = new StringBuilder(30);
- 119 5552 } else if (current.isVulnSummaryNode()) {
- 120 108 nodeText = new StringBuilder(500);
- 121 5444 } else if (current.isNVDNode()) {
- 122 4 final String nvdVer = attributes.getValue("nvd_xml_version" );
- 123 4 if (!CURRENT_SCHEMA_VERSION.equals(nvdVer)) {
+ 114 90 } else if (reference != null && current.isVulnReferenceNode()) {
+ 115 90 reference.setUrl(attributes.getValue("href" ));
+ 116 90 nodeText = new StringBuilder(130);
+ 117 1478 } else if (reference != null && current.isVulnSourceNode()) {
+ 118 90 nodeText = new StringBuilder(30);
+ 119 1388 } else if (current.isVulnSummaryNode()) {
+ 120 27 nodeText = new StringBuilder(500);
+ 121 1361 } else if (current.isNVDNode()) {
+ 122 1 final String nvdVer = attributes.getValue("nvd_xml_version" );
+ 123 1 if (!CURRENT_SCHEMA_VERSION.equals(nvdVer)) {
124 0 throw new SAXNotSupportedException("Schema version " + nvdVer + " is not supported" );
125
}
- 126 4 } else if (current.isVulnCWENode()) {
- 127 76 vulnerability.setCwe(attributes.getValue("id" ));
- 128 5364 } else if (current.isCVSSScoreNode()) {
- 129 104 nodeText = new StringBuilder(5);
- 130 5260 } else if (current.isCVSSAccessVectorNode()) {
- 131 104 nodeText = new StringBuilder(20);
- 132 5156 } else if (current.isCVSSAccessComplexityNode()) {
- 133 104 nodeText = new StringBuilder(20);
- 134 5052 } else if (current.isCVSSAuthenticationNode()) {
- 135 104 nodeText = new StringBuilder(20);
- 136 4948 } else if (current.isCVSSAvailabilityImpactNode()) {
- 137 104 nodeText = new StringBuilder(20);
- 138 4844 } else if (current.isCVSSConfidentialityImpactNode()) {
- 139 104 nodeText = new StringBuilder(20);
- 140 4740 } else if (current.isCVSSIntegrityImpactNode()) {
- 141 104 nodeText = new StringBuilder(20);
+ 126 1 } else if (current.isVulnCWENode()) {
+ 127 19 vulnerability.setCwe(attributes.getValue("id" ));
+ 128 1341 } else if (current.isCVSSScoreNode()) {
+ 129 26 nodeText = new StringBuilder(5);
+ 130 1315 } else if (current.isCVSSAccessVectorNode()) {
+ 131 26 nodeText = new StringBuilder(20);
+ 132 1289 } else if (current.isCVSSAccessComplexityNode()) {
+ 133 26 nodeText = new StringBuilder(20);
+ 134 1263 } else if (current.isCVSSAuthenticationNode()) {
+ 135 26 nodeText = new StringBuilder(20);
+ 136 1237 } else if (current.isCVSSAvailabilityImpactNode()) {
+ 137 26 nodeText = new StringBuilder(20);
+ 138 1211 } else if (current.isCVSSConfidentialityImpactNode()) {
+ 139 26 nodeText = new StringBuilder(20);
+ 140 1185 } else if (current.isCVSSIntegrityImpactNode()) {
+ 141 26 nodeText = new StringBuilder(20);
142
}
- 143 9648 }
+ 143 2412 }
144
145
@Override
146
public void characters(char [] ch, int start, int length) throws SAXException {
- 147 15948 if (nodeText != null ) {
- 148 4568 nodeText.append(ch, start, length);
+ 147 3987 if (nodeText != null ) {
+ 148 1142 nodeText.append(ch, start, length);
149
}
- 150 15948 }
+ 150 3987 }
151
152
@Override
153
public void endElement(String uri, String localName, String qName) throws SAXException {
- 154 9648 current.setNode(qName);
- 155 9648 if (current.isEntryNode()) {
- 156 108 totalNumberOfEntries += 1;
- 157 108 if (hasApplicationCpe) {
- 158 76 totalNumberOfApplicationEntries += 1;
+ 154 2412 current.setNode(qName);
+ 155 2412 if (current.isEntryNode()) {
+ 156 27 totalNumberOfEntries += 1;
+ 157 27 if (hasApplicationCpe) {
+ 158 19 totalNumberOfApplicationEntries += 1;
159
try {
- 160 76 saveEntry(vulnerability);
+ 160 19 saveEntry(vulnerability);
161 0 } catch (DatabaseException ex) {
162 0 throw new SAXException(ex);
163 0 } catch (CorruptIndexException ex) {
164 0 throw new SAXException(ex);
165 0 } catch (IOException ex) {
166 0 throw new SAXException(ex);
- 167 76 }
+ 167 19 }
168
}
- 169 108 vulnerability = null ;
- 170 9540 } else if (current.isCVSSScoreNode()) {
+ 169 27 vulnerability = null ;
+ 170 2385 } else if (current.isCVSSScoreNode()) {
171
try {
- 172 104 final float score = Float.parseFloat(nodeText.toString());
- 173 104 vulnerability.setCvssScore(score);
+ 172 26 final float score = Float.parseFloat(nodeText.toString());
+ 173 26 vulnerability.setCvssScore(score);
174 0 } catch (NumberFormatException ex) {
175 0 LOGGER.log(Level.SEVERE, "Error parsing CVSS Score." );
176 0 LOGGER.log(Level.FINE, null , ex);
- 177 104 }
- 178 104 nodeText = null ;
- 179 9436 } else if (current.isCVSSAccessVectorNode()) {
- 180 104 vulnerability.setCvssAccessVector(nodeText.toString());
- 181 104 nodeText = null ;
- 182 9332 } else if (current.isCVSSAccessComplexityNode()) {
- 183 104 vulnerability.setCvssAccessComplexity(nodeText.toString());
- 184 104 nodeText = null ;
- 185 9228 } else if (current.isCVSSAuthenticationNode()) {
- 186 104 vulnerability.setCvssAuthentication(nodeText.toString());
- 187 104 nodeText = null ;
- 188 9124 } else if (current.isCVSSAvailabilityImpactNode()) {
- 189 104 vulnerability.setCvssAvailabilityImpact(nodeText.toString());
- 190 104 nodeText = null ;
- 191 9020 } else if (current.isCVSSConfidentialityImpactNode()) {
- 192 104 vulnerability.setCvssConfidentialityImpact(nodeText.toString());
- 193 104 nodeText = null ;
- 194 8916 } else if (current.isCVSSIntegrityImpactNode()) {
- 195 104 vulnerability.setCvssIntegrityImpact(nodeText.toString());
- 196 104 nodeText = null ;
- 197 8812 } else if (current.isVulnProductNode()) {
- 198 2908 final String cpe = nodeText.toString();
- 199 2908 if (cpe.startsWith("cpe:/a:" )) {
- 200 2456 hasApplicationCpe = true ;
- 201 2456 vulnerability.addVulnerableSoftware(cpe);
+ 177 26 }
+ 178 26 nodeText = null ;
+ 179 2359 } else if (current.isCVSSAccessVectorNode()) {
+ 180 26 vulnerability.setCvssAccessVector(nodeText.toString());
+ 181 26 nodeText = null ;
+ 182 2333 } else if (current.isCVSSAccessComplexityNode()) {
+ 183 26 vulnerability.setCvssAccessComplexity(nodeText.toString());
+ 184 26 nodeText = null ;
+ 185 2307 } else if (current.isCVSSAuthenticationNode()) {
+ 186 26 vulnerability.setCvssAuthentication(nodeText.toString());
+ 187 26 nodeText = null ;
+ 188 2281 } else if (current.isCVSSAvailabilityImpactNode()) {
+ 189 26 vulnerability.setCvssAvailabilityImpact(nodeText.toString());
+ 190 26 nodeText = null ;
+ 191 2255 } else if (current.isCVSSConfidentialityImpactNode()) {
+ 192 26 vulnerability.setCvssConfidentialityImpact(nodeText.toString());
+ 193 26 nodeText = null ;
+ 194 2229 } else if (current.isCVSSIntegrityImpactNode()) {
+ 195 26 vulnerability.setCvssIntegrityImpact(nodeText.toString());
+ 196 26 nodeText = null ;
+ 197 2203 } else if (current.isVulnProductNode()) {
+ 198 727 final String cpe = nodeText.toString();
+ 199 727 if (cpe.startsWith("cpe:/a:" )) {
+ 200 614 hasApplicationCpe = true ;
+ 201 614 vulnerability.addVulnerableSoftware(cpe);
202
}
- 203 2908 nodeText = null ;
- 204 2908 } else if (reference != null && current.isVulnReferencesNode()) {
- 205 360 vulnerability.addReference(reference);
- 206 360 reference = null ;
- 207 5544 } else if (reference != null && current.isVulnReferenceNode()) {
- 208 360 reference.setName(nodeText.toString());
- 209 360 nodeText = null ;
- 210 5184 } else if (reference != null && current.isVulnSourceNode()) {
- 211 360 reference.setSource(nodeText.toString());
- 212 360 nodeText = null ;
- 213 4824 } else if (current.isVulnSummaryNode()) {
- 214 108 vulnerability.setDescription(nodeText.toString());
- 215 108 if (nodeText.indexOf("** REJECT **" ) >= 0) {
- 216 4 hasApplicationCpe = true ;
+ 203 727 nodeText = null ;
+ 204 727 } else if (reference != null && current.isVulnReferencesNode()) {
+ 205 90 vulnerability.addReference(reference);
+ 206 90 reference = null ;
+ 207 1386 } else if (reference != null && current.isVulnReferenceNode()) {
+ 208 90 reference.setName(nodeText.toString());
+ 209 90 nodeText = null ;
+ 210 1296 } else if (reference != null && current.isVulnSourceNode()) {
+ 211 90 reference.setSource(nodeText.toString());
+ 212 90 nodeText = null ;
+ 213 1206 } else if (current.isVulnSummaryNode()) {
+ 214 27 vulnerability.setDescription(nodeText.toString());
+ 215 27 if (nodeText.indexOf("** REJECT **" ) >= 0) {
+ 216 1 hasApplicationCpe = true ;
217
}
- 218 108 nodeText = null ;
+ 218 27 nodeText = null ;
219
}
- 220 9648 }
+ 220 2412 }
221
222
@@ -422,8 +422,8 @@
256
private void saveEntry(Vulnerability vuln) throws DatabaseException, CorruptIndexException, IOException {
- 257 76 if (cveDB == null ) {
- 258 76 return ;
+ 257 19 if (cveDB == null ) {
+ 258 19 return ;
259
}
260 0 final String cveName = vuln.getName();
@@ -446,7 +446,7 @@
273
- 274 4 protected static class Element {
+ 274 1 protected static class Element {
275
276
@@ -627,7 +627,7 @@
364
public boolean isNVDNode() {
- 365 5444 return NVD.equals(node);
+ 365 1361 return NVD.equals(node);
366
}
367
@@ -644,7 +644,7 @@
373
public boolean isEntryNode() {
- 374 19296 return ENTRY.equals(node);
+ 374 4824 return ENTRY.equals(node);
375
}
376
@@ -661,7 +661,7 @@
382
public boolean isVulnProductNode() {
- 383 18352 return VULN_PRODUCT.equals(node);
+ 383 4588 return VULN_PRODUCT.equals(node);
384
}
385
@@ -678,7 +678,7 @@
391
public boolean isVulnReferencesNode() {
- 392 7712 return VULN_REFERENCES.equals(node);
+ 392 1928 return VULN_REFERENCES.equals(node);
393
}
394
@@ -695,7 +695,7 @@
400
public boolean isVulnReferenceNode() {
- 401 1440 return VULN_REFERENCE.equals(node);
+ 401 360 return VULN_REFERENCE.equals(node);
402
}
403
@@ -712,7 +712,7 @@
409
public boolean isVulnSourceNode() {
- 410 720 return VULN_SOURCE.equals(node);
+ 410 180 return VULN_SOURCE.equals(node);
411
}
412
@@ -729,7 +729,7 @@
418
public boolean isVulnSummaryNode() {
- 419 10376 return VULN_SUMMARY.equals(node);
+ 419 2594 return VULN_SUMMARY.equals(node);
420
}
421
@@ -746,7 +746,7 @@
427
public boolean isVulnCWENode() {
- 428 5440 return VULN_CWE.equals(node);
+ 428 1360 return VULN_CWE.equals(node);
429
}
430
@@ -763,7 +763,7 @@
436
public boolean isCVSSScoreNode() {
- 437 14904 return CVSS_SCORE.equals(node);
+ 437 3726 return CVSS_SCORE.equals(node);
438
}
439
@@ -780,7 +780,7 @@
445
public boolean isCVSSAccessVectorNode() {
- 446 14696 return CVSS_ACCESS_VECTOR.equals(node);
+ 446 3674 return CVSS_ACCESS_VECTOR.equals(node);
447
}
448
@@ -797,7 +797,7 @@
454
public boolean isCVSSAccessComplexityNode() {
- 455 14488 return CVSS_ACCESS_COMPLEXITY.equals(node);
+ 455 3622 return CVSS_ACCESS_COMPLEXITY.equals(node);
456
}
457
@@ -814,7 +814,7 @@
463
public boolean isCVSSAuthenticationNode() {
- 464 14280 return CVSS_AUTHENTICATION.equals(node);
+ 464 3570 return CVSS_AUTHENTICATION.equals(node);
465
}
466
@@ -831,7 +831,7 @@
472
public boolean isCVSSConfidentialityImpactNode() {
- 473 13864 return CVSS_CONFIDENTIALITY_IMPACT.equals(node);
+ 473 3466 return CVSS_CONFIDENTIALITY_IMPACT.equals(node);
474
}
475
@@ -848,7 +848,7 @@
481
public boolean isCVSSIntegrityImpactNode() {
- 482 13656 return CVSS_INTEGRITY_IMPACT.equals(node);
+ 482 3414 return CVSS_INTEGRITY_IMPACT.equals(node);
483
}
484
@@ -865,7 +865,7 @@
490
public boolean isCVSSAvailabilityImpactNode() {
- 491 14072 return CVSS_AVAILABILITY_IMPACT.equals(node);
+ 491 3518 return CVSS_AVAILABILITY_IMPACT.equals(node);
492
}
493
@@ -876,6 +876,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Confidence.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Confidence.html
index 929d550c6..a53170930 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Confidence.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Confidence.html
@@ -65,7 +65,7 @@
24
- 25 20 public enum Confidence {
+ 25 5 public enum Confidence {
26
27
@@ -74,32 +74,32 @@
29
- 30 4 HIGHEST,
+ 30 1 HIGHEST,
31
32
33
- 34 4 HIGH,
+ 34 1 HIGH,
35
36
37
- 38 4 MEDIUM,
+ 38 1 MEDIUM,
39
40
41
- 42 4 LOW
+ 42 1 LOW
43
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Dependency.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Dependency.html
index bc695475c..f4ed9439c 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Dependency.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Dependency.html
@@ -60,1205 +60,1207 @@
21
import java.io.IOException;
22
- import java.security.NoSuchAlgorithmException;
+ import java.io.Serializable;
23
- import java.util.Set;
+ import java.security.NoSuchAlgorithmException;
24
- import java.util.SortedSet;
+ import java.util.Set;
25
- import java.util.TreeSet;
+ import java.util.SortedSet;
26
- import java.util.logging.Level;
+ import java.util.TreeSet;
27
- import java.util.logging.Logger;
+ import java.util.logging.Level;
28
- import org.owasp.dependencycheck.utils.Checksum;
+ import java.util.logging.Logger;
29
- import org.owasp.dependencycheck.utils.FileUtils;
+ import org.owasp.dependencycheck.utils.Checksum;
30
-
+ import org.owasp.dependencycheck.utils.FileUtils;
31
-
+
32
-
+
33
-
+
34
-
+
35
-
+
36
-
+
37
+
+ 38
- 38 8 public class Dependency implements Comparable<Dependency> {
- 39
-
+ 39 2 public class Dependency implements Serializable, Comparable<Dependency> {
40
-
+
41
-
+
42
+
+ 43
- 43 4 private static final Logger LOGGER = Logger.getLogger(Dependency.class .getName());
- 44
-
+ 44 1 private static final Logger LOGGER = Logger.getLogger(Dependency.class .getName());
45
-
+
46
-
+
47
- private String actualFilePath;
+
48
-
+ private String actualFilePath;
49
-
+
50
-
+
51
- private String filePath;
+
52
-
+ private String filePath;
53
-
+
54
-
+
55
- private String fileName;
+
56
-
+ private String fileName;
57
-
+
58
-
+
59
- private String fileExtension;
+
60
-
+ private String fileExtension;
61
-
+
62
-
+
63
- private String md5sum;
+
64
-
+ private String md5sum;
65
-
+
66
-
+
67
- private String sha1sum;
+
68
-
+ private String sha1sum;
69
-
+
70
-
+
71
- private Set<Identifier> identifiers;
+
72
-
+ private Set<Identifier> identifiers;
73
-
+
74
-
+
75
- private final EvidenceCollection vendorEvidence;
+
76
-
+ private final EvidenceCollection vendorEvidence;
77
-
+
78
-
+
79
- private final EvidenceCollection productEvidence;
+
80
-
+ private final EvidenceCollection productEvidence;
81
-
+
82
-
+
83
- private final EvidenceCollection versionEvidence;
+
84
-
+ private final EvidenceCollection versionEvidence;
85
-
+
86
-
+
87
-
- 88 152 public Dependency() {
- 89 152 vendorEvidence = new EvidenceCollection();
- 90 152 productEvidence = new EvidenceCollection();
- 91 152 versionEvidence = new EvidenceCollection();
- 92 152 identifiers = new TreeSet<Identifier>();
- 93 152 vulnerabilities = new TreeSet<Vulnerability>(new VulnerabilityComparator());
- 94 152 suppressedIdentifiers = new TreeSet<Identifier>();
- 95 152 suppressedVulnerabilities = new TreeSet<Vulnerability>(new VulnerabilityComparator());
- 96 152 }
- 97
-
- 98
-
- 99
+ 88
+
+ 89 38 public Dependency() {
+ 90 38 vendorEvidence = new EvidenceCollection();
+ 91 38 productEvidence = new EvidenceCollection();
+ 92 38 versionEvidence = new EvidenceCollection();
+ 93 38 identifiers = new TreeSet<Identifier>();
+ 94 38 vulnerabilities = new TreeSet<Vulnerability>(new VulnerabilityComparator());
+ 95 38 suppressedIdentifiers = new TreeSet<Identifier>();
+ 96 38 suppressedVulnerabilities = new TreeSet<Vulnerability>(new VulnerabilityComparator());
+ 97 38 }
+ 98
+
+ 99
+
100
-
+
101
-
+
102
-
+
103
+
+ 104
public Dependency(File file) {
- 104 68 this ();
- 105 68 this .actualFilePath = file.getPath();
- 106 68 this .filePath = this .actualFilePath;
- 107 68 this .fileName = file.getName();
- 108 68 this .fileExtension = FileUtils.getFileExtension(fileName);
- 109 68 determineHashes(file);
- 110 68 }
- 111
-
+ 105 17 this ();
+ 106 17 this .actualFilePath = file.getPath();
+ 107 17 this .filePath = this .actualFilePath;
+ 108 17 this .fileName = file.getName();
+ 109 17 this .fileExtension = FileUtils.getFileExtension(fileName);
+ 110 17 determineHashes(file);
+ 111 17 }
112
-
+
113
-
+
114
-
+
115
-
+
116
-
+
117
- public String getFileName() {
+
118
- return this .fileName;
+ public String getFileName() {
119
- }
+ return this .fileName;
120
-
+ }
121
-
+
122
-
+
123
-
+
124
-
+
125
-
+
126
-
+
127
+
+ 128
public String getFileNameForJavaScript() {
- 128 0 return this .fileName.replace("\\" , "\\\\" );
- 129
- }
+ 129 0 return this .fileName.replace("\\" , "\\\\" );
130
-
+ }
131
-
+
132
-
+
133
-
- 134
-
- 135
-
- 136
- public void setFileName(String fileName) {
- 137
- this .fileName = fileName;
- 138
- }
- 139
-
- 140
-
- 141
-
- 142
-
- 143
-
- 144
-
- 145
- public void setActualFilePath(String actualFilePath) {
- 146 8 this .actualFilePath = actualFilePath;
- 147 8 if (this .sha1sum == null ) {
- 148 8 final File file = new File(this .actualFilePath);
- 149 8 determineHashes(file);
- 150
- }
- 151 8 }
- 152
-
- 153
-
- 154
-
- 155
-
- 156
-
- 157
-
- 158
- public String getActualFilePath() {
- 159
- return this .actualFilePath;
- 160
- }
- 161
-
- 162
-
- 163
-
- 164
-
- 165
-
- 166
-
- 167
- public File getActualFile() {
- 168 12 return new File(this .actualFilePath);
- 169
- }
- 170
-
- 171
-
- 172
-
- 173
-
- 174
-
- 175
-
- 176
- public void setFilePath(String filePath) {
- 177
- this .filePath = filePath;
- 178
- }
- 179
-
- 180
-
- 181
-
- 182
-
- 183 152 private String displayName = null ;
- 184
-
- 185
-
- 186
-
- 187
-
- 188
-
- 189
-
- 190
- public void setDisplayFileName(String displayName) {
- 191
- this .displayName = displayName;
- 192
- }
- 193
-
- 194
-
- 195
-
- 196
-
- 197
-
- 198
-
- 199
-
- 200
- public String getDisplayFileName() {
- 201 0 if (displayName == null ) {
- 202 0 return this .fileName;
- 203
- }
- 204 0 return this .displayName;
- 205
- }
- 206
-
- 207
-
- 208
-
- 209
-
- 210
-
- 211
-
- 212
-
- 213
-
- 214
-
- 215
-
- 216
- public String getFilePath() {
- 217
- return this .filePath;
- 218
- }
- 219
-
- 220
-
- 221
+ 134
+
+ 135
+
+ 136
+
+ 137
+ public void setFileName(String fileName) {
+ 138
+ this .fileName = fileName;
+ 139
+ }
+ 140
+
+ 141
+
+ 142
+
+ 143
+
+ 144
+
+ 145
+
+ 146
+ public void setActualFilePath(String actualFilePath) {
+ 147 2 this .actualFilePath = actualFilePath;
+ 148 2 if (this .sha1sum == null ) {
+ 149 2 final File file = new File(this .actualFilePath);
+ 150 2 determineHashes(file);
+ 151
+ }
+ 152 2 }
+ 153
+
+ 154
+
+ 155
+
+ 156
+
+ 157
+
+ 158
+
+ 159
+ public String getActualFilePath() {
+ 160
+ return this .actualFilePath;
+ 161
+ }
+ 162
+
+ 163
+
+ 164
+
+ 165
+
+ 166
+
+ 167
+
+ 168
+ public File getActualFile() {
+ 169 3 return new File(this .actualFilePath);
+ 170
+ }
+ 171
+
+ 172
+
+ 173
+
+ 174
+
+ 175
+
+ 176
+
+ 177
+ public void setFilePath(String filePath) {
+ 178
+ this .filePath = filePath;
+ 179
+ }
+ 180
+
+ 181
+
+ 182
+
+ 183
+
+ 184 38 private String displayName = null ;
+ 185
+
+ 186
+
+ 187
+
+ 188
+
+ 189
+
+ 190
+
+ 191
+ public void setDisplayFileName(String displayName) {
+ 192
+ this .displayName = displayName;
+ 193
+ }
+ 194
+
+ 195
+
+ 196
+
+ 197
+
+ 198
+
+ 199
+
+ 200
+
+ 201
+ public String getDisplayFileName() {
+ 202 0 if (displayName == null ) {
+ 203 0 return this .fileName;
+ 204
+ }
+ 205 0 return this .displayName;
+ 206
+ }
+ 207
+
+ 208
+
+ 209
+
+ 210
+
+ 211
+
+ 212
+
+ 213
+
+ 214
+
+ 215
+
+ 216
+
+ 217
+ public String getFilePath() {
+ 218
+ return this .filePath;
+ 219
+ }
+ 220
+
+ 221
+
222
-
+
223
-
+
224
-
+
225
- public void setFileExtension(String fileExtension) {
+
226
- this .fileExtension = fileExtension;
+ public void setFileExtension(String fileExtension) {
227
- }
+ this .fileExtension = fileExtension;
228
-
+ }
229
-
+
230
-
+
231
-
+
232
-
+
233
-
+
234
- public String getFileExtension() {
+
235
- return this .fileExtension;
+ public String getFileExtension() {
236
- }
+ return this .fileExtension;
237
-
+ }
238
-
+
239
-
+
240
-
+
241
-
+
242
-
+
243
- public String getMd5sum() {
+
244
- return this .md5sum;
+ public String getMd5sum() {
245
- }
+ return this .md5sum;
246
-
+ }
247
-
+
248
-
+
249
-
+
250
-
+
251
-
+
252
- public void setMd5sum(String md5sum) {
+
253
- this .md5sum = md5sum;
+ public void setMd5sum(String md5sum) {
254
- }
+ this .md5sum = md5sum;
255
-
+ }
256
-
+
257
-
+
258
-
+
259
-
+
260
-
+
261
- public String getSha1sum() {
+
262
- return this .sha1sum;
+ public String getSha1sum() {
263
- }
+ return this .sha1sum;
264
-
+ }
265
-
+
266
-
+
267
-
+
268
-
+
269
-
+
270
- public void setSha1sum(String sha1sum) {
+
271
- this .sha1sum = sha1sum;
+ public void setSha1sum(String sha1sum) {
272
- }
+ this .sha1sum = sha1sum;
273
-
+ }
274
-
+
275
-
+
276
-
+
277
-
+
278
-
+
279
- public Set<Identifier> getIdentifiers() {
+
280
- return this .identifiers;
+ public Set<Identifier> getIdentifiers() {
281
- }
+ return this .identifiers;
282
-
+ }
283
-
+
284
-
+
285
-
+
286
-
+
287
-
+
288
- public void setIdentifiers(Set<Identifier> identifiers) {
+
289
- this .identifiers = identifiers;
+ public void setIdentifiers(Set<Identifier> identifiers) {
290
- }
+ this .identifiers = identifiers;
291
-
+ }
292
-
+
293
-
+
294
-
+
295
-
+
296
-
- 297
-
- 298
-
- 299
- public void addIdentifier(String type, String value, String url) {
- 300 44 final Identifier i = new Identifier(type, value, url);
- 301 44 this .identifiers.add(i);
- 302 44 }
- 303
-
- 304
-
- 305
-
- 306
-
- 307
- 308
+ 297
- 309
+ 298
- 310
-
- 311
+ 299
- 312
- public void addIdentifier(String type, String value, String url, Confidence confidence) {
- 313 4 final Identifier i = new Identifier(type, value, url);
- 314 4 i.setConfidence(confidence);
- 315 4 this .identifiers.add(i);
- 316 4 }
- 317
+ 300
+ public void addIdentifier(String type, String value, String url) {
+ 301 11 final Identifier i = new Identifier(type, value, url);
+ 302 11 this .identifiers.add(i);
+ 303 11 }
+ 304
- 318
+ 305
- 319
+ 306
+ 307
+
+ 308
+
+ 309
+
+ 310
+
+ 311
+
+ 312
+
+ 313
+ public void addIdentifier(String type, String value, String url, Confidence confidence) {
+ 314 1 final Identifier i = new Identifier(type, value, url);
+ 315 1 i.setConfidence(confidence);
+ 316 1 this .identifiers.add(i);
+ 317 1 }
+ 318
+
+ 319
+
320
-
+
321
-
+
322
-
+
323
+
+ 324
public void addIdentifier(Identifier identifier) {
- 324 16 this .identifiers.add(identifier);
- 325 16 }
- 326
-
+ 325 2 this .identifiers.add(identifier);
+ 326 2 }
327
-
+
328
-
+
329
- private Set<Identifier> suppressedIdentifiers;
+
330
-
+ private Set<Identifier> suppressedIdentifiers;
331
-
+
332
-
+
333
-
+
334
-
+
335
-
+
336
- public Set<Identifier> getSuppressedIdentifiers() {
+
337
- return suppressedIdentifiers;
+ public Set<Identifier> getSuppressedIdentifiers() {
338
- }
+ return suppressedIdentifiers;
339
-
+ }
340
-
+
341
-
+
342
-
+
343
-
+
344
-
+
345
- public void setSuppressedIdentifiers(Set<Identifier> suppressedIdentifiers) {
+
346
- this .suppressedIdentifiers = suppressedIdentifiers;
+ public void setSuppressedIdentifiers(Set<Identifier> suppressedIdentifiers) {
347
- }
+ this .suppressedIdentifiers = suppressedIdentifiers;
348
-
+ }
349
-
+
350
-
+
351
-
+
352
-
+
353
-
+
354
+
+ 355
public void addSuppressedIdentifier(Identifier identifier) {
- 355 28 this .suppressedIdentifiers.add(identifier);
- 356 28 }
- 357
-
+ 356 4 this .suppressedIdentifiers.add(identifier);
+ 357 4 }
358
-
+
359
-
+
360
-
+
361
- private SortedSet<Vulnerability> suppressedVulnerabilities;
+
362
-
+ private SortedSet<Vulnerability> suppressedVulnerabilities;
363
-
+
364
-
+
365
-
+
366
-
+
367
-
+
368
- public SortedSet<Vulnerability> getSuppressedVulnerabilities() {
+
369
- return suppressedVulnerabilities;
+ public SortedSet<Vulnerability> getSuppressedVulnerabilities() {
370
- }
+ return suppressedVulnerabilities;
371
-
+ }
372
-
+
373
-
+
374
-
+
375
-
+
376
-
+
377
- public void setSuppressedVulnerabilities(SortedSet<Vulnerability> suppressedVulnerabilities) {
+
378
- this .suppressedVulnerabilities = suppressedVulnerabilities;
+ public void setSuppressedVulnerabilities(SortedSet<Vulnerability> suppressedVulnerabilities) {
379
- }
+ this .suppressedVulnerabilities = suppressedVulnerabilities;
380
-
+ }
381
-
+
382
-
+
383
-
+
384
-
+
385
-
+
386
+
+ 387
public void addSuppressedVulnerability(Vulnerability vulnerability) {
- 387 12 this .suppressedVulnerabilities.add(vulnerability);
- 388 12 }
- 389
-
+ 388 3 this .suppressedVulnerabilities.add(vulnerability);
+ 389 3 }
390
-
+
391
-
+
392
-
+
393
-
+
394
-
+
395
+
+ 396
public EvidenceCollection getEvidence() {
- 396 12 return EvidenceCollection.merge(this .productEvidence, this .vendorEvidence, this .versionEvidence);
- 397
- }
+ 397 3 return EvidenceCollection.merge(this .productEvidence, this .vendorEvidence, this .versionEvidence);
398
-
+ }
399
-
+
400
-
+
401
-
- 402
-
- 403
-
- 404
- public Set<Evidence> getEvidenceForDisplay() {
- 405 0 return EvidenceCollection.mergeForDisplay(this .productEvidence, this .vendorEvidence, this .versionEvidence);
- 406
- }
- 407
-
- 408
-
- 409
+ 402
+
+ 403
+
+ 404
+
+ 405
+ public Set<Evidence> getEvidenceForDisplay() {
+ 406 0 return EvidenceCollection.mergeForDisplay(this .productEvidence, this .vendorEvidence, this .versionEvidence);
+ 407
+ }
+ 408
+
+ 409
+
410
-
+
411
-
+
412
-
+
413
+
+ 414
public EvidenceCollection getEvidenceUsed() {
- 414 4 return EvidenceCollection.mergeUsed(this .productEvidence, this .vendorEvidence, this .versionEvidence);
- 415
- }
+ 415 1 return EvidenceCollection.mergeUsed(this .productEvidence, this .vendorEvidence, this .versionEvidence);
416
-
+ }
417
-
+
418
-
+
419
-
+
420
-
+
421
-
+
422
- public EvidenceCollection getVendorEvidence() {
+
423
- return this .vendorEvidence;
+ public EvidenceCollection getVendorEvidence() {
424
- }
+ return this .vendorEvidence;
425
-
+ }
426
-
+
427
-
+
428
-
+
429
-
+
430
-
- 431
- public EvidenceCollection getProductEvidence() {
- 432
- return this .productEvidence;
- 433
- }
- 434
-
- 435
-
- 436
-
- 437
-
- 438
+ 431
+
+ 432
+ public EvidenceCollection getProductEvidence() {
+ 433
+ return this .productEvidence;
+ 434
+ }
+ 435
+
+ 436
+
+ 437
+
+ 438
+
439
-
+
440
- public EvidenceCollection getVersionEvidence() {
+
441
- return this .versionEvidence;
+ public EvidenceCollection getVersionEvidence() {
442
- }
+ return this .versionEvidence;
443
-
+ }
444
-
+
445
-
+
446
- private String description;
+
447
-
+ private String description;
448
-
+
449
-
+
450
-
+
451
-
+
452
-
+
453
- public String getDescription() {
+
454
- return description;
+ public String getDescription() {
455
- }
+ return description;
456
-
+ }
457
-
+
458
-
+
459
-
+
460
-
+
461
-
+
462
- public void setDescription(String description) {
+
463
- this .description = description;
+ public void setDescription(String description) {
464
- }
+ this .description = description;
465
-
+ }
466
-
+
467
-
+
468
- private String license;
+
469
-
+ private String license;
470
-
+
471
-
+
472
-
+
473
-
+
474
-
+
475
- public String getLicense() {
+
476
- return license;
+ public String getLicense() {
477
- }
+ return license;
478
-
+ }
479
-
+
480
-
+
481
-
+
482
-
+
483
-
+
484
- public void setLicense(String license) {
+
485
- this .license = license;
+ public void setLicense(String license) {
486
- }
+ this .license = license;
487
-
+ }
488
-
+
489
-
+
490
- private SortedSet<Vulnerability> vulnerabilities;
+
491
-
+ private SortedSet<Vulnerability> vulnerabilities;
492
-
+
493
-
+
494
-
+
495
-
+
496
-
+
497
- public SortedSet<Vulnerability> getVulnerabilities() {
+
498
- return vulnerabilities;
+ public SortedSet<Vulnerability> getVulnerabilities() {
499
- }
+ return vulnerabilities;
500
-
+ }
501
-
+
502
-
+
503
-
+
504
-
+
505
-
+
506
- public void setVulnerabilities(SortedSet<Vulnerability> vulnerabilities) {
+
507
- this .vulnerabilities = vulnerabilities;
+ public void setVulnerabilities(SortedSet<Vulnerability> vulnerabilities) {
508
- }
+ this .vulnerabilities = vulnerabilities;
509
-
+ }
510
-
+
511
-
+
512
-
+
513
-
+
514
-
+
515
+
+ 516
private void determineHashes(File file) {
- 516 76 String md5 = null ;
- 517 76 String sha1 = null ;
- 518
+ 517 19 String md5 = null ;
+ 518 19 String sha1 = null ;
+ 519
try {
- 519 76 md5 = Checksum.getMD5Checksum(file);
- 520 64 sha1 = Checksum.getSHA1Checksum(file);
- 521 12 } catch (IOException ex) {
- 522 12 final String msg = String.format("Unable to read '%s' to determine hashes." , file.getName());
- 523 12 LOGGER.log(Level.WARNING, msg);
- 524 12 LOGGER.log(Level.FINE, null , ex);
- 525 0 } catch (NoSuchAlgorithmException ex) {
- 526 0 final String msg = "Unable to use MD5 of SHA1 checksums." ;
- 527 0 LOGGER.log(Level.WARNING, msg);
- 528 0 LOGGER.log(Level.FINE, null , ex);
- 529 76 }
- 530 76 this .setMd5sum(md5);
- 531 76 this .setSha1sum(sha1);
- 532 76 }
- 533
-
+ 520 19 md5 = Checksum.getMD5Checksum(file);
+ 521 16 sha1 = Checksum.getSHA1Checksum(file);
+ 522 3 } catch (IOException ex) {
+ 523 3 final String msg = String.format("Unable to read '%s' to determine hashes." , file.getName());
+ 524 3 LOGGER.log(Level.WARNING, msg);
+ 525 3 LOGGER.log(Level.FINE, null , ex);
+ 526 0 } catch (NoSuchAlgorithmException ex) {
+ 527 0 final String msg = "Unable to use MD5 of SHA1 checksums." ;
+ 528 0 LOGGER.log(Level.WARNING, msg);
+ 529 0 LOGGER.log(Level.FINE, null , ex);
+ 530 19 }
+ 531 19 this .setMd5sum(md5);
+ 532 19 this .setSha1sum(sha1);
+ 533 19 }
534
-
+
535
-
+
536
-
+
537
-
+
538
-
+
539
+
+ 540
public void addVulnerability(Vulnerability vulnerability) {
- 540 12 this .vulnerabilities.add(vulnerability);
- 541 12 }
- 542
-
+ 541 3 this .vulnerabilities.add(vulnerability);
+ 542 3 }
543
-
+
544
+
+ 545
- 545 152 private Set<Dependency> relatedDependencies = new TreeSet<Dependency>();
- 546
-
+ 546 38 private Set<Dependency> relatedDependencies = new TreeSet<Dependency>();
547
-
+
548
-
+
549
-
+
550
-
+
551
-
+
552
- public Set<Dependency> getRelatedDependencies() {
+
553
- return relatedDependencies;
+ public Set<Dependency> getRelatedDependencies() {
554
- }
+ return relatedDependencies;
555
-
+ }
556
-
+
557
-
+
558
-
+
559
-
+
560
-
+
561
- public void setRelatedDependencies(Set<Dependency> relatedDependencies) {
+
562
- this .relatedDependencies = relatedDependencies;
+ public void setRelatedDependencies(Set<Dependency> relatedDependencies) {
563
- }
+ this .relatedDependencies = relatedDependencies;
564
-
+ }
565
-
+
566
-
+
567
-
+
568
-
+
569
-
+
570
+
+ 571
public void addRelatedDependency(Dependency dependency) {
- 571 0 relatedDependencies.add(dependency);
- 572 0 }
- 573
-
+ 572 0 relatedDependencies.add(dependency);
+ 573 0 }
574
-
+
575
-
+
576
-
+
577
-
+
578
-
+
579
-
+
580
+
+ 581
public int compareTo(Dependency o) {
- 581 8 return this .getFileName().compareToIgnoreCase(o.getFileName());
- 582
- }
+ 582 2 return this .getFileName().compareToIgnoreCase(o.getFileName());
583
-
+ }
584
-
+
585
-
+
586
-
+
587
-
+
588
-
+
589
-
+
590
- @Override
+
591
+ @Override
+ 592
public boolean equals(Object obj) {
- 592 0 if (obj == null ) {
- 593 0 return false ;
- 594
+ 593 0 if (obj == null ) {
+ 594 0 return false ;
+ 595
}
- 595 0 if (getClass() != obj.getClass()) {
- 596 0 return false ;
- 597
+ 596 0 if (getClass() != obj.getClass()) {
+ 597 0 return false ;
+ 598
}
- 598 0 final Dependency other = (Dependency) obj;
- 599 0 if ((this .actualFilePath == null ) ? (other.actualFilePath != null ) : !this .actualFilePath.equals(other.actualFilePath)) {
- 600 0 return false ;
- 601
+ 599 0 final Dependency other = (Dependency) obj;
+ 600 0 if ((this .actualFilePath == null ) ? (other.actualFilePath != null ) : !this .actualFilePath.equals(other.actualFilePath)) {
+ 601 0 return false ;
+ 602
}
- 602 0 if ((this .filePath == null ) ? (other.filePath != null ) : !this .filePath.equals(other.filePath)) {
- 603 0 return false ;
- 604
+ 603 0 if ((this .filePath == null ) ? (other.filePath != null ) : !this .filePath.equals(other.filePath)) {
+ 604 0 return false ;
+ 605
}
- 605 0 if ((this .fileName == null ) ? (other.fileName != null ) : !this .fileName.equals(other.fileName)) {
- 606 0 return false ;
- 607
+ 606 0 if ((this .fileName == null ) ? (other.fileName != null ) : !this .fileName.equals(other.fileName)) {
+ 607 0 return false ;
+ 608
}
- 608 0 if ((this .fileExtension == null ) ? (other.fileExtension != null ) : !this .fileExtension.equals(other.fileExtension)) {
- 609 0 return false ;
- 610
+ 609 0 if ((this .fileExtension == null ) ? (other.fileExtension != null ) : !this .fileExtension.equals(other.fileExtension)) {
+ 610 0 return false ;
+ 611
}
- 611 0 if ((this .md5sum == null ) ? (other.md5sum != null ) : !this .md5sum.equals(other.md5sum)) {
- 612 0 return false ;
- 613
+ 612 0 if ((this .md5sum == null ) ? (other.md5sum != null ) : !this .md5sum.equals(other.md5sum)) {
+ 613 0 return false ;
+ 614
}
- 614 0 if ((this .sha1sum == null ) ? (other.sha1sum != null ) : !this .sha1sum.equals(other.sha1sum)) {
- 615 0 return false ;
- 616
+ 615 0 if ((this .sha1sum == null ) ? (other.sha1sum != null ) : !this .sha1sum.equals(other.sha1sum)) {
+ 616 0 return false ;
+ 617
}
- 617 0 if (this .identifiers != other.identifiers && (this .identifiers == null || !this .identifiers.equals(other.identifiers))) {
- 618 0 return false ;
- 619
+ 618 0 if (this .identifiers != other.identifiers && (this .identifiers == null || !this .identifiers.equals(other.identifiers))) {
+ 619 0 return false ;
+ 620
}
- 620 0 if (this .vendorEvidence != other.vendorEvidence && (this .vendorEvidence == null || !this .vendorEvidence.equals(other.vendorEvidence))) {
- 621 0 return false ;
- 622
+ 621 0 if (this .vendorEvidence != other.vendorEvidence && (this .vendorEvidence == null || !this .vendorEvidence.equals(other.vendorEvidence))) {
+ 622 0 return false ;
+ 623
}
- 623 0 if (this .productEvidence != other.productEvidence && (this .productEvidence == null || !this .productEvidence.equals(other.productEvidence))) {
- 624 0 return false ;
- 625
+ 624 0 if (this .productEvidence != other.productEvidence && (this .productEvidence == null || !this .productEvidence.equals(other.productEvidence))) {
+ 625 0 return false ;
+ 626
}
- 626 0 if (this .versionEvidence != other.versionEvidence && (this .versionEvidence == null || !this .versionEvidence.equals(other.versionEvidence))) {
- 627 0 return false ;
- 628
+ 627 0 if (this .versionEvidence != other.versionEvidence && (this .versionEvidence == null || !this .versionEvidence.equals(other.versionEvidence))) {
+ 628 0 return false ;
+ 629
}
- 629 0 if ((this .description == null ) ? (other.description != null ) : !this .description.equals(other.description)) {
- 630 0 return false ;
- 631
+ 630 0 if ((this .description == null ) ? (other.description != null ) : !this .description.equals(other.description)) {
+ 631 0 return false ;
+ 632
}
- 632 0 if ((this .license == null ) ? (other.license != null ) : !this .license.equals(other.license)) {
- 633 0 return false ;
- 634
+ 633 0 if ((this .license == null ) ? (other.license != null ) : !this .license.equals(other.license)) {
+ 634 0 return false ;
+ 635
}
- 635 0 if (this .vulnerabilities != other.vulnerabilities && (this .vulnerabilities == null || !this .vulnerabilities.equals(other.vulnerabilities))) {
- 636 0 return false ;
- 637
+ 636 0 if (this .vulnerabilities != other.vulnerabilities && (this .vulnerabilities == null || !this .vulnerabilities.equals(other.vulnerabilities))) {
+ 637 0 return false ;
+ 638
}
- 638 0 if (this .relatedDependencies != other.relatedDependencies
- 639
+ 639 0 if (this .relatedDependencies != other.relatedDependencies
+ 640
&& (this .relatedDependencies == null || !this .relatedDependencies.equals(other.relatedDependencies))) {
- 640 0 return false ;
- 641
+ 641 0 return false ;
+ 642
}
- 642 0 return true ;
- 643
- }
+ 643 0 return true ;
644
-
+ }
645
-
- 646
-
- 647
-
- 648
-
- 649
-
- 650
- @Override
- 651
- public int hashCode() {
- 652 104 int hash = 3;
- 653 104 hash = 47 * hash + (this .actualFilePath != null ? this .actualFilePath.hashCode() : 0);
- 654 104 hash = 47 * hash + (this .filePath != null ? this .filePath.hashCode() : 0);
- 655 104 hash = 47 * hash + (this .fileName != null ? this .fileName.hashCode() : 0);
- 656 104 hash = 47 * hash + (this .fileExtension != null ? this .fileExtension.hashCode() : 0);
- 657 104 hash = 47 * hash + (this .md5sum != null ? this .md5sum.hashCode() : 0);
- 658 104 hash = 47 * hash + (this .sha1sum != null ? this .sha1sum.hashCode() : 0);
- 659 104 hash = 47 * hash + (this .identifiers != null ? this .identifiers.hashCode() : 0);
- 660 104 hash = 47 * hash + (this .vendorEvidence != null ? this .vendorEvidence.hashCode() : 0);
- 661 104 hash = 47 * hash + (this .productEvidence != null ? this .productEvidence.hashCode() : 0);
- 662 104 hash = 47 * hash + (this .versionEvidence != null ? this .versionEvidence.hashCode() : 0);
- 663 104 hash = 47 * hash + (this .description != null ? this .description.hashCode() : 0);
- 664 104 hash = 47 * hash + (this .license != null ? this .license.hashCode() : 0);
- 665 104 hash = 47 * hash + (this .vulnerabilities != null ? this .vulnerabilities.hashCode() : 0);
- 666 104 hash = 47 * hash + (this .relatedDependencies != null ? this .relatedDependencies.hashCode() : 0);
- 667 104 return hash;
- 668
- }
- 669
- 670
+ 646
- 671
-
- 672
+ 647
+
+ 648
- 673
-
- 674
+ 649
+
+ 650
- 675
+ 651
@Override
- 676
- public String toString() {
- 677 0 return "Dependency{ fileName='" + fileName + "', actualFilePath='" + actualFilePath + "', filePath='" + filePath + "'}" ;
- 678
+ 652
+ public int hashCode() {
+ 653 26 int hash = 3;
+ 654 26 hash = 47 * hash + (this .actualFilePath != null ? this .actualFilePath.hashCode() : 0);
+ 655 26 hash = 47 * hash + (this .filePath != null ? this .filePath.hashCode() : 0);
+ 656 26 hash = 47 * hash + (this .fileName != null ? this .fileName.hashCode() : 0);
+ 657 26 hash = 47 * hash + (this .fileExtension != null ? this .fileExtension.hashCode() : 0);
+ 658 26 hash = 47 * hash + (this .md5sum != null ? this .md5sum.hashCode() : 0);
+ 659 26 hash = 47 * hash + (this .sha1sum != null ? this .sha1sum.hashCode() : 0);
+ 660 26 hash = 47 * hash + (this .identifiers != null ? this .identifiers.hashCode() : 0);
+ 661 26 hash = 47 * hash + (this .vendorEvidence != null ? this .vendorEvidence.hashCode() : 0);
+ 662 26 hash = 47 * hash + (this .productEvidence != null ? this .productEvidence.hashCode() : 0);
+ 663 26 hash = 47 * hash + (this .versionEvidence != null ? this .versionEvidence.hashCode() : 0);
+ 664 26 hash = 47 * hash + (this .description != null ? this .description.hashCode() : 0);
+ 665 26 hash = 47 * hash + (this .license != null ? this .license.hashCode() : 0);
+ 666 26 hash = 47 * hash + (this .vulnerabilities != null ? this .vulnerabilities.hashCode() : 0);
+ 667 26 hash = 47 * hash + (this .relatedDependencies != null ? this .relatedDependencies.hashCode() : 0);
+ 668 26 return hash;
+ 669
}
+ 670
+
+ 671
+
+ 672
+
+ 673
+
+ 674
+
+ 675
+
+ 676
+ @Override
+ 677
+ public String toString() {
+ 678 0 return "Dependency{ fileName='" + fileName + "', actualFilePath='" + actualFilePath + "', filePath='" + filePath + "'}" ;
679
+ }
+ 680
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Evidence.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Evidence.html
index be54837e2..5b2cd6ec0 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Evidence.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Evidence.html
@@ -56,544 +56,548 @@
19
20
-
+ import java.io.Serializable;
21
-
+
22
-
+
23
-
+
24
-
- 25 158856 public class Evidence implements Comparable<Evidence> {
+
+ 25
+
26
-
- 27
-
+
+ 27 39714 public class Evidence implements Serializable, Comparable<Evidence> {
28
-
+
29
-
+
30
- public Evidence() {
+
31
- }
+
32
-
+ public Evidence() {
33
-
+ }
34
-
+
35
-
+
36
-
+
37
-
+
38
-
+
39
-
+
40
-
+
41
- public Evidence(String source, String name, String value, Confidence confidence) {
+
42
- this .source = source;
+
43
- this .name = name;
+ public Evidence(String source, String name, String value, Confidence confidence) {
44
- this .value = value;
- 45
- this .confidence = confidence;
- 46
- }
- 47
-
- 48
-
- 49
-
- 50
- private String name;
- 51
-
- 52
-
- 53
-
- 54
-
- 55
-
- 56
-
- 57
- public String getName() {
- 58
- return name;
- 59
- }
- 60
-
- 61
-
- 62
-
- 63
-
- 64
-
- 65
-
- 66
- public void setName(String name) {
- 67
- this .name = name;
- 68
- }
- 69
-
- 70
-
- 71
-
- 72
- private String source;
- 73
-
- 74
-
- 75
-
- 76
-
- 77
-
- 78
-
- 79
- public String getSource() {
- 80
- return source;
- 81
- }
- 82
-
- 83
-
- 84
-
- 85
-
- 86
-
- 87
-
- 88
- public void setSource(String source) {
- 89
this .source = source;
- 90
- }
- 91
-
- 92
-
- 93
-
- 94
- private String value;
- 95
-
- 96
-
- 97
-
- 98
-
- 99
-
- 100
-
- 101
- public String getValue() {
- 102 3436 used = true ;
- 103 3436 return value;
- 104
- }
- 105
-
- 106
-
- 107
-
- 108
-
- 109
-
- 110
-
- 111
-
- 112
- public String getValue(Boolean setUsed) {
- 113 200 used = used || setUsed;
- 114 200 return value;
- 115
- }
- 116
-
- 117
-
- 118
-
- 119
-
- 120
-
- 121
-
- 122
- public void setValue(String value) {
- 123
+ 45
+ this .name = name;
+ 46
this .value = value;
- 124
- }
- 125
-
- 126
-
- 127
-
- 128
- private boolean used;
- 129
-
- 130
-
- 131
-
- 132
-
- 133
-
- 134
-
- 135
- public boolean isUsed() {
- 136
- return used;
- 137
- }
- 138
-
- 139
-
- 140
-
- 141
-
- 142
-
- 143
-
- 144
- public void setUsed(boolean used) {
- 145
- this .used = used;
- 146
- }
- 147
-
- 148
-
- 149
-
- 150
- private Confidence confidence;
- 151
-
- 152
-
- 153
-
- 154
-
- 155
-
- 156
-
- 157
- public Confidence getConfidence() {
- 158
- return confidence;
- 159
- }
- 160
-
- 161
-
- 162
-
- 163
-
- 164
-
- 165
-
- 166
- public void setConfidence(Confidence confidence) {
- 167
+ 47
this .confidence = confidence;
+ 48
+ }
+ 49
+
+ 50
+
+ 51
+
+ 52
+ private String name;
+ 53
+
+ 54
+
+ 55
+
+ 56
+
+ 57
+
+ 58
+
+ 59
+ public String getName() {
+ 60
+ return name;
+ 61
+ }
+ 62
+
+ 63
+
+ 64
+
+ 65
+
+ 66
+
+ 67
+
+ 68
+ public void setName(String name) {
+ 69
+ this .name = name;
+ 70
+ }
+ 71
+
+ 72
+
+ 73
+
+ 74
+ private String source;
+ 75
+
+ 76
+
+ 77
+
+ 78
+
+ 79
+
+ 80
+
+ 81
+ public String getSource() {
+ 82
+ return source;
+ 83
+ }
+ 84
+
+ 85
+
+ 86
+
+ 87
+
+ 88
+
+ 89
+
+ 90
+ public void setSource(String source) {
+ 91
+ this .source = source;
+ 92
+ }
+ 93
+
+ 94
+
+ 95
+
+ 96
+ private String value;
+ 97
+
+ 98
+
+ 99
+
+ 100
+
+ 101
+
+ 102
+
+ 103
+ public String getValue() {
+ 104 325 used = true ;
+ 105 325 return value;
+ 106
+ }
+ 107
+
+ 108
+
+ 109
+
+ 110
+
+ 111
+
+ 112
+
+ 113
+
+ 114
+ public String getValue(Boolean setUsed) {
+ 115 50 used = used || setUsed;
+ 116 50 return value;
+ 117
+ }
+ 118
+
+ 119
+
+ 120
+
+ 121
+
+ 122
+
+ 123
+
+ 124
+ public void setValue(String value) {
+ 125
+ this .value = value;
+ 126
+ }
+ 127
+
+ 128
+
+ 129
+
+ 130
+ private boolean used;
+ 131
+
+ 132
+
+ 133
+
+ 134
+
+ 135
+
+ 136
+
+ 137
+ public boolean isUsed() {
+ 138
+ return used;
+ 139
+ }
+ 140
+
+ 141
+
+ 142
+
+ 143
+
+ 144
+
+ 145
+
+ 146
+ public void setUsed(boolean used) {
+ 147
+ this .used = used;
+ 148
+ }
+ 149
+
+ 150
+
+ 151
+
+ 152
+ private Confidence confidence;
+ 153
+
+ 154
+
+ 155
+
+ 156
+
+ 157
+
+ 158
+
+ 159
+ public Confidence getConfidence() {
+ 160
+ return confidence;
+ 161
+ }
+ 162
+
+ 163
+
+ 164
+
+ 165
+
+ 166
+
+ 167
+
168
- }
+ public void setConfidence(Confidence confidence) {
169
-
+ this .confidence = confidence;
170
-
+ }
171
-
+
172
-
+
173
-
+
174
-
+
175
- @Override
+
176
- public int hashCode() {
- 177 8 int hash = 3;
- 178 8 hash = 67 * hash + (this .name != null ? this .name.hashCode() : 0);
- 179 8 hash = 67 * hash + (this .source != null ? this .source.hashCode() : 0);
- 180 8 hash = 67 * hash + (this .value != null ? this .value.hashCode() : 0);
- 181 8 hash = 67 * hash + (this .confidence != null ? this .confidence.hashCode() : 0);
- 182 8 return hash;
- 183
- }
- 184
-
- 185
-
- 186
-
- 187
-
- 188
-
- 189
-
- 190
- 191
+ 177
@Override
+ 178
+ public int hashCode() {
+ 179 2 int hash = 3;
+ 180 2 hash = 67 * hash + (this .name != null ? this .name.hashCode() : 0);
+ 181 2 hash = 67 * hash + (this .source != null ? this .source.hashCode() : 0);
+ 182 2 hash = 67 * hash + (this .value != null ? this .value.hashCode() : 0);
+ 183 2 hash = 67 * hash + (this .confidence != null ? this .confidence.hashCode() : 0);
+ 184 2 return hash;
+ 185
+ }
+ 186
+
+ 187
+
+ 188
+
+ 189
+
+ 190
+
+ 191
+
192
+
+ 193
+ @Override
+ 194
public boolean equals(Object that) {
- 193 0 if (this == that) {
- 194 0 return true ;
- 195
+ 195 0 if (this == that) {
+ 196 0 return true ;
+ 197
}
- 196 0 if (!(that instanceof Evidence)) {
- 197 0 return false ;
- 198
- }
- 199 0 final Evidence e = (Evidence) that;
+ 198 0 if (!(that instanceof Evidence)) {
+ 199 0 return false ;
200
-
- 201 0 return testEquality(name, e.name) && testEquality(source, e.source) && testEquality(value, e.value)
+ }
+ 201 0 final Evidence e = (Evidence) that;
202
- && (confidence == null ? e.confidence == null : confidence == e.confidence);
- 203
- }
+
+ 203 0 return testEquality(name, e.name) && testEquality(source, e.source) && testEquality(value, e.value)
204
-
+ && (confidence == null ? e.confidence == null : confidence == e.confidence);
205
-
+ }
206
-
+
207
-
+
208
-
+
209
-
+
210
-
+
211
-
+
212
- private boolean testEquality(String l, String r) {
- 213 0 return l == null ? r == null : l.equalsIgnoreCase(r);
+
+ 213
+
214
- }
- 215
-
+ private boolean testEquality(String l, String r) {
+ 215 0 return l == null ? r == null : l.equalsIgnoreCase(r);
216
-
+ }
217
-
+
218
-
+
219
-
+
220
-
+
221
-
+
222
+
+ 223
+
+ 224
public int compareTo(Evidence o) {
- 223 158856 if (o == null ) {
- 224 0 return 1;
- 225
+ 225 39714 if (o == null ) {
+ 226 0 return 1;
+ 227
}
- 226 158856 if (equalsWithNullCheck(source, o.source)) {
- 227 101004 if (equalsWithNullCheck(name, o.name)) {
- 228 100632 if (equalsWithNullCheck(value, o.value)) {
- 229 61780 if (equalsWithNullCheck(confidence, o.confidence)) {
- 230 61728 return 0;
- 231
- } else {
- 232 52 return compareToWithNullCheck(confidence, o.confidence);
+ 228 39714 if (equalsWithNullCheck(source, o.source)) {
+ 229 25251 if (equalsWithNullCheck(name, o.name)) {
+ 230 25158 if (equalsWithNullCheck(value, o.value)) {
+ 231 15445 if (equalsWithNullCheck(confidence, o.confidence)) {
+ 232 15432 return 0;
233
+ } else {
+ 234 13 return compareToWithNullCheck(confidence, o.confidence);
+ 235
}
- 234
- } else {
- 235 38852 return compareToIgnoreCaseWithNullCheck(value, o.value);
236
+ } else {
+ 237 9713 return compareToIgnoreCaseWithNullCheck(value, o.value);
+ 238
}
- 237
- } else {
- 238 372 return compareToIgnoreCaseWithNullCheck(name, o.name);
239
+ } else {
+ 240 93 return compareToIgnoreCaseWithNullCheck(name, o.name);
+ 241
}
- 240
- } else {
- 241 57852 return compareToIgnoreCaseWithNullCheck(source, o.source);
242
- }
- 243
- }
+ } else {
+ 243 14463 return compareToIgnoreCaseWithNullCheck(source, o.source);
244
-
+ }
245
-
+ }
246
-
+
247
-
+
248
-
- 249
-
- 250
-
- 251
-
- 252
- private boolean equalsWithNullCheck(String me, String other) {
- 253 360492 if (me == null && other == null ) {
- 254 0 return true ;
- 255 360492 } else if (me == null || other == null ) {
- 256 0 return false ;
- 257
- }
- 258 360492 return me.equals(other);
- 259
- }
- 260
-
- 261
-
- 262
+ 249
+
+ 250
+
+ 251
+
+ 252
+
+ 253
+
+ 254
+ private boolean equalsWithNullCheck(String me, String other) {
+ 255 90123 if (me == null && other == null ) {
+ 256 0 return true ;
+ 257 90123 } else if (me == null || other == null ) {
+ 258 0 return false ;
+ 259
+ }
+ 260 90123 return me.equals(other);
+ 261
+ }
+ 262
+
263
-
+
264
-
+
265
-
+
266
-
+
267
-
+
268
+
+ 269
+
+ 270
private boolean equalsWithNullCheck(Confidence me, Confidence other) {
- 269 61780 if (me == null && other == null ) {
- 270 0 return true ;
- 271 61780 } else if (me == null || other == null ) {
- 272 0 return false ;
- 273
- }
- 274 61780 return me.equals(other);
+ 271 15445 if (me == null && other == null ) {
+ 272 0 return true ;
+ 273 15445 } else if (me == null || other == null ) {
+ 274 0 return false ;
275
- }
- 276
-
+ }
+ 276 15445 return me.equals(other);
277
-
+ }
278
-
- 279
-
- 280
-
- 281
-
- 282
-
- 283
-
- 284
-
- 285
- private int compareToIgnoreCaseWithNullCheck(String me, String other) {
- 286 97076 if (me == null && other == null ) {
- 287 0 return 0;
- 288 97076 } else if (me == null ) {
- 289 0 return -1;
- 290 97076 } else if (other == null ) {
- 291 0 return 1;
- 292
- }
- 293 97076 return me.compareToIgnoreCase(other);
- 294
- }
- 295
- 296
+ 279
- 297
-
- 298
-
- 299
+ 280
+
+ 281
+
+ 282
- 300
+ 283
- 301
+ 284
- 302
+ 285
- 303
+ 286
- 304
- private int compareToWithNullCheck(Confidence me, Confidence other) {
- 305 52 if (me == null && other == null ) {
- 306 0 return 0;
- 307 52 } else if (me == null ) {
- 308 0 return -1;
- 309 52 } else if (other == null ) {
- 310 0 return 1;
- 311
+ 287
+ private int compareToIgnoreCaseWithNullCheck(String me, String other) {
+ 288 24269 if (me == null && other == null ) {
+ 289 0 return 0;
+ 290 24269 } else if (me == null ) {
+ 291 0 return -1;
+ 292 24269 } else if (other == null ) {
+ 293 0 return 1;
+ 294
}
- 312 52 return me.compareTo(other);
- 313
+ 295 24269 return me.compareToIgnoreCase(other);
+ 296
}
- 314
+ 297
+
+ 298
+
+ 299
+
+ 300
+
+ 301
+
+ 302
+
+ 303
+
+ 304
+
+ 305
+
+ 306
+ private int compareToWithNullCheck(Confidence me, Confidence other) {
+ 307 13 if (me == null && other == null ) {
+ 308 0 return 0;
+ 309 13 } else if (me == null ) {
+ 310 0 return -1;
+ 311 13 } else if (other == null ) {
+ 312 0 return 1;
+ 313
+ }
+ 314 13 return me.compareTo(other);
+ 315
+ }
+ 316
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.EvidenceCollection.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.EvidenceCollection.html
index 918dee562..b8b34e8ff 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.EvidenceCollection.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.EvidenceCollection.html
@@ -61,652 +61,654 @@
19
20
- import java.net.MalformedURLException;
+ import java.io.Serializable;
21
- import java.util.HashSet;
+ import java.net.MalformedURLException;
22
- import java.util.Iterator;
+ import java.util.HashSet;
23
- import java.util.List;
+ import java.util.Iterator;
24
- import java.util.Set;
+ import java.util.List;
25
- import java.util.TreeSet;
+ import java.util.Set;
26
- import java.util.logging.Level;
+ import java.util.TreeSet;
27
- import java.util.logging.Logger;
+ import java.util.logging.Level;
28
- import org.apache.commons.lang.StringUtils;
+ import java.util.logging.Logger;
29
- import org.owasp.dependencycheck.utils.DependencyVersion;
+ import org.apache.commons.lang.StringUtils;
30
- import org.owasp.dependencycheck.utils.DependencyVersionUtil;
+ import org.owasp.dependencycheck.utils.DependencyVersion;
31
- import org.owasp.dependencycheck.utils.Filter;
+ import org.owasp.dependencycheck.utils.DependencyVersionUtil;
32
- import org.owasp.dependencycheck.utils.UrlStringUtils;
+ import org.owasp.dependencycheck.utils.Filter;
33
-
+ import org.owasp.dependencycheck.utils.UrlStringUtils;
34
-
+
35
-
+
36
-
+
37
-
+
38
-
+
39
- public class EvidenceCollection implements Iterable<Evidence> {
+
40
-
+ public class EvidenceCollection implements Serializable, Iterable<Evidence> {
41
-
+
42
-
+
43
+
+ 44
- 44 4 private static final Logger LOGGER = Logger.getLogger(EvidenceCollection.class .getName());
- 45
-
+ 45 1 private static final Logger LOGGER = Logger.getLogger(EvidenceCollection.class .getName());
46
-
+
47
+
+ 48
- 48 292 private static final Filter<Evidence> HIGHEST_CONFIDENCE = new Filter<Evidence>() {
- 49
+ 49 57 private static final Filter<Evidence> HIGHEST_CONFIDENCE = new Filter<Evidence>() {
+ 50
public boolean passes(Evidence evidence) {
- 50 292 return evidence.getConfidence() == Confidence.HIGHEST;
- 51
- }
+ 51 57 return evidence.getConfidence() == Confidence.HIGHEST;
52
- };
+ }
53
-
+ };
54
-
+
55
+
+ 56
- 56 252 private static final Filter<Evidence> HIGH_CONFIDENCE = new Filter<Evidence>() {
- 57
+ 57 47 private static final Filter<Evidence> HIGH_CONFIDENCE = new Filter<Evidence>() {
+ 58
public boolean passes(Evidence evidence) {
- 58 252 return evidence.getConfidence() == Confidence.HIGH;
- 59
- }
+ 59 47 return evidence.getConfidence() == Confidence.HIGH;
60
- };
+ }
61
-
+ };
62
-
+
63
+
+ 64
- 64 4 private static final Filter<Evidence> MEDIUM_CONFIDENCE = new Filter<Evidence>() {
- 65
+ 65 1 private static final Filter<Evidence> MEDIUM_CONFIDENCE = new Filter<Evidence>() {
+ 66
public boolean passes(Evidence evidence) {
- 66 292 return evidence.getConfidence() == Confidence.MEDIUM;
- 67
- }
+ 67 32 return evidence.getConfidence() == Confidence.MEDIUM;
68
- };
+ }
69
-
+ };
70
-
+
71
+
+ 72
- 72 4 private static final Filter<Evidence> LOW_CONFIDENCE = new Filter<Evidence>() {
- 73
+ 73 1 private static final Filter<Evidence> LOW_CONFIDENCE = new Filter<Evidence>() {
+ 74
public boolean passes(Evidence evidence) {
- 74 488 return evidence.getConfidence() == Confidence.LOW;
- 75
- }
+ 75 32 return evidence.getConfidence() == Confidence.LOW;
76
- };
+ }
77
-
- 78
-
- 79
-
- 80 4 private static final Filter<Evidence> EVIDENCE_USED = new Filter<Evidence>() {
- 81
- public boolean passes(Evidence evidence) {
- 82 3824 return evidence.isUsed();
- 83
- }
- 84
};
+ 78
+
+ 79
+
+ 80
+
+ 81 1 private static final Filter<Evidence> EVIDENCE_USED = new Filter<Evidence>() {
+ 82
+ public boolean passes(Evidence evidence) {
+ 83 437 return evidence.isUsed();
+ 84
+ }
85
-
+ };
86
-
+
87
-
+
88
-
+
89
-
+
90
-
+
91
-
+
92
+
+ 93
public final Iterable<Evidence> iterator(Confidence confidence) {
- 93 176 if (confidence == Confidence.HIGHEST) {
- 94 40 return EvidenceCollection.HIGHEST_CONFIDENCE.filter(this .list);
- 95 136 } else if (confidence == Confidence.HIGH) {
- 96 40 return EvidenceCollection.HIGH_CONFIDENCE.filter(this .list);
- 97 96 } else if (confidence == Confidence.MEDIUM) {
- 98 40 return EvidenceCollection.MEDIUM_CONFIDENCE.filter(this .list);
- 99
+ 94 20 if (confidence == Confidence.HIGHEST) {
+ 95 6 return EvidenceCollection.HIGHEST_CONFIDENCE.filter(this .list);
+ 96 14 } else if (confidence == Confidence.HIGH) {
+ 97 6 return EvidenceCollection.HIGH_CONFIDENCE.filter(this .list);
+ 98 8 } else if (confidence == Confidence.MEDIUM) {
+ 99 4 return EvidenceCollection.MEDIUM_CONFIDENCE.filter(this .list);
+ 100
} else {
- 100 56 return EvidenceCollection.LOW_CONFIDENCE.filter(this .list);
- 101
- }
+ 101 4 return EvidenceCollection.LOW_CONFIDENCE.filter(this .list);
102
- }
+ }
103
-
+ }
104
-
+
105
-
+
106
- private final Set<Evidence> list;
+
107
-
+ private final Set<Evidence> list;
108
-
+
109
-
+
110
- private final Set<String> weightedStrings;
+
111
-
+ private final Set<String> weightedStrings;
112
-
+
113
-
+
114
+
+ 115
- 115 472 public EvidenceCollection() {
- 116 472 list = new TreeSet<Evidence>();
- 117 472 weightedStrings = new HashSet<String>();
- 118 472 }
- 119
-
+ 116 118 public EvidenceCollection() {
+ 117 118 list = new TreeSet<Evidence>();
+ 118 118 weightedStrings = new HashSet<String>();
+ 119 118 }
120
-
+
121
-
+
122
-
+
123
-
+
124
-
+
125
+
+ 126
public void addEvidence(Evidence e) {
- 126 61972 list.add(e);
- 127 61972 }
- 128
-
+ 127 15493 list.add(e);
+ 128 15493 }
129
-
+
130
-
+
131
-
+
132
-
+
133
-
+
134
-
+
135
-
+
136
-
+
137
+
+ 138
public void addEvidence(String source, String name, String value, Confidence confidence) {
- 138 61944 final Evidence e = new Evidence(source, name, value, confidence);
- 139 61944 addEvidence(e);
- 140 61944 }
- 141
-
+ 139 15486 final Evidence e = new Evidence(source, name, value, confidence);
+ 140 15486 addEvidence(e);
+ 141 15486 }
142
-
+
143
-
+
144
-
+
145
-
+
146
-
+
147
-
+
148
-
+
149
-
+
150
-
+
151
-
+
152
-
+
153
+
+ 154
public void addWeighting(String str) {
- 154 60 weightedStrings.add(str);
- 155 60 }
- 156
-
+ 155 15 weightedStrings.add(str);
+ 156 15 }
157
-
+
158
-
+
159
-
+
160
-
+
161
-
+
162
-
+
163
- public Set<String> getWeighting() {
+
164
- return weightedStrings;
+ public Set<String> getWeighting() {
165
- }
+ return weightedStrings;
166
-
+ }
167
-
+
168
-
+
169
-
+
170
-
+
171
-
+
172
- public Set<Evidence> getEvidence() {
+
173
- return list;
+ public Set<Evidence> getEvidence() {
174
- }
+ return list;
175
-
+ }
176
-
+
177
-
+
178
-
+
179
-
+
180
-
- 181
-
- 182
- public Set<Evidence> getEvidence(String source) {
- 183 0 if (source == null ) {
- 184 0 return null ;
- 185
- }
- 186 0 final Set<Evidence> ret = new HashSet<Evidence>();
- 187 0 for (Evidence e : list) {
- 188 0 if (source.equals(e.getSource())) {
- 189 0 ret.add(e);
- 190
- }
- 191 0 }
- 192 0 return ret;
- 193
- }
- 194
-
- 195
-
- 196
-
- 197
-
- 198
- 199
-
- 200
+ 181
+ 182
+
+ 183
+ public Set<Evidence> getEvidence(String source) {
+ 184 0 if (source == null ) {
+ 185 0 return null ;
+ 186
+ }
+ 187 0 final Set<Evidence> ret = new HashSet<Evidence>();
+ 188 0 for (Evidence e : list) {
+ 189 0 if (source.equals(e.getSource())) {
+ 190 0 ret.add(e);
+ 191
+ }
+ 192 0 }
+ 193 0 return ret;
+ 194
+ }
+ 195
+
+ 196
+
+ 197
+
+ 198
+
+ 199
+
+ 200
+
201
-
+
202
+
+ 203
public Set<Evidence> getEvidence(String source, String name) {
- 203 8 if (source == null || name == null ) {
- 204 0 return null ;
- 205
+ 204 2 if (source == null || name == null ) {
+ 205 0 return null ;
+ 206
}
- 206 8 final Set<Evidence> ret = new HashSet<Evidence>();
- 207 8 for (Evidence e : list) {
- 208 8 if (source.equals(e.getSource()) && name.equals(e.getName())) {
- 209 8 ret.add(e);
- 210
+ 207 2 final Set<Evidence> ret = new HashSet<Evidence>();
+ 208 2 for (Evidence e : list) {
+ 209 2 if (source.equals(e.getSource()) && name.equals(e.getName())) {
+ 210 2 ret.add(e);
+ 211
}
- 211 8 }
- 212 8 return ret;
- 213
- }
+ 212 2 }
+ 213 2 return ret;
214
-
+ }
215
-
+
216
-
+
217
-
+
218
-
+
219
-
+
220
+
+ 221
public Iterator<Evidence> iterator() {
- 221 468 return list.iterator();
- 222
- }
+ 222 62 return list.iterator();
223
-
+ }
224
-
+
225
-
+
226
-
+
227
-
+
228
-
+
229
-
- 230
- public boolean containsUsedString(String text) {
- 231 448 if (text == null ) {
- 232 0 return false ;
- 233
- }
- 234 448 final String textToTest = text.toLowerCase();
- 235
-
- 236 448 for (Evidence e : EvidenceCollection.EVIDENCE_USED.filter(this )) {
- 237
-
- 238 2992 final String value = urlCorrection(e.getValue().toLowerCase()).replaceAll("[\\s_-]" , "" );
- 239 2992 if (value.contains(textToTest)) {
- 240 176 return true ;
- 241
- }
- 242 2816 }
- 243 272 return false ;
- 244
- }
- 245
-
- 246
-
- 247
-
- 248
-
- 249
-
- 250
+ 230
+
+ 231
+ public boolean containsUsedString(String text) {
+ 232 57 if (text == null ) {
+ 233 0 return false ;
+ 234
+ }
+ 235 57 final String textToTest = text.toLowerCase();
+ 236
+
+ 237 57 for (Evidence e : EvidenceCollection.EVIDENCE_USED.filter(this )) {
+ 238
+
+ 239 259 final String value = urlCorrection(e.getValue().toLowerCase()).replaceAll("[\\s_-]" , "" );
+ 240 259 if (value.contains(textToTest)) {
+ 241 28 return true ;
+ 242
+ }
+ 243 231 }
+ 244 29 return false ;
+ 245
+ }
+ 246
+
+ 247
+
+ 248
+
+ 249
+
+ 250
+
251
-
+
252
+
+ 253
public boolean containsUsedVersion(DependencyVersion version) {
- 253 0 if (version == null ) {
- 254 0 return false ;
- 255
- }
+ 254 0 if (version == null ) {
+ 255 0 return false ;
256
+ }
+ 257
- 257 0 for (Evidence e : EvidenceCollection.EVIDENCE_USED.filter(this )) {
- 258 0 final DependencyVersion value = DependencyVersionUtil.parseVersion(e.getValue());
- 259 0 if (value != null && value.matchesAtLeastThreeLevels(version)) {
- 260 0 return true ;
- 261
+ 258 0 for (Evidence e : EvidenceCollection.EVIDENCE_USED.filter(this )) {
+ 259 0 final DependencyVersion value = DependencyVersionUtil.parseVersion(e.getValue());
+ 260 0 if (value != null && value.matchesAtLeastThreeLevels(version)) {
+ 261 0 return true ;
+ 262
}
- 262 0 }
- 263 0 return false ;
- 264
- }
+ 263 0 }
+ 264 0 return false ;
265
-
+ }
266
-
+
267
-
+
268
-
+
269
-
+
270
-
+
271
-
+
272
+
+ 273
public boolean contains(Confidence confidence) {
- 273 96 for (Evidence e : list) {
- 274 512 if (e.getConfidence().equals(confidence)) {
- 275 84 return true ;
- 276
+ 274 12 for (Evidence e : list) {
+ 275 62 if (e.getConfidence().equals(confidence)) {
+ 276 11 return true ;
+ 277
}
- 277 428 }
- 278 12 return false ;
- 279
- }
+ 278 51 }
+ 279 1 return false ;
280
-
+ }
281
-
+
282
-
+
283
-
+
284
-
+
285
-
- 286
-
- 287
- public static EvidenceCollection mergeUsed(EvidenceCollection... ec) {
- 288 4 final EvidenceCollection ret = new EvidenceCollection();
- 289 16 for (EvidenceCollection col : ec) {
- 290 12 for (Evidence e : col.list) {
- 291 8 if (e.isUsed()) {
- 292 4 ret.addEvidence(e);
- 293
- }
- 294 8 }
- 295
- }
- 296 4 return ret;
- 297
- }
- 298
-
- 299
-
- 300
-
- 301
-
- 302
- 303
-
- 304
+ 286
+
+ 287
- 305
- public static EvidenceCollection merge(EvidenceCollection... ec) {
- 306 12 final EvidenceCollection ret = new EvidenceCollection();
- 307 48 for (EvidenceCollection col : ec) {
- 308 36 ret.list.addAll(col.list);
- 309 36 ret.weightedStrings.addAll(col.weightedStrings);
- 310
- }
- 311 12 return ret;
- 312
- }
- 313
-
- 314
-
- 315
-
- 316
-
- 317
-
- 318
-
- 319
-
- 320
- public static Set<Evidence> mergeForDisplay(EvidenceCollection... ec) {
- 321 0 final Set<Evidence> ret = new TreeSet<Evidence>();
- 322 0 for (EvidenceCollection col : ec) {
- 323 0 for (Evidence e : col) {
- 324 0 if (e.isUsed()) {
- 325 0 final Evidence newEvidence = new Evidence(e.getSource(), e.getName(), e.getValue(), null );
- 326 0 newEvidence.setUsed(true );
- 327 0 ret.add(newEvidence);
- 328
+ 288
+ public static EvidenceCollection mergeUsed(EvidenceCollection... ec) {
+ 289 1 final EvidenceCollection ret = new EvidenceCollection();
+ 290 4 for (EvidenceCollection col : ec) {
+ 291 3 for (Evidence e : col.list) {
+ 292 2 if (e.isUsed()) {
+ 293 1 ret.addEvidence(e);
+ 294
}
- 329 0 }
- 330
+ 295 2 }
+ 296
}
- 331 0 return ret;
- 332
+ 297 1 return ret;
+ 298
}
+ 299
+
+ 300
+
+ 301
+
+ 302
+
+ 303
+
+ 304
+
+ 305
+
+ 306
+ public static EvidenceCollection merge(EvidenceCollection... ec) {
+ 307 3 final EvidenceCollection ret = new EvidenceCollection();
+ 308 12 for (EvidenceCollection col : ec) {
+ 309 9 ret.list.addAll(col.list);
+ 310 9 ret.weightedStrings.addAll(col.weightedStrings);
+ 311
+ }
+ 312 3 return ret;
+ 313
+ }
+ 314
+
+ 315
+
+ 316
+
+ 317
+
+ 318
+
+ 319
+
+ 320
+
+ 321
+ public static Set<Evidence> mergeForDisplay(EvidenceCollection... ec) {
+ 322 0 final Set<Evidence> ret = new TreeSet<Evidence>();
+ 323 0 for (EvidenceCollection col : ec) {
+ 324 0 for (Evidence e : col) {
+ 325 0 if (e.isUsed()) {
+ 326 0 final Evidence newEvidence = new Evidence(e.getSource(), e.getName(), e.getValue(), null );
+ 327 0 newEvidence.setUsed(true );
+ 328 0 ret.add(newEvidence);
+ 329
+ }
+ 330 0 }
+ 331
+ }
+ 332 0 return ret;
333
-
+ }
334
-
+
335
-
+
336
-
+
337
-
+
338
-
+
339
- @Override
+
340
+ @Override
+ 341
public String toString() {
- 341 12 final StringBuilder sb = new StringBuilder();
- 342 12 for (Evidence e : this .list) {
- 343 52 sb.append(e.getValue()).append(' ' );
- 344 52 }
- 345 12 return sb.toString();
- 346
- }
+ 342 3 final StringBuilder sb = new StringBuilder();
+ 343 3 for (Evidence e : this .list) {
+ 344 13 sb.append(e.getValue()).append(' ' );
+ 345 13 }
+ 346 3 return sb.toString();
347
-
+ }
348
-
- 349
-
- 350
-
- 351
-
- 352
-
- 353
- public int size() {
- 354 116 return list.size();
- 355
- }
- 356
- 357
+ 349
- 358
-
- 359
-
- 360
-
- 361
-
- 362
-
- 363
-
- 364
+ 350
+
+ 351
- 365
-
- 366
-
- 367
-
- 368
-
- 369
-
- 370
-
- 371
-
- 372
-
- 373
-
- 374
+ 352
+
+ 353
- 375
- private String urlCorrection(String value) {
- 376 2992 if (value == null || !UrlStringUtils.containsUrl(value)) {
- 377 2972 return value;
- 378
- }
- 379 20 final StringBuilder sb = new StringBuilder(value.length());
- 380 20 final String[] parts = value.split("\\s" );
- 381 40 for (String part : parts) {
- 382 20 if (UrlStringUtils.isUrl(part)) {
- 383
- try {
- 384 20 final List<String> data = UrlStringUtils.extractImportantUrlData(part);
- 385 20 sb.append(' ' ).append(StringUtils.join(data, ' ' ));
- 386 0 } catch (MalformedURLException ex) {
- 387 0 LOGGER.log(Level.FINE, "error parsing " + part, ex);
- 388 0 sb.append(' ' ).append(part);
- 389 20 }
- 390
- } else {
- 391 0 sb.append(' ' ).append(part);
- 392
- }
- 393
- }
- 394 20 return sb.toString().trim();
- 395
+ 354
+ public int size() {
+ 355 13 return list.size();
+ 356
}
+ 357
+
+ 358
+
+ 359
+
+ 360
+
+ 361
+
+ 362
+
+ 363
+
+ 364
+
+ 365
+
+ 366
+
+ 367
+
+ 368
+
+ 369
+
+ 370
+
+ 371
+
+ 372
+
+ 373
+
+ 374
+
+ 375
+
+ 376
+ private String urlCorrection(String value) {
+ 377 259 if (value == null || !UrlStringUtils.containsUrl(value)) {
+ 378 254 return value;
+ 379
+ }
+ 380 5 final StringBuilder sb = new StringBuilder(value.length());
+ 381 5 final String[] parts = value.split("\\s" );
+ 382 10 for (String part : parts) {
+ 383 5 if (UrlStringUtils.isUrl(part)) {
+ 384
+ try {
+ 385 5 final List<String> data = UrlStringUtils.extractImportantUrlData(part);
+ 386 5 sb.append(' ' ).append(StringUtils.join(data, ' ' ));
+ 387 0 } catch (MalformedURLException ex) {
+ 388 0 LOGGER.log(Level.FINE, "error parsing " + part, ex);
+ 389 0 sb.append(' ' ).append(part);
+ 390 5 }
+ 391
+ } else {
+ 392 0 sb.append(' ' ).append(part);
+ 393
+ }
+ 394
+ }
+ 395 5 return sb.toString().trim();
396
+ }
+ 397
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Identifier.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Identifier.html
index a9c1e5d50..70d17fd64 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Identifier.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Identifier.html
@@ -56,375 +56,379 @@
19
20
-
+ import java.io.Serializable;
21
-
+
22
-
+
23
-
- 24 128 public class Identifier implements Comparable<Identifier> {
+
+ 24
+
25
-
- 26
-
+
+ 26 26 public class Identifier implements Serializable, Comparable<Identifier> {
27
-
+
28
-
+
29
-
- 30
-
- 31
-
- 32
-
- 33
- public Identifier(String type, String value, String url) {
- 34
- this .type = type;
- 35
- this .value = value;
- 36
- this .url = url;
- 37
- }
- 38
-
- 39
-
- 40
- 41
+ 30
- 42
+ 31
- 43
+ 32
- 44
+ 33
- 45
-
- 46
+ 34
- 47
- public Identifier(String type, String value, String url, String description) {
- 48 0 this (type, value, url);
- 49 0 this .description = description;
- 50 0 }
- 51
-
- 52
-
- 53
-
- 54
-
- 55
- private Confidence confidence;
- 56
-
- 57
-
- 58
-
- 59
-
- 60
-
- 61
-
- 62
- public Confidence getConfidence() {
- 63
- return confidence;
- 64
- }
- 65
-
- 66
-
- 67
-
- 68
-
- 69
-
- 70
-
- 71
- public void setConfidence(Confidence confidence) {
- 72
- this .confidence = confidence;
- 73
- }
- 74
-
- 75
-
- 76
-
- 77
-
- 78
- private String value;
- 79
-
- 80
-
- 81
-
- 82
-
- 83
-
- 84
-
- 85
- public String getValue() {
- 86
- return value;
- 87
- }
- 88
-
- 89
-
- 90
-
- 91
-
- 92
-
- 93
-
- 94
- public void setValue(String value) {
- 95
- this .value = value;
- 96
- }
- 97
-
- 98
-
- 99
-
- 100
- private String url;
- 101
-
- 102
-
- 103
-
- 104
-
- 105
-
- 106
-
- 107
- public String getUrl() {
- 108
- return url;
- 109
- }
- 110
-
- 111
-
- 112
-
- 113
-
- 114
-
- 115
-
- 116
- public void setUrl(String url) {
- 117
- this .url = url;
- 118
- }
- 119
-
- 120
-
- 121
-
- 122
- private String type;
- 123
-
- 124
-
- 125
-
- 126
-
- 127
-
- 128
-
- 129
- public String getType() {
- 130
- return type;
- 131
- }
- 132
-
- 133
-
- 134
-
- 135
-
- 136
-
- 137
-
- 138
-
- 139
-
- 140
- public void setType(String type) {
- 141
+ 35
+ public Identifier(String type, String value, String url) {
+ 36
this .type = type;
+ 37
+ this .value = value;
+ 38
+ this .url = url;
+ 39
+ }
+ 40
+
+ 41
+
+ 42
+
+ 43
+
+ 44
+
+ 45
+
+ 46
+
+ 47
+
+ 48
+
+ 49
+ public Identifier(String type, String value, String url, String description) {
+ 50 0 this (type, value, url);
+ 51 0 this .description = description;
+ 52 0 }
+ 53
+
+ 54
+
+ 55
+
+ 56
+
+ 57
+ private Confidence confidence;
+ 58
+
+ 59
+
+ 60
+
+ 61
+
+ 62
+
+ 63
+
+ 64
+ public Confidence getConfidence() {
+ 65
+ return confidence;
+ 66
+ }
+ 67
+
+ 68
+
+ 69
+
+ 70
+
+ 71
+
+ 72
+
+ 73
+ public void setConfidence(Confidence confidence) {
+ 74
+ this .confidence = confidence;
+ 75
+ }
+ 76
+
+ 77
+
+ 78
+
+ 79
+
+ 80
+ private String value;
+ 81
+
+ 82
+
+ 83
+
+ 84
+
+ 85
+
+ 86
+
+ 87
+ public String getValue() {
+ 88
+ return value;
+ 89
+ }
+ 90
+
+ 91
+
+ 92
+
+ 93
+
+ 94
+
+ 95
+
+ 96
+ public void setValue(String value) {
+ 97
+ this .value = value;
+ 98
+ }
+ 99
+
+ 100
+
+ 101
+
+ 102
+ private String url;
+ 103
+
+ 104
+
+ 105
+
+ 106
+
+ 107
+
+ 108
+
+ 109
+ public String getUrl() {
+ 110
+ return url;
+ 111
+ }
+ 112
+
+ 113
+
+ 114
+
+ 115
+
+ 116
+
+ 117
+
+ 118
+ public void setUrl(String url) {
+ 119
+ this .url = url;
+ 120
+ }
+ 121
+
+ 122
+
+ 123
+
+ 124
+ private String type;
+ 125
+
+ 126
+
+ 127
+
+ 128
+
+ 129
+
+ 130
+
+ 131
+ public String getType() {
+ 132
+ return type;
+ 133
+ }
+ 134
+
+ 135
+
+ 136
+
+ 137
+
+ 138
+
+ 139
+
+ 140
+
+ 141
+
142
- }
+ public void setType(String type) {
143
-
+ this .type = type;
144
-
+ }
145
-
+
146
- private String description;
+
147
-
+
148
-
+ private String description;
149
-
+
150
-
+
151
-
+
152
-
+
153
- public String getDescription() {
+
154
- return description;
+
155
- }
+ public String getDescription() {
156
-
+ return description;
157
-
+ }
158
-
+
159
-
+
160
-
+
161
-
+
162
- public void setDescription(String description) {
+
163
- this .description = description;
+
164
- }
+ public void setDescription(String description) {
165
-
+ this .description = description;
166
- @Override
+ }
167
+
+ 168
+ @Override
+ 169
public boolean equals(Object obj) {
- 168 0 if (obj == null ) {
- 169 0 return false ;
- 170
+ 170 0 if (obj == null ) {
+ 171 0 return false ;
+ 172
}
- 171 0 if (getClass() != obj.getClass()) {
- 172 0 return false ;
- 173
+ 173 0 if (getClass() != obj.getClass()) {
+ 174 0 return false ;
+ 175
}
- 174 0 final Identifier other = (Identifier) obj;
- 175 0 if ((this .value == null ) ? (other.value != null ) : !this .value.equals(other.value)) {
- 176 0 return false ;
- 177
+ 176 0 final Identifier other = (Identifier) obj;
+ 177 0 if ((this .value == null ) ? (other.value != null ) : !this .value.equals(other.value)) {
+ 178 0 return false ;
+ 179
}
- 178 0 if ((this .type == null ) ? (other.type != null ) : !this .type.equals(other.type)) {
- 179 0 return false ;
- 180
- }
- 181 0 return true ;
+ 180 0 if ((this .type == null ) ? (other.type != null ) : !this .type.equals(other.type)) {
+ 181 0 return false ;
182
- }
- 183
-
- 184
- @Override
- 185
- public int hashCode() {
- 186 40 int hash = 5;
- 187 40 hash = 53 * hash + (this .value != null ? this .value.hashCode() : 0);
- 188 40 hash = 53 * hash + (this .type != null ? this .type.hashCode() : 0);
- 189 40 return hash;
- 190
- }
- 191
-
- 192
-
- 193
-
- 194
-
- 195
-
- 196
-
- 197
- @Override
- 198
- public String toString() {
- 199 0 return "Identifier{" + "value=" + value + ", type=" + type + '}' ;
- 200
- }
- 201
-
- 202
-
- 203
-
- 204
-
- 205
-
- 206
-
- 207
-
- 208
- public int compareTo(Identifier o) {
- 209 144 if (o == null ) {
- 210 0 return -1;
- 211
}
- 212 144 return this .value.compareTo(o.value);
- 213
+ 183 0 return true ;
+ 184
}
- 214
+ 185
+
+ 186
+ @Override
+ 187
+ public int hashCode() {
+ 188 10 int hash = 5;
+ 189 10 hash = 53 * hash + (this .value != null ? this .value.hashCode() : 0);
+ 190 10 hash = 53 * hash + (this .type != null ? this .type.hashCode() : 0);
+ 191 10 return hash;
+ 192
+ }
+ 193
+
+ 194
+
+ 195
+
+ 196
+
+ 197
+
+ 198
+
+ 199
+ @Override
+ 200
+ public String toString() {
+ 201 0 return "Identifier{" + "value=" + value + ", type=" + type + '}' ;
+ 202
+ }
+ 203
+
+ 204
+
+ 205
+
+ 206
+
+ 207
+
+ 208
+
+ 209
+
+ 210
+ public int compareTo(Identifier o) {
+ 211 28 if (o == null ) {
+ 212 0 return -1;
+ 213
+ }
+ 214 28 return this .value.compareTo(o.value);
+ 215
+ }
+ 216
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Reference.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Reference.html
index 96d2ed81f..16febd151 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Reference.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Reference.html
@@ -69,7 +69,7 @@
26
- 27 1408 public class Reference implements Serializable, Comparable<Reference> {
+ 27 352 public class Reference implements Serializable, Comparable<Reference> {
28
29
@@ -271,10 +271,10 @@
136
public int compareTo(Reference o) {
- 137 1408 if (source.equals(o.source)) {
- 138 420 if (name.equals(o.name)) {
- 139 136 if (url.equals(o.url)) {
- 140 136 return 0;
+ 137 352 if (source.equals(o.source)) {
+ 138 105 if (name.equals(o.name)) {
+ 139 34 if (url.equals(o.url)) {
+ 140 34 return 0;
141
} else {
142 0 return url.compareTo(o.url);
@@ -282,12 +282,12 @@
}
144
} else {
- 145 284 return name.compareTo(o.name);
+ 145 71 return name.compareTo(o.name);
146
}
147
} else {
- 148 988 return source.compareTo(o.source);
+ 148 247 return source.compareTo(o.source);
149
}
150
@@ -296,6 +296,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Vulnerability.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Vulnerability.html
index 496b158f6..1576ac49b 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Vulnerability.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.Vulnerability.html
@@ -75,7 +75,7 @@
29
- 30 144 public class Vulnerability implements Serializable, Comparable<Vulnerability> {
+ 30 36 public class Vulnerability implements Serializable, Comparable<Vulnerability> {
31
32
@@ -180,7 +180,7 @@
82
- 83 144 private SortedSet<Reference> references = new TreeSet<Reference>();
+ 83 36 private SortedSet<Reference> references = new TreeSet<Reference>();
84
85
@@ -231,8 +231,8 @@
108
public void addReference(Reference ref) {
- 109 360 this .references.add(ref);
- 110 360 }
+ 109 90 this .references.add(ref);
+ 110 90 }
111
112
@@ -251,19 +251,19 @@
119
public void addReference(String referenceSource, String referenceName, String referenceUrl) {
- 120 272 final Reference ref = new Reference();
- 121 272 ref.setSource(referenceSource);
- 122 272 ref.setName(referenceName);
- 123 272 ref.setUrl(referenceUrl);
- 124 272 this .references.add(ref);
- 125 272 }
+ 120 68 final Reference ref = new Reference();
+ 121 68 ref.setSource(referenceSource);
+ 122 68 ref.setName(referenceName);
+ 123 68 ref.setUrl(referenceUrl);
+ 124 68 this .references.add(ref);
+ 125 68 }
126
127
128
- 129 144 private SortedSet<VulnerableSoftware> vulnerableSoftware = new TreeSet<VulnerableSoftware>();
+ 129 36 private SortedSet<VulnerableSoftware> vulnerableSoftware = new TreeSet<VulnerableSoftware>();
130
131
@@ -316,7 +316,7 @@
155
public boolean addVulnerableSoftware(String cpe) {
- 156 3368 return addVulnerableSoftware(cpe, null );
+ 156 842 return addVulnerableSoftware(cpe, null );
157
}
158
@@ -337,13 +337,13 @@
166
public boolean addVulnerableSoftware(String cpe, String previousVersion) {
- 167 3400 final VulnerableSoftware vs = new VulnerableSoftware();
- 168 3400 vs.setCpe(cpe);
- 169 3400 if (previousVersion != null ) {
- 170 32 vs.setPreviousVersion(previousVersion);
+ 167 850 final VulnerableSoftware vs = new VulnerableSoftware();
+ 168 850 vs.setCpe(cpe);
+ 169 850 if (previousVersion != null ) {
+ 170 8 vs.setPreviousVersion(previousVersion);
171
}
- 172 3400 return updateVulnerableSoftware(vs);
+ 172 850 return updateVulnerableSoftware(vs);
173
}
174
@@ -362,11 +362,11 @@
181
public boolean updateVulnerableSoftware(VulnerableSoftware vulnSoftware) {
- 182 3400 if (vulnerableSoftware.contains(vulnSoftware)) {
+ 182 850 if (vulnerableSoftware.contains(vulnSoftware)) {
183 0 vulnerableSoftware.remove(vulnSoftware);
184
}
- 185 3400 return vulnerableSoftware.add(vulnSoftware);
+ 185 850 return vulnerableSoftware.add(vulnSoftware);
186
}
187
@@ -749,9 +749,9 @@
@Override
380
public int hashCode() {
- 381 32 int hash = 5;
- 382 32 hash = 41 * hash + (this .name != null ? this .name.hashCode() : 0);
- 383 32 return hash;
+ 381 8 int hash = 5;
+ 382 8 hash = 41 * hash + (this .name != null ? this .name.hashCode() : 0);
+ 383 8 return hash;
384
}
385
@@ -811,9 +811,9 @@
413
public void setMatchedCPE(String cpeId, String previous) {
- 414 32 matchedCPE = cpeId;
- 415 32 matchedAllPreviousCPE = previous;
- 416 32 }
+ 414 8 matchedCPE = cpeId;
+ 415 8 matchedAllPreviousCPE = previous;
+ 416 8 }
417
418
@@ -871,6 +871,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.VulnerabilityComparator.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.VulnerabilityComparator.html
index c4e7c4f9d..07ec2bfa2 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.VulnerabilityComparator.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.VulnerabilityComparator.html
@@ -71,7 +71,7 @@
27
- 28 92 public class VulnerabilityComparator implements Comparator<Vulnerability>, Serializable {
+ 28 23 public class VulnerabilityComparator implements Comparator<Vulnerability>, Serializable {
29
30
@@ -100,13 +100,13 @@
42
public int compare(Vulnerability o1, Vulnerability o2) {
- 43 92 return o2.getName().compareTo(o1.getName());
+ 43 23 return o2.getName().compareTo(o1.getName());
44
}
45
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.VulnerableSoftware.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.VulnerableSoftware.html
index 4996f3aee..1006a4c4d 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.VulnerableSoftware.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.dependency.VulnerableSoftware.html
@@ -79,7 +79,7 @@
31
- 32 40016 public class VulnerableSoftware extends IndexEntry implements Serializable, Comparable<VulnerableSoftware> {
+ 32 10004 public class VulnerableSoftware extends IndexEntry implements Serializable, Comparable<VulnerableSoftware> {
33
34
@@ -88,7 +88,7 @@
36
- 37 4 private static final Logger LOGGER = Logger.getLogger(VulnerableSoftware.class .getName());
+ 37 1 private static final Logger LOGGER = Logger.getLogger(VulnerableSoftware.class .getName());
38
39
@@ -113,14 +113,14 @@
public void setCpe(String cpe) {
49
try {
- 50 4056 parseName(cpe);
+ 50 936 parseName(cpe);
51 0 } catch (UnsupportedEncodingException ex) {
52 0 final String msg = String.format("Character encoding is unsupported for CPE '%s'." , cpe);
53 0 LOGGER.log(Level.WARNING, msg);
54 0 LOGGER.log(Level.FINE, null , ex);
55 0 setName(cpe);
- 56 4056 }
- 57 4056 }
+ 56 936 }
+ 57 936 }
58
59
@@ -157,32 +157,32 @@
@Override
75
public void parseName(String cpeName) throws UnsupportedEncodingException {
- 76 4204 this .name = cpeName;
- 77 4204 if (cpeName != null && cpeName.length() > 7) {
- 78 4204 final String[] data = cpeName.substring(7).split(":" );
- 79 4204 if (data.length >= 1) {
- 80 4204 this .setVendor(urlDecode(data[0]));
+ 76 973 this .name = cpeName;
+ 77 973 if (cpeName != null && cpeName.length() > 7) {
+ 78 973 final String[] data = cpeName.substring(7).split(":" );
+ 79 973 if (data.length >= 1) {
+ 80 973 this .setVendor(urlDecode(data[0]));
81
}
- 82 4204 if (data.length >= 2) {
- 83 4204 this .setProduct(urlDecode(data[1]));
+ 82 973 if (data.length >= 2) {
+ 83 973 this .setProduct(urlDecode(data[1]));
84
}
- 85 4204 if (data.length >= 3) {
- 86 4204 version = urlDecode(data[2]);
+ 85 973 if (data.length >= 3) {
+ 86 973 version = urlDecode(data[2]);
87
}
- 88 4204 if (data.length >= 4) {
- 89 604 revision = urlDecode(data[3]);
+ 88 973 if (data.length >= 4) {
+ 89 119 revision = urlDecode(data[3]);
90
}
- 91 4204 if (data.length >= 5) {
+ 91 973 if (data.length >= 5) {
92 0 edition = urlDecode(data[4]);
93
}
94
}
- 95 4204 }
+ 95 973 }
96
97
@@ -262,17 +262,17 @@
@Override
135
public boolean equals(Object obj) {
- 136 4 if (obj == null ) {
+ 136 1 if (obj == null ) {
137 0 return false ;
138
}
- 139 4 if (getClass() != obj.getClass()) {
+ 139 1 if (getClass() != obj.getClass()) {
140 0 return false ;
141
}
- 142 4 final VulnerableSoftware other = (VulnerableSoftware) obj;
- 143 4 if ((this .getName() == null ) ? (other.getName() != null ) : !this .getName().equals(other.getName())) {
- 144 4 return false ;
+ 142 1 final VulnerableSoftware other = (VulnerableSoftware) obj;
+ 143 1 if ((this .getName() == null ) ? (other.getName() != null ) : !this .getName().equals(other.getName())) {
+ 144 1 return false ;
145
}
146 0 return true ;
@@ -294,9 +294,9 @@
@Override
155
public int hashCode() {
- 156 652 int hash = 7;
- 157 652 hash = 83 * hash + (this .getName() != null ? this .getName().hashCode() : 0);
- 158 652 return hash;
+ 156 82 int hash = 7;
+ 157 82 hash = 83 * hash + (this .getName() != null ? this .getName().hashCode() : 0);
+ 158 82 return hash;
159
}
160
@@ -336,21 +336,21 @@
@Override
178
public int compareTo(VulnerableSoftware vs) {
- 179 40024 int result = 0;
- 180 40024 final String[] left = this .getName().split(":" );
- 181 40024 final String[] right = vs.getName().split(":" );
- 182 40024 final int max = (left.length <= right.length) ? left.length : right.length;
- 183 40024 if (max > 0) {
- 184 241004 for (int i = 0; result == 0 && i < max; i++) {
- 185 200980 final String[] subLeft = left[i].split("\\." );
- 186 200980 final String[] subRight = right[i].split("\\." );
- 187 200980 final int subMax = (subLeft.length <= subRight.length) ? subLeft.length : subRight.length;
- 188 200980 if (subMax > 0) {
- 189 458592 for (int x = 0; result == 0 && x < subMax; x++) {
- 190 257612 if (isPositiveInteger(subLeft[x]) && isPositiveInteger(subRight[x])) {
+ 179 10006 int result = 0;
+ 180 10006 final String[] left = this .getName().split(":" );
+ 181 10006 final String[] right = vs.getName().split(":" );
+ 182 10006 final int max = (left.length <= right.length) ? left.length : right.length;
+ 183 10006 if (max > 0) {
+ 184 60251 for (int i = 0; result == 0 && i < max; i++) {
+ 185 50245 final String[] subLeft = left[i].split("\\." );
+ 186 50245 final String[] subRight = right[i].split("\\." );
+ 187 50245 final int subMax = (subLeft.length <= subRight.length) ? subLeft.length : subRight.length;
+ 188 50245 if (subMax > 0) {
+ 189 114648 for (int x = 0; result == 0 && x < subMax; x++) {
+ 190 64403 if (isPositiveInteger(subLeft[x]) && isPositiveInteger(subRight[x])) {
191
try {
- 192 93808 result = Long.valueOf(subLeft[x]).compareTo(Long.valueOf(subRight[x]));
+ 192 23452 result = Long.valueOf(subLeft[x]).compareTo(Long.valueOf(subRight[x]));
193
194
@@ -376,21 +376,21 @@
205 0 result = subLeft[x].compareToIgnoreCase(subRight[x]);
206
}
- 207 93808 }
+ 207 23452 }
208
} else {
- 209 163804 result = subLeft[x].compareToIgnoreCase(subRight[x]);
+ 209 40951 result = subLeft[x].compareToIgnoreCase(subRight[x]);
210
}
211
}
- 212 200980 if (result == 0) {
- 213 161856 if (subLeft.length > subRight.length) {
- 214 456 result = 2;
+ 212 50245 if (result == 0) {
+ 213 40464 if (subLeft.length > subRight.length) {
+ 214 114 result = 2;
215
}
- 216 161856 if (subRight.length > subLeft.length) {
- 217 28 result = -2;
+ 216 40464 if (subRight.length > subLeft.length) {
+ 217 7 result = -2;
218
}
219
@@ -402,13 +402,13 @@
}
223
}
- 224 40024 if (result == 0) {
- 225 416 if (left.length > right.length) {
- 226 272 result = 2;
+ 224 10006 if (result == 0) {
+ 225 104 if (left.length > right.length) {
+ 226 68 result = 2;
227
}
- 228 416 if (right.length > left.length) {
- 229 40 result = -2;
+ 228 104 if (right.length > left.length) {
+ 229 10 result = -2;
230
}
231
@@ -418,7 +418,7 @@
233 0 result = this .getName().compareToIgnoreCase(vs.getName());
234
}
- 235 40024 return result;
+ 235 10006 return result;
236
}
237
@@ -437,19 +437,19 @@
244
private static boolean isPositiveInteger(final String str) {
- 245 351708 if (str == null || str.isEmpty()) {
- 246 56 return false ;
+ 245 87927 if (str == null || str.isEmpty()) {
+ 246 14 return false ;
247
}
- 248 571592 for (int i = 0; i < str.length(); i++) {
- 249 383688 final char c = str.charAt(i);
- 250 383688 if (c < '0' || c > '9' ) {
- 251 163748 return false ;
+ 248 142898 for (int i = 0; i < str.length(); i++) {
+ 249 95922 final char c = str.charAt(i);
+ 250 95922 if (c < '0' || c > '9' ) {
+ 251 40937 return false ;
252
}
253
}
- 254 187904 return true ;
+ 254 46976 return true ;
255
}
256
@@ -644,12 +644,12 @@
351
private String urlDecode(String string) {
- 352 13216 final String text = string.replace("+" , "%2B" );
+ 352 3038 final String text = string.replace("+" , "%2B" );
353
String result;
354
try {
- 355 13216 result = URLDecoder.decode(text, "UTF-8" );
+ 355 3038 result = URLDecoder.decode(text, "UTF-8" );
356 0 } catch (UnsupportedEncodingException ex) {
357
try {
@@ -657,14 +657,14 @@
359 0 } catch (UnsupportedEncodingException ex1) {
360 0 result = URLDecoder.decode(text);
361 0 }
- 362 13216 }
- 363 13216 return result;
+ 362 3038 }
+ 363 3038 return result;
364
}
365
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.exception.NoDataException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.exception.NoDataException.html
index 7e26a2779..e2326c052 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.exception.NoDataException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.exception.NoDataException.html
@@ -155,6 +155,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.exception.ScanAgentException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.exception.ScanAgentException.html
index 5f1b4cd50..74785d686 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.exception.ScanAgentException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.exception.ScanAgentException.html
@@ -155,6 +155,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.MavenNamespaceFilter.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.MavenNamespaceFilter.html
index 83a2f8d2c..7cb28f9af 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.MavenNamespaceFilter.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.MavenNamespaceFilter.html
@@ -198,6 +198,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Activation.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Activation.html
index 28c673b8d..413958b32 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Activation.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Activation.html
@@ -409,6 +409,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationFile.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationFile.html
index cc9bf767d..5c04a64bf 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationFile.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationFile.html
@@ -233,6 +233,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationOS.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationOS.html
index c22270385..770578428 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationOS.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationOS.html
@@ -347,6 +347,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationProperty.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationProperty.html
index a85c7460c..41d74e942 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationProperty.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ActivationProperty.html
@@ -233,6 +233,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Build.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Build.html
index cde480e54..509ae0541 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Build.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Build.html
@@ -1635,6 +1635,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.BuildBase.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.BuildBase.html
index 5d0b8a9cc..536fb5f6c 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.BuildBase.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.BuildBase.html
@@ -1145,6 +1145,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.CiManagement.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.CiManagement.html
index da552ee1d..a93122dc0 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.CiManagement.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.CiManagement.html
@@ -429,6 +429,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Contributor.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Contributor.html
index 491ef6a9c..8b7079a13 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Contributor.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Contributor.html
@@ -875,6 +875,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Dependency.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Dependency.html
index 216fab006..634501956 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Dependency.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Dependency.html
@@ -783,6 +783,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DependencyManagement.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DependencyManagement.html
index 246b9e18d..02f7de96e 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DependencyManagement.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DependencyManagement.html
@@ -317,6 +317,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DeploymentRepository.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DeploymentRepository.html
index 5d3cc0315..2f13b8489 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DeploymentRepository.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DeploymentRepository.html
@@ -409,6 +409,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Developer.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Developer.html
index bf7c1aa3b..f0b2f04d1 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Developer.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Developer.html
@@ -929,6 +929,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DistributionManagement.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DistributionManagement.html
index 7ad5e81fd..eb24ab0d4 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DistributionManagement.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.DistributionManagement.html
@@ -465,6 +465,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Exclusion.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Exclusion.html
index 3d8d211e7..0e4ff3a90 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Exclusion.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Exclusion.html
@@ -225,6 +225,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Extension.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Extension.html
index db50d0dd7..304135092 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Extension.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Extension.html
@@ -283,6 +283,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.IssueManagement.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.IssueManagement.html
index d9ee169b8..68f911977 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.IssueManagement.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.IssueManagement.html
@@ -229,6 +229,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.License.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.License.html
index f034569a3..22079953e 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.License.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.License.html
@@ -349,6 +349,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.MailingList.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.MailingList.html
index 4189a47f7..2ae1a51df 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.MailingList.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.MailingList.html
@@ -609,6 +609,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Model.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Model.html
index 9b43150bf..589568d08 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Model.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Model.html
@@ -3169,6 +3169,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Notifier.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Notifier.html
index 426e51de8..dd5b3edff 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Notifier.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Notifier.html
@@ -683,6 +683,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ObjectFactory.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ObjectFactory.html
index 4d79e904d..6a7ecd088 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ObjectFactory.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ObjectFactory.html
@@ -1396,6 +1396,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Organization.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Organization.html
index 9f390f458..3cd7d48f0 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Organization.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Organization.html
@@ -225,6 +225,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Parent.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Parent.html
index 0c7a6f861..79110fa02 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Parent.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Parent.html
@@ -345,6 +345,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Plugin.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Plugin.html
index 311acc7ba..ae62df5c9 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Plugin.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Plugin.html
@@ -1217,6 +1217,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.PluginExecution.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.PluginExecution.html
index 3a8e8ccb1..412f8401e 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.PluginExecution.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.PluginExecution.html
@@ -697,6 +697,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.PluginManagement.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.PluginManagement.html
index e099c8105..5bc8a9f2b 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.PluginManagement.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.PluginManagement.html
@@ -317,6 +317,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Prerequisites.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Prerequisites.html
index b368bc896..569e854b8 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Prerequisites.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Prerequisites.html
@@ -171,6 +171,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Profile.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Profile.html
index ebe0f7f13..fc1c30af2 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Profile.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Profile.html
@@ -1673,6 +1673,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Relocation.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Relocation.html
index 03c1f12f0..0475b287d 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Relocation.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Relocation.html
@@ -343,6 +343,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ReportPlugin.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ReportPlugin.html
index 0d5f0baaf..9596b3475 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ReportPlugin.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ReportPlugin.html
@@ -755,6 +755,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ReportSet.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ReportSet.html
index e8cb50892..4454cf912 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ReportSet.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.ReportSet.html
@@ -639,6 +639,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Reporting.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Reporting.html
index 79c964e7d..e6168ec22 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Reporting.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Reporting.html
@@ -433,6 +433,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Repository.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Repository.html
index 73f1bf0a2..dee835671 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Repository.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Repository.html
@@ -465,6 +465,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.RepositoryPolicy.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.RepositoryPolicy.html
index 64480d5dc..ae7a03a0b 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.RepositoryPolicy.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.RepositoryPolicy.html
@@ -287,6 +287,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Resource.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Resource.html
index f1f319d1b..e7423dca4 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Resource.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Resource.html
@@ -697,6 +697,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Scm.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Scm.html
index 8297ef9e0..6fb0fd648 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Scm.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Scm.html
@@ -345,6 +345,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Site.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Site.html
index 6db52e580..c6865eb98 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Site.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.Site.html
@@ -287,6 +287,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.package-info.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.package-info.html
index 42160bbb5..2ea44cf63 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.package-info.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.jaxb.pom.generated.package-info.html
@@ -37,6 +37,6 @@
package org.owasp.dependencycheck.jaxb.pom.generated;
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.EscapeTool.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.EscapeTool.html
index 5d5e812c8..98d32674a 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.EscapeTool.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.EscapeTool.html
@@ -159,6 +159,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.ReportGenerator.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.ReportGenerator.html
index 044079d5b..24107fbd8 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.ReportGenerator.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.ReportGenerator.html
@@ -447,6 +447,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.VelocityLoggerRedirect.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.VelocityLoggerRedirect.html
index 23fefb2c9..6e568904f 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.VelocityLoggerRedirect.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.reporting.VelocityLoggerRedirect.html
@@ -221,6 +221,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.PropertyType.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.PropertyType.html
index f384397f4..5f3bc3c8c 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.PropertyType.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.PropertyType.html
@@ -237,28 +237,28 @@
110
public boolean matches(String text) {
- 111 136 if (text == null ) {
+ 111 38 if (text == null ) {
112 0 return false ;
113
}
- 114 136 if (this .regex) {
+ 114 38 if (this .regex) {
115
Pattern rx;
- 116 36 if (this .caseSensitive) {
- 117 8 rx = Pattern.compile(this .value);
+ 116 12 if (this .caseSensitive) {
+ 117 2 rx = Pattern.compile(this .value);
118
} else {
- 119 28 rx = Pattern.compile(this .value, Pattern.CASE_INSENSITIVE);
+ 119 10 rx = Pattern.compile(this .value, Pattern.CASE_INSENSITIVE);
120
}
- 121 36 return rx.matcher(text).matches();
+ 121 12 return rx.matcher(text).matches();
122
} else {
- 123 100 if (this .caseSensitive) {
- 124 8 return value.equals(text);
+ 123 26 if (this .caseSensitive) {
+ 124 2 return value.equals(text);
125
} else {
- 126 92 return value.equalsIgnoreCase(text);
+ 126 24 return value.equalsIgnoreCase(text);
127
}
128
@@ -308,28 +308,28 @@
@Override
153
public boolean equals(Object obj) {
- 154 4 if (obj == null ) {
+ 154 1 if (obj == null ) {
155 0 return false ;
156
}
- 157 4 if (getClass() != obj.getClass()) {
+ 157 1 if (getClass() != obj.getClass()) {
158 0 return false ;
159
}
- 160 4 final PropertyType other = (PropertyType) obj;
- 161 4 if ((this .value == null ) ? (other.value != null ) : !this .value.equals(other.value)) {
+ 160 1 final PropertyType other = (PropertyType) obj;
+ 161 1 if ((this .value == null ) ? (other.value != null ) : !this .value.equals(other.value)) {
162 0 return false ;
163
}
- 164 4 if (this .regex != other.regex) {
+ 164 1 if (this .regex != other.regex) {
165 0 return false ;
166
}
- 167 4 if (this .caseSensitive != other.caseSensitive) {
+ 167 1 if (this .caseSensitive != other.caseSensitive) {
168 0 return false ;
169
}
- 170 4 return true ;
+ 170 1 return true ;
171
}
172
@@ -357,6 +357,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionErrorHandler.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionErrorHandler.html
index 286fbe4b7..edfe38d04 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionErrorHandler.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionErrorHandler.html
@@ -87,7 +87,7 @@
35
- 36 4 private static final Logger LOGGER = Logger.getLogger(SuppressionErrorHandler.class .getName());
+ 36 1 private static final Logger LOGGER = Logger.getLogger(SuppressionErrorHandler.class .getName());
37
38
@@ -197,6 +197,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionHandler.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionHandler.html
index 318b97fb2..2f57e4bee 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionHandler.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionHandler.html
@@ -12,7 +12,7 @@
@@ -77,7 +77,7 @@
30
- 31 36 public class SuppressionHandler extends DefaultHandler {
+ 31 9 public class SuppressionHandler extends DefaultHandler {
32
33
@@ -150,7 +150,7 @@
67
- 68 36 private List<SuppressionRule> suppressionRules = new ArrayList<SuppressionRule>();
+ 68 9 private List<SuppressionRule> suppressionRules = new ArrayList<SuppressionRule>();
69
70
@@ -217,121 +217,129 @@
@Override
101
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- 102 540 currentAttributes = attributes;
- 103 540 currentText = new StringBuffer();
- 104 540 if (SUPPRESS.equals(qName)) {
- 105 120 rule = new SuppressionRule();
- 106
- }
- 107 540 }
- 108
-
+ 102 195 currentAttributes = attributes;
+ 103 195 currentText = new StringBuffer();
+ 104 195 if (SUPPRESS.equals(qName)) {
+ 105 45 rule = new SuppressionRule();
+ 106 45 final String base = currentAttributes.getValue("base" );
+ 107 45 if (base != null ) {
+ 108 45 rule.setBase(Boolean.parseBoolean(base));
109
-
- 110
-
+ } else {
+ 110 0 rule.setBase(false );
111
-
+ }
112
-
- 113
-
+ }
+ 113 195 }
114
-
+
115
-
+
116
-
+
117
- @Override
+
118
- public void endElement(String uri, String localName, String qName) throws SAXException {
- 119 540 if (SUPPRESS.equals(qName)) {
- 120 120 suppressionRules.add(rule);
- 121 120 rule = null ;
- 122 420 } else if (FILE_PATH.equals(qName)) {
- 123 48 final PropertyType pt = processPropertyType();
- 124 48 rule.setFilePath(pt);
- 125 48 } else if (SHA1.equals(qName)) {
- 126 16 rule.setSha1(currentText.toString());
- 127 356 } else if (GAV.equals(qName)) {
- 128 40 final PropertyType pt = processPropertyType();
- 129 40 rule.setGav(pt);
- 130 40 } else if (CPE.equals(qName)) {
- 131 112 final PropertyType pt = processPropertyType();
- 132 112 rule.addCpe(pt);
- 133 112 } else if (CWE.equals(qName)) {
- 134 0 rule.addCwe(currentText.toString());
- 135 204 } else if (CVE.equals(qName)) {
- 136 32 rule.addCve(currentText.toString());
- 137 172 } else if (CVSS_BELOW.equals(qName)) {
- 138 16 final float cvss = Float.parseFloat(currentText.toString());
- 139 16 rule.addCvssBelow(cvss);
- 140
- }
- 141 540 }
- 142
-
- 143
-
- 144
-
- 145
-
- 146
-
- 147
-
- 148
-
- 149
-
- 150
+
+ 119
+
+ 120
+
+ 121
+
+ 122
- 151
+ 123
@Override
- 152
- public void characters(char [] ch, int start, int length) throws SAXException {
- 153 1184 currentText.append(ch, start, length);
- 154 1184 }
- 155
-
- 156
-
- 157
-
- 158
-
- 159
-
- 160
-
- 161
-
- 162
- private PropertyType processPropertyType() {
- 163 200 final PropertyType pt = new PropertyType();
- 164 200 pt.setValue(currentText.toString());
- 165 200 if (currentAttributes != null && currentAttributes.getLength() > 0) {
- 166 200 final String regex = currentAttributes.getValue("regex" );
- 167 200 if (regex != null ) {
- 168 200 pt.setRegex(Boolean.parseBoolean(regex));
- 169
- }
- 170 200 final String caseSensitive = currentAttributes.getValue("caseSensitive" );
- 171 200 if (caseSensitive != null ) {
- 172 200 pt.setCaseSensitive(Boolean.parseBoolean(caseSensitive));
- 173
- }
- 174
+ 124
+ public void endElement(String uri, String localName, String qName) throws SAXException {
+ 125 195 if (SUPPRESS.equals(qName)) {
+ 126 45 suppressionRules.add(rule);
+ 127 45 rule = null ;
+ 128 150 } else if (FILE_PATH.equals(qName)) {
+ 129 17 final PropertyType pt = processPropertyType();
+ 130 17 rule.setFilePath(pt);
+ 131 17 } else if (SHA1.equals(qName)) {
+ 132 4 rule.setSha1(currentText.toString());
+ 133 129 } else if (GAV.equals(qName)) {
+ 134 20 final PropertyType pt = processPropertyType();
+ 135 20 rule.setGav(pt);
+ 136 20 } else if (CPE.equals(qName)) {
+ 137 43 final PropertyType pt = processPropertyType();
+ 138 43 rule.addCpe(pt);
+ 139 43 } else if (CWE.equals(qName)) {
+ 140 0 rule.addCwe(currentText.toString());
+ 141 66 } else if (CVE.equals(qName)) {
+ 142 8 rule.addCve(currentText.toString());
+ 143 58 } else if (CVSS_BELOW.equals(qName)) {
+ 144 4 final float cvss = Float.parseFloat(currentText.toString());
+ 145 4 rule.addCvssBelow(cvss);
+ 146
}
- 175 200 return pt;
- 176
+ 147 195 }
+ 148
+
+ 149
+
+ 150
+
+ 151
+
+ 152
+
+ 153
+
+ 154
+
+ 155
+
+ 156
+
+ 157
+ @Override
+ 158
+ public void characters(char [] ch, int start, int length) throws SAXException {
+ 159 431 currentText.append(ch, start, length);
+ 160 431 }
+ 161
+
+ 162
+
+ 163
+
+ 164
+
+ 165
+
+ 166
+
+ 167
+
+ 168
+ private PropertyType processPropertyType() {
+ 169 80 final PropertyType pt = new PropertyType();
+ 170 80 pt.setValue(currentText.toString());
+ 171 80 if (currentAttributes != null && currentAttributes.getLength() > 0) {
+ 172 80 final String regex = currentAttributes.getValue("regex" );
+ 173 80 if (regex != null ) {
+ 174 80 pt.setRegex(Boolean.parseBoolean(regex));
+ 175
+ }
+ 176 80 final String caseSensitive = currentAttributes.getValue("caseSensitive" );
+ 177 80 if (caseSensitive != null ) {
+ 178 80 pt.setCaseSensitive(Boolean.parseBoolean(caseSensitive));
+ 179
+ }
+ 180
+ }
+ 181 80 return pt;
+ 182
}
- 177
+ 183
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionParseException.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionParseException.html
index 9c1ccc172..40a671935 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionParseException.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionParseException.html
@@ -155,6 +155,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionParser.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionParser.html
index c71526dee..80436c4df 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionParser.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionParser.html
@@ -109,7 +109,7 @@
46
- 47 4 private static final Logger LOGGER = Logger.getLogger(SuppressionParser.class .getName());
+ 47 1 private static final Logger LOGGER = Logger.getLogger(SuppressionParser.class .getName());
48
49
@@ -152,23 +152,23 @@
68
public List<SuppressionRule> parseSuppressionRules(File file) throws SuppressionParseException {
- 69 16 FileInputStream fis = null ;
+ 69 4 FileInputStream fis = null ;
70
try {
- 71 16 fis = new FileInputStream(file);
- 72 12 return parseSuppressionRules(fis);
- 73 4 } catch (IOException ex) {
- 74 4 LOGGER.log(Level.FINE, null , ex);
- 75 4 throw new SuppressionParseException(ex);
+ 71 4 fis = new FileInputStream(file);
+ 72 3 return parseSuppressionRules(fis);
+ 73 1 } catch (IOException ex) {
+ 74 1 LOGGER.log(Level.FINE, null , ex);
+ 75 1 throw new SuppressionParseException(ex);
76
} finally {
- 77 16 if (fis != null ) {
+ 77 4 if (fis != null ) {
78
try {
- 79 12 fis.close();
+ 79 3 fis.close();
80 0 } catch (IOException ex) {
81 0 LOGGER.log(Level.FINE, "Unable to close stream" , ex);
- 82 28 }
+ 82 7 }
83
}
84
@@ -195,29 +195,29 @@
public List<SuppressionRule> parseSuppressionRules(InputStream inputStream) throws SuppressionParseException {
95
try {
- 96 32 final InputStream schemaStream = this .getClass().getClassLoader().getResourceAsStream("schema/suppression.xsd" );
- 97 32 final SuppressionHandler handler = new SuppressionHandler();
- 98 32 final SAXParserFactory factory = SAXParserFactory.newInstance();
- 99 32 factory.setNamespaceAware(true );
- 100 32 factory.setValidating(true );
- 101 32 final SAXParser saxParser = factory.newSAXParser();
- 102 32 saxParser.setProperty(SuppressionParser.JAXP_SCHEMA_LANGUAGE, SuppressionParser.W3C_XML_SCHEMA);
- 103 32 saxParser.setProperty(SuppressionParser.JAXP_SCHEMA_SOURCE, new InputSource(schemaStream));
- 104 32 final XMLReader xmlReader = saxParser.getXMLReader();
- 105 32 xmlReader.setErrorHandler(new SuppressionErrorHandler());
- 106 32 xmlReader.setContentHandler(handler);
+ 96 8 final InputStream schemaStream = this .getClass().getClassLoader().getResourceAsStream("schema/suppression.xsd" );
+ 97 8 final SuppressionHandler handler = new SuppressionHandler();
+ 98 8 final SAXParserFactory factory = SAXParserFactory.newInstance();
+ 99 8 factory.setNamespaceAware(true );
+ 100 8 factory.setValidating(true );
+ 101 8 final SAXParser saxParser = factory.newSAXParser();
+ 102 8 saxParser.setProperty(SuppressionParser.JAXP_SCHEMA_LANGUAGE, SuppressionParser.W3C_XML_SCHEMA);
+ 103 8 saxParser.setProperty(SuppressionParser.JAXP_SCHEMA_SOURCE, new InputSource(schemaStream));
+ 104 8 final XMLReader xmlReader = saxParser.getXMLReader();
+ 105 8 xmlReader.setErrorHandler(new SuppressionErrorHandler());
+ 106 8 xmlReader.setContentHandler(handler);
107
- 108 32 final Reader reader = new InputStreamReader(inputStream, "UTF-8" );
- 109 32 final InputSource in = new InputSource(reader);
+ 108 8 final Reader reader = new InputStreamReader(inputStream, "UTF-8" );
+ 109 8 final InputSource in = new InputSource(reader);
110
111
- 112 32 xmlReader.parse(in);
+ 112 8 xmlReader.parse(in);
113
- 114 32 return handler.getSuppressionRules();
+ 114 8 return handler.getSuppressionRules();
115 0 } catch (ParserConfigurationException ex) {
116 0 LOGGER.log(Level.FINE, null , ex);
117 0 throw new SuppressionParseException(ex);
@@ -238,6 +238,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionRule.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionRule.html
index 620f89c80..ff6dd5971 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionRule.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.suppression.SuppressionRule.html
@@ -12,7 +12,7 @@
@@ -77,7 +77,7 @@
30
- 31 176 public class SuppressionRule {
+ 31 61 public class SuppressionRule {
32
33
@@ -174,7 +174,7 @@
79
- 80 176 private List<PropertyType> cpe = new ArrayList<PropertyType>();
+ 80 61 private List<PropertyType> cpe = new ArrayList<PropertyType>();
81
82
@@ -225,8 +225,8 @@
105
public void addCpe(PropertyType cpe) {
- 106 140 this .cpe.add(cpe);
- 107 140 }
+ 106 50 this .cpe.add(cpe);
+ 107 50 }
108
109
@@ -241,7 +241,7 @@
114
public boolean hasCpe() {
- 115 44 return cpe.size() > 0;
+ 115 15 return cpe.size() > 0;
116
}
117
@@ -250,7 +250,7 @@
119
- 120 176 private List<Float> cvssBelow = new ArrayList<Float>();
+ 120 61 private List<Float> cvssBelow = new ArrayList<Float>();
121
122
@@ -301,8 +301,8 @@
145
public void addCvssBelow(Float cvss) {
- 146 28 this .cvssBelow.add(cvss);
- 147 28 }
+ 146 7 this .cvssBelow.add(cvss);
+ 147 7 }
148
149
@@ -317,7 +317,7 @@
154
public boolean hasCvssBelow() {
- 155 32 return cvssBelow.size() > 0;
+ 155 12 return cvssBelow.size() > 0;
156
}
157
@@ -326,7 +326,7 @@
159
- 160 176 private List<String> cwe = new ArrayList<String>();
+ 160 61 private List<String> cwe = new ArrayList<String>();
161
162
@@ -377,8 +377,8 @@
185
public void addCwe(String cwe) {
- 186 8 this .cwe.add(cwe);
- 187 8 }
+ 186 2 this .cwe.add(cwe);
+ 187 2 }
188
189
@@ -393,7 +393,7 @@
194
public boolean hasCwe() {
- 195 36 return cwe.size() > 0;
+ 195 13 return cwe.size() > 0;
196
}
197
@@ -402,7 +402,7 @@
199
- 200 176 private List<String> cve = new ArrayList<String>();
+ 200 61 private List<String> cve = new ArrayList<String>();
201
202
@@ -453,8 +453,8 @@
225
public void addCve(String cve) {
- 226 44 this .cve.add(cve);
- 227 44 }
+ 226 11 this .cve.add(cve);
+ 227 11 }
228
229
@@ -469,7 +469,7 @@
234
public boolean hasCve() {
- 235 44 return cve.size() > 0;
+ 235 15 return cve.size() > 0;
236
}
237
@@ -478,7 +478,7 @@
239
- 240 176 private PropertyType gav = null ;
+ 240 61 private PropertyType gav = null ;
241
242
@@ -535,272 +535,318 @@
268
269
-
+ private boolean base;
270
-
+
271
-
+
272
-
+
273
-
+
274
-
+
275
- public void process(Dependency dependency) {
- 276 72 if (filePath != null && !filePath.matches(dependency.getFilePath())) {
- 277 0 return ;
+
+ 276
+ public boolean isBase() {
+ 277
+ return base;
278
- }
- 279 72 if (sha1 != null && !sha1.equalsIgnoreCase(dependency.getSha1sum())) {
- 280 4 return ;
+ }
+ 279
+
+ 280
+
281
- }
- 282 68 if (gav != null ) {
- 283 36 final Iterator<Identifier> itr = dependency.getIdentifiers().iterator();
- 284 36 boolean gavFound = false ;
- 285 84 while (itr.hasNext()) {
- 286 52 final Identifier i = itr.next();
- 287 52 if (identifierMatches("maven" , this .gav, i)) {
- 288 4 gavFound = true ;
- 289 4 break ;
+
+ 282
+
+ 283
+
+ 284
+
+ 285
+ public void setBase(boolean base) {
+ 286
+ this .base = base;
+ 287
+ }
+ 288
+
+ 289
+
290
- }
- 291 48 }
- 292 36 if (!gavFound) {
- 293 32 return ;
+
+ 291
+
+ 292
+
+ 293
+
294
- }
+
295
+ public void process(Dependency dependency) {
+ 296 30 if (filePath != null && !filePath.matches(dependency.getFilePath())) {
+ 297 0 return ;
+ 298
}
- 296
-
- 297 36 if (this .hasCpe()) {
- 298 16 final Iterator<Identifier> itr = dependency.getIdentifiers().iterator();
- 299 56 while (itr.hasNext()) {
- 300 40 final Identifier i = itr.next();
- 301 40 for (PropertyType c : this .cpe) {
- 302 84 if (identifierMatches("cpe" , c, i)) {
- 303 28 dependency.addSuppressedIdentifier(i);
- 304 28 itr.remove();
- 305 28 break ;
- 306
- }
- 307 56 }
- 308 40 }
- 309
+ 299 30 if (sha1 != null && !sha1.equalsIgnoreCase(dependency.getSha1sum())) {
+ 300 1 return ;
+ 301
}
- 310 36 if (hasCve() || hasCwe() || hasCvssBelow()) {
- 311 20 final Iterator<Vulnerability> itr = dependency.getVulnerabilities().iterator();
- 312 40 while (itr.hasNext()) {
- 313 20 boolean remove = false ;
- 314 20 final Vulnerability v = itr.next();
- 315 20 for (String entry : this .cve) {
- 316 12 if (entry.equalsIgnoreCase(v.getName())) {
- 317 4 remove = true ;
- 318 4 break ;
- 319
- }
- 320 8 }
- 321 20 if (!remove) {
- 322 16 for (String entry : this .cwe) {
- 323 4 if (v.getCwe() != null ) {
- 324 4 final String toMatch = String.format("CWE-%s " , entry);
- 325 4 final String toTest = v.getCwe().substring(0, toMatch.length()).toUpperCase();
- 326 4 if (toTest.equals(toMatch)) {
- 327 4 remove = true ;
- 328 4 break ;
- 329
- }
- 330
- }
- 331 0 }
- 332
+ 302 29 if (gav != null ) {
+ 303 17 final Iterator<Identifier> itr = dependency.getIdentifiers().iterator();
+ 304 17 boolean gavFound = false ;
+ 305 37 while (itr.hasNext()) {
+ 306 21 final Identifier i = itr.next();
+ 307 21 if (identifierMatches("maven" , this .gav, i)) {
+ 308 1 gavFound = true ;
+ 309 1 break ;
+ 310
}
- 333 20 if (!remove) {
- 334 12 for (float cvss : this .cvssBelow) {
- 335 12 if (v.getCvssScore() < cvss) {
- 336 4 remove = true ;
- 337 4 break ;
- 338
- }
- 339 8 }
- 340
- }
- 341 20 if (remove) {
- 342 12 dependency.addSuppressedVulnerability(v);
- 343 12 itr.remove();
- 344
- }
- 345 20 }
- 346
- }
- 347 36 }
- 348
-
- 349
-
- 350
-
- 351
-
- 352
-
- 353
-
- 354
-
- 355
- boolean cpeHasNoVersion(PropertyType c) {
- 356 92 if (c.isRegex()) {
- 357 8 return false ;
- 358
- }
- 359 84 if (countCharacter(c.getValue(), ':' ) == 3) {
- 360 48 return true ;
- 361
- }
- 362 36 return false ;
- 363
- }
- 364
-
- 365
-
- 366
-
- 367
-
- 368
-
- 369
-
- 370
-
- 371
-
- 372
- int countCharacter(String str, char c) {
- 373 96 int count = 0;
- 374 96 int pos = str.indexOf(c) + 1;
- 375 408 while (pos > 0) {
- 376 312 count += 1;
- 377 312 pos = str.indexOf(c, pos) + 1;
- 378
- }
- 379 96 return count;
- 380
- }
- 381
-
- 382
-
- 383
-
- 384
-
- 385
-
- 386
-
- 387
-
- 388
-
- 389
-
- 390
- boolean identifierMatches(String identifierType, PropertyType suppressionEntry, Identifier identifier) {
- 391 172 if (identifierType.equals(identifier.getType())) {
- 392 112 if (suppressionEntry.matches(identifier.getValue())) {
- 393 28 return true ;
- 394 84 } else if ("cpe" .equals(identifierType) && cpeHasNoVersion(suppressionEntry)) {
- 395 44 if (suppressionEntry.isCaseSensitive()) {
- 396 0 return identifier.getValue().startsWith(suppressionEntry.getValue());
- 397
- } else {
- 398 44 final String id = identifier.getValue().toLowerCase();
- 399 44 final String check = suppressionEntry.getValue().toLowerCase();
- 400 44 return id.startsWith(check);
- 401
- }
- 402
+ 311 20 }
+ 312 17 if (!gavFound) {
+ 313 16 return ;
+ 314
}
- 403
+ 315
}
- 404 100 return false ;
- 405
- }
- 406
+ 316
- 407
+ 317 13 if (this .hasCpe()) {
+ 318 8 final Iterator<Identifier> itr = dependency.getIdentifiers().iterator();
+ 319 22 while (itr.hasNext()) {
+ 320 14 final Identifier i = itr.next();
+ 321 14 for (PropertyType c : this .cpe) {
+ 322 22 if (identifierMatches("cpe" , c, i)) {
+ 323 7 if (!isBase()) {
+ 324 4 dependency.addSuppressedIdentifier(i);
+ 325
+ }
+ 326 7 itr.remove();
+ 327 7 break ;
+ 328
+ }
+ 329 15 }
+ 330 14 }
+ 331
+ }
+ 332 13 if (hasCve() || hasCwe() || hasCvssBelow()) {
+ 333 5 final Iterator<Vulnerability> itr = dependency.getVulnerabilities().iterator();
+ 334 10 while (itr.hasNext()) {
+ 335 5 boolean remove = false ;
+ 336 5 final Vulnerability v = itr.next();
+ 337 5 for (String entry : this .cve) {
+ 338 3 if (entry.equalsIgnoreCase(v.getName())) {
+ 339 1 remove = true ;
+ 340 1 break ;
+ 341
+ }
+ 342 2 }
+ 343 5 if (!remove) {
+ 344 4 for (String entry : this .cwe) {
+ 345 1 if (v.getCwe() != null ) {
+ 346 1 final String toMatch = String.format("CWE-%s " , entry);
+ 347 1 final String toTest = v.getCwe().substring(0, toMatch.length()).toUpperCase();
+ 348 1 if (toTest.equals(toMatch)) {
+ 349 1 remove = true ;
+ 350 1 break ;
+ 351
+ }
+ 352
+ }
+ 353 0 }
+ 354
+ }
+ 355 5 if (!remove) {
+ 356 3 for (float cvss : this .cvssBelow) {
+ 357 3 if (v.getCvssScore() < cvss) {
+ 358 1 remove = true ;
+ 359 1 break ;
+ 360
+ }
+ 361 2 }
+ 362
+ }
+ 363 5 if (remove) {
+ 364 3 if (!isBase()) {
+ 365 3 dependency.addSuppressedVulnerability(v);
+ 366
+ }
+ 367 3 itr.remove();
+ 368
+ }
+ 369 5 }
+ 370
+ }
+ 371 13 }
+ 372
+
+ 373
- 408
-
- 409
+ 374
+
+ 375
- 410
-
- 411
+ 376
+
+ 377
+
+ 378
+ 379
+ boolean cpeHasNoVersion(PropertyType c) {
+ 380 26 if (c.isRegex()) {
+ 381 2 return false ;
+ 382
+ }
+ 383 24 if (countCharacter(c.getValue(), ':' ) == 3) {
+ 384 18 return true ;
+ 385
+ }
+ 386 6 return false ;
+ 387
+ }
+ 388
+
+ 389
+
+ 390
+
+ 391
+
+ 392
+
+ 393
+
+ 394
+
+ 395
+
+ 396
+ int countCharacter(String str, char c) {
+ 397 27 int count = 0;
+ 398 27 int pos = str.indexOf(c) + 1;
+ 399 111 while (pos > 0) {
+ 400 84 count += 1;
+ 401 84 pos = str.indexOf(c, pos) + 1;
+ 402
+ }
+ 403 27 return count;
+ 404
+ }
+ 405
+
+ 406
+
+ 407
+
+ 408
+
+ 409
+
+ 410
+
+ 411
+
412
- @Override
+
413
- public String toString() {
- 414 0 final StringBuilder sb = new StringBuilder();
- 415 0 sb.append("SuppressionRule{" );
- 416 0 if (filePath != null ) {
- 417 0 sb.append("filePath=" ).append(filePath).append("," );
- 418
- }
- 419 0 if (sha1 != null ) {
- 420 0 sb.append("sha1=" ).append(sha1).append("," );
+
+ 414
+ boolean identifierMatches(String identifierType, PropertyType suppressionEntry, Identifier identifier) {
+ 415 52 if (identifierType.equals(identifier.getType())) {
+ 416 29 if (suppressionEntry.matches(identifier.getValue())) {
+ 417 5 return true ;
+ 418 24 } else if ("cpe" .equals(identifierType) && cpeHasNoVersion(suppressionEntry)) {
+ 419 17 if (suppressionEntry.isCaseSensitive()) {
+ 420 0 return identifier.getValue().startsWith(suppressionEntry.getValue());
421
+ } else {
+ 422 17 final String id = identifier.getValue().toLowerCase();
+ 423 17 final String check = suppressionEntry.getValue().toLowerCase();
+ 424 17 return id.startsWith(check);
+ 425
+ }
+ 426
+ }
+ 427
}
- 422 0 if (gav != null ) {
- 423 0 sb.append("gav=" ).append(gav).append("," );
- 424
- }
- 425 0 if (cpe != null && cpe.size() > 0) {
- 426 0 sb.append("cpe={" );
- 427 0 for (PropertyType pt : cpe) {
- 428 0 sb.append(pt).append("," );
- 429 0 }
- 430 0 sb.append("}" );
+ 428 30 return false ;
+ 429
+ }
+ 430
+
431
+
+ 432
+
+ 433
+
+ 434
+
+ 435
+
+ 436
+ @Override
+ 437
+ public String toString() {
+ 438 0 final StringBuilder sb = new StringBuilder();
+ 439 0 sb.append("SuppressionRule{" );
+ 440 0 if (filePath != null ) {
+ 441 0 sb.append("filePath=" ).append(filePath).append("," );
+ 442
}
- 432 0 if (cwe != null && cwe.size() > 0) {
- 433 0 sb.append("cwe={" );
- 434 0 for (String s : cwe) {
- 435 0 sb.append(s).append("," );
- 436 0 }
- 437 0 sb.append("}" );
- 438
- }
- 439 0 if (cve != null && cve.size() > 0) {
- 440 0 sb.append("cve={" );
- 441 0 for (String s : cve) {
- 442 0 sb.append(s).append("," );
- 443 0 }
- 444 0 sb.append("}" );
+ 443 0 if (sha1 != null ) {
+ 444 0 sb.append("sha1=" ).append(sha1).append("," );
445
}
- 446 0 if (cvssBelow != null && cvssBelow.size() > 0) {
- 447 0 sb.append("cvssBelow={" );
- 448 0 for (Float s : cvssBelow) {
- 449 0 sb.append(s).append("," );
- 450 0 }
- 451 0 sb.append("}" );
- 452
+ 446 0 if (gav != null ) {
+ 447 0 sb.append("gav=" ).append(gav).append("," );
+ 448
}
- 453 0 sb.append("}" );
- 454 0 return sb.toString();
+ 449 0 if (cpe != null && cpe.size() > 0) {
+ 450 0 sb.append("cpe={" );
+ 451 0 for (PropertyType pt : cpe) {
+ 452 0 sb.append(pt).append("," );
+ 453 0 }
+ 454 0 sb.append("}" );
455
+ }
+ 456 0 if (cwe != null && cwe.size() > 0) {
+ 457 0 sb.append("cwe={" );
+ 458 0 for (String s : cwe) {
+ 459 0 sb.append(s).append("," );
+ 460 0 }
+ 461 0 sb.append("}" );
+ 462
+ }
+ 463 0 if (cve != null && cve.size() > 0) {
+ 464 0 sb.append("cve={" );
+ 465 0 for (String s : cve) {
+ 466 0 sb.append(s).append("," );
+ 467 0 }
+ 468 0 sb.append("}" );
+ 469
+ }
+ 470 0 if (cvssBelow != null && cvssBelow.size() > 0) {
+ 471 0 sb.append("cvssBelow={" );
+ 472 0 for (Float s : cvssBelow) {
+ 473 0 sb.append(s).append("," );
+ 474 0 }
+ 475 0 sb.append("}" );
+ 476
+ }
+ 477 0 sb.append("}" );
+ 478 0 return sb.toString();
+ 479
}
- 456
+ 480
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DBUtils.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DBUtils.html
index 2de3026d6..c2eccb063 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DBUtils.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DBUtils.html
@@ -89,7 +89,7 @@
36
- 37 4 private static final Logger LOGGER = Logger.getLogger(DBUtils.class .getName());
+ 37 1 private static final Logger LOGGER = Logger.getLogger(DBUtils.class .getName());
38
39
@@ -150,16 +150,16 @@
72
public static void closeStatement(Statement statement) {
- 73 140 if (statement != null ) {
+ 73 33 if (statement != null ) {
74
try {
- 75 140 statement.close();
+ 75 33 statement.close();
76 0 } catch (SQLException ex) {
77 0 LOGGER.log(Level.FINEST, statement.toString(), ex);
- 78 140 }
+ 78 33 }
79
}
- 80 140 }
+ 80 33 }
81
82
@@ -174,20 +174,20 @@
87
public static void closeResultSet(ResultSet rs) {
- 88 148 if (rs != null ) {
+ 88 35 if (rs != null ) {
89
try {
- 90 148 rs.close();
+ 90 35 rs.close();
91 0 } catch (SQLException ex) {
92 0 LOGGER.log(Level.FINEST, rs.toString(), ex);
- 93 148 }
+ 93 35 }
94
}
- 95 148 }
+ 95 35 }
96
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DependencyVersion.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DependencyVersion.html
index 6da0e238d..74f8d8e8d 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DependencyVersion.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DependencyVersion.html
@@ -12,7 +12,7 @@
@@ -95,7 +95,7 @@
39
- 40 56 public class DependencyVersion implements Iterable, Comparable<DependencyVersion> {
+ 40 14 public class DependencyVersion implements Iterable, Comparable<DependencyVersion> {
41
42
@@ -124,9 +124,9 @@
54
- 55 2896 public DependencyVersion(String version) {
- 56 2896 parseVersion(version);
- 57 2896 }
+ 55 402 public DependencyVersion(String version) {
+ 56 402 parseVersion(version);
+ 57 402 }
58
59
@@ -143,21 +143,21 @@
65
public final void parseVersion(String version) {
- 66 2904 versionParts = new ArrayList<String>();
- 67 2904 if (version != null ) {
- 68 2904 final Pattern rx = Pattern.compile("(\\d+|[a-z]+\\d+|(release|beta|alpha)$)" );
- 69 2904 final Matcher matcher = rx.matcher(version.toLowerCase());
- 70 12212 while (matcher.find()) {
- 71 9308 versionParts.add(matcher.group());
+ 66 404 versionParts = new ArrayList<String>();
+ 67 404 if (version != null ) {
+ 68 404 final Pattern rx = Pattern.compile("(\\d+|[a-z]+\\d+|(release|beta|alpha)$)" );
+ 69 404 final Matcher matcher = rx.matcher(version.toLowerCase());
+ 70 1687 while (matcher.find()) {
+ 71 1283 versionParts.add(matcher.group());
72
}
- 73 2904 if (versionParts.isEmpty()) {
- 74 24 versionParts.add(version);
+ 73 404 if (versionParts.isEmpty()) {
+ 74 4 versionParts.add(version);
75
}
76
}
- 77 2904 }
+ 77 404 }
78
79
@@ -216,7 +216,7 @@
106
public Iterator iterator() {
- 107 4 return versionParts.iterator();
+ 107 1 return versionParts.iterator();
108
}
109
@@ -235,7 +235,7 @@
@Override
116
public String toString() {
- 117 340 return StringUtils.join(versionParts.toArray(), "." );
+ 117 83 return StringUtils.join(versionParts.toArray(), "." );
118
}
119
@@ -256,30 +256,30 @@
@Override
127
public boolean equals(Object obj) {
- 128 2660 if (obj == null ) {
+ 128 353 if (obj == null ) {
129 0 return false ;
130
}
- 131 2660 if (getClass() != obj.getClass()) {
+ 131 353 if (getClass() != obj.getClass()) {
132 0 return false ;
133
}
- 134 2660 final DependencyVersion other = (DependencyVersion) obj;
- 135 2660 final int max = (this .versionParts.size() < other.versionParts.size())
+ 134 353 final DependencyVersion other = (DependencyVersion) obj;
+ 135 353 final int max = (this .versionParts.size() < other.versionParts.size())
136
? this .versionParts.size() : other.versionParts.size();
137
- 138 5772 for (int i = 0; i < max; i++) {
- 139 5128 final String thisPart = this .versionParts.get(i);
- 140 5128 final String otherPart = other.versionParts.get(i);
- 141 5128 if (!thisPart.equals(otherPart)) {
- 142 2016 return false ;
+ 138 767 for (int i = 0; i < max; i++) {
+ 139 678 final String thisPart = this .versionParts.get(i);
+ 140 678 final String otherPart = other.versionParts.get(i);
+ 141 678 if (!thisPart.equals(otherPart)) {
+ 142 264 return false ;
143
}
144
}
- 145 644 if (this .versionParts.size() > max) {
+ 145 89 if (this .versionParts.size() > max) {
146 0 for (int i = max; i < this .versionParts.size(); i++) {
147 0 if (!"0" .equals(this .versionParts.get(i))) {
148 0 return false ;
@@ -291,10 +291,10 @@
}
152
- 153 644 if (other.versionParts.size() > max) {
- 154 516 for (int i = max; i < other.versionParts.size(); i++) {
- 155 516 if (!"0" .equals(other.versionParts.get(i))) {
- 156 516 return false ;
+ 153 89 if (other.versionParts.size() > max) {
+ 154 65 for (int i = max; i < other.versionParts.size(); i++) {
+ 155 65 if (!"0" .equals(other.versionParts.get(i))) {
+ 156 65 return false ;
157
}
158
@@ -313,7 +313,7 @@
165
- 166 128 return true ;
+ 166 24 return true ;
167
}
168
@@ -332,9 +332,9 @@
@Override
175
public int hashCode() {
- 176 4 int hash = 5;
- 177 4 hash = 71 * hash + (this .versionParts != null ? this .versionParts.hashCode() : 0);
- 178 4 return hash;
+ 176 1 int hash = 5;
+ 177 1 hash = 71 * hash + (this .versionParts != null ? this .versionParts.hashCode() : 0);
+ 178 1 return hash;
179
}
180
@@ -355,95 +355,101 @@
188
public boolean matchesAtLeastThreeLevels(DependencyVersion version) {
- 189 2416 if (version == null ) {
+ 189 304 if (version == null ) {
190 0 return false ;
191
}
- 192
-
- 193 2416 boolean ret = true ;
- 194 2416 int max = (this .versionParts.size() < version.versionParts.size())
+ 192 304 if (Math.abs(this .versionParts.size() - version.versionParts.size()) >= 3) {
+ 193 1 return false ;
+ 194
+ }
195
+
+ 196 303 final int max = (this .versionParts.size() < version.versionParts.size())
+ 197
? this .versionParts.size() : version.versionParts.size();
- 196
+ 198
- 197 2416 if (max > 3) {
- 198 8 max = 3;
- 199
- }
- 200
-
- 201 5164 for (int i = 0; i < max; i++) {
- 202 4644 if (this .versionParts.get(i) == null || !this .versionParts.get(i).equals(version.versionParts.get(i))) {
- 203 1896 ret = false ;
- 204 1896 break ;
- 205
- }
- 206
- }
+ 199 303 boolean ret = true ;
+ 200 652 for (int i = 0; i < max; i++) {
+ 201 586 String thisVersion = this .versionParts.get(i);
+ 202 586 String otherVersion = version.getVersionParts().get(i);
+ 203 586 if (i >= 3) {
+ 204 2 if (thisVersion.compareToIgnoreCase(otherVersion) >= 0) {
+ 205 1 ret = false ;
+ 206 1 break ;
207
-
- 208 2416 return ret;
- 209
- }
- 210
-
+ }
+ 208 584 } else if (!thisVersion.equals(otherVersion)) {
+ 209 236 ret = false ;
+ 210 236 break ;
211
- @Override
- 212
- public int compareTo(DependencyVersion version) {
- 213 76 if (version == null ) {
- 214 0 return 1;
- 215
- }
- 216 76 final List<String> left = this .getVersionParts();
- 217 76 final List<String> right = version.getVersionParts();
- 218 76 final int max = left.size() < right.size() ? left.size() : right.size();
- 219
-
- 220 180 for (int i = 0; i < max; i++) {
- 221 152 final String lStr = left.get(i);
- 222 152 final String rStr = right.get(i);
- 223 152 if (lStr.equals(rStr)) {
- 224 104 continue ;
- 225
}
- 226
- try {
- 227 48 final int l = Integer.parseInt(lStr);
- 228 28 final int r = Integer.parseInt(rStr);
- 229 28 if (l < r) {
- 230 20 return -1;
- 231 8 } else if (l > r) {
- 232 8 return 1;
- 233
- }
- 234 20 } catch (NumberFormatException ex) {
- 235 20 final int comp = left.get(i).compareTo(right.get(i));
- 236 20 if (comp < 0) {
- 237 20 return -1;
- 238 0 } else if (comp > 0) {
- 239 0 return 1;
- 240
- }
- 241 0 }
- 242
+ 212
}
- 243 28 if (left.size() < right.size()) {
- 244 12 return -1;
- 245 16 } else if (left.size() > right.size()) {
- 246 12 return 1;
- 247
- } else {
- 248 4 return 0;
- 249
- }
- 250
+ 213
+
+ 214 303 return ret;
+ 215
}
- 251
+ 216
+
+ 217
+ @Override
+ 218
+ public int compareTo(DependencyVersion version) {
+ 219 19 if (version == null ) {
+ 220 0 return 1;
+ 221
+ }
+ 222 19 final List<String> left = this .getVersionParts();
+ 223 19 final List<String> right = version.getVersionParts();
+ 224 19 final int max = left.size() < right.size() ? left.size() : right.size();
+ 225
+
+ 226 45 for (int i = 0; i < max; i++) {
+ 227 38 final String lStr = left.get(i);
+ 228 38 final String rStr = right.get(i);
+ 229 38 if (lStr.equals(rStr)) {
+ 230 26 continue ;
+ 231
+ }
+ 232
+ try {
+ 233 12 final int l = Integer.parseInt(lStr);
+ 234 7 final int r = Integer.parseInt(rStr);
+ 235 7 if (l < r) {
+ 236 5 return -1;
+ 237 2 } else if (l > r) {
+ 238 2 return 1;
+ 239
+ }
+ 240 5 } catch (NumberFormatException ex) {
+ 241 5 final int comp = left.get(i).compareTo(right.get(i));
+ 242 5 if (comp < 0) {
+ 243 5 return -1;
+ 244 0 } else if (comp > 0) {
+ 245 0 return 1;
+ 246
+ }
+ 247 0 }
+ 248
+ }
+ 249 7 if (left.size() < right.size()) {
+ 250 3 return -1;
+ 251 4 } else if (left.size() > right.size()) {
+ 252 3 return 1;
+ 253
+ } else {
+ 254 1 return 0;
+ 255
+ }
+ 256
+ }
+ 257
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DependencyVersionUtil.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DependencyVersionUtil.html
index a681309c8..383d9600d 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DependencyVersionUtil.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.DependencyVersionUtil.html
@@ -85,7 +85,7 @@
34
- 35 4 private static final Pattern RX_VERSION = Pattern.compile("\\d+(\\.\\d{1,6})+(\\.?([_-](release|beta|alpha)|[a-zA-Z_-]{1,3}\\d{1,8}))?" );
+ 35 1 private static final Pattern RX_VERSION = Pattern.compile("\\d+(\\.\\d{1,6})+(\\.?([_-](release|beta|alpha)|[a-zA-Z_-]{1,3}\\d{1,8}))?" );
36
37
@@ -94,7 +94,7 @@
39
- 40 4 private static final Pattern RX_SINGLE_VERSION = Pattern.compile("\\d+(\\.?([_-](release|beta|alpha)|[a-zA-Z_-]{1,3}\\d{1,8}))?" );
+ 40 1 private static final Pattern RX_SINGLE_VERSION = Pattern.compile("\\d+(\\.?([_-](release|beta|alpha)|[a-zA-Z_-]{1,3}\\d{1,8}))?" );
41
42
@@ -131,56 +131,56 @@
58
public static DependencyVersion parseVersion(String text) {
- 59 2780 if (text == null ) {
+ 59 375 if (text == null ) {
60 0 return null ;
61
}
62
- 63 2780 if ("-" .equals(text)) {
- 64 4 final DependencyVersion dv = new DependencyVersion();
- 65 4 final ArrayList<String> list = new ArrayList<String>();
- 66 4 list.add(text);
- 67 4 dv.setVersionParts(list);
- 68 4 return dv;
+ 63 375 if ("-" .equals(text)) {
+ 64 1 final DependencyVersion dv = new DependencyVersion();
+ 65 1 final ArrayList<String> list = new ArrayList<String>();
+ 66 1 list.add(text);
+ 67 1 dv.setVersionParts(list);
+ 68 1 return dv;
69
}
- 70 2776 String version = null ;
- 71 2776 Matcher matcher = RX_VERSION.matcher(text);
- 72 2776 if (matcher.find()) {
- 73 2760 version = matcher.group();
+ 70 374 String version = null ;
+ 71 374 Matcher matcher = RX_VERSION.matcher(text);
+ 72 374 if (matcher.find()) {
+ 73 370 version = matcher.group();
74
}
75
- 76 2776 if (matcher.find()) {
- 77 8 return null ;
+ 76 374 if (matcher.find()) {
+ 77 2 return null ;
78
}
- 79 2768 if (version == null ) {
- 80 16 matcher = RX_SINGLE_VERSION.matcher(text);
- 81 16 if (matcher.find()) {
- 82 8 version = matcher.group();
+ 79 372 if (version == null ) {
+ 80 4 matcher = RX_SINGLE_VERSION.matcher(text);
+ 81 4 if (matcher.find()) {
+ 82 2 version = matcher.group();
83
} else {
- 84 8 return null ;
+ 84 2 return null ;
85
}
86
- 87 8 if (matcher.find()) {
- 88 4 return null ;
+ 87 2 if (matcher.find()) {
+ 88 1 return null ;
89
}
90
}
- 91 2756 return new DependencyVersion(version);
+ 91 369 return new DependencyVersion(version);
92
}
93
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.ExtractionUtil.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.ExtractionUtil.html
index 9aa28de56..2c0e9f017 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.ExtractionUtil.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.ExtractionUtil.html
@@ -258,6 +258,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.Filter.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.Filter.html
index 9f547cb9b..64378d995 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.Filter.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.Filter.html
@@ -57,19 +57,19 @@
19
public Iterator<T> filter(Iterator<T> iterator) {
- 20 628 return new FilterIterator(iterator);
+ 20 78 return new FilterIterator(iterator);
21
}
22
23
public Iterable<T> filter(final Iterable<T> iterable) {
- 24 628 return new Iterable<T>() {
+ 24 78 return new Iterable<T>() {
25
26
public Iterator<T> iterator() {
- 27 628 return filter(iterable.iterator());
+ 27 78 return filter(iterable.iterator());
28
}
29
@@ -78,7 +78,7 @@
}
31
- 32 628 private class FilterIterator implements Iterator<T> {
+ 32 78 private class FilterIterator implements Iterator<T> {
33
34
@@ -87,28 +87,28 @@
private T next;
36
- 37 628 private FilterIterator(Iterator<T> iterator) {
- 38 628 this .iterator = iterator;
- 39 628 toNext();
- 40 628 }
+ 37 78 private FilterIterator(Iterator<T> iterator) {
+ 38 78 this .iterator = iterator;
+ 39 78 toNext();
+ 40 78 }
41
42
public boolean hasNext() {
- 43 3824 return next != null ;
+ 43 359 return next != null ;
44
}
45
46
public T next() {
- 47 3372 if (next == null ) {
+ 47 309 if (next == null ) {
48 0 throw new NoSuchElementException();
49
}
- 50 3372 T returnValue = next;
- 51 3372 toNext();
- 52 3372 return returnValue;
+ 50 309 T returnValue = next;
+ 51 309 toNext();
+ 52 309 return returnValue;
53
}
54
@@ -122,22 +122,22 @@
59
private void toNext() {
- 60 4000 next = null ;
- 61 5620 while (iterator.hasNext()) {
- 62 5160 T item = iterator.next();
- 63 5160 if (item != null && passes(item)) {
- 64 3540 next = item;
- 65 3540 break ;
+ 60 387 next = null ;
+ 61 659 while (iterator.hasNext()) {
+ 62 608 T item = iterator.next();
+ 63 608 if (item != null && passes(item)) {
+ 64 336 next = item;
+ 65 336 break ;
66
}
- 67 1620 }
- 68 4000 }
+ 67 272 }
+ 68 387 }
69
}
70
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.NonClosingStream.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.NonClosingStream.html
index 7db5463a7..baecdc637 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.NonClosingStream.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.NonClosingStream.html
@@ -107,11 +107,11 @@
public void close() {
45
- 46 4 }
+ 46 1 }
47
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.Pair.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.Pair.html
index 87fce6fa2..49247e8b3 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.Pair.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.Pair.html
@@ -211,10 +211,10 @@
@Override
97
public int hashCode() {
- 98 88752 int hash = 3;
- 99 88752 hash = 53 * hash + (this .left != null ? this .left.hashCode() : 0);
- 100 88752 hash = 53 * hash + (this .right != null ? this .right.hashCode() : 0);
- 101 88752 return hash;
+ 98 22146 int hash = 3;
+ 99 22146 hash = 53 * hash + (this .left != null ? this .left.hashCode() : 0);
+ 100 22146 hash = 53 * hash + (this .right != null ? this .right.hashCode() : 0);
+ 101 22146 return hash;
102
}
103
@@ -259,6 +259,6 @@
}
-
+
diff --git a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.UrlStringUtils.html b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.UrlStringUtils.html
index 739721f4d..7223e3f0e 100644
--- a/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.UrlStringUtils.html
+++ b/dependency-check-core/cobertura/org.owasp.dependencycheck.utils.UrlStringUtils.html
@@ -99,14 +99,14 @@
41
- 42 4 private static final Pattern CONTAINS_URL_TEST = Pattern.compile("^.*(ht|f)tps?://.*$" , Pattern.MULTILINE | Pattern.CASE_INSENSITIVE);
+ 42 1 private static final Pattern CONTAINS_URL_TEST = Pattern.compile("^.*(ht|f)tps?://.*$" , Pattern.MULTILINE | Pattern.CASE_INSENSITIVE);
43
44
45
- 46 4 private static final Pattern IS_URL_TEST = Pattern.compile("^(ht|f)tps?://.*" , Pattern.CASE_INSENSITIVE);
+ 46 1 private static final Pattern IS_URL_TEST = Pattern.compile("^(ht|f)tps?://.*" , Pattern.CASE_INSENSITIVE);
47
48
@@ -125,7 +125,7 @@
55
public static boolean containsUrl(String text) {
- 56 69045 return CONTAINS_URL_TEST.matcher(text).matches();
+ 56 21961 return CONTAINS_URL_TEST.matcher(text).matches();
57
}
58
@@ -144,7 +144,7 @@
65
public static boolean isUrl(String text) {
- 66 28 return IS_URL_TEST.matcher(text).matches();
+ 66 7 return IS_URL_TEST.matcher(text).matches();
67
}
68
@@ -153,7 +153,7 @@
70
- 71 4 private static final HashSet<String> IGNORE_LIST = new HashSet<String>(
+ 71 1 private static final HashSet<String> IGNORE_LIST = new HashSet<String>(
72
Arrays.asList("www" , "com" , "org" , "gov" , "info" , "name" , "net" , "pro" , "tel" , "mobi" , "xxx" ));
73
@@ -188,40 +188,40 @@
88
public static List<String> extractImportantUrlData(String text) throws MalformedURLException {
- 89 28 final ArrayList<String> importantParts = new ArrayList<String>();
- 90 28 final URL url = new URL(text);
- 91 28 final String[] domain = url.getHost().split("\\." );
+ 89 7 final ArrayList<String> importantParts = new ArrayList<String>();
+ 90 7 final URL url = new URL(text);
+ 91 7 final String[] domain = url.getHost().split("\\." );
92
- 93 80 for (int i = 0; i < domain.length - 1; i++) {
- 94 52 final String sub = domain[i];
- 95 52 if (!IGNORE_LIST.contains(sub.toLowerCase())) {
- 96 48 importantParts.add(sub);
+ 93 20 for (int i = 0; i < domain.length - 1; i++) {
+ 94 13 final String sub = domain[i];
+ 95 13 if (!IGNORE_LIST.contains(sub.toLowerCase())) {
+ 96 12 importantParts.add(sub);
97
}
98
}
- 99 28 final String document = url.getPath();
- 100 28 final String[] pathParts = document.split("[\\//]" );
- 101 48 for (int i = 0; i < pathParts.length - 2; i++) {
- 102 20 if (!pathParts[i].isEmpty()) {
+ 99 7 final String document = url.getPath();
+ 100 7 final String[] pathParts = document.split("[\\//]" );
+ 101 12 for (int i = 0; i < pathParts.length - 2; i++) {
+ 102 5 if (!pathParts[i].isEmpty()) {
103 0 importantParts.add(pathParts[i]);
104
}
105
}
- 106 28 if (pathParts.length > 0 && !pathParts[pathParts.length - 1].isEmpty()) {
- 107 24 final String fileNameNoExt = pathParts[pathParts.length - 1].replaceAll("\\..*{0,5}$" , "" );
- 108 24 importantParts.add(fileNameNoExt);
+ 106 7 if (pathParts.length > 0 && !pathParts[pathParts.length - 1].isEmpty()) {
+ 107 6 final String fileNameNoExt = pathParts[pathParts.length - 1].replaceAll("\\..*{0,5}$" , "" );
+ 108 6 importantParts.add(fileNameNoExt);
109
}
- 110 28 return importantParts;
+ 110 7 return importantParts;
111
}
112
}
-
+
diff --git a/dependency-check-core/cpd.html b/dependency-check-core/cpd.html
index c5945e96a..1d0595d69 100644
--- a/dependency-check-core/cpd.html
+++ b/dependency-check-core/cpd.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - CPD Results
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
@@ -248,10 +248,10 @@
Line
org\owasp\dependencycheck\analyzer\ArchiveAnalyzer.java
-165
+165
org\owasp\dependencycheck\analyzer\JarAnalyzer.java
-986
+986
@Override
diff --git a/dependency-check-core/dependency-updates-report.html b/dependency-check-core/dependency-updates-report.html
index 67f2bfce6..72f1c82fb 100644
--- a/dependency-check-core/dependency-updates-report.html
+++ b/dependency-check-core/dependency-updates-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - Dependency Updates Report
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
-
| Last Published: 2014-08-05
+
| Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
@@ -244,7 +244,7 @@
# of dependencies using the latest version available
-9
+
8
# of dependencies where the next version available is smaller than an incremental version update
@@ -256,11 +256,11 @@
# of dependencies where the next version available is a minor version update
-10
+11
# of dependencies where the next version available is a major version update
-1
+2
Dependency Management
This project does not declare any dependencies in a dependencyManagement section.
@@ -556,7 +556,7 @@
1.4.2
-
+
org.glassfish.main.admingui
war
4.0
@@ -565,7 +565,7 @@
war
-
+4.1
@@ -595,7 +595,7 @@
org.owasp
dependency-check-utils
-1.2.4
+1.2.5
compile
jar
@@ -617,6 +617,18 @@
3.0.0.RELEASE
+org.springframework.retry
+spring-retry
+1.1.0.RELEASE
+provided
+
+jar
+
+
+
+1.1.1.RELEASE
+
+
org.springframework.security
spring-security-web
3.0.0.RELEASE
@@ -627,7 +639,7 @@
3.0.1.RELEASE
-
+
Status
Group Id
Artifact Id
@@ -645,28 +657,28 @@
com.google.code.findbugs:annotations
-
+
Status
There is at least one newer incremental version available. Incremental updates are typically passive.
-
+
Group Id
com.google.code.findbugs
-
+
Artifact Id
annotations
-
+
Current Version
2.0.1
-
+
Scope
compile
-
+
Classifier
-
+
Type
jar
-
+
Newer versions
2.0.2 Next Incremental 2.0.3 Latest Incremental 3.0.0 Next Major
@@ -719,7 +731,7 @@
jar
Newer versions
-1.3.173 Next Incremental 1.3.174 1.3.1751.3.176 Latest Incremental 1.4.177 Next Minor 1.4.178 1.4.1791.4.180 Latest Minor
+1.3.173 Next Incremental 1.3.174 1.3.1751.3.176 Latest Incremental 1.4.177 Next Minor 1.4.178 1.4.179 1.4.1801.4.181 Latest Minor
com.hazelcast:hazelcast
@@ -746,7 +758,7 @@
jar
Newer versions
-2.5.1 Next Incremental 2.6 Next Minor 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 3.0-RC13.0-RC2 Latest Minor 3.0 Next Major 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2-RC1 3.2-RC2 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.3-RC1 3.3-RC2 3.3-EA3.3-EA2 Latest Major
+2.5.1 Next Incremental 2.6 Next Minor 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 3.0-RC13.0-RC2 Latest Minor 3.0 Next Major 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2-RC1 3.2-RC2 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3-RC1 3.3-RC2 3.3-RC3 3.3 3.3-EA3.3-EA2 Latest Major
commons-cli:commons-cli
@@ -1004,7 +1016,7 @@
jar
Newer versions
-4.6.0 Next Minor 4.6.1 4.7.0 4.7.1 4.7.2 4.8.0 4.8.14.9.0 Latest Minor
+4.6.0 Next Minor 4.6.1 4.7.0 4.7.1 4.7.2 4.8.0 4.8.1 4.9.04.10.0 Latest Minor
org.apache.lucene:lucene-core
@@ -1031,7 +1043,7 @@
jar
Newer versions
-4.6.0 Next Minor 4.6.1 4.7.0 4.7.1 4.7.2 4.8.0 4.8.14.9.0 Latest Minor
+4.6.0 Next Minor 4.6.1 4.7.0 4.7.1 4.7.2 4.8.0 4.8.1 4.9.04.10.0 Latest Minor
org.apache.lucene:lucene-queryparser
@@ -1058,7 +1070,7 @@
jar
Newer versions
-4.6.0 Next Minor 4.6.1 4.7.0 4.7.1 4.7.2 4.8.0 4.8.14.9.0 Latest Minor
+4.6.0 Next Minor 4.6.1 4.7.0 4.7.1 4.7.2 4.8.0 4.8.1 4.9.04.10.0 Latest Minor
org.apache.lucene:lucene-test-framework
@@ -1085,7 +1097,7 @@
jar
Newer versions
-4.4.0 Next Minor 4.5.0 4.5.1 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 4.8.0 4.8.14.9.0 Latest Minor
+4.4.0 Next Minor 4.5.0 4.5.1 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 4.8.0 4.8.1 4.9.04.10.0 Latest Minor
org.apache.maven.scm:maven-scm-provider-cvsexe
@@ -1247,7 +1259,7 @@
Status
- No newer versions available.
+ There is at least one newer minor version available. Minor updates are sometimes passive.
Group Id
org.glassfish.main.admingui
@@ -1265,7 +1277,10 @@
Type
-war
+war
+
+Newer versions
+4.1 Next Minor
org.jsoup:jsoup
@@ -1334,7 +1349,7 @@
dependency-check-utils
Current Version
-1.2.4
+1.2.5
Scope
compile
@@ -1370,7 +1385,34 @@
jar
Newer versions
-2.5.6 Next Incremental 2.5.6.SEC01 2.5.6.SEC022.5.6.SEC03 Latest Incremental 3.0.0.RELEASE Next Major 3.0.1.RELEASE 3.0.2.RELEASE 3.0.3.RELEASE 3.0.4.RELEASE 3.0.5.RELEASE 3.0.6.RELEASE 3.0.7.RELEASE 3.1.0.RELEASE 3.1.1.RELEASE 3.1.2.RELEASE 3.2.0.RELEASE 3.2.1.RELEASE 3.2.2.RELEASE 3.2.3.RELEASE 3.2.4.RELEASE 3.2.5.RELEASE 3.2.6.RELEASE 3.2.7.RELEASE 3.2.8.RELEASE 3.2.9.RELEASE 3.2.10.RELEASE 4.0.0.RELEASE 4.0.1.RELEASE 4.0.2.RELEASE 4.0.3.RELEASE 4.0.4.RELEASE 4.0.5.RELEASE4.0.6.RELEASE Latest Major
+2.5.6 Next Incremental 2.5.6.SEC01 2.5.6.SEC022.5.6.SEC03 Latest Incremental 3.0.0.RELEASE Next Major 3.0.1.RELEASE 3.0.2.RELEASE 3.0.3.RELEASE 3.0.4.RELEASE 3.0.5.RELEASE 3.0.6.RELEASE 3.0.7.RELEASE 3.1.0.RELEASE 3.1.1.RELEASE 3.1.2.RELEASE 3.2.0.RELEASE 3.2.1.RELEASE 3.2.2.RELEASE 3.2.3.RELEASE 3.2.4.RELEASE 3.2.5.RELEASE 3.2.6.RELEASE 3.2.7.RELEASE 3.2.8.RELEASE 3.2.9.RELEASE 3.2.10.RELEASE 3.2.11.RELEASE 4.0.0.RELEASE 4.0.1.RELEASE 4.0.2.RELEASE 4.0.3.RELEASE 4.0.4.RELEASE 4.0.5.RELEASE 4.0.6.RELEASE 4.0.7.RELEASE4.1.0.RELEASE Latest Major
+
+
org.springframework.retry:spring-retry
+
+
+Status
+ There is at least one newer major version available. Major updates are rarely passive.
+
+Group Id
+org.springframework.retry
+
+Artifact Id
+spring-retry
+
+Current Version
+1.1.0.RELEASE
+
+Scope
+provided
+
+Classifier
+
+
+Type
+jar
+
+Newer versions
+1.1.1.RELEASE Next Major
org.springframework.security:spring-security-web
@@ -1397,7 +1439,7 @@
jar
Newer versions
-3.0.1.RELEASE Next Major 3.0.2.RELEASE 3.0.3.RELEASE 3.0.4.RELEASE 3.0.5.RELEASE 3.0.6.RELEASE 3.0.7.RELEASE 3.0.8.RELEASE 3.1.0.RELEASE 3.1.1.RELEASE 3.1.2.RELEASE 3.1.3.RELEASE 3.1.4.RELEASE 3.1.5.RELEASE 3.1.6.RELEASE 3.2.0.RELEASE 3.2.1.RELEASE 3.2.2.RELEASE 3.2.3.RELEASE3.2.4.RELEASE Latest Major
+3.0.1.RELEASE Next Major 3.0.2.RELEASE 3.0.3.RELEASE 3.0.4.RELEASE 3.0.5.RELEASE 3.0.6.RELEASE 3.0.7.RELEASE 3.0.8.RELEASE 3.1.0.RELEASE 3.1.1.RELEASE 3.1.2.RELEASE 3.1.3.RELEASE 3.1.4.RELEASE 3.1.5.RELEASE 3.1.6.RELEASE 3.1.7.RELEASE 3.2.0.RELEASE 3.2.1.RELEASE 3.2.2.RELEASE 3.2.3.RELEASE 3.2.4.RELEASE3.2.5.RELEASE Latest Major
diff --git a/dependency-check-core/failsafe-report.html b/dependency-check-core/failsafe-report.html
index 3f3c96933..01500cf46 100644
--- a/dependency-check-core/failsafe-report.html
+++ b/dependency-check-core/failsafe-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - Surefire Report
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
@@ -273,7 +273,7 @@ function toggleDisplay(elementId) {
0
0
100%
-341.197
+214.202
Note: failures are anticipated and checked for with assertions while errors are unanticipated.
Package List
@@ -294,7 +294,7 @@ function toggleDisplay(elementId) {
0
0
100%
-
10.057
+
11.567
org.owasp.dependencycheck
2
@@ -302,7 +302,7 @@ function toggleDisplay(elementId) {
0
0
100%
-245.125
+
85.85
org.owasp.dependencycheck.analyzer
17
@@ -310,7 +310,7 @@ function toggleDisplay(elementId) {
0
0
100%
-50.086
+
44.255
org.owasp.dependencycheck.data.update
4
@@ -318,7 +318,7 @@ function toggleDisplay(elementId) {
0
0
100%
-22.453
+
56.755
org.owasp.dependencycheck.data.nvdcve
8
@@ -326,7 +326,7 @@ function toggleDisplay(elementId) {
0
0
100%
-13.476
+
15.775
Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.
org.owasp.dependencycheck.reporting
@@ -348,7 +348,7 @@ function toggleDisplay(elementId) {
0
0
100%
-
10.057
+
11.567
org.owasp.dependencycheck
@@ -369,7 +369,7 @@ function toggleDisplay(elementId) {
0
0
100%
-245.125
+85.85
org.owasp.dependencycheck.analyzer
+6.762
org.owasp.dependencycheck.data.update
@@ -429,7 +429,7 @@ function toggleDisplay(elementId) {
0
0
100%
-11.862
+26.184
StandardUpdateIntegrationTest
@@ -438,7 +438,7 @@ function toggleDisplay(elementId) {
0
0
100%
-10.591
+30.571
org.owasp.dependencycheck.data.nvdcve
@@ -459,7 +459,7 @@ function toggleDisplay(elementId) {
0
0
100%
-4.966
+5.355
DatabasePropertiesIntegrationTest
@@ -468,7 +468,7 @@ function toggleDisplay(elementId) {
0
0
100%
-8.51
+10.42
Test Cases
[Summary ] [Package List ] [Test Cases ]
@@ -478,15 +478,15 @@ function toggleDisplay(elementId) {
testAnalyzeTar
-3.68
+
6.076
testAnalyzeTgz
-10.074
+
13.247
testAnalyze
-1.528
+
1.312
testGetAnalysisPhase
@@ -494,23 +494,23 @@ function toggleDisplay(elementId) {
testGetName
-0
+
0.001
testAnalyze_badZip
-0.939
+
0.641
testInitialize
-0
+
0.001
testAnalyzeTarGz
-7.339
+
7.341
testSupportsExtension
-0.001
+
0
testGetSupportedExtensions
@@ -521,15 +521,15 @@ function toggleDisplay(elementId) {
testSearchCPE
-2.55
+
2.74
testDetermineCPE
-3.225
+
3.227
testDetermineCPE_full
-14.858
+
2.907
testBuildSearch
@@ -540,7 +540,7 @@ function toggleDisplay(elementId) {
testAnalyze
-5.892
+
6.762
testGetAnalysisPhase
@@ -555,82 +555,82 @@ function toggleDisplay(elementId) {
testOpen
-1.941
+
2.048
testGetCPEs
-1.43
+
1.496
testGetVulnerabilities
-1.595
+1.811
DatabasePropertiesIntegrationTest
testSave
-2.87
+3.94
testGetProperty_String_String
-1.391
+1.547
testGetProperties
-1.421
+1.625
testGetProperty_String
-1.395
+1.671
testIsEmpty
-1.433
+1.637
NvdCveUpdaterIntegrationTest
testUpdate
-11.862
+26.184
StandardUpdateIntegrationTest
testOpenDataStores
-2.505
+3.042
testUpdatesNeeded
-6.111
+25.95
testWithinRange
-1.975
+1.579
EngineIntegrationTest
testScan
-0.872
+7.952
testEngine
-244.253
+77.898
ReportGeneratorIntegrationTest
testGenerateXMLReport
-10.055
+11.567
testGenerateReport
-0.002
+0
diff --git a/dependency-check-core/findbugs.html b/dependency-check-core/findbugs.html
index fddae27ef..84a69745d 100644
--- a/dependency-check-core/findbugs.html
+++ b/dependency-check-core/findbugs.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - FindBugs Bug Detector Report
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
@@ -253,7 +253,7 @@
Missing Classes
198
-5
+8
0
0
-
-
org.owasp.dependencycheck.analyzer.AssemblyAnalyzer
-
+
+
org.owasp.dependencycheck.Engine
+
+
+
org.owasp.dependencycheck.analyzer.AssemblyAnalyzer
+
+
+Bug
+Category
+Details
+Line
+Priority
+
org.owasp.dependencycheck.analyzer.AssemblyAnalyzer.initializeFileTypeAnalyzer() discards result of readLine after checking if it is nonnull
STYLE
RV_DONT_JUST_NULL_CHECK_READLINE
@@ -289,34 +319,34 @@
org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer
-
+
Bug
Category
Details
Line
Priority
-
+
Possible null pointer dereference of currentVersion on branch that might be infeasible in org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer.removeSpuriousCPE(Dependency)
STYLE
NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE
-145
+175
Medium
-
+
Possible null pointer dereference of nextVersion on branch that might be infeasible in org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer.removeSpuriousCPE(Dependency)
STYLE
NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE
-145
+175
Medium
org.owasp.dependencycheck.analyzer.JavaScriptAnalyzer
-
+
Bug
Category
Details
Line
Priority
-
+
Found reliance on default encoding in org.owasp.dependencycheck.analyzer.JavaScriptAnalyzer.analyzeFileType(Dependency, Engine): new java.io.FileReader(File)
I18N
DM_DEFAULT_ENCODING
diff --git a/dependency-check-core/index.html b/dependency-check-core/index.html
index 58a3ce421..e5bdb434c 100644
--- a/dependency-check-core/index.html
+++ b/dependency-check-core/index.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - About
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
diff --git a/dependency-check-core/javancss.html b/dependency-check-core/javancss.html
index 3da2752f3..8457915eb 100644
--- a/dependency-check-core/javancss.html
+++ b/dependency-check-core/javancss.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - JavaNCSS Metric Results
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
@@ -259,11 +259,11 @@
org.owasp.dependencycheck.analyzer
23
172
-2232
-190
-1283
-149
-652
+2250
+189
+1278
+158
+654
org.owasp.dependencycheck.jaxb.pom.generated
86
@@ -277,7 +277,7 @@
org.owasp.dependencycheck.dependency
14
176
-807
+811
173
1097
17
@@ -294,17 +294,17 @@
org.owasp.dependencycheck.suppression
6
-53
-390
-59
-369
+55
+402
+61
+379
5
154
org.owasp.dependencycheck.utils
10
43
-341
+348
40
238
6
@@ -349,11 +349,11 @@
org.owasp.dependencycheck
1
22
-223
+224
22
-127
+124
6
-45
+48
org.owasp.dependencycheck.data.cpe
4
@@ -455,12 +455,12 @@
Multi lines comment
195
-1359
-8575
-1504
-12583
-486
-2675
+1361
+8617
+1505
+12585
+495
+2680
[ package ] [ object ] [ method ] [ explanation ]
@@ -492,10 +492,10 @@
67
org.owasp.dependencycheck.analyzer.CPEAnalyzer
-261
-17
+263
+16
2
-30
+
29
org.owasp.dependencycheck.jaxb.pom.generated.Model
217
@@ -527,23 +527,23 @@
0
22
+org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer
+179
+13
+0
+13
+
org.owasp.dependencycheck.jaxb.pom.generated.ObjectFactory
175
87
0
88
-
-org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer
-163
-12
-0
-13
org.owasp.dependencycheck.suppression.SuppressionRule
-160
-28
+167
+30
0
-29
+
31
org.owasp.dependencycheck.analyzer.DependencyBundlingAnalyzer
157
@@ -605,17 +605,17 @@
5
39
+org.owasp.dependencycheck.utils.DependencyVersion
+98
+11
+0
+11
+
org.owasp.dependencycheck.jaxb.pom.generated.Profile
97
24
6
37
-
-org.owasp.dependencycheck.utils.DependencyVersion
-91
-11
-0
-11
org.owasp.dependencycheck.reporting.ReportGenerator
88
@@ -641,17 +641,17 @@
4
27
+org.owasp.dependencycheck.suppression.SuppressionHandler
+67
+5
+0
+6
+
org.owasp.dependencycheck.jaxb.pom.generated.BuildBase
65
16
4
-25
-
-org.owasp.dependencycheck.analyzer.AbstractSuppressionAnalyzer
-62
-6
-0
-7
+
25
TOP 30 classes containing the most methods.
@@ -697,17 +697,17 @@
1
36
+org.owasp.dependencycheck.suppression.SuppressionRule
+167
+30
+0
+31
+
org.owasp.dependencycheck.jaxb.pom.generated.Build
101
28
5
39
-
-org.owasp.dependencycheck.suppression.SuppressionRule
-160
-28
-0
-29
org.owasp.dependencycheck.jaxb.pom.generated.Profile
97
@@ -763,17 +763,17 @@
4
27
-org.owasp.dependencycheck.analyzer.CPEAnalyzer
-261
-17
-2
-30
-
org.owasp.dependencycheck.data.update.xml.NvdCve20Handler.Element
51
17
0
17
+
+org.owasp.dependencycheck.analyzer.CPEAnalyzer
+263
+16
+2
+29
org.owasp.dependencycheck.dependency.Identifier
55
@@ -817,14 +817,14 @@
0
14
-org.owasp.dependencycheck.analyzer.ArchiveAnalyzer
-211
-12
+org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer
+179
+13
0
13
-org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer
-163
+org.owasp.dependencycheck.analyzer.ArchiveAnalyzer
+211
12
0
13
@@ -849,11 +849,11 @@
Methods average
Javadocs average
-40.57
-8,575.00
+40.76
+8,617.00
0.32
-6.97
-8.16
+6.98
+8.17
[ package ] [ object ] [ method ] [ explanation ]
@@ -891,25 +891,35 @@
25
1
+org.owasp.dependencycheck.analyzer.CPEAnalyzer.determineIdentifiers(Dependency,String,String,Confidence)
+60
+23
+1
+
org.owasp.dependencycheck.data.nvdcve.ConnectionFactory.initialize()
60
25
1
-
+
org.owasp.dependencycheck.analyzer.AssemblyAnalyzer.initializeFileTypeAnalyzer()
55
20
1
-
+
org.owasp.dependencycheck.data.update.xml.NvdCve20Handler.startElement(String,String,String,Attributes)
55
21
0
-
+
org.owasp.dependencycheck.data.nvdcve.CveDB.getVulnerability(String)
54
9
1
+
+org.owasp.dependencycheck.suppression.SuppressionRule.process(Dependency)
+51
+32
+1
org.owasp.dependencycheck.utils.ExtractionUtil.extractFiles(File,File,Engine)
51
@@ -936,16 +946,6 @@
9
1
-org.owasp.dependencycheck.suppression.SuppressionRule.process(Dependency)
-49
-30
-1
-
-org.owasp.dependencycheck.analyzer.CPEAnalyzer.determineIdentifiers(Dependency,String,String)
-47
-22
-1
-
org.owasp.dependencycheck.Engine.analyzeDependencies()
47
14
@@ -1024,9 +1024,9 @@
CCN average
Javadocs average
-8,575.00
-4.85
-2.35
+8,617.00
+4.87
+2.36
0.97
diff --git a/dependency-check-core/license.html b/dependency-check-core/license.html
index 2806b5f80..8df58a9e6 100644
--- a/dependency-check-core/license.html
+++ b/dependency-check-core/license.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - Project License
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
-
| Last Published: 2014-08-05
+
| Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
diff --git a/dependency-check-core/plugin-updates-report.html b/dependency-check-core/plugin-updates-report.html
index 7d3d5b6d1..11ccb82b7 100644
--- a/dependency-check-core/plugin-updates-report.html
+++ b/dependency-check-core/plugin-updates-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - Plugin Updates Report
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
-
| Last Published: 2014-08-05
+
| Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
diff --git a/dependency-check-core/pmd.html b/dependency-check-core/pmd.html
index 13659b907..734676cae 100644
--- a/dependency-check-core/pmd.html
+++ b/dependency-check-core/pmd.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - PMD Results
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
-
| Last Published: 2014-08-05
+
| Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
@@ -250,10 +250,10 @@
Line
These nested if statements could be combined
-362 –365
+
362–365
These nested if statements could be combined
-376 –379
+376–379
org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java
@@ -262,7 +262,7 @@
Line
Avoid empty while statements
-236 –238
+236–238
org/owasp/dependencycheck/analyzer/CPEAnalyzer.java
@@ -271,34 +271,40 @@
Line
Useless parentheses.
-222
+219
-These nested if statements could be combined
-541 –546
+Avoid unused method parameters such as 'currentConfidence'.
+495
These nested if statements could be combined
-542 –545
+530–535
These nested if statements could be combined
-551 –554
+531–534
+
+These nested if statements could be combined
+540–543
org/owasp/dependencycheck/analyzer/DependencyBundlingAnalyzer.java
-
+
Violation
Line
-
+
These nested if statements could be combined
-228 –230
+228–230
org/owasp/dependencycheck/analyzer/FalsePositiveAnalyzer.java
-
+
Violation
Line
+
+These nested if statements could be combined
+100–106
These nested if statements could be combined
-134 –154
+164–184
org/owasp/dependencycheck/analyzer/JarAnalyzer.java
@@ -307,7 +313,7 @@
Line
Useless parentheses.
-383
+383
org/owasp/dependencycheck/analyzer/JavaScriptAnalyzer.java
@@ -316,7 +322,7 @@
Line
Avoid unused local variables such as 'extractComments'.
-113
+113
org/owasp/dependencycheck/analyzer/NvdCveAnalyzer.java
@@ -325,7 +331,7 @@
Line
Useless parentheses.
-76
+76
org/owasp/dependencycheck/data/cpe/IndexEntry.java
@@ -334,10 +340,10 @@
Line
Useless parentheses.
-172
+172
Useless parentheses.
-175
+175
org/owasp/dependencycheck/data/nvdcve/CveDB.java
@@ -346,7 +352,7 @@
Line
Useless parentheses.
-745
+745
org/owasp/dependencycheck/data/nvdcve/DriverShim.java
@@ -355,7 +361,7 @@
Line
Useless parentheses.
-192
+192
org/owasp/dependencycheck/data/update/StandardUpdate.java
@@ -364,7 +370,7 @@
Line
Useless parentheses.
-118
+118
org/owasp/dependencycheck/dependency/Dependency.java
@@ -373,28 +379,28 @@
Line
Useless parentheses.
-599
+600
Useless parentheses.
-602
+603
Useless parentheses.
-605
+606
Useless parentheses.
-608
+609
Useless parentheses.
-611
+612
Useless parentheses.
-614
+615
Useless parentheses.
-629
+630
Useless parentheses.
-632
+633
org/owasp/dependencycheck/dependency/Evidence.java
@@ -403,7 +409,7 @@
Line
Useless parentheses.
-202
+204
org/owasp/dependencycheck/dependency/Identifier.java
@@ -412,10 +418,10 @@
Line
Useless parentheses.
-175
+177
Useless parentheses.
-178
+180
org/owasp/dependencycheck/dependency/Reference.java
@@ -424,13 +430,13 @@
Line
Useless parentheses.
-109
+109
Useless parentheses.
-112
+112
Useless parentheses.
-115
+115
org/owasp/dependencycheck/dependency/Vulnerability.java
@@ -439,7 +445,7 @@
Line
Useless parentheses.
-373
+373
org/owasp/dependencycheck/dependency/VulnerableSoftware.java
@@ -448,13 +454,13 @@
Line
Useless parentheses.
-143
+143
Useless parentheses.
-182
+182
Useless parentheses.
-187
+187
org/owasp/dependencycheck/suppression/PropertyType.java
@@ -463,7 +469,7 @@
Line
Useless parentheses.
-161
+161
org/owasp/dependencycheck/utils/DependencyVersion.java
@@ -472,10 +478,10 @@
Line
Useless parentheses.
-135
+135
Useless parentheses.
-194
+196
diff --git a/dependency-check-core/project-info.html b/dependency-check-core/project-info.html
index a6674fe7a..ad8c05ad6 100644
--- a/dependency-check-core/project-info.html
+++ b/dependency-check-core/project-info.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - Project Information
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
diff --git a/dependency-check-core/project-reports.html b/dependency-check-core/project-reports.html
index 665d0f9f0..d5df97f18 100644
--- a/dependency-check-core/project-reports.html
+++ b/dependency-check-core/project-reports.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - Generated Reports
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
diff --git a/dependency-check-core/project-summary.html b/dependency-check-core/project-summary.html
index 3410bb659..4b34e7cfa 100644
--- a/dependency-check-core/project-summary.html
+++ b/dependency-check-core/project-summary.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - Project Summary
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
@@ -203,7 +203,7 @@
dependency-check-core
Version
-1.2.4
+1.2.5
Type
jar
diff --git a/dependency-check-core/surefire-report.html b/dependency-check-core/surefire-report.html
index 9226be196..784edd865 100644
--- a/dependency-check-core/surefire-report.html
+++ b/dependency-check-core/surefire-report.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - Surefire Report
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
@@ -268,12 +268,12 @@ function toggleDisplay(elementId) {
Success Rate
Time
-148
+149
0
0
1
-99.324%
-22.57
+99.329%
+19.855
Note: failures are anticipated and checked for with assertions while errors are unanticipated.
Package List
@@ -302,7 +302,7 @@ function toggleDisplay(elementId) {
0
0
100%
-
0.023
+
0
org.owasp.dependencycheck.data.nexus
4
@@ -310,7 +310,7 @@ function toggleDisplay(elementId) {
0
0
100%
-3.336
+
1.553
org.owasp.dependencycheck.dependency
23
@@ -318,7 +318,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.015
+
0.033
org.owasp.dependencycheck.utils
10
@@ -334,7 +334,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.128
+
0.349
org.owasp.dependencycheck.analyzer
42
@@ -342,7 +342,7 @@ function toggleDisplay(elementId) {
0
1
97.619%
-18.024
+
16.787
org.owasp.dependencycheck.data.update
10
@@ -358,15 +358,15 @@ function toggleDisplay(elementId) {
0
0
100%
-0
+
0.039
org.owasp.dependencycheck.suppression
-36
+37
0
0
0
100%
-0.002
+
0.005
org.owasp.dependencycheck.data.lucene
10
@@ -374,7 +374,7 @@ function toggleDisplay(elementId) {
0
0
100%
-1.042
+
1.089
org.owasp.dependencycheck.data.cpe
1
@@ -425,7 +425,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.023
+0
org.owasp.dependencycheck.data.nexus
@@ -446,7 +446,7 @@ function toggleDisplay(elementId) {
0
0
100%
-3.336
+1.553
org.owasp.dependencycheck.dependency
@@ -467,7 +467,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.015
+0.033
VulnerableSoftwareTest
@@ -536,7 +536,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0
+0.121
NvdCve_2_0_HandlerTest
@@ -545,7 +545,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.128
+0.228
org.owasp.dependencycheck.analyzer
@@ -566,7 +566,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.045
+0.089
AbstractSuppressionAnalyzerTest
@@ -575,7 +575,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.831
+0.681
AnalyzerServiceTest
@@ -584,7 +584,7 @@ function toggleDisplay(elementId) {
0
0
100%
-1.229
+0.684
AssemblyAnalyzerTest
@@ -593,7 +593,7 @@ function toggleDisplay(elementId) {
0
1
80%
-1.277
+1.389
DependencyBundlingAnalyzerTest
@@ -620,7 +620,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.11
+0.004
HintAnalyzerTest
@@ -629,7 +629,7 @@ function toggleDisplay(elementId) {
0
0
100%
-11.319
+12.317
JarAnalyzerTest
@@ -638,7 +638,7 @@ function toggleDisplay(elementId) {
0
0
100%
-3.181
+1.564
JavaScriptAnalyzerTest
@@ -647,7 +647,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.032
+0.059
NuspecAnalyzerTest
@@ -707,7 +707,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0
+0.039
org.owasp.dependencycheck.suppression
@@ -750,12 +750,12 @@ function toggleDisplay(elementId) {
SuppressionRuleTest
-30
+31
0
0
0
100%
-0.002
+0.005
org.owasp.dependencycheck.data.lucene
@@ -785,7 +785,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0
+0.001
TokenPairConcatenatingFilterTest
@@ -794,7 +794,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.08
+0.141
UrlTokenizingFilterTest
@@ -803,7 +803,7 @@ function toggleDisplay(elementId) {
0
0
100%
-0.962
+0.947
org.owasp.dependencycheck.data.cpe
@@ -834,22 +834,22 @@ function toggleDisplay(elementId) {
testNewHashSet
-0.045
+0.089
AbstractSuppressionAnalyzerTest
testFailureToLocateSuppressionFileAnywhere
-0.597
+0.524
testGetRulesFromSuppressionFileFromURL
-0.184
+0.112
testGetRulesFromSuppressionFileInClasspath
-0.05
+0.045
testGetSupportedExtensions
@@ -860,18 +860,18 @@ function toggleDisplay(elementId) {
testGetAnalyzers
-1.229
+0.684
AssemblyAnalyzerTest
testGetName
-0.471
+0.328
testAnalysis
-0.241
+0.398
testWithSettingMono
@@ -884,11 +884,11 @@ function toggleDisplay(elementId) {
testNonexistent
-0.175
+0.264
testLog4Net
-0.39
+0.399
DependencyBundlingAnalyzerTest
@@ -929,7 +929,7 @@ function toggleDisplay(elementId) {
testAnalyze
-0.11
+0.004
testClose
@@ -952,11 +952,11 @@ function toggleDisplay(elementId) {
testAnalyze
-11.311
+12.3
testGetAnalysisPhase
-0.008
+0.017
testGetName
@@ -967,30 +967,30 @@ function toggleDisplay(elementId) {
testAnalyze
-0.731
+0.415
testGetName
-0.755
+0.28
testInterpolateString
-0.65
+0.262
testSupportsExtension
-0.584
+0.283
testGetSupportedExtensions
-0.461
+0.324
JavaScriptAnalyzerTest
testAnalyze
-0
+0.058
testClose
@@ -1002,7 +1002,7 @@ function toggleDisplay(elementId) {
testGetName
-0.032
+0.001
testInitialize
@@ -1073,52 +1073,52 @@ function toggleDisplay(elementId) {
testAppendEscapedLuceneQuery_null
-0
+0.001
TokenPairConcatenatingFilterTest
testClear
-0.059
+0.131
testExamples
-0.021
+0.01
UrlTokenizingFilterTest
testRandomStrings
-0.902
+0.92
testExamples
-0.006
+0.01
testEmptyTerm
-0.054
+0.017
NexusSearchTest
testNullSha1
-1.713
+1.175
testMalformedSha1
-0.099
+0.071
testValidSha1
-1.32
+0.155
testMissingSha1
-0.204
+0.152
XPathNuspecParserTest
@@ -1129,7 +1129,7 @@ function toggleDisplay(elementId) {
testMissingDocument
-0.023
+0
testNotNuspec
@@ -1160,7 +1160,7 @@ function toggleDisplay(elementId) {
testLoad_String_String_multiple_paths
-0
+0.039
NvdCveInfoTest
@@ -1213,14 +1213,14 @@ function toggleDisplay(elementId) {
testParse
-0
+0.121
NvdCve_2_0_HandlerTest
testParse
-0.128
+0.228
DependencyTest
@@ -1231,7 +1231,7 @@ function toggleDisplay(elementId) {
testGetSha1sum
-0.005
+0
testGetProductEvidence
@@ -1239,11 +1239,11 @@ function toggleDisplay(elementId) {
testGetActualFilePath
-0.001
+0
testSetFileExtension
-0
+0.001
testGetIdentifiers
@@ -1303,7 +1303,7 @@ function toggleDisplay(elementId) {
testSetActualFilePath
-0.001
+0.024
VulnerableSoftwareTest
@@ -1366,112 +1366,116 @@ function toggleDisplay(elementId) {
testCve
-0.001
+0
testCwe
0
-testSha1
+testBase
0
-testCpeMatches
-0
+testSha1
+0.001
+testCpeMatches
+0.001
+
+
testHasCvssBelow
0
-
+
testProcess
-0
-
+0.001
+
testGetSha1
0
-
-
-testProcessGAV
-0
-testAddCvssBelow
-0
+testProcessGAV
+0.001
+testAddCvssBelow
+0.001
+
+
testFilePath
0
-
+
testGetCvssBelow
0
-
+
testSetFilePath
0
-
+
testGetFilePath
0
-
+
testAddCpe
0
-
+
testAddCve
0
-
+
testAddCwe
0
-
+
testGetCpe
0
-
+
testGetCve
0
-
+
testGetCwe
0
-
+
testHasCpe
0
-
+
testHasCve
0
-
+
testHasCwe
0
-
+
testSetCvssBelow
0
-
+
testSetSha1
0
-
+
testSetCpe
0
-
+
testSetCve
0
-
+
testSetCwe
-0.001
-
+0
+
testCountCharacter
0
diff --git a/dependency-check-core/taglist.html b/dependency-check-core/taglist.html
index d940585f3..bc7039c63 100644
--- a/dependency-check-core/taglist.html
+++ b/dependency-check-core/taglist.html
@@ -1,13 +1,13 @@
-
+
dependency-check-core - Tag List report
@@ -54,7 +54,7 @@
-
+
/
@@ -67,9 +67,9 @@
- | Last Published: 2014-08-05
+ | Last Published: 2014-09-16
- Version: 1.2.4
+ Version: 1.2.5
@@ -247,12 +247,12 @@
Tag strings used by tag class
Todo Work
-21
+22
todo, FIXME
Each tag is detailed below:
-
Number of occurrences found in the code: 21
+
Number of occurrences found in the code: 22
org.owasp.dependencycheck.analyzer.ArchiveAnalyzer
@@ -267,96 +267,99 @@
org.owasp.dependencycheck.analyzer.CPEAnalyzer
Line
-- likely need to change the split... not sure if this will work for CPE with special chars
-451
+test dojo-war against this. we shold get dojo-toolkit:dojo-toolkit AND dojo-toolkit:toolkit
+173
-the following isn't quite right is it? need to think about this guessing game a bit more.
-538
+- likely need to change the split... not sure if this will work for CPE with special chars
+432
+the following isn't quite right is it? need to think about this guessing game a bit more.
+527
+
org.owasp.dependencycheck.analyzer.CPEAnalyzerIntegrationTest
Line
-
-- yeah, not a very good test as the results are the same with or without weighting...
-198
-fix this assert Assert.assertEquals(expResult, result.get(0).getName());
-206
+- yeah, not a very good test as the results are the same with or without weighting...
+201
+fix this assert Assert.assertEquals(expResult, result.get(0).getName());
+209
+
org.owasp.dependencycheck.analyzer.DependencyBundlingAnalyzerTest
Line
-
+
review the generated test code and remove the default call to fail. fail("The test case is a prototype.");
62
-
+
org.owasp.dependencycheck.analyzer.FalsePositiveAnalyzer
Line
-
+
fix the version problem below
-132
-
+162
+
- can we utilize the pom's groupid and artifactId to filter??? most of these are due to low quality data. Other idea would be to say any CPE found based on LOW confidence evidence should have a different CPE type? (this might be a better solution then just removing the URL for "best-guess" matches).
-233
-
-move this startsWith expression to a configuration file?
-242
+263
-move this to the hint analyzer
-330
+move this startsWith expression to a configuration file?
+272
+move this to the hint analyzer
+360
+
org.owasp.dependencycheck.analyzer.JarAnalyzer
Line
-
+
remove weighting
712
-
+
change this to a regex?
830
-
+
org.owasp.dependencycheck.analyzer.JavaScriptAnalyzerTest
Line
-
+
improve the assertions assertTrue(depJQ6.getEvidence().size() > 0); assertTrue(depJQ10.getEvidence().size() > 0); assertTrue(depJQ10min.getEvidence().size() > 0);
103
-
+
org.owasp.dependencycheck.data.lucene.SearchVersionAnalyzer
Line
-
+
consider implementing payloads/custom attributes... use custom attributes for major, minor, x, x, x, rcx these can then be used to weight the score for searches on the version. see http://lucene.apache.org/core/3_6_1/api/core/org/apache/lucene/analysis/package-summary.html#package_description look at this article to implement http://www.codewrecks.com/blog/index.php/2012/08/25/index-your-blog-using-tags-and-lucene-net/
36
-
+
org.owasp.dependencycheck.data.lucene.VersionAnalyzer
Line
-
+
consider implementing payloads/custom attributes... use custom attributes for major, minor, x, x, x, rcx these can then be used to weight the score for searches on the version. see http://lucene.apache.org/core/3_6_1/api/core/org/apache/lucene/analysis/package-summary.html#package_description look at this article to implement http://www.codewrecks.com/blog/index.php/2012/08/25/index-your-blog-using-tags-and-lucene-net/
36
-
+
org.owasp.dependencycheck.data.lucene.VersionTokenizingFilter
Line
-
+
should we also be splitting on dash or underscore? we would need to incorporate the dash or underscore back in...
81
-
+
org.owasp.dependencycheck.data.nvdcve.CveDB
Line
-
+
consider utilizing the matchThreeVersion method to get additional results. However, this might also introduce false positives.
755
-
+
org.owasp.dependencycheck.data.update.StandardUpdateIntegrationTest
Line
-
+
make this an actual test }
78
-
+
org.owasp.dependencycheck.dependency.EvidenceCollection
Line
-
-consider changing the regex to only compare alpha-numeric (i.e. strip everything else)
-237
+consider changing the regex to only compare alpha-numeric (i.e. strip everything else)
+238
+
org.owasp.dependencycheck.utils.DependencyVersion
Line
-
+
steal better version of code from compareTo
137
diff --git a/dependency-check-core/xref-test/index.html b/dependency-check-core/xref-test/index.html
index 948e76ede..5151839d8 100644
--- a/dependency-check-core/xref-test/index.html
+++ b/dependency-check-core/xref-test/index.html
@@ -4,7 +4,7 @@
- Dependency-Check Core 1.2.4 Reference
+ Dependency-Check Core 1.2.5 Reference