)]}'
{"bandit/plugins/general_hardcoded_password.py":[{"author":{"_account_id":11716,"name":"Tim Kelsey","email":"timothy.kelsey@uk.ibm.com","username":"tkelsey"},"change_message_id":"91ef62ccd282528b6bab6341b5f677c61b554f9e","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    except (OSError, IOError):"},{"line_number":57,"context_line":"        logger.error(\"Could not open word_list (from config\""},{"line_number":58,"context_line":"                     \" file): %s\" % word_list_file)"},{"line_number":59,"context_line":"        sys.exit(2)"},{"line_number":60,"context_line":"    else:"},{"line_number":61,"context_line":"        for word in f:"},{"line_number":62,"context_line":"            word_list.append(word.strip())"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_d69a4f14","line":59,"updated":"2015-07-13 10:15:28.000000000","message":"please raise an exception here instead of exiting. This will log the error to the bandit output but allow other functional plugins to continue working.","commit_id":"40cc77f634cfbed69ee51a2834dcb499dc11621c"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"8fae92705d72fc02d9cb3affa7dba79340f0b05d","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def find_word_list(cfg_word_list_f):"},{"line_number":26,"context_line":"    if type(cfg_word_list_f) \u003d\u003d str:"},{"line_number":27,"context_line":"        if \"(site_data_dir)\" in cfg_word_list_f:"},{"line_number":28,"context_line":"            # We have a substitution to deal with"},{"line_number":29,"context_line":"            site_data_dir_list \u003d site_data_dir(\"bandit\", \"\","}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_e4faf074","line":26,"updated":"2015-07-14 15:42:16.000000000","message":"This shouldn\u0027t be done this way. We should be doing\n\n    if not isinstance(cfg_word_list_f, str):\n        return None\n\n    try:\n        cfg_word_list_f % {\u0027site_data_dir\u0027: \u0027\u0027}\n    except TypeError:\n        return cfg_word_list_f\n\n    site_data_dirs \u003d [\u0027.\u0027] + appdirs.site_data_dir(\"bandit\", \"\", multipath\u003dTrue).split(\u0027:\u0027)\n    # Inserts and appends are slow iirc, let\u0027s avoid them\n\n    for dir in site_data_dirs:\n        word_list_path \u003d cfg_word_list_f % {\u0027site_data_dir\u0027: dir}\n        if os.path.isfile(word_list_path):\n            return word_list_path\n\n    raise RuntimeError(...)","commit_id":"3e60a3c9762f57cbabc69151f37f131dd6b0565d"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"8fae92705d72fc02d9cb3affa7dba79340f0b05d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"            site_data_dir_list.insert(0, \".\")  # Support relative substitution"},{"line_number":32,"context_line":"            for f in site_data_dir_list:"},{"line_number":33,"context_line":"                # check each of the locations for a file"},{"line_number":34,"context_line":"                word_list_f \u003d cfg_word_list_f.replace(\"(site_data_dir)\", f)"},{"line_number":35,"context_line":"                if os.path.isfile(word_list_f):"},{"line_number":36,"context_line":"                    return word_list_f"},{"line_number":37,"context_line":"            raise RuntimeError(\"Could not substitute \u0027(site_data_dir)\u0027 \""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_e4fbd0bf","line":34,"updated":"2015-07-14 15:42:16.000000000","message":"Why aren\u0027t we using\n\n    hardcoded_password:\n      word_list: %(site_data_dir)s/wordlist/default-passwords\n\nAnd then simply doing\n\n    word_list_f \u003d cfg_word_list_f % {\u0027site_data_dir\u0027: f}","commit_id":"3e60a3c9762f57cbabc69151f37f131dd6b0565d"},{"author":{"_account_id":11029,"name":"Jamie Finnigan","email":"jamiefinnigan@gmail.com","username":"jamiefinnigan"},"change_message_id":"d23937741b65d2971264f9f526659e35eb6fa668","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        if os.path.isfile(word_list_path):"},{"line_number":39,"context_line":"            if dir \u003d\u003d \".\":"},{"line_number":40,"context_line":"                warnings.warn(\"Using relative path for word_list: %s\""},{"line_number":41,"context_line":"                              % word_list_path)"},{"line_number":42,"context_line":"            return word_list_path"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    raise RuntimeError(\"Could not substitute \u0027%(site_data_dir)s\u0027 \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_856f422a","line":41,"updated":"2015-07-15 04:31:54.000000000","message":"The usage of warnings.warn() changes the look of the bandit output.  The warning doesn\u0027t quite look \u0027right\u0027 compared with the logger entries above it.  I\u0027d prefer to keep it uniform, but if that\u0027s not possible then so be it.\n\nFor me, this shows up as:\n\n  (venv27)seventh:bandit finnigaj$ bandit examples/hardcoded-passwords.py\n  [bandit]\tINFO\tusing config: /Users/finnigaj/repo/bandit/venv27/lib/python2.7/site-packages/bandit/config/bandit.yaml\n  [bandit]\tINFO\trunning on Python 2.7.10\n  /Users/finnigaj/repo/bandit/venv27/lib/python2.7/site-packages/bandit/plugins/general_hardcoded_password.py:41: UserWarning: Using relative path for word_list: ./wordlist/default-passwords\n    % word_list_path)\n  Run started:\n  \t2015-07-15 04:11:25.240983\n\nOr (if there is no wordlist file available):\n\n  (venv27)seventh:bandit finnigaj$ bandit examples/hardcoded-passwords.py\n  [bandit]\tINFO\tusing config: /Users/finnigaj/repo/bandit/venv27/lib/python2.7/site-packages/bandit/config/bandit.yaml\n  [bandit]\tINFO\trunning on Python 2.7.10\n  /Users/finnigaj/repo/bandit/venv27/lib/python2.7/site-packages/bandit/plugins/general_hardcoded_password.py:58: UserWarning: Could not substitute \u0027%(site_data_dir)s\u0027 to a path with a valid word_list file\n    warnings.warn(e.message)\n  Run started:\n  \t2015-07-15 04:19:51.182414","commit_id":"78643c5b2173596b8ae2bd96e1c2e56c0b38560a"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"628fcb49e7490ca4934d14dcf1f2b6108be76462","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        if os.path.isfile(word_list_path):"},{"line_number":39,"context_line":"            if dir \u003d\u003d \".\":"},{"line_number":40,"context_line":"                warnings.warn(\"Using relative path for word_list: %s\""},{"line_number":41,"context_line":"                              % word_list_path)"},{"line_number":42,"context_line":"            return word_list_path"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    raise RuntimeError(\"Could not substitute \u0027%(site_data_dir)s\u0027 \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_c829b1e7","line":41,"in_reply_to":"9a41bdd9_856f422a","updated":"2015-07-15 20:23:43.000000000","message":"The idea behind using the warnings module was to have this display just once instead of multiple times.\n\nI suppose we could do some kind of caching so that if the cache is found, we just return that. Then we would just using log.warn here instead of warnings.warn.","commit_id":"78643c5b2173596b8ae2bd96e1c2e56c0b38560a"}],"requirements.txt":[{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"ca5d91481a2bd12235a9f04234b775d0a58ce274","unresolved":false,"context_lines":[{"line_number":1,"context_line":"appdirs\u003e\u003d1.3.0"},{"line_number":2,"context_line":"PyYAML\u003e\u003d3.1.0"},{"line_number":3,"context_line":"six\u003e\u003d1.9.0"},{"line_number":4,"context_line":"stevedore\u003e\u003d1.5.0  # Apache 2.0"}],"source_content_type":"text/plain","patch_set":3,"id":"9a41bdd9_64910047","line":1,"updated":"2015-07-14 15:43:02.000000000","message":"probably need to write it this way:\n\nappdirs\u003e\u003d1.3.0  # MIT License","commit_id":"3e60a3c9762f57cbabc69151f37f131dd6b0565d"}]}
