-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
s310literal.py
from urllib.request import urlopen
urlopen("http://www.example.com")command:
$ ruff check --select S310 s310literal.py
s310literal.py:3:1: S310 Audit URL open for permitted schemes. Allowing use of `file:` or custom schemes is often unexpected.
Found 1 error.ruff rule S310 suggest
To mitigate this risk, audit all uses of URL open functions and ensure that
only permitted schemes are used (e.g., allowinghttp:andhttps:and
disallowingfile:andftp:).
but in this case there is nothing to check...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working