)]}'
{"bandit/plugins/general_hardcoded_password.py":[{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"334cb2901be132bbd5fb10beca21d05840b83919","unresolved":false,"context_lines":[{"line_number":75,"context_line":"@takes_config"},{"line_number":76,"context_line":"@checks(\u0027Str\u0027)"},{"line_number":77,"context_line":"def hardcoded_password(context, config):"},{"line_number":78,"context_line":"    word_list \u003d _get_wordlist(config)"},{"line_number":79,"context_line":"    # for every password in the list, check against the current string"},{"line_number":80,"context_line":"    for word in word_list:"},{"line_number":81,"context_line":"        if context.string_val and context.string_val \u003d\u003d word:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_446f362b","line":78,"updated":"2015-08-19 03:46:29.000000000","message":"To include the code faster, caching itself looks like it deserves a patch on its own. I don\u0027t think anyone disagrees about including it while the details of the check itself are discussed.","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"c521fda96cfad9158abc747960a77c39da3c5ec7","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"@checks(\u0027Str\u0027)"},{"line_number":90,"context_line":"def hardcoded_password2(context):"},{"line_number":91,"context_line":"    # looks for \"*pass* \u003d \u0027some_string\u0027\""},{"line_number":92,"context_line":"    node \u003d context.node"},{"line_number":93,"context_line":"    if isinstance(node.parent, ast.Assign):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_4ba55bb3","line":90,"updated":"2015-07-16 21:34:48.000000000","message":"A. This is a terrible check name\nB. Wouldn\u0027t this (erroneously) catch something like:\n\n    surpass_expectations \u003d \u0027everyday\u0027\n\n   I\u0027d really hate to see a bunch of code using bandit start having to add `# nosec` to lines like that. Would it be possible to be smarter?","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"334cb2901be132bbd5fb10beca21d05840b83919","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"@checks(\u0027Str\u0027)"},{"line_number":90,"context_line":"def hardcoded_password2(context):"},{"line_number":91,"context_line":"    # looks for \"*pass* \u003d \u0027some_string\u0027\""},{"line_number":92,"context_line":"    node \u003d context.node"},{"line_number":93,"context_line":"    if isinstance(node.parent, ast.Assign):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_64d83af0","line":90,"in_reply_to":"9a41bdd9_4ba55bb3","updated":"2015-08-19 03:46:29.000000000","message":"I don\u0027t think there are that many ways to misspell password. How about just checking a set of usual suspects?\n\n    set([\"password\", \"pass\", \"passwd\", \"pwd\", \"secret\", \"token\"])","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"c521fda96cfad9158abc747960a77c39da3c5ec7","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            if isinstance(targ, ast.Name) and \"pass\" in targ.id:"},{"line_number":96,"context_line":"                return bandit.Issue("},{"line_number":97,"context_line":"                    severity\u003dbandit.LOW,"},{"line_number":98,"context_line":"                    confidence\u003dbandit.MEDIUM,"},{"line_number":99,"context_line":"                    text\u003d(\"Possible hardcoded password: \u0027%s\u0027\" %"},{"line_number":100,"context_line":"                          utils.safe_str(node.s))"},{"line_number":101,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_eba9cf91","line":98,"updated":"2015-07-16 21:34:48.000000000","message":"Agreed with Travis if we don\u0027t make this smarter.","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"950a60c4c73684e2aa6ada558ed7d522ae2f8064","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            if isinstance(targ, ast.Name) and \"pass\" in targ.id:"},{"line_number":96,"context_line":"                return bandit.Issue("},{"line_number":97,"context_line":"                    severity\u003dbandit.LOW,"},{"line_number":98,"context_line":"                    confidence\u003dbandit.MEDIUM,"},{"line_number":99,"context_line":"                    text\u003d(\"Possible hardcoded password: \u0027%s\u0027\" %"},{"line_number":100,"context_line":"                          utils.safe_str(node.s))"},{"line_number":101,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_25f05ac9","line":98,"updated":"2015-07-16 14:35:53.000000000","message":"this is probably still low confidence","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"c521fda96cfad9158abc747960a77c39da3c5ec7","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"@checks(\u0027Call\u0027)"},{"line_number":105,"context_line":"def hardcoded_password_call(context):"},{"line_number":106,"context_line":"    # looks for \"function(*pass*\u003d\u0027some_string\u0027)\""},{"line_number":107,"context_line":"    for kw in context.node.keywords:"},{"line_number":108,"context_line":"        if \"pass\" in kw.arg and isinstance(kw.value, ast.Str):"},{"line_number":109,"context_line":"            return bandit.Issue("}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_0baf5395","line":106,"updated":"2015-07-16 21:34:48.000000000","message":"A better name would probably be \"hardcoded_password_funcarg\". Further, while this should have fewer false positives than \"hardcoded_password2\", I think it\u0027s still low confidence.","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"c521fda96cfad9158abc747960a77c39da3c5ec7","unresolved":false,"context_lines":[{"line_number":105,"context_line":"def hardcoded_password_call(context):"},{"line_number":106,"context_line":"    # looks for \"function(*pass*\u003d\u0027some_string\u0027)\""},{"line_number":107,"context_line":"    for kw in context.node.keywords:"},{"line_number":108,"context_line":"        if \"pass\" in kw.arg and isinstance(kw.value, ast.Str):"},{"line_number":109,"context_line":"            return bandit.Issue("},{"line_number":110,"context_line":"                severity\u003dbandit.LOW,"},{"line_number":111,"context_line":"                confidence\u003dbandit.MEDIUM,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_ab942744","line":108,"updated":"2015-07-16 21:34:48.000000000","message":"This will skip (on Python 3) something like\n\n    doLogin(password\u003db\u0027secret\u0027)\n\nWe\u0027ll need some compatibility shims here around the ast for type checking.","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"334cb2901be132bbd5fb10beca21d05840b83919","unresolved":false,"context_lines":[{"line_number":105,"context_line":"def hardcoded_password_call(context):"},{"line_number":106,"context_line":"    # looks for \"function(*pass*\u003d\u0027some_string\u0027)\""},{"line_number":107,"context_line":"    for kw in context.node.keywords:"},{"line_number":108,"context_line":"        if \"pass\" in kw.arg and isinstance(kw.value, ast.Str):"},{"line_number":109,"context_line":"            return bandit.Issue("},{"line_number":110,"context_line":"                severity\u003dbandit.LOW,"},{"line_number":111,"context_line":"                confidence\u003dbandit.MEDIUM,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_a4ec1290","line":108,"in_reply_to":"9a41bdd9_ab942744","updated":"2015-08-19 03:46:29.000000000","message":"Submitted in https://review.openstack.org/214414 - I\u0027ll rebase/update if this patch lands first.","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"950a60c4c73684e2aa6ada558ed7d522ae2f8064","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        if \"pass\" in kw.arg and isinstance(kw.value, ast.Str):"},{"line_number":109,"context_line":"            return bandit.Issue("},{"line_number":110,"context_line":"                severity\u003dbandit.LOW,"},{"line_number":111,"context_line":"                confidence\u003dbandit.MEDIUM,"},{"line_number":112,"context_line":"                text\u003d(\"Possible hardcoded password: \u0027%s\u0027\" %"},{"line_number":113,"context_line":"                      utils.safe_str(kw.value.s))"},{"line_number":114,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a41bdd9_65cd0286","line":111,"updated":"2015-07-16 14:35:53.000000000","message":"low confidence I think","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"}],"examples/hardcoded-passwords.py":[{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"334cb2901be132bbd5fb10beca21d05840b83919","unresolved":false,"context_lines":[{"line_number":14,"context_line":"        print(\"Nice password!\")"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"doLogin(password\u003d\"blerg\")"},{"line_number":17,"context_line":"password \u003d \"blerg\""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_c496e6ef","line":17,"updated":"2015-08-19 03:46:29.000000000","message":"How about adding a new case that definitely shouldn\u0027t match. I like the:\n\n    # includes \"*pass*\", but should not match\n    surpass_expectations \u003d \"everyday\"","commit_id":"1abf3c77a540e444177a202de3fe4892ec2112e5"}]}
