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

[flake8-bandit] Add S504 SslWithNoVersion rule #9384

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

qdegraaf
Copy link
Contributor

@qdegraaf qdegraaf commented Jan 3, 2024

Summary

Adds S504 rule for the flake8-bandit plugin port.

Checks for calls to ssl.wrap_socket which have no ssl_version argument set. See also https://bandit.readthedocs.io/en/latest/_modules/bandit/plugins/insecure_ssl_tls.html#ssl_with_no_version

Test Plan

Fixture added

Issue Link

Refers: #1646

@@ -13,7 +13,7 @@ use crate::registry::AsRule;
/// Checks for imports of the`telnetlib` module.
///
/// ## Why is this bad?
/// Telnet is considered insecure. Instead, ise SSH or another encrypted
/// Telnet is considered insecure. Instead, use SSH or another encrypted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work by me!

@charliermarsh charliermarsh added rule Implementing or modifying a lint rule preview Related to preview mode features labels Jan 3, 2024
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@charliermarsh charliermarsh enabled auto-merge (squash) January 3, 2024 21:34
@qdegraaf
Copy link
Contributor Author

qdegraaf commented Jan 3, 2024

Thanks for quick review! Unsure what's up with linux and windows tests, is this a known CI issue?

@charliermarsh
Copy link
Member

@qdegraaf - I think we just had to bump the rule set size.

@charliermarsh charliermarsh merged commit 3b323a0 into astral-sh:main Jan 3, 2024
16 checks passed
Copy link
Contributor

github-actions bot commented Jan 3, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants