Running dependency-check on multi module build
See original GitHub issueMaven version: 3.6.1 Dependency check version: 5.2.1
Hi,
I have a multi module maven build and am trying to determine the correct configuration for running dependency check from the top level and generating a collated report of all sub modules. Please can you help?
I have the following config in my parent pom:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>${owasp-maven-plugin.version}</version>
<executions>
<execution>
<phase>none</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<format>html</format>
<outputDirectory>${project.basedir}/target</outputDirectory>
<failBuildOnCVSS>0</failBuildOnCVSS>
<cveValidForHours>168</cveValidForHours>
<centralAnalyzerEnabled>false</centralAnalyzerEnabled>
<nexusAnalyzerEnabled>false</nexusAnalyzerEnabled>
<pyDistributionAnalyzerEnabled>false</pyDistributionAnalyzerEnabled>
<pyPackageAnalyzerEnabled>false</pyPackageAnalyzerEnabled>
<rubygemsAnalyzerEnabled>false</rubygemsAnalyzerEnabled>
<cmakeAnalyzerEnabled>false</cmakeAnalyzerEnabled>
<autoconfAnalyzerEnabled>false</autoconfAnalyzerEnabled>
<composerAnalyzerEnabled>false</composerAnalyzerEnabled>
<nodeAnalyzerEnabled>false</nodeAnalyzerEnabled>
<nuspecAnalyzerEnabled>false</nuspecAnalyzerEnabled>
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
<retireJsAnalyzerEnabled>false</retireJsAnalyzerEnabled>
</configuration>
</plugin>
</plugins>
</pluginManagement>
I have 9 sub modules, each with the following config:
<plugins>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<configuration>
<suppressionFile>${project.parent.basedir}/owasp-suppressions.xml</suppressionFile>
</configuration>
</plugin>
</plugins>
I am running mvn dependency-check:check
from the top level, but the report appears to only show information from the top-level (parent) project.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
dependency-check:aggregate
Maven Plugin that checks project dependencies and the dependencies of all child modules to ... Fail the build if any dependency has a...
Read more >Sonar Configuration for multi-module project with OWASP ...
Hi, I've multi module project setup. ... sonar-scanner run fine but skip to pick up the dependency check as It always check ...
Read more >Using OWASP Dependency Check with Maven
In this post we will set up OWASP DependencyCheck in a Maven project and test it against the Apache Struts2 vulnerability CVE-2017-5638 that...
Read more >sonar-maven-plugin with multi-module maven - Stack Overflow
Ok, so have contacted the author and the dependency-check-sonar-plugin doesn't work with a multi-module maven project.
Read more >Adding vulnerabilities check on maven or gradle
Maven. For maven, you only have to add the plugin and indicate the goal “check” if we want it to run automatically when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this is why it is called an aggregate, it shows all of your project in 1 aggregate, if it just scanned the paren - which should have no dependencies - your report would be empty
At the moment - there is no way to skip specific children in an aggregate report. Also, without putting inherited=false in the parent you will receive an aggregate report generated for the parent that will contain everything AND an aggregate report for each child (aggregating itself and any of its child poms).
One option to explore would be to setup a profile that excluded the children you don’t want to include and run dependency-check under that profile.