Skip to content

refactor: Deprecate list_whitelisted_cves #153

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Oct 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions sdcclient/_scanning.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import re
import time
from warnings import warn

import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
Expand Down Expand Up @@ -112,7 +113,14 @@ def list_whitelisted_cves(self):

**Success Return Value**
A JSON object containing all the whitelisted CVEs.

**Deprecated**
This method has been deprecated since the API has changed. Use the
list_vulnerability_exception_bundles and get_vulnerability_exception_bundle methods.
'''
warn("list_whitelisted_cves has been deprecated and doesn't work properly, please use the "
"list_vulnerability_exception_bundles and get_vulnerability_exception_bundle methods",
DeprecationWarning, 3)
url = self.url + "/api/scanning/v1/whitelists/global?bundle=default"
res = requests.get(url, headers=self.hdrs, verify=self.ssl_verify)
if not self._checkResponse(res):
Expand Down