Methods for CI/CD integration with CLI
CI/CD integration with CLI Now you can start online scans with the new CLI command:
Method 1: Scan repo using our cluster
cdefense online
Options:
cdefense online --api-key={} --repository-url={} --branch-name= {optional} --tag={optional} (You should have ENV variable SCAN_URL=https://console.clouddefenseai. com)
Example:
cdefense online --api-key=76858509-fe91-4969-b57a-decc36d0726a --repository-url=https://github.com/mono/mono --branch-name= example --tag=example (You should have ENV variable SCAN_URL=https://console.clouddefenseai. com)
Command will return exit status 1 if build policy was failed.
Scan private repo
We also support private repositories. To do this you need to provide API key related to account where integration is configured or provide an access token into repository URL:
GitHub:
https://{private-access-token}@github.com/username/repo.git
GitLab:
https://oauth2:{personal-access-token}@gitlab.com/username/repo.git
https://{username}:{password}@gitlab.com/username/repo.git
Azure Repo:
https://{private-access-token}@dev.azure.com/orgname/projectname/_git/repo
Bitbucket:
https://{username}:{access_token}@bitbucket.org/username/repo.git
Example output
Without verbose:
With verbose:
Method 2: Scan repo on your system, but download repo from external (any git)
Example:
Method 3: Scan repo on your system, but copy project from your PC
Example:
Command will push data to console.clouddefenseai.com
Last updated