From 5f259cb88c045ceee0fd0197f630bd1f4780f0f8 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Sat, 7 Nov 2015 06:37:36 -0500 Subject: [PATCH] added missed configuration options for new analyzers --- .../maven/BaseDependencyCheckMojo.java | 51 +++++++++++++++++++ .../src/site/markdown/configuration.md | 32 +++++++----- 2 files changed, 71 insertions(+), 12 deletions(-) diff --git a/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java b/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java index d82c41eee..4a88f2142 100644 --- a/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java +++ b/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java @@ -164,6 +164,47 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma @Parameter(property = "archiveAnalyzerEnabled", required = false) private Boolean archiveAnalyzerEnabled; + /** + * Sets whether the Python Distribution Analyzer will be used. + */ + @Parameter(property = "pyDistributionAnalyzerEnabled", required = false) + private Boolean pyDistributionAnalyzerEnabled; + /** + * Sets whether the Python Package Analyzer will be used. + */ + @Parameter(property = "pyPackageAnalyzerEnabled", required = false) + private Boolean pyPackageAnalyzerEnabled; + /** + * Sets whether the Ruby Gemspec Analyzer will be used. + */ + @Parameter(property = "rubygemsAnalyzerEnabled", required = false) + private Boolean rubygemsAnalyzerEnabled; + /** + * Sets whether or not the openssl Analyzer should be used. + */ + @Parameter(property = "opensslAnalyzerEnabled", required = false) + private Boolean opensslAnalyzerEnabled; + /** + * Sets whether or not the CMake Analyzer should be used. + */ + @Parameter(property = "cmakeAnalyzerEnabled", required = false) + private Boolean cmakeAnalyzerEnabled; + /** + * Sets whether or not the autoconf Analyzer should be used. + */ + @Parameter(property = "autoconfAnalyzerEnabled", required = false) + private Boolean autoconfAnalyzerEnabled; + /** + * Sets whether or not the PHP Composer Lock File Analyzer should be used. + */ + @Parameter(property = "composerAnalyzerEnabled", required = false) + private Boolean composerAnalyzerEnabled; + /** + * Sets whether or not the Node.js Analyzer should be used. + */ + @Parameter(property = "nodeAnalyzerEnabled", required = false) + private Boolean nodeAnalyzerEnabled; + /** * Whether or not the .NET Assembly Analyzer is enabled. */ @@ -624,6 +665,15 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma Settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, zipExtensions); Settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_MONO_PATH, pathToMono); + Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, pyDistributionAnalyzerEnabled); + Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, pyPackageAnalyzerEnabled); + Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, rubygemsAnalyzerEnabled); + Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, opensslAnalyzerEnabled); + Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CMAKE_ENABLED, cmakeAnalyzerEnabled); + Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, autoconfAnalyzerEnabled); + Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, composerAnalyzerEnabled); + Settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, nodeAnalyzerEnabled); + //Database configuration Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName); Settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath); @@ -638,6 +688,7 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_1_2, cveUrl12Base); Settings.setStringIfNotEmpty(Settings.KEYS.CVE_SCHEMA_2_0, cveUrl20Base); Settings.setIntIfNotNull(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours); + } /** diff --git a/dependency-check-maven/src/site/markdown/configuration.md b/dependency-check-maven/src/site/markdown/configuration.md index 9269b7ab9..31ad3484f 100644 --- a/dependency-check-maven/src/site/markdown/configuration.md +++ b/dependency-check-maven/src/site/markdown/configuration.md @@ -34,18 +34,26 @@ Note, that specific analyzers will automatically disable themselves if no file types that they support are detected - so specifically disabling them may not be needed. -Property | Description | Default Value -------------------------|---------------------------------------------------------------------------|------------------ -archiveAnalyzerEnabled | Sets whether the Archive Analyzer will be used. | true -zipExtensions | A comma-separated list of additional file extensions to be treated like a ZIP file, the contents will be extracted and analyzed. |   -jarAnalyzer | Sets whether Jar Analyzer will be used. | true -centralAnalyzerEnabled | Sets whether Central Analyzer will be used. If this analyzer is being disabled there is a good chance you also want to disable the Nexus Analyzer (see below). | true -nexusAnalyzerEnabled | Sets whether Nexus Analyzer will be used. This analyzer is superceded by the Central Analyzer; however, you can configure this to run against a Nexus Pro installation. | true -nexusUrl | Defines the Nexus Server's web service end point (example http://domain.enterprise/service/local/). If not set the Nexus Analyzer will be disabled. |   -nexusUsesProxy | Whether or not the defined proxy should be used when connecting to Nexus. | true -nuspecAnalyzerEnabled | Sets whether or not the .NET Nuget Nuspec Analyzer will be used. | true -assemblyAnalyzerEnabled | Sets whether or not the .NET Assembly Analyzer should be used. | true -pathToMono | The path to Mono for .NET assembly analysis on non-windows systems. |   +Property | Description | Default Value +------------------------------|---------------------------------------------------------------------------|------------------ +archiveAnalyzerEnabled | Sets whether the Archive Analyzer will be used. | true +zipExtensions | A comma-separated list of additional file extensions to be treated like a ZIP file, the contents will be extracted and analyzed. |   +jarAnalyzer | Sets whether Jar Analyzer will be used. | true +centralAnalyzerEnabled | Sets whether Central Analyzer will be used. If this analyzer is being disabled there is a good chance you also want to disable the Nexus Analyzer (see below). | true +nexusAnalyzerEnabled | Sets whether Nexus Analyzer will be used. This analyzer is superceded by the Central Analyzer; however, you can configure this to run against a Nexus Pro installation. | true +nexusUrl | Defines the Nexus Server's web service end point (example http://domain.enterprise/service/local/). If not set the Nexus Analyzer will be disabled. |   +nexusUsesProxy | Whether or not the defined proxy should be used when connecting to Nexus. | true +pyDistributionAnalyzerEnabled | Sets whether the Python Distribution Analyzer will be used. | true +pyPackageAnalyzerEnabled | Sets whether the Python Package Analyzer will be used. | true +rubygemsAnalyzerEnabled | Sets whether the Ruby Gemspec Analyzer will be used. | true +opensslAnalyzerEnabled | Sets whether or not the openssl Analyzer should be used. | true +cmakeAnalyzerEnabled | Sets whether or not the CMake Analyzer should be used. | true +autoconfAnalyzerEnabled | Sets whether or not the autoconf Analyzer should be used. | true +composerAnalyzerEnabled | Sets whether or not the PHP Composer Lock File Analyzer should be used. | true +nodeAnalyzerEnabled | Sets whether or not the Node.js Analyzer should be used. | true +nuspecAnalyzerEnabled | Sets whether or not the .NET Nuget Nuspec Analyzer will be used. | true +assemblyAnalyzerEnabled | Sets whether or not the .NET Assembly Analyzer should be used. | true +pathToMono | The path to Mono for .NET assembly analysis on non-windows systems. |   Advanced Configuration ====================