Use Plerion Code security IaC to scan for security vulnerabilities and compliance issues.
Use the following command to upload your IaC files to the Plerion Code security IaC scanning queue:
export PLERION_API_KEY=YOUR_API_KEY
curl --request POST \
--location 'https://au.api.plerion.com/v1/tenant/shiftleft/iac/scan?artifactName=YOUR-ARTIFACT-NAME.zip' \
--header "Authorization: Bearer $PLERION_API_KEY" \
--header 'Content-Type: application/zip' \
--data-binary '@/Users/example.user/examples-iac/terraform.zip'
Replace YOUR_API_KEY
with your actual API key and /Users/example.user/examples-iac/terraform.zip
with the actual path to your zip file.
After receiving a 202 message, retrieve the scanId and proceed to check the results by repeatedly polling the findings endpoint with exponential backoff until the data field is not empty.
This endpoint supports the following public cloud platforms and IaC templates:
Please note that this API endpoint has following limitations:
To work around these limitations, please consider the following:
Note: If you encounter the error code “x422Z” while using cURL, it’s possible that the error is related to missing the ”@” symbol when specifying the file path in the —data or —data-binary option. To resolve this error, you should double-check that you have included the ”@” symbol before the file path when uploading files with cURL.
Bearer API Key. For example, "Bearer {Tenant API Key}"
Bearer API Key. For example, "Bearer {Tenant API Key}"
application/zip
Name of the artifact being scanned (e.g. my-iac.zip)
"my-iac.zip"
The body is of type file
.
Accepted
The response is of type object
.