From: Sébastien Helleu Date: Sun, 14 Nov 2021 18:00:55 +0000 (+0100) Subject: Ignore bandit security error about possible hardcoded password X-Git-Url: https://jfr.im/git/irc/weechat/qweechat.git/commitdiff_plain/2a814055fef9f182ee1e3fd7601d80d82bbe2a8c Ignore bandit security error about possible hardcoded password Bandit reports this error: >> Issue: [B105:hardcoded_password_string] Possible hardcoded password: 'init password=%(password)s%(totp)s The password is of course never hardcoded there. --- diff --git a/qweechat/network.py b/qweechat/network.py index f665c22..968c927 100644 --- a/qweechat/network.py +++ b/qweechat/network.py @@ -47,7 +47,7 @@ _HASH_ALGOS = ':'.join(_HASH_ALGOS_LIST) _PROTO_HANDSHAKE = f'(handshake) handshake password_hash_algo={_HASH_ALGOS}\n' # initialize with the password (plain text) -_PROTO_INIT_PWD = 'init password=%(password)s%(totp)s\n' +_PROTO_INIT_PWD = 'init password=%(password)s%(totp)s\n' # nosec # initialize with the hashed password _PROTO_INIT_HASH = ('init password_hash='