Update CI Image Vulnerability Policy
PUT/api/v32.07/policies/vulnerability/ci/images
x-prisma-cloud-target-env: {"permission":"policyContainers"}
Updates the policy for images scanned in your continuous integration (CI) pipeline. All rules in the policy are updated in a single shot.
The policy set in this endpoint is enforced by the scanners in the Jenkins plugin and the twistcli
command line tool.
This endpoint maps to the policy table in Defend > Vulnerabilities > Images > CI in the Console UI.
cURL Request
Refer to the following example cURL command that overwrites all rules in your current policy with a new policy that has a single rule:
$ curl 'https://<CONSOLE>/api/v<VERSION>/policies/vulnerability/ci/images' \
-X PUT \
-u <USER> \
-H 'Content-Type: application/json' \
-d \
'{
"rules": [
{
"name": "<RULE_NAME>",
"collections":[
{
"name":"<COLLECTION_NAME>",
}
],
"alertThreshold":{
"disabled":false,
"value":4
},
"blockThreshold":{
"enabled":false,
"value":0
},
...
}
],
"policyType": "ciImagesVulnerability"
...
}'
Note: No response will be returned upon successful execution.
Request
Responses
- 200
- default
OK