Skip to main content

Install the Veracode CLI

You install the Veracode CLI prior to using Veracode Container Security. You can also use this procedure to upgrade the Veracode CLI.

Before you begin:

Meet the Veracode Container Security prerequisites.

To complete this task:

  1. Run this command to install the Veracode CLI in your current working directory:

     curl -fsS | sh

    When the installation completes, this message appears: The Veracode CLI is now installed!

  2. To set your credentials as environment variables, set the VERACODE_API_KEY_ID and VERACODE_API_KEY_SECRET variables to your Veracode API credentials. For example:

    export VERACODE_API_KEY_ID={apiId}
    export VERACODE_API_KEY_SECRET={apiSecretKey}
  3. Run the following command to configure your Veracode API credentials:

    ./veracode configure
  4. When prompted, enter the API ID and secret key you generated in the Veracode Platform.

    If you set your credentials as environment variables, the Veracode CLI pre-populates these fields.

  5. Run a test scan to confirm you have successfully configured Veracode Container Security. For example:

    ./veracode scan --source alpine:latest --type image