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

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

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

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

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

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

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

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

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

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

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

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