For the complete documentation index, see llms.txt. This page is also available as Markdown.

CLI Options for Local image scanning

Image Scanning CLI options:

Usage: aikido-local-scanner image-scan [options] <image>

Run an image scan.

Arguments:
  image                            The image you want to scan.

Options:
  --apikey <apikey>                Apikey to send scanning results to Aikdo.  (env: AIKIDO_API_KEY)
  --platform <platform>            Set platform (to pull arm64 image on a amd64 system for example)
  --image-name <name>              Specify a name for the scanned image. This overwrites the default behaviour of deducting the image name from the <image> argument. Can be used to specify a descriptive name if the image name is not.
  --tag <tag>                      Specify a tag for the scanned image for reporting purposes. This overwrites the default behaviour of deducting the tag from the <image> or <image-name> argument.
  --debug                          Add additional debug information to command output.
  --fail-on <severity>             Runs scanner in gating mode and fails on the given severity or higher. (choices: "low", "medium", "high", "critical")
  --gating-mode <mode>             Indicate whether the scanner should run in release or PR gating mode. Release gating mode scans your main branch and waits to see if there are any issues that should prevent release, in pull request mode, Aikido seeks ONLY new vulnerabilities introduced in a branch. You must supply a base and head commit for the comparison to work. Should be combined with the --fail-on flag (choices: "release", "pr", default: "release")
  --sla-mode                       In release gating mode, only fail the gate on issues that are out of SLA.
  --base-commit-id <commit-id>     Base commit id, this is the commit that Aikido will compare against to determine if a finding is new. Only used for PR gating mode.
  --head-commit-id <commit-id>     Head commit id, the commit that is being scanned. Only used for PR gating mode.
  --gating-result-output <output>  JSON file to write issues to (when running in gating mode only)
  --no-fail-on-timeout             Do not fail the process in case the scan result polling times out (release gating mode only)
  --max-polling-attempts <amount>  Amount of times to poll for scan results, increase this if the default value of 20 is not enough (release gating mode only)
  --linked-team-name <name>        Team name to link the image to.
  --force-create-image-for-tag     Create a new image in Aikido with the tag instead of updating the tag on existing image.
  --scan-timeout <timeout>         Timeout in milliseconds for each scan (defaults to 900000ms).
  --output-cyclonedx-json <output> JSON file to write CycloneDX JSON SBOM to.
  --enable-proxy                   Uses HTTPS_PROXY environment variable to proxy requests.
  --ca-bundle <path>               Path to a PEM file containing custom root CA(s) to trust when using --enable-proxy. (env: AIKIDO_CA_BUNDLE)
  --linked-repository-name <name>  Repository name to link the image to.
  -h, --help                       display help for command

For repository scanning CLI options, see here.

Common use cases

Below you can find some example configurations of common use cases.

I want to run an image scan

I want to run an image scan and link the image to team "Cloud Team"

I want to run a repository scan and link the repository to teams "Dev Team 1" and "Dev Team 2"

I want to run an image scan and output the SBOM to a JSON file

Last updated

Was this helpful?