In this section:
OWASP dependency-check is an open source tool that scans Java and .NET projects and identifies the use of known vulnerable components. Parasoft OWASP Dependency Check Pack reads the results the OWASP dependency-check tool and reports vulnerabilities to Parasoft DTP in a standardized format. This enables DTP to present the data in widgets and to provide remediation paths for addressing the vulnerabilities.
Vulnerabilities are reported in DTP as violations of the OWASP Top 10 2021 A6: Vulnerable and Outdated Components guideline. Merging the OWASP Dependency Check Pack data with code analysis results from Parasoft Jtest or dotTEST enables the full implementation of your OWASP security compliance initiative.
DISPLAY
variable must be set and access control must be disabled for the xhost
command (run xhost +
). This is required to ensure that overview images in HTML reports display correctly.The OWASP Dependency Check Pack is shipped with the Parasoft Security Bundle.
For DTP to display the OWASP dependency-check rule documentation, the rules shipped with the OWASP Dependency Check Pack must be copied to the DTP rules directory.
Copy the contents of the <DEPENDENCY_CHECK_INSTALL>/rulesdoc/dependencycheck/ directory to the <DTP_INSTALL>/tomcat/webapps/grs/rulesdoc/ directory.
After copying the rules, documentation associated with OWASP dependency-check violations will be available in DTP interfaces, such as the Documentation tab of the Violations Explorer.
The OWASP Dependency-Check Pack is a separate tool and must connect to DTP to send results to your DTP project. Specify the following settings in the settings.properties file located in the installation directory:
Specifies the host name of the DTP server.
Specifies the DTP port number. Default is 8443
.
Specifies the user name for DTP authentication.
Specifies the user password for DTP authentication. You can encode your DTP password by running the dependency.sh or .bat with the -encodepass
parameter. For example:
./dependencycheck.sh -encodepass=<mypassword>
Specifies the name of the existing DTP project that you want to link to.
Specifies the build that the data should be associated with. For accurate results, the build ID should match the build ID configured in your static analysis tool
If you have not already done so, execute OWASP dependency-check. The results should be output to an XML file. To send these results to Parasoft DTP using OWASP Dependency Check Pack:
Execute the .BAT or .SH script with specifying the OWASP dependency-check results using the -results.file
parameter, e.g.:
./dependencycheck.sh -results.file="/Users/admin/Desktop/dependency_check.xml" |
The -results.file
is the only required parameter, but you can pass the following optional parameters:
-parasoft.local.storage.dir
This settings specifies the location for generated log files. The recommended location is ${project.base.dir}/.dependencycheck
.
For example:
-parasoft.local.storage.dir=.dependencycheck
-settings
By default, the OWASP Dependency Check Pack will reference the settings.properties file in the installation directory, but you can use this setting to point to alternate configuration files. Example:
-settings=C:\my-team-configs\my-settings.properties
After executing the OWASP Dependency Check Pack, results are output in two ways:
As mentioned under Viewing Results above, after executing the OWASP Dependency Check Pack, results are sent to DTP as violations of the OWASP Top 10 2021 A6: Vulnerable and Outdated Components guideline, but you can change this to send them as violations of the OWASP Top 10 2017 A9: Using Components with Known Vulnerabilities guideline instead. To do so, edit the <dependency check pack install folder>\etc\dependencycheck-settings.properties
file in the following manner:
Uncomment the following line:
rules.provider_dependencycheck.data=${env_var:ANALYZER_HOME}/rules/builtin/dependencycheck-owasp-2017-A9-rulesmap.xml |
Comment out the following line:
rules.provider_dependencycheck.data=${env_var:ANALYZER_HOME}/rules/builtin/dependencycheck-owasp-2021-A6-rulesmap.xml |