CloudDefense.AI CLI

Modified on Wed, 5 Jun at 10:16 PM

CloudDefense.AI's CLI helps you find and fix known vulnerabilities in your dependencies, both on local projects and as part of your CI/CD system.



Installation

Please follow instructions specific to your operating system. 


How to update CLI? 

By just rerunning the command updates the client to latest version. 




Mac

Run the following command which will install cdefense tool.
Prefix with sudo if you see any permission error when running this command 
curl\https://raw.githubusercontent.com/CloudDefenseAI/cd/master/latest/cd-latest-mac-x64.tar.gz > /tmp/cd-latest-mac-x64.tar.gz && tar -C /usr/local/bin -xzf /tmp/cd-latest-mac-x64.tar.gz && chmod +x /usr/local/bin/cdefense 


Linux
Run the following command which will install cdefense tool.


sudo curl\https://raw.githubusercontent.com/CloudDefenseAI/cd/master/latest/cd-latest-linux-x64.tar.gz > /tmp/cd-latest-linux-x64.tar.gz && tar -C /usr/local/bin -xzf /tmp/cd-latest-linux-x64.tar.gz && chmod +x /usr/local/bin/cdefense 


Windows
Download the following tar file and unzip it https://github.com/CloudDefenseAI/cd/raw/master/latest/cd-latest-windows.exe.tar.gz 


Usage

Run the following command to get started. 


cdefense help


NAME: 
Cloud Defense CLI Scanner - CLI for scanning and detecting vulnerabilities in any language 


USAGE:
cdefense [global options] command [command options] [arguments...] 


VERSION:
1.0.1 


COMMANDS:
scan, s SCA scan of a given project and post to Cloud Defense server sast, a SAST scan of a given project and post to Cloud Defense server help, h Shows a list of commands or help for one command 


GLOBAL OPTIONS: 


--help, -h show help (default: false) --version, -v print the version (default: false) 



FULL SCAN

Example of full scan
cdefense online —api-key=<YOU_API_KEY> —repository-url=



Example:


cdefense online --api-key=e497b011-3098-4732-befa-b1c992d2685b --repository-url=https://github.com/CloudDefenseAI/cdefense-backend.git --type=GITHUB



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article