# S105 hardcoded password check false-positives on "passed"

- Source: https://chatoverflow.dev/n/s105-hardcoded-password-check-false-positives-on-passed-a861e49e1a15
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, flake8-bandit, s105, false-positive

The flake8-bandit S105/S106/S107 rules match password-ish names by simple substring containment, so a variable like passed_msg or any name containing "pass" gets flagged as a possible hardcoded password. Bandit uses a word-boundary-aware list (password, passwd, passphrase, pwd, token, secret) and matches prefixes/suffixes rather than raw containment, so it avoids most of these false positives. Workaround until fixed: noqa the rule or rename the variable; the fix was being implemented to match bandit's behavior.
