Using the CLI in my CI/CD pipeline
Using the CLI in my CI/CD pipeline
Table of Contents
The Command Line Interface (CLI) is a nodeJS based tool to enable automation for use cases like CI/CD or other machine to machine type integrations. Using the CLI directly or through a script, you can for example initiate the scan of a repository and await the results.
The CLI uses exit codes to indicate success, errors and whether vulnerabilities were found for a given scan. The potential exit codes returned and their meaning are defined below:
| Exit Code | Meaning |
|---|---|
0 |
Command was successful / No vulnerabilities were found |
1 |
Command resulted in an error |
2 |
Vulnerabilities were found |
Standard Output/Standard Error
Output (e.g. scan results formatted as json) is sent to standard output stdout whereas all other messaging (e.g. status/progress updates, errors, etc.) is sent to standard error stderr. This separation enables you to cleanly pipe or redirect output.