Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

urllib.urlopen does not exist in Python 3 #998

Closed
Closed
urllib.urlopen does not exist in Python 3#998
Assignees
Labels
bugSomething isn't working

Description

Describe the bug

The blacklist calls plugin checks for urllib usage. Specifically it checks for functions that don't exist in Python 3. Namely these:

  • urllib.urlopen
  • urllib.urlretrieve
  • urllib.URLopener
  • urllib.FancyURLopener

These also don't exist in Python 3:

  • urllib2.urlopen
  • urllib2.Request

Reproduction steps

1. Read through https://docs.python.org/3/library/urllib.html
2. Compare with what was available in Python 2.7 https://docs.python.org/2.7/library/urllib.html

Expected behavior

I expect that we shouldn't have to test for old Python 2 modules when Bandit no longer supports Python2.

Bandit version

1.7.5 (Default)

Python version

3.7

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions