Skip to main content

Veracode Scanner Reference

Veracode is a popular tool for scanning code repos for security issues and vulnerabilities. Veracode performs dynamic (automated penetration test) and static (automated code review) code analysis and finds security vulnerabilities that include malicious code as well as the absence of functionality that can lead to security breaches.


  • Before you can ingest scan results, you must perform all the Veracode prerequisites for the repo that you're scanning. If you're scanning a Java repo, for example, the Veracode documentation outlines the specific packaging and compilation requirements for scanning your Java applications.
    For specific requirements, got to the Veracode docs and search for Veracode Packaging Requirements.
  • You also need access credentials so that STO can communicate with your Veracode instance. Harness recommends using API keys, not usernames and passwords, for your Veracode integrations
    For instructions, go to the Veracode docs and search for Generate Veracode API Credentials.
    Harness recommends you create text secrets for your authentication credentials — password, API key, API secret key, etc. — and access your secrets using <+secrets.getValue("<my_secret>")>.
  • The Veracode - Automated Data Load and Veracode - Activate Scenario blog posts include useful information about how to ingest Veracode scan results into Harness.

Required Settings

  • product_name = veracode
  • scan_typerepository
  • policy_type — STO supports the following scan policy types for Veracode:
    • orchestratedScan  — A Security step in the pipeline runs the scan and ingests the results. This is the easiest to set up and supports scans with default or predefined settings. See Run an Orchestrated Scan in an STO Pipeline.
    • ingestionOnly — Run the scan in a Run step, or outside the pipeline, and then ingest the results. This is useful for advanced workflows that address specific security needs. See Ingest scan results into an STO pipeline.
    • dataLoad — A Security step downloads and ingests results from an external scanner.
  • product_config_name = default
  • repository_project — The name of the repo that gets scanned as shown in the Veracode UI. You use the Codebase Config object in the Harness pipeline to determine the URL of the repo to scan.
    In most cases, this should match the repo name used in your Git provider.
  • repository_branch — The branch that gets reported in STO for the ingested results. You can specify a hardcoded string or use the runtime variable <+codebase.branch>. This sets the branch based on the user input or trigger payload at runtime.
    In most cases, this field should match the name of Git branch that is getting scanned.
  • product_auth_type
    • apiKey — Recommended.
      Go to the Veracode docs and search for Generate Veracode API Credentials.
    • usernamePassword— Not recommended.
  • product_access_id
    • For usernamePassword authentication, this is your username.
    • For apiKey authorization, this is your API key.
  • product_access_token
    • For usernamePassword authentication, this is your password.
    • For apiKey authorization, this is your API Secret key.
  • product_app_id  — The Veracode GUID, separated with hyphens, for the target application.
    To determine the App Id, go to the home page for the Veracode app with the results you want to scan. The App Id is the string immediately after the port number in the URL. Thus, for the following app, you would specify 1973759.
  • product_project_name— The Veracode project with the scan results you want to ingest.
    The Veracode - Automated Data Load blog post describes how you can find your application Id's and project names.