Skip to content

[SDK-30] nosemgrep #626

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion splunklib/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ def connect(scheme, host, port):
if cert_file is not None: kwargs['cert_file'] = cert_file

if not verify:
kwargs['context'] = ssl._create_unverified_context()
kwargs['context'] = ssl._create_unverified_context() # nosemgrep
elif context:
# verify is True in elif branch and context is not None
kwargs['context'] = context
Expand Down
4 changes: 2 additions & 2 deletions tests/test_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def urllib2_handler(url, message, **kwargs):
headers = dict(message.get('headers', []))
req = Request(url, data, headers)
try:
response = urlopen(req, context=ssl._create_unverified_context())
response = urlopen(req, context=ssl._create_unverified_context()) # nosemgrep
except HTTPError as response:
pass # Propagate HTTP errors via the returned response message
return {
Expand Down Expand Up @@ -498,7 +498,7 @@ def urllib2_insert_cookie_handler(url, message, **kwargs):
headers = dict(message.get('headers', []))
req = Request(url, data, headers)
try:
response = urlopen(req, context=ssl._create_unverified_context())
response = urlopen(req, context=ssl._create_unverified_context()) # nosemgrep
except HTTPError as response:
pass # Propagate HTTP errors via the returned response message

Expand Down