Skip to content

S501 (request-with-no-cert-validation) does not flag requests.request() with verify=False #23735

@otakart-sv

Description

@otakart-sv

Summary

Description:

ruff check --select S501 correctly flags verify=False on convenience methods (requests.get(), requests.post(), etc.) but misses the same argument on requests.request(), which is the generic method all convenience methods delegate to.

Reproduction:

# Detected
requests.get("https://example.com", verify=False)

# Not detected
requests.request("GET", "https://example.com", verify=False)

Expected: Both calls should trigger S501.

Impact: Code using requests.request() with verify=False silently passes linting

Metadata

Metadata

Assignees

Labels

ruleImplementing or modifying a lint rule

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions