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:
Run this command to install the Veracode CLI in your current working directory:
curl -fsS https://tools.veracode.com/veracode-cli/install | sh
When the installation completes, this message appears:
The Veracode CLI is now installed!
To set your credentials as environment variables, set the
VERACODE_API_KEY_ID
andVERACODE_API_KEY_SECRET
variables to your Veracode API credentials. For example:export VERACODE_API_KEY_ID={apiId}
export VERACODE_API_KEY_SECRET={apiSecretKey}Run the following command to configure your Veracode API credentials:
./veracode configure
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.
Run a test scan to confirm you have successfully configured Veracode Container Security. For example:
./veracode scan --source alpine:latest --type image