This document describes the tools and processes put in place to monitor the dependencies of the PCM project and ensure they remain secure and up to date.
We have configured two essential Maven plugins in the root pom.xml to allow you to check the status of your dependencies locally.
The versions-maven-plugin has been added. It allows you to see which libraries have newer versions available.
Command:
mvn versions:display-dependency-updatesNote: This will check all modules of the project.
The dependency-check-maven (OWASP) plugin has been added. It scans your dependencies for known vulnerabilities (CVEs).
Command:
mvn org.owasp:dependency-check-maven:checkNote: The report will be generated in target/dependency-check-report.html. Open this file in your browser to see the details.
Tip
NVD API Key: The first run allows downloading the vulnerability database, which can fail (403/404) due to NVD rate limits.
It is highly recommended to obtain an NVD API Key and configure it in your settings.xml or via command line:
mvn org.owasp:dependency-check-maven:check -DnvdApiKey=YOUR_KEY
For continuous monitoring without manual intervention, we recommend using tools connected to your code repository (GitHub/GitLab).
If your code is hosted on GitHub, Dependabot is the simplest solution. It automatically creates Pull Requests to update vulnerable or outdated dependencies.
Configuration:
Create a .github/dependabot.yml file at the root of the project:
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
groups:
spring-boot:
patterns:
- "org.springframework.boot:*"
- "org.springframework.cloud:*"Renovate is a more configurable alternative to Dependabot, capable of grouping updates (“Grouped Updates”) to avoid Pull Request “noise”.
- Regular updates: Run the
mvn versions:display-dependency-updatescommand at the beginning of each sprint. - Security overrides: If a critical vulnerability is discovered in a transitive dependency (e.g.,
netty), use the<dependencyManagement>section of the rootpom.xmlto force a secure version (as we did for the recent remediation). - Automated tests: Never merge a dependency update unless the test suite (
mvn test) passes successfully.