Skip to content

Commit 1ec76b9

Browse files
authored
chore: Deprecate list_whitelisted_cves method (#153)
1 parent 1040694 commit 1ec76b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sdcclient/_scanning.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import re
44
import time
5+
from warnings import warn
56

67
import requests
78
from requests_toolbelt.multipart.encoder import MultipartEncoder
@@ -112,7 +113,14 @@ def list_whitelisted_cves(self):
112113
113114
**Success Return Value**
114115
A JSON object containing all the whitelisted CVEs.
116+
117+
**Deprecated**
118+
This method has been deprecated since the API has changed. Use the
119+
list_vulnerability_exception_bundles and get_vulnerability_exception_bundle methods.
115120
'''
121+
warn("list_whitelisted_cves has been deprecated and doesn't work properly, please use the "
122+
"list_vulnerability_exception_bundles and get_vulnerability_exception_bundle methods",
123+
DeprecationWarning, 3)
116124
url = self.url + "/api/scanning/v1/whitelists/global?bundle=default"
117125
res = requests.get(url, headers=self.hdrs, verify=self.ssl_verify)
118126
if not self._checkResponse(res):

0 commit comments

Comments
 (0)