You can use the Veracode Jenkins Plugin to start DynamicDS scans of your application as a post-build action.
The post-build action of creating and starting DynamicDS scans is possible in freestyle or pipeline builds and supports vulnerability rescans.
Configure Veracode Jenkins Settings
To use the Veracode Jenkins Plugin to perform a DynamicDS scan of your application, you must configure additional settings.
- Go to .
- Scroll down to the Veracode Jenkins Plugin section.
- Enter your Veracode API ID and key.
- Select the checkbox in the Fail Build field to force Jenkins to fail the entire build job if the Dynamic Rescan with Veracode action fails. This feature saves you time and enables you to troubleshoot errors more easily.
- In the Default Values section, you can configure Jenkins server environment-type variables
for global application to all Jenkins jobs. These variables include:
- $projectname, which uses the Jenkins server project name for the application name. You can overwrite this value in the individual Jenkins project settings page in the Veracode options section.
- $buildnumber, which changes to the Veracode default scan name.
- Select Run in Debug.
Select to run in debug mode to enable the collection of detailed information about Veracode scans. This data is stored in the console log of each individual Jenkins project.
- Select the Connect using proxy option and provide the specific host, port, username, and password settings for global use in Jenkins.
Configure a Jenkins Job for Dynamic Vulnerability Rescan
- In your project, go to the Post-build Actions section.
- From the Add post-build action dropdown menu, select Dynamic Rescan with Veracode.
- In the popup, in the Application Name field, enter the name of an application that already exists in the Veracode Platform that you want Veracode to scan, or enter $projectname to use the name of the Jenkins project as the application name.
- Select the Vulnerability-only Rescan option if you want to be able to rescan only the vulnerabilities found in a previous full DynamicDS scan.
- Click Apply and Save.
Configure a Jenkins Pipeline Job for Dynamic Vulnerability Rescan
Veracode recommends using a snippet generator to create code snippets for routinely repeated steps in your build/test/deploy pipeline.
- In your project, select Snippet Generator in the sidebar.
- From the dropdown menu in the Sample Step field, select with Credentials: Bind credentials to variables.
- Under Bindings, click Add, and select Username and password (separated).
- Enter your Veracode username and password. Alternatively, you can enter your Veracode API ID in the Username field and your Veracode API key in the password field.
- Optionally, if you have already bound your Veracode credentials, you select them from the menu in the Credentials field.
- Click Generate Groovy.
- Copy this Groovy code into your pipeline and save it.
- Go back to the Snippet Generator, and from the menu in the Sample Step field, select veracode: Dynamic Rescan with Veracode Pipeline.
- In the Application Name field, enter the name of the application you want Veracode to scan.
- In the Credentials Type dropdown menu, select the type of credentials you want to use.
- Depending on which type of credentials you have chosen to use, enter your Veracode username and password or API ID and key.
- Select the Fail Build checkbox if you want the entire Jenkins job to fail if the Dynamic Rescan with Veracode action fails. If you do not select this option, you do not receive any notification if the action fails but the job completes.
- Select the Debug checkbox if you want to display additional information in the console output window, including the supplied credentials.
- Select Connect using proxy, if applicable, and enter the host, port, and username and password.
- Click Generate Pipeline Script.
- Copy the script and insert it into your pipeline.
You can use environment variables to dynamically bind the Jenkins project name to the
application name and the build number to the scan name. When you generate the script, enter the
variables into the script.