Cortex CLI usage
To execute a Cortex CLI scan, run:
cortexcli [global flags] [module name] scan [module flags]Command breakdown
cortexcli:
The Cortex CLI binary - a global option. Establishes the execution environment for all subsequent commands
Global flags:
Flags that apply across all supported modules. Place global flags between cortexcli and the module name
--api-base-url <value>--api-key <value>--api-key-id <value>
Additional global flags are supported by the AppSec and CWP modules, but not the WAAS module. Refer to Cortex CLI common command line reference guide for more information.
Module name:
Select the module (environment) to be scanned:
api— API Security. For more information about API Security scans, refer to Cortex CLI for API Securityimage— CWP. For more information about CWP scans, refer to Cortex CLI for Cloud Workload Protectioncode— Application Security. For more information about Application Security refer to Cortex CLI for Code Security
Module flags:
The flags available for the selected command:
For flags common to all environments, refer to Cortex CLI common command line reference guide
For flags specific to CWP refer to Cloud Workload Protection command line reference
For flags specific to API Security, refer to Cortex CLI API Security command line reference guide
For flags specific to Application Security, refer to Cortex CLI Application Security command line reference
Examples
Global flags:
Apply to all modules. Place between cortexcli and the module name:
Global flags common to AppSec and CWP:
Upload mode, exit code handling, and log output. Not supported by WAAS:
AppSec scan:
Scan source code for IaC misconfigurations, SCA vulnerabilities, and secrets:
CWP scan:
Scan a container image for vulnerabilities:
API Security scan:
Scan APIs for security issues. Global flags (other than authentication) are not supported:
Last updated
Was this helpful?
