---
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
---
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
 --> S108.py:5:11
  |
3 |     f.write("def")
4 |
5 | with open("/tmp/abc", "w") as f:
  |           ^^^^^^^^^^
6 |     f.write("def")
  |

S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
 --> S108.py:8:13
  |
6 |     f.write("def")
7 |
8 | with open(f"/tmp/abc", "w") as f:
  |             ^^^^^^^^
9 |     f.write("def")
  |

S108 Probable insecure usage of temporary file or directory: "/var/tmp/123"
  --> S108.py:11:11
   |
 9 |     f.write("def")
10 |
11 | with open("/var/tmp/123", "w") as f:
   |           ^^^^^^^^^^^^^^
12 |     f.write("def")
   |

S108 Probable insecure usage of temporary file or directory: "/dev/shm/unit/test"
  --> S108.py:14:11
   |
12 |     f.write("def")
13 |
14 | with open("/dev/shm/unit/test", "w") as f:
   |           ^^^^^^^^^^^^^^^^^^^^
15 |     f.write("def")
   |

S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
  --> S108.py:22:11
   |
21 | # Implicit string concatenation
22 | with open("/tmp/" "abc", "w") as f:
   |           ^^^^^^^^^^^^^
23 |     f.write("def")
   |

S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
  --> S108.py:25:11
   |
23 |     f.write("def")
24 |
25 | with open("/tmp/abc" f"/tmp/abc", "w") as f:
   |           ^^^^^^^^^^
26 |     f.write("def")
   |

S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
  --> S108.py:25:24
   |
23 |     f.write("def")
24 |
25 | with open("/tmp/abc" f"/tmp/abc", "w") as f:
   |                        ^^^^^^^^
26 |     f.write("def")
   |
