Fix APIs in Visual Studio
In Microsoft Visual Studio (VS), the OpenAPI (Swagger) Editor extension makes creating and navigating API definitions quicker and easier, and you can run Security Audit directly from the editor. You can fix the issues that Security Audit found and then upload the updated API definition to 42Crunch Platform.
The issues represent real concerns and security risks in your API definition, and they may either prevent API Protection completely, or severely impact its quality. We highly recommend that you fix all found issues.
(missing or bad snippet)Upload updated APIs to the platform
After you have edited the API definition of your API in VS, you can upload the updated API definition to 42Crunch Platform without reimporting the API.
Uploading a new API definition for an imported API overwrites the API definition currently stored in 42Crunch Platform. If you have also edited the API definition in Security Editor, these changes are lost if you have not included them in the file you are uploading.
- Go to the API you want to update, and click > Update definition.
- Select the file to upload.
- Click Update definition.
The API definition of the API you selected in 42Crunch Platform is replaced with the one you uploaded. Security Audit audits the uploaded API definition and recalculates the audit score for the API.
Uploading an OpenAPI definition changes the format (JSON or YAML) of the API in the platform to match the uploaded file. If you upload a .json file, the API definition in the platform will now be in JSON format. Same applies uploading a YAML file. You can switch between the JSON and YAML format as needed, see Convert APIs.
You can also integrate Security Audit with your CI/CD pipeline so that any changes to APIs in your project are automatically audited for security. For more details, see CI/CD integration.