From 608c3384030627b2eb67efb8d7f3042fd790655a Mon Sep 17 00:00:00 2001 From: Steve Springett Date: Thu, 10 Apr 2014 23:39:52 -0500 Subject: [PATCH] Added archive support for JAR, SAR, and APK file formats. Ticket #106 Former-commit-id: 19991f8b32e746d9691e48eeac15343178dd3e99 --- .../org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.java | 2 +- .../owasp/dependencycheck/analyzer/ArchiveAnalyzerTest.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.java index a36914e11..54e1c5e70 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.java @@ -92,7 +92,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer { /** * The set of things we can handle with Zip methods */ - private static final Set ZIPPABLES = newHashSet("zip", "ear", "war", "nupkg"); + private static final Set ZIPPABLES = newHashSet("zip", "ear", "war", "jar", "sar", "apk", "nupkg"); /** * The set of file extensions supported by this analyzer. Note for developers, any additions to this list will need * to be explicitly handled in extractFiles(). diff --git a/dependency-check-core/src/test/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzerTest.java b/dependency-check-core/src/test/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzerTest.java index 381f9f250..32c4365f2 100644 --- a/dependency-check-core/src/test/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzerTest.java +++ b/dependency-check-core/src/test/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzerTest.java @@ -69,6 +69,9 @@ public class ArchiveAnalyzerTest extends AbstractDatabaseTestCase { expResult.add("zip"); expResult.add("war"); expResult.add("ear"); + expResult.add("jar"); + expResult.add("sar"); + expResult.add("apk"); expResult.add("nupkg"); expResult.add("tar"); expResult.add("gz");