API Scan from CloudDefense.AI UI

Modified on Wed, 11 Oct 2023 at 05:30 PM

We support only swagger endpoints for API Scans for now, so if you have any APIs which aren't in swagger, we request you to create a swagger file using those APIs. To run API Scans follow these steps

Step 1: Access to API application

Login to your CloudDefense Instance and click on “Scan” then “Other”. After this select “API”
 

Step 2: Provide Swagger Details

We’ll use https://petstore.swagger.io/v2/swagger.json for testing here (Remember we need json as output not any html website, there is difference between swagger viewer and swagger json)
In App URL you need to provide (Base URL) example - https://petstore.swagger.io/ In JSON Path provide full URL of JSON - https://petstore.swagger.io/v2/swagger.json

Step 3: Scan your API Key

Then click on “Run Scan” and your scan should start. API Scan from CloudDefense CLI guidelines are given below:
a) Install cdefense CLI in your Device using these steps - https://github.com/CloudDefenseAI/cd#installation 
b) Now run below command to run DAST Scan from CLI
cdefense api --api-key=<CLOUDDEFENSE_API_KEY> --url=https://petstore.swagger.io/ --openapi-jsonurl=https://petstore.swagger.io/v2/swagger.json --project-name=example-api-scan --verbose  

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 atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article