Skip to content

Create a Pipeline Scan command line based on application and policy settings from Veracode

License

Notifications You must be signed in to change notification settings

tjarrettveracode/veracode-pipeline-script-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Veracode Pipeline Script Template

Uses the Veracode APIs to create a starting point for a Pipeline Scan command line that is tailored to an application as already scanned in the Veracode Platform. Requires Python 3.

The script looks at the modules uploaded for the last successful scan of the application to determine if the application is a good candidate for Pipeline Scan, based on the compiler and architecture of each module. It also checks the analysis size as a proxy for the size of the application to make sure the application is not over 100MB.

The template command line will include the filename as well as Severity or CWE rules if those are present for static analysis in the policy attached to the applications.

Setup

Clone this repository:

git clone https://github.com/tjarrettveracode/veracode-pipeline-script-template

Install dependencies:

cd veracode-pipeline-script-template
pip install -r requirements.txt

(Optional) Save Veracode API credentials in ~/.veracode/credentials

[default]
veracode_api_key_id = <YOUR_API_KEY_ID>
veracode_api_key_secret = <YOUR_API_KEY_SECRET>

Run

If you have saved credentials as above you can run:

python vcpipelinescript.py (arguments)

Otherwise you will need to set environment variables before running vcarcher.py:

export VERACODE_API_KEY_ID=<YOUR_API_KEY_ID>
export VERACODE_API_KEY_SECRET=<YOUR_API_KEY_SECRET>
python vcpipelinescript.py (arguments)

Arguments supported include:

  • --application-id, -a : Application ID for the application for which you want a Pipeline Script template.

Output

The script outputs a text file, pipeline_template.txt, based on the latest static scan completed for the application and the policy rules for the policy assigned to the application.

Notes

  1. The script requires a user with the Upload API or Submitter roles as described in the Veracode Help Center
  2. If the application has never had a static scan performed, or the latest results are in an application language not reported by Pipeline Scan, the script returns an error.

About

Create a Pipeline Scan command line based on application and policy settings from Veracode

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages