ruff/crates/ruff_linter/resources/test/fixtures/flake8_bandit
trag1c c2512b4c50
[flake8-bandit] Mark str and list[str] literals as trusted input (S603) (#17136)
## Summary

Closes #17112. Allows passing in string and list-of-strings literals
into `subprocess.run` (and related) calls without marking them as
untrusted input:
```py
import subprocess

subprocess.run("true")

# "instant" named expressions are also allowed
subprocess.run(c := "ls")
```

## Test Plan

Added test cases covering new behavior, passed with `cargo nextest run`.
2025-04-02 11:22:37 -04:00
..
S101.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S102.py [flake8-bandit] Check for builtins instead of builtin (S102, PTH123) (#15443) 2025-01-12 19:45:31 -05:00
S103.py Implement our own small-integer optimization (#7584) 2023-09-25 15:13:21 +00:00
S104.py Use ExprFString for StringLike::FString variant (#10311) 2024-03-14 13:30:22 +05:30
S105.py [flake8-bandit] Check S105 for annotated assignment (#15059) 2024-12-19 12:26:40 +00:00
S106.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S107.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S108.py Use ExprFString for StringLike::FString variant (#10311) 2024-03-14 13:30:22 +05:30
S110.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S112.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S113.py [flake8-bandit] fix S113 false positive for httpx without timeout argument (#12213) 2024-07-06 14:08:40 -05:00
S201.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S202.py [flake8-bandit] Implement tarfile-unsafe-members (S202) (#8829) 2023-11-24 17:46:06 +00:00
S301.py [flake8-bandit] Report all references to suspicious functions (S3) (#15541) 2025-01-20 09:02:53 +00:00
S307.py [flake8-bandit] Report all references to suspicious functions (S3) (#15541) 2025-01-20 09:02:53 +00:00
S308.py [flake8-bandit] Allow raw strings in suspicious-mark-safe-usage (S308) #16702 (#16770) 2025-03-17 11:29:07 +01:00
S310.py [flake8-bandit] Report all references to suspicious functions (S3) (#15541) 2025-01-20 09:02:53 +00:00
S311.py [flake8-bandit] Report all references to suspicious functions (S3) (#15541) 2025-01-20 09:02:53 +00:00
S312.py [flake8-bandit] Report all references to suspicious functions (S3) (#15541) 2025-01-20 09:02:53 +00:00
S324.py [flake8-bandit] Fix mixed-case hash algorithm names (S324) (#16552) 2025-03-07 15:21:07 +00:00
S401.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S401.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S402.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S402.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S403.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S403.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S404.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S404.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S405.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S405.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S406.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S406.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S407.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S407.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S408.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S408.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S409.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S409.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S410.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S410.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S411.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S411.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S412.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S412.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S413.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S413.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S415.py [flake8-bandit] Implement S4XX suspicious import rules (#8831) 2024-01-03 18:26:26 +00:00
S415.pyi [flake8-bandit] Permit suspicious imports within stub files (S4) (#15822) 2025-01-29 23:42:56 -06:00
S501.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S502.py [flake8-bandit] Implement S502 SslInsecureVersion rule (#9390) 2024-01-05 01:27:41 +00:00
S503.py [flake8-bandit] Implement S503 SslWithBadDefaults rule (#9391) 2024-01-05 01:38:41 +00:00
S504.py [flake8-bandit] Add S504 SslWithNoVersion rule (#9384) 2024-01-03 21:56:41 +00:00
S505.py feat(rules): implement flake8-bandit S505 (#7703) 2023-09-28 21:27:37 -04:00
S506.py [flake8-bandit/S506] Dont report violation when SafeLoader is imported from yaml.loader (#9299) 2023-12-28 14:30:46 +00:00
S507.py fix(rules): improve S507 detection (#7661) 2023-09-28 21:35:59 +00:00
S508.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S509.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S601.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S602.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S603.py [flake8-bandit] Mark str and list[str] literals as trusted input (S603) (#17136) 2025-04-02 11:22:37 -04:00
S604.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S605.py [flake8-bandit] Implement upstream updates for S311, S324 and S605 (#10313) 2024-03-11 21:07:58 +00:00
S606.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S607.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S608.py [flake8-bandit] Add missing single-line/dotall regex flag (S608) (#15654) 2025-01-22 10:20:22 +05:30
S609.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S610.py [flake8-bandit]: Implement S610 rule (#10316) 2024-03-11 20:22:02 -04:00
S611.py [flake8-bandit] Implement django-raw-sql (S611) (#8651) 2023-11-20 12:21:12 +00:00
S612.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S701.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
S702.py [flake8-bandit] Implement mako-templates (S702) (#8533) 2023-11-07 20:58:43 +00:00
S704.py [flake8-bandit] Move unsafe-markup-use from RUF035 to S704 (#15957) 2025-03-13 15:37:37 +01:00
S704_extend_markup_names.py [flake8-bandit] Move unsafe-markup-use from RUF035 to S704 (#15957) 2025-03-13 15:37:37 +01:00
S704_skip_early_out.py [flake8-bandit] Move unsafe-markup-use from RUF035 to S704 (#15957) 2025-03-13 15:37:37 +01:00
S704_whitelisted_markup_calls.py [flake8-bandit] Move unsafe-markup-use from RUF035 to S704 (#15957) 2025-03-13 15:37:37 +01:00