---
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
---
S602 `subprocess` call with `shell=True` seems safe, but may be changed in the future; consider rewriting without `shell`
 --> S602.py:4:1
  |
3 | # Check different Popen wrappers are checked.
4 | Popen("true", shell=True)
  | ^^^^^
5 | call("true", shell=True)
6 | check_call("true", shell=True)
  |

S602 `subprocess` call with `shell=True` seems safe, but may be changed in the future; consider rewriting without `shell`
 --> S602.py:5:1
  |
3 | # Check different Popen wrappers are checked.
4 | Popen("true", shell=True)
5 | call("true", shell=True)
  | ^^^^
6 | check_call("true", shell=True)
7 | check_output("true", shell=True)
  |

S602 `subprocess` call with `shell=True` seems safe, but may be changed in the future; consider rewriting without `shell`
 --> S602.py:6:1
  |
4 | Popen("true", shell=True)
5 | call("true", shell=True)
6 | check_call("true", shell=True)
  | ^^^^^^^^^^
7 | check_output("true", shell=True)
8 | run("true", shell=True)
  |

S602 `subprocess` call with `shell=True` seems safe, but may be changed in the future; consider rewriting without `shell`
 --> S602.py:7:1
  |
5 | call("true", shell=True)
6 | check_call("true", shell=True)
7 | check_output("true", shell=True)
  | ^^^^^^^^^^^^
8 | run("true", shell=True)
  |

S602 `subprocess` call with `shell=True` seems safe, but may be changed in the future; consider rewriting without `shell`
  --> S602.py:8:1
   |
 6 | check_call("true", shell=True)
 7 | check_output("true", shell=True)
 8 | run("true", shell=True)
   | ^^^
 9 |
10 | # Check values that truthy values are treated as true.
   |

S602 `subprocess` call with truthy `shell` seems safe, but may be changed in the future; consider rewriting without `shell`
  --> S602.py:11:1
   |
10 | # Check values that truthy values are treated as true.
11 | Popen("true", shell=1)
   | ^^^^^
12 | Popen("true", shell=[1])
13 | Popen("true", shell={1: 1})
   |

S602 `subprocess` call with truthy `shell` seems safe, but may be changed in the future; consider rewriting without `shell`
  --> S602.py:12:1
   |
10 | # Check values that truthy values are treated as true.
11 | Popen("true", shell=1)
12 | Popen("true", shell=[1])
   | ^^^^^
13 | Popen("true", shell={1: 1})
14 | Popen("true", shell=(1,))
   |

S602 `subprocess` call with truthy `shell` seems safe, but may be changed in the future; consider rewriting without `shell`
  --> S602.py:13:1
   |
11 | Popen("true", shell=1)
12 | Popen("true", shell=[1])
13 | Popen("true", shell={1: 1})
   | ^^^^^
14 | Popen("true", shell=(1,))
   |

S602 `subprocess` call with truthy `shell` seems safe, but may be changed in the future; consider rewriting without `shell`
  --> S602.py:14:1
   |
12 | Popen("true", shell=[1])
13 | Popen("true", shell={1: 1})
14 | Popen("true", shell=(1,))
   | ^^^^^
15 |
16 | # Check command argument looks unsafe.
   |

S602 `subprocess` call with `shell=True` identified, security issue
  --> S602.py:18:1
   |
16 | # Check command argument looks unsafe.
17 | var_string = "true"
18 | Popen(var_string, shell=True)
   | ^^^^^
19 | Popen([var_string], shell=True)
20 | Popen([var_string, ""], shell=True)
   |

S602 `subprocess` call with `shell=True` identified, security issue
  --> S602.py:19:1
   |
17 | var_string = "true"
18 | Popen(var_string, shell=True)
19 | Popen([var_string], shell=True)
   | ^^^^^
20 | Popen([var_string, ""], shell=True)
   |

S602 `subprocess` call with `shell=True` identified, security issue
  --> S602.py:20:1
   |
18 | Popen(var_string, shell=True)
19 | Popen([var_string], shell=True)
20 | Popen([var_string, ""], shell=True)
   | ^^^^^
21 |
22 | # Check dict display with only double-starred expressions can be falsey.
   |

S602 `subprocess` call with truthy `shell` seems safe, but may be changed in the future; consider rewriting without `shell`
  --> S602.py:38:1
   |
37 | # Additional truthiness cases for generator, lambda, and f-strings
38 | Popen("true", shell=(i for i in ()))
   | ^^^^^
39 | Popen("true", shell=lambda: 0)
40 | Popen("true", shell=f"{b''}")
   |

S602 `subprocess` call with truthy `shell` seems safe, but may be changed in the future; consider rewriting without `shell`
  --> S602.py:39:1
   |
37 | # Additional truthiness cases for generator, lambda, and f-strings
38 | Popen("true", shell=(i for i in ()))
39 | Popen("true", shell=lambda: 0)
   | ^^^^^
40 | Popen("true", shell=f"{b''}")
41 | x = 1
   |

S602 `subprocess` call with truthy `shell` seems safe, but may be changed in the future; consider rewriting without `shell`
  --> S602.py:40:1
   |
38 | Popen("true", shell=(i for i in ()))
39 | Popen("true", shell=lambda: 0)
40 | Popen("true", shell=f"{b''}")
   | ^^^^^
41 | x = 1
42 | Popen("true", shell=f"{x=}")
   |

S602 `subprocess` call with truthy `shell` seems safe, but may be changed in the future; consider rewriting without `shell`
  --> S602.py:42:1
   |
40 | Popen("true", shell=f"{b''}")
41 | x = 1
42 | Popen("true", shell=f"{x=}")
   | ^^^^^
   |
