PaloAltoNetworks / pan.dev

Palo Alto Networks for Developers
https://pan.dev
MIT License
41 stars 56 forks source link

Issue/Help with "Get CI Image Vulnerability Policy" #406

Open ovasilko opened 1 year ago

ovasilko commented 1 year ago

Documentation link

https://pan.dev/prisma-cloud/api/cwpp/get-policies-vulnerability-ci-images/

Describe the problem

when using the following API: /api/v30.01/policies/vulnerability/ci/images for getting CI vulnerability rules for the images, I do not see rules[x]/condition/vulnerabilities array to be populated, it is always empty array:

"condition": {
                "readonly": false,
                "device": "",
                "vulnerabilities": []
            },

Path rules[x]/condition/vulnerabilities

In the same time according to "Example (from schema)" on this page https://pan.dev/prisma-cloud/api/cwpp/get-policies-vulnerability-ci-images/ - this array should contain some information:

"condition": {
        "device": "string",
        "readonly": true,
        "vulnerabilities": [
          {
            "block": true,
            "id": 0
          }
        ]
},

Side notes: no such problem for /api/v30.01/policies/compliance/ci/images as vulnerabilities arrays are populated correctly

Could you please confirm if it is expected or an issue?

Suggested fix

include information about rules[x]/condition/vulnerabilities into response for /api/v30.01/policies/vulnerability/ci/images

welcome-to-palo-alto-networks[bot] commented 1 year ago

:tada: Thanks for opening your first issue here! Welcome to the community!

ovasilko commented 1 year ago

hi PaloAltoNetworks Team, maybe you can suggest regarding this ticket whether this is expected behavior and documentation is to be updated or this is some kind of bug in data from API and vulnerabilities array expected to be non empty