Scan Container Vulnerabilities
Request that FortiCNAPP scans (evaluates) for vulnerabilities in the specified container image. Specify the container image by passing in a tag, repository, and registry in the body parameter. You must specify a container image and repository located in a registry domain that has already been integrated with FortiCNAPP.
For registries that are integrated using the FortiCNAPP generic Docker V2 Registry type, vulnerability scans can be started only by calling this API operation.
For registries that are integrated using any FortiCNAPP registry type except "Docker V2 Registry", vulnerability scans start when the container registry is initially integrated, when specified by the default scan schedule, or when this operation is called.
For more information, see https://docs.fortinet.com/document/forticnapp/latest/administration-guide/784472/container-vulnerability-assessment-overview.
For more information about creating an API access key and token to run this operation and using this operation with organization resources, see https://docs.fortinet.com/document/forticnapp/latest/api-reference/932048/api-keys-and-access-tokens.
Usage Example:
curl -X POST -H 'Content-Type: application/json' -d '{ "registry": "index.docker.io", "repository": "yourDockerOrg/yourRepository", "tag": "yourTag" }' "https://YourAccount.lacework.net/api/v2/Vulnerabilities/Containers/scan" -H "Authorization: Bearer YourAPIToken"
In the JSON body, do not prefix the registry or the repository with the http:// string.
This operation returns a unique requestId in the response that you can use to track the status of this scan/assessment.
Headers
Bearer Access Token. For example, "Bearer {YourAPIToken}"
application/json
Request body
Example request
{
"registry": "index.docker.io",
"repository": "yourDockerOrg/yourRepository",
"tag": "yourTag"
}Response
No Error (Request Id and Status)