splunk-sdk-python
splunk-sdk-python copied to clipboard
Unverified SSL context
https://github.com/splunk/splunk-sdk-python/blob/f7b41fe918045a827abe7258e5e5fb8700842d77/splunklib/binding.py#L1765
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