Configure a Dynamic Analysis for Internal Scanning

Veracode APIs

Use this code to configure a Dynamic Analysis to run with Veracode Internal Scanning Management (ISM).

To configure an analysis to run with ISM:
  1. Go to https://ui.analysiscenter.veracode.com/mvsa/admin/gateways?depth=1.
  2. Obtain the:
    • Gateway ID by looking for the ref_id corresponding to the gateway name
    • Endpoint ID by looking for the token corresponding to the gateway name
  3. Make a POST call to https://api.veracode.com/was/configservice/v1/analyses to create an analysis, specifying the endpoint and gateway IDs.

The following is an example of a Dynamic Analysis configured for ISM.

{
  "name": "Veracode API ISM",
  "scans": [
    {
      "scan_config_request": {
        "target_url": {
          "url": "http://www.example.com/",
          "http_and_https": true,
          "directory_restriction_type": "DIRECTORY_AND_SUBDIRECTORY"
        }
      },
      "internal_scan_configuration": {
        "enabled": true,
        "gateway_id": "12345678-85b2-4fe2-a633-425418f6a5ef",
        "endpoint_id": "1234abcd-cecc-43e8-a658-6b3447c3e52a"
      }
    }
  ],
  "schedule": {
    "now": true,
    "duration": {
      "length": 1,
      "unit": "DAY"
    }
  }
}