Skip to content
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

Blacklist call B309 not relevant any longer #857

Closed
ericwb opened this issue Mar 18, 2022 · 0 comments · Fixed by #858
Closed

Blacklist call B309 not relevant any longer #857

ericwb opened this issue Mar 18, 2022 · 0 comments · Fixed by #858
Labels
bug Something isn't working

Comments

@ericwb
Copy link
Member

ericwb commented Mar 18, 2022

Describe the bug

B309 blacklist call checks for HTTPSConnection usage which was insecure in Python version prior to 2.7.9 and 3.4.3 because it didn't check certificate or hostnames. However, Bandit only supports a minimum of Python 3.7 now.

https://docs.python.org/3.5/library/http.client.html#http.client.HTTPSConnection

Reproduction steps

1. See https://docs.python.org/3.5/library/http.client.html#http.client.HTTPSConnection
2. Notice the comments in https://github.com/PyCQA/bandit/blob/main/bandit/blacklists/calls.py#L492 on versions affected.

Expected behavior

I expect there is no longer a need for this check.

Bandit version

1.7.4 (Default)

Python version

3.10 (Default)

Additional context

No response

@ericwb ericwb added the bug Something isn't working label Mar 18, 2022
ericwb added a commit that referenced this issue Mar 19, 2022
This check existed because of insufficient checking of certificates
when using httpsconnection. Since 3.4.3, this has been fixed. And
since Bandit supports 3.7+, there is no longer a need to scan for
this.

Closes #857

Signed-off-by: Eric Brown <browne@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant