|
ctx = ssl._create_unverified_context() # nosemgrep |
Unverified SSL context detected. This will permit insecure connections without verifyingSSL certificates. Can this use 'ssl.create_default_context()' instead.
Suggested Change:
if not verify:
# verify=False is an explicit, user-requested opt-out of certificate
# validation (e.g. for self-signed Splunk instances). Build the context
# from the public API rather than the private _create_unverified_context() helper.
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
splunk-sdk-python/splunklib/binding.py
Line 1765 in f7b41fe
Unverified SSL context detected. This will permit insecure connections without verifyingSSL certificates. Can this use 'ssl.create_default_context()' instead.
Suggested Change: