You can invoke the CLI using sl:

sl [global options] command [command options] [arguments...]

For Windows PowerShell users:

# Be sure to execute this command from the directory where the sl
# executable is saved. Alternatively, you can provide the relative
# path (i.e., `<path>\sl.exe`)
sl.exe [global options] command [command options] [arguments...]

It accepts the following commands:

analyzeAnalyze applications using NG SAST
check-analysisCheck analysis results against pre-defined build rules
check-environmentCheck local environment to ensure connectivity and installation of required tools
count-linesCount the lines of code in a given directory
ocularStart Ocular
policyManage custom policies
remediationSuppress findings
subscriptionGet subscription information
updateUpdate CLI components

Some commands accept additional options, and some command-related information can be stored as environment variables for easy reuse in future analyses. See the linked sections for further details.

Global Options

You can use the following global options with any sl command.

OptionEnvironment VariableDescription
--diagnosticSHIFTLEFT_DIAGNOSTICAllows the submission of diagnostic data to ShiftLeft
--help, -hList CLI commands and accepted options
--no-auto-updateSHIFTLEFT_NO_AUTO_UPDATE=trueDisables automatic updating of the CLI
--no-diagnosticSHIFTLEFT_NO_DIAGNOSTIC=trueDisables the submission of diagnostic data; this is the default setting
--updates-download-timeout <timeout>SHIFTLEFT_UPDATES_DOWNLOAD_TIMEOUT=<timeout>Timeout (e.g. '15m') userd when downloading updates; if this isn't set, the CLI applies no timeouts
--updates-read-timeout <timeout>SHIFTLEFT_UPDATES_READ_TIMEOUT=<timeout>Idle timeout (e.g. '30s') used when downloading data updates; if this isn't set, the CLI applies no timeouts. Default: 3 minutes (3m0s)
--verboseSHIFTLEFT_VERBOSE=trueVerbose mode
--version, -vDisplays the ShiftLeft CLI version
Nonehttps_proxy=<proxy>Proxy configuration