Configure a step to resubmit a Dynamic Analysis with pipeline builds
You can add a step to your Jenkins pipeline project for performing a Dynamic Analysis of you application.
Before you begin:
- You meet the prerequisites.
- You have installed the Jenkins Plugin.
- For added security, Veracode highly recommends using the Credentials Binding plugin to manage your credentials. You use the plugin to bind your credentials to environment variables, which prevents your credentials from appearing in the Jenkins interface. See Protect Veracode credentials in Jenkins pipeline builds.
Veracode recommends using a snippet generator to create code snippets for routinely repeated steps in your build/test/deploy pipeline.
To complete this task:
-
In your Jenkins pipeline project, select Configure.
-
Scroll down to the Pipeline section.
-
Select Pipeline Syntax to display the Snippet Generator page.
-
From the Sample Step dropdown menu, select veracodeDynamicAnalysisResubmit: Resubmit Veracode Dynamic Analysis.
-
In the Analysis Name field, enter the name of a Dynamic Analysis that already exists in the Veracode Platform.
-
Enter the maximum duration, in hours, that you want the analysis to run.
-
Select whether to fail the Jenkins build if the analysis fails.
-
Enter your Veracode API credentials.
noteIf your Veracode API credentials are bound to environment variables, you can enter the environment variables for the API ID and API key.
-
Select Run in debug mode to collect detailed information about the analysis. The plugin stores the information in the console log of each Jenkins project.
-
If you are using a proxy host to connect to the Veracode Platform, select Connect using proxy and enter the proxy host information.
-
Select Generate Pipeline Script to generate a script using the selected settings.
This example shows a script using bound credentials. The values for the Veracode API user ID (vid
) and API key (vkey
) are the environment variables that map to the actual credentials in the Jenkins credential store.
veracodeDynamicAnalysisResubmit analysisName: 'Dynamic Analysis Test 2', debug: true, failBuildAsScanFailed: true, maximumDuration: 72, vid: 'VERACODE_API_ID', vkey: 'VERACODE_API_KEY'
- Copy the pipeline script, which you then add to your pipeline project.
- Go back to the main page of your pipeline project.
- Select Configure > Pipeline.
- In the Pipeline section, paste the generated script into the Script field.
- Delete the quotes from around the values for
vid
andvkey
. - Select Save.
Next steps:
Continue to Configure a step to review Dynamic Analysis results with pipeline builds.