Skip to content

Commit 1634ad0

Browse files
author
Néstor Salceda
authored
Merge pull request #124 from draios/add-list-cve-whitelist
Add list_whitelisted_cves method
2 parents 67ded29 + ba60d51 commit 1634ad0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

sdcclient/_scanning.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,23 @@ def list_images(self):
103103

104104
return [True, res.json()]
105105

106+
def list_whitelisted_cves(self):
107+
'''**Description**
108+
List the whitelisted global CVEs.
109+
110+
**Arguments**
111+
- None
112+
113+
**Success Return Value**
114+
A JSON object containing all the whitelisted CVEs.
115+
'''
116+
url = self.url + "/api/scanning/v1/whitelists/global?bundle=default"
117+
res = requests.get(url, headers=self.hdrs, verify=self.ssl_verify)
118+
if not self._checkResponse(res):
119+
return [False, self.lasterr]
120+
121+
return [True, res.json()]
122+
106123
def query_image_content(self, image, content_type=""):
107124
'''**Description**
108125
Find the image with the tag <image> and return its content.

0 commit comments

Comments
 (0)