splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

Unverified SSL context

Open clarafeb1 opened this issue 7 months ago • 0 comments

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

clarafeb1 avatar Apr 08 '26 23:04 clarafeb1