Skip to content

[flake8-bandit] Add S504 SslWithNoVersion rule#9384

Merged
charliermarsh merged 4 commits intoastral-sh:mainfrom
qdegraaf:rule/S504
Jan 3, 2024
Merged

[flake8-bandit] Add S504 SslWithNoVersion rule#9384
charliermarsh merged 4 commits intoastral-sh:mainfrom
qdegraaf:rule/S504

Conversation

@qdegraaf
Copy link
Copy Markdown
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

///
/// ## 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@github-actions
Copy link
Copy Markdown
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