-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
322 additions
and
21 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S403.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
import dill # S403 | ||
from dill import objects # S403 | ||
import shelve | ||
from shelve import open | ||
import cPickle | ||
from cPickle import load | ||
import pickle | ||
from pickle import load |
2 changes: 1 addition & 1 deletion
2
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S410.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import lxml # S410 | ||
from lxml import etree # S410 | ||
from lxml import etree # S410 |
6 changes: 3 additions & 3 deletions
6
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S412.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import wsgiref.handlers # S413 | ||
from twisted.internet import reactor # S413 | ||
from twisted.web import static, server, twcgi # S413 | ||
import wsgiref.handlers # S412 | ||
from twisted.internet import reactor # S412 | ||
from twisted.web import static, server, twcgi # S412 |
3 changes: 3 additions & 0 deletions
3
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S415.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import pyghmi # S415 | ||
from pyghmi import foo # S415 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S401_S401.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs | ||
--- | ||
S401.py:1:8: S401 `telnetlib` and related modules are considered insecure. Use SSH or some other encrypted protocol | ||
| | ||
1 | import telnetlib # S401 | ||
| ^^^^^^^^^ S401 | ||
2 | from telnetlib import Telnet # S401 | ||
| | ||
|
||
S401.py:2:6: S401 `telnetlib` and related modules are considered insecure. Use SSH or some other encrypted protocol | ||
| | ||
1 | import telnetlib # S401 | ||
2 | from telnetlib import Telnet # S401 | ||
| ^^^^^^^^^ S401 | ||
| | ||
|
||
|
18 changes: 18 additions & 0 deletions
18
...rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S402_S402.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs | ||
--- | ||
S402.py:1:8: S402 `ftplib` and related modules are considered insecure. Use SSH/SFTP/SCP or some other encrypted protocol | ||
| | ||
1 | import ftplib # S402 | ||
| ^^^^^^ S402 | ||
2 | from ftplib import FTP # S402 | ||
| | ||
|
||
S402.py:2:6: S402 `ftplib` and related modules are considered insecure. Use SSH/SFTP/SCP or some other encrypted protocol | ||
| | ||
1 | import ftplib # S402 | ||
2 | from ftplib import FTP # S402 | ||
| ^^^^^^ S402 | ||
| | ||
|
||
|
78 changes: 78 additions & 0 deletions
78
...rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S403_S403.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs | ||
--- | ||
S403.py:1:8: S403 `pickle`, `cPickle`, `dill` and `shelve` modules are possibly insecure | ||
| | ||
1 | import dill # S403 | ||
| ^^^^ S403 | ||
2 | from dill import objects # S403 | ||
3 | import shelve | ||
| | ||
|
||
S403.py:2:6: S403 `pickle`, `cPickle`, `dill` and `shelve` modules are possibly insecure | ||
| | ||
1 | import dill # S403 | ||
2 | from dill import objects # S403 | ||
| ^^^^ S403 | ||
3 | import shelve | ||
4 | from shelve import open | ||
| | ||
|
||
S403.py:3:8: S403 `pickle`, `cPickle`, `dill` and `shelve` modules are possibly insecure | ||
| | ||
1 | import dill # S403 | ||
2 | from dill import objects # S403 | ||
3 | import shelve | ||
| ^^^^^^ S403 | ||
4 | from shelve import open | ||
5 | import cPickle | ||
| | ||
|
||
S403.py:4:6: S403 `pickle`, `cPickle`, `dill` and `shelve` modules are possibly insecure | ||
| | ||
2 | from dill import objects # S403 | ||
3 | import shelve | ||
4 | from shelve import open | ||
| ^^^^^^ S403 | ||
5 | import cPickle | ||
6 | from cPickle import load | ||
| | ||
|
||
S403.py:5:8: S403 `pickle`, `cPickle`, `dill` and `shelve` modules are possibly insecure | ||
| | ||
3 | import shelve | ||
4 | from shelve import open | ||
5 | import cPickle | ||
| ^^^^^^^ S403 | ||
6 | from cPickle import load | ||
7 | import pickle | ||
| | ||
|
||
S403.py:6:6: S403 `pickle`, `cPickle`, `dill` and `shelve` modules are possibly insecure | ||
| | ||
4 | from shelve import open | ||
5 | import cPickle | ||
6 | from cPickle import load | ||
| ^^^^^^^ S403 | ||
7 | import pickle | ||
8 | from pickle import load | ||
| | ||
|
||
S403.py:7:8: S403 `pickle`, `cPickle`, `dill` and `shelve` modules are possibly insecure | ||
| | ||
5 | import cPickle | ||
6 | from cPickle import load | ||
7 | import pickle | ||
| ^^^^^^ S403 | ||
8 | from pickle import load | ||
| | ||
|
||
S403.py:8:6: S403 `pickle`, `cPickle`, `dill` and `shelve` modules are possibly insecure | ||
| | ||
6 | from cPickle import load | ||
7 | import pickle | ||
8 | from pickle import load | ||
| ^^^^^^ S403 | ||
| | ||
|
||
|
28 changes: 28 additions & 0 deletions
28
...rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S404_S404.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs | ||
--- | ||
S404.py:1:8: S404 `subprocess` module is possibly insecure | ||
| | ||
1 | import subprocess # S404 | ||
| ^^^^^^^^^^ S404 | ||
2 | from subprocess import Popen # S404 | ||
3 | from subprocess import Popen as pop # S404 | ||
| | ||
|
||
S404.py:2:6: S404 `subprocess` module is possibly insecure | ||
| | ||
1 | import subprocess # S404 | ||
2 | from subprocess import Popen # S404 | ||
| ^^^^^^^^^^ S404 | ||
3 | from subprocess import Popen as pop # S404 | ||
| | ||
|
||
S404.py:3:6: S404 `subprocess` module is possibly insecure | ||
| | ||
1 | import subprocess # S404 | ||
2 | from subprocess import Popen # S404 | ||
3 | from subprocess import Popen as pop # S404 | ||
| ^^^^^^^^^^ S404 | ||
| | ||
|
||
|
18 changes: 18 additions & 0 deletions
18
...rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S410_S410.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs | ||
--- | ||
S410.py:1:8: S410 `lxml` is vulnerable to XML attacks | ||
| | ||
1 | import lxml # S410 | ||
| ^^^^ S410 | ||
2 | from lxml import etree # S410 | ||
| | ||
|
||
S410.py:2:6: S410 `lxml` is vulnerable to XML attacks | ||
| | ||
1 | import lxml # S410 | ||
2 | from lxml import etree # S410 | ||
| ^^^^ S410 | ||
| | ||
|
||
|
18 changes: 18 additions & 0 deletions
18
...rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S411_S411.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs | ||
--- | ||
S411.py:1:8: S411 XMLRPC is particularly dangerous as it is also concerned with communicating data over a network | ||
| | ||
1 | import xmlrpc # S411 | ||
| ^^^^^^ S411 | ||
2 | from xmlrpc import server # S411 | ||
| | ||
|
||
S411.py:2:6: S411 XMLRPC is particularly dangerous as it is also concerned with communicating data over a network | ||
| | ||
1 | import xmlrpc # S411 | ||
2 | from xmlrpc import server # S411 | ||
| ^^^^^^ S411 | ||
| | ||
|
||
|
Oops, something went wrong.