Fix bandit failure B105 in keystone fernet

>> Issue: [B105:hardcoded_password_string] Possible hardcoded password: '/etc/keystone/fernet-keys'
   Severity: Low Confidence: Medium
      Location: docker/keystone/keystone-fernet/fetch_fernet_tokens.py:27
         More Info: https://bandit.readthedocs.io/en/latest/plugins/b105_hardcoded_password_string.html

Ignore bandit failures on this line.

Change-Id: I9828c23e4bcec7553a69aa5f20e990e0ef0538ea
Closes-Bug: #1828416
(cherry picked from commit e6387634c6)
This commit is contained in:
Mark Goddard 2019-05-09 14:28:21 +01:00
parent 2648c12c8d
commit 2b2218448f
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ import json
import os
import sys
TOKEN_PATH = '/etc/keystone/fernet-keys'
# Adding nosec since this fails bandit B105, 'Possible hardcoded password'.
TOKEN_PATH = '/etc/keystone/fernet-keys' # nosec
def json_exit(msg=None, failed=False, changed=False):