Major
Detail
Major
Detail
Top-Logic uses a number of third-party libraries. It is far too time-consuming to check manually whether these have security vulnerabilities. This should therefore be automated. The libraries found must then be updated.
Implementation
There is a Maven plugin that checks all dependencies for known security vulnerabilities in the versions used. The check is performed recursively. The list of known vulnerabilities is updated automatically. The plugin itself does not need to be updated every time. The Maven plugin is offered by the "Open Web Application Security Project". It is available under the Apache 2 license. links:
- [https://en.wikipedia.org/wiki/OWASP|OWASP]
- Page]
- [https://jeremylong.github.io/DependencyCheck/dependency-check-maven/index.html|Documentation]
- Documentation]
Usage
- Enter the following in tl-parent-all/pom.xml (under <project><build><plugins>):
{{#!xml <plugin> <groupId>org.owasp</groupId> <artifactId>dependency-check-maven</artifactId> <version>6.5.3</version> <configuration> <format>ALL</format> </configuration> </plugin> }}}
- Execute for all modules: mvn dependency-check:check
- The reports are written to target/dependency-check-[...].
- Update the reported libraries.
- Ensure that the check is automatically executed regularly and that the build fails if it is found: Jenkins target CheckDependencies
Suppression file
In a suppression file, security vulnerabilities are entered that are currently (up to a certain date) no longer to be reported again. Only suppressions with an expiration date should be stored there.
This supports the following workflow: A new vulnerability is detected. The build fails with a report. A ticket is created for the update of this library and a suppression for this vulnerability with an expiration date is entered in the suppression file. The build is then green again. If the ticket has not been processed by the entered expiration date, the check fails again and reminds the user of the outstanding security problem: DependencyCheckSuppressions
Details
When using <format>ALL</format>, the following reports are generated:
- dependency-check-junit.xml
- dependency-check-report.csv
- dependency-check-report.html
- dependency-check-report.json
- dependency-check-report.sarif
- dependency-check-report.xml
The dependency-check-junit.xml file is used to cause a test to fail if a security vulnerability is detected, thereby marking the build as "unstable".
The dependency-check-report.html file contains a detailed report which can also be used to generate a suppression for the suppression file if necessary.
Test
- Run mvn dependency-check:check in all applications.
- No security vulnerabilities may be reported.
- Check that:
- Jenkins runs this check automatically on a regular basis (Target CheckDependencies).
- the corresponding build fails in the event of security vulnerabilities
- we are informed about it.