Skip to main content

Installing the DAST CLI in a Pipeline

You can integrate DAST with your favorite CI/CD pipelines. This section explains how the DAST CLI can be installed in a pipeline.

To run a DAST Scan, you need an outbound connection to Checkmarx One so we can upload the results. To do so, we must ensure we can connect to the following IP (for BETA version-> Canary). For more information, see Whitelisting IPs for Checkmarx One's outgoing traffic.

3.126.230.210

3.74.225.192

3.120.214.171

When running the DAST CLI, you have the following available commands/flags available:

Usage:

Glossary

Executes a DAST api scan

Usage:  dast api [flags]

Flags: 

-h, --help             help for api     

--openapi string   path to the openapi file     

--postman string   path to the postman file

Executes a DAST web scan

Usage:  dast web [flags]

Flags:  -h, --help   help for web

Generate a DAST configuration file

Usage:  dast generate [command]

Available Commands:

form-auth

json-auth

no-auth

Flags:

-h, --help   help for generate

Global Flags:

Glossary

--base-url <string>

CxOne Servers base URL.

--config <string>

Path to the config file.

--environment-id <string>

The ID of the environment previously created in the CxOne Frontend.

--fail-on <string>

Lowest severity in the results to fail the execution of the DAST-CLI (all, low, info, medium, high, Critical).

-h, --help

Help for DAST.

--jvm-properties <string> (Default - "-Xmx3G")

Path to the jvm properties file.

--log-level <string> (Default - "info")

Log level.

--output <string>

Path to the output directory.

--proxy-port <string>

Override the proxy port to connect to the target application. (Application under test)

--proxy-url <string>

Override the proxy URL to connect to the target application. (Application under test)

--retry-delay <int> (Default - 20)

Time between retries in seconds, use with --retry.

--retry <int> (Default - 3)

Retry requests to AST on connection failure.

--timeout <int> (Default - 10000)

DAST scan timeout in seconds.

--update-interval <int> (Default - 30)

Update interval in seconds.

--verbose

Print logs to stdout.

The following CI/CD pipelines integrate with DAST:

CI/CD Command

Your DevOps pipeline can include DAST scans and store all of its configuration data in Checkmarx One. This will ensure that every subsequent scan uses the same settings, giving you greater flexibility and making integrating DAST into your workflow easier.

To add your own CI/CD command, at the end of the environment row:

  1. Click Vertical_Ellipsis.png to open the dropdown menu.

    cicd1.png
  2. Select >_ Create CI/CD Command.

  3. A second dropdown will appear with available templates - choose one to open the CI/CD panel.

    cicd2.png

The left side of the panel contains all the template sections. The right side contains the full template, including the Docker command. When you hover over a section on the left, the corresponding parameter in the text will be highlighted on the right.

Click Copy Command when ready.