)]}'
{"bandit/core/issue.py":[{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"b8ad60fe9f5b87187d936ae0cfd63ec438672524","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # if the issue text, severity, confidence, and filename match, it\u0027s"},{"line_number":113,"context_line":"        # the same issue from our perspective"},{"line_number":114,"context_line":"        match_types \u003d [\u0027issue_text\u0027, \u0027issue_severity\u0027, \u0027issue_confidence\u0027,"},{"line_number":115,"context_line":"                       \u0027filename\u0027, \u0027test_name\u0027]"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        for key in match_types:"},{"line_number":118,"context_line":"            if not match_dict[key] \u003d\u003d self_dict[key]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_1393105d","line":115,"updated":"2015-11-09 07:25:22.000000000","message":"This is the Issue class method. Why not use the actual field names (.getattr()) and skip the .as_dict()? Or even the actual field names + .__dict__","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"188cdd3745f10605cae8ce980a611e53605a486a","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # if the issue text, severity, confidence, and filename match, it\u0027s"},{"line_number":113,"context_line":"        # the same issue from our perspective"},{"line_number":114,"context_line":"        match_types \u003d [\u0027issue_text\u0027, \u0027issue_severity\u0027, \u0027issue_confidence\u0027,"},{"line_number":115,"context_line":"                       \u0027filename\u0027, \u0027test_name\u0027]"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        for key in match_types:"},{"line_number":118,"context_line":"            if not match_dict[key] \u003d\u003d self_dict[key]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_7ba58502","line":115,"in_reply_to":"da85f559_1393105d","updated":"2015-11-09 12:51:26.000000000","message":"Done","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":11716,"name":"Tim Kelsey","email":"timothy.kelsey@uk.ibm.com","username":"tkelsey"},"change_message_id":"fa9de28466aa7a9838946df43a4722cc8406a119","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # if the issue text, severity, confidence, and filename match, it\u0027s"},{"line_number":113,"context_line":"        # the same issue from our perspective"},{"line_number":114,"context_line":"        match_types \u003d [\u0027issue_text\u0027, \u0027issue_severity\u0027, \u0027issue_confidence\u0027,"},{"line_number":115,"context_line":"                       \u0027filename\u0027, \u0027test_name\u0027]"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        for key in match_types:"},{"line_number":118,"context_line":"            if not match_dict[key] \u003d\u003d self_dict[key]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_00496731","line":115,"in_reply_to":"da85f559_1393105d","updated":"2015-11-09 12:03:08.000000000","message":"I would prefer avoiding the as_dict() here as well, its only really there for JSON/XML/etc serialisers that want dicts.","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"b8ad60fe9f5b87187d936ae0cfd63ec438672524","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                       \u0027filename\u0027, \u0027test_name\u0027]"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        for key in match_types:"},{"line_number":118,"context_line":"            if not match_dict[key] \u003d\u003d self_dict[key]:"},{"line_number":119,"context_line":"                return False"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_13e55008","line":118,"updated":"2015-11-09 07:25:22.000000000","message":"just\n\n    if ... !\u003d ...:\n\n?","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":11716,"name":"Tim Kelsey","email":"timothy.kelsey@uk.ibm.com","username":"tkelsey"},"change_message_id":"fa9de28466aa7a9838946df43a4722cc8406a119","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                       \u0027filename\u0027, \u0027test_name\u0027]"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        for key in match_types:"},{"line_number":118,"context_line":"            if not match_dict[key] \u003d\u003d self_dict[key]:"},{"line_number":119,"context_line":"                return False"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_c0527fdd","line":118,"in_reply_to":"da85f559_13e55008","updated":"2015-11-09 12:03:08.000000000","message":"+1","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"188cdd3745f10605cae8ce980a611e53605a486a","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                       \u0027filename\u0027, \u0027test_name\u0027]"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        for key in match_types:"},{"line_number":118,"context_line":"            if not match_dict[key] \u003d\u003d self_dict[key]:"},{"line_number":119,"context_line":"                return False"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_3bb05d43","line":118,"in_reply_to":"da85f559_13e55008","updated":"2015-11-09 12:51:26.000000000","message":"Done","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"}],"bandit/core/manager.py":[{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"b8ad60fe9f5b87187d936ae0cfd63ec438672524","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    for new_issue in results:"},{"line_number":383,"context_line":"        # keep track of index in the baseline where the issue was so we can"},{"line_number":384,"context_line":"        # remove it from the list"},{"line_number":385,"context_line":"        found_index \u003d 0"},{"line_number":386,"context_line":"        for baseline_issue in baseline:"},{"line_number":387,"context_line":"            if new_issue.matches_issue(baseline_issue):"},{"line_number":388,"context_line":"                break"},{"line_number":389,"context_line":"            found_index +\u003d 1"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # we went through all the results and didn\u0027t find it, add to unmatched"},{"line_number":392,"context_line":"        if found_index \u003d\u003d len(baseline):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_f3a3ec9c","line":389,"range":{"start_line":385,"start_character":8,"end_line":389,"end_character":28},"updated":"2015-11-09 07:25:22.000000000","message":"This is equivalent to:\n\n    for found_index, baseline_issue in enumerate(baseline):\n        if new_issue.matches_issue(baseline_issue):\n            break","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"188cdd3745f10605cae8ce980a611e53605a486a","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    for new_issue in results:"},{"line_number":383,"context_line":"        # keep track of index in the baseline where the issue was so we can"},{"line_number":384,"context_line":"        # remove it from the list"},{"line_number":385,"context_line":"        found_index \u003d 0"},{"line_number":386,"context_line":"        for baseline_issue in baseline:"},{"line_number":387,"context_line":"            if new_issue.matches_issue(baseline_issue):"},{"line_number":388,"context_line":"                break"},{"line_number":389,"context_line":"            found_index +\u003d 1"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # we went through all the results and didn\u0027t find it, add to unmatched"},{"line_number":392,"context_line":"        if found_index \u003d\u003d len(baseline):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_3b5ffe73","line":389,"range":{"start_line":385,"start_character":8,"end_line":389,"end_character":28},"in_reply_to":"da85f559_f3a3ec9c","updated":"2015-11-09 12:51:26.000000000","message":"Good point","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"b8ad60fe9f5b87187d936ae0cfd63ec438672524","unresolved":false,"context_lines":[{"line_number":401,"context_line":"def _find_candidate_matches(unmatched_issues, results_list):"},{"line_number":402,"context_line":"    \"\"\"Returns a dictionary with issue candidates"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    For example, let\u0027s stay we find a new command injection issue in a file"},{"line_number":405,"context_line":"    which used to have two.  Bandit can\u0027t tell which of the command injection"},{"line_number":406,"context_line":"    issues in the file are new, so it will show all three.  The user should"},{"line_number":407,"context_line":"    be able to pick out the new one."}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_93bb80c4","line":404,"range":{"start_line":404,"start_character":23,"end_line":404,"end_character":27},"updated":"2015-11-09 07:25:22.000000000","message":"say","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"188cdd3745f10605cae8ce980a611e53605a486a","unresolved":false,"context_lines":[{"line_number":401,"context_line":"def _find_candidate_matches(unmatched_issues, results_list):"},{"line_number":402,"context_line":"    \"\"\"Returns a dictionary with issue candidates"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    For example, let\u0027s stay we find a new command injection issue in a file"},{"line_number":405,"context_line":"    which used to have two.  Bandit can\u0027t tell which of the command injection"},{"line_number":406,"context_line":"    issues in the file are new, so it will show all three.  The user should"},{"line_number":407,"context_line":"    be able to pick out the new one."}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_5bc76212","line":404,"range":{"start_line":404,"start_character":23,"end_line":404,"end_character":27},"in_reply_to":"da85f559_93bb80c4","updated":"2015-11-09 12:51:26.000000000","message":"Done","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"b8ad60fe9f5b87187d936ae0cfd63ec438672524","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    for unmatched in unmatched_issues:"},{"line_number":417,"context_line":"        issue_candidates[unmatched] \u003d ([i for i in results_list if"},{"line_number":418,"context_line":"                                        unmatched.matches_issue(i)])"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"    return issue_candidates"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_73ddbc13","line":418,"updated":"2015-11-09 07:25:22.000000000","message":"How many issues are expected in a file, maximum? This has N^2 complexity - shouldn\u0027t matter for small files, but processing a huge project with (for example) autogenerated files may take very long.","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"188cdd3745f10605cae8ce980a611e53605a486a","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    for unmatched in unmatched_issues:"},{"line_number":417,"context_line":"        issue_candidates[unmatched] \u003d ([i for i in results_list if"},{"line_number":418,"context_line":"                                        unmatched.matches_issue(i)])"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"    return issue_candidates"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_fb097632","line":418,"in_reply_to":"da85f559_73ddbc13","updated":"2015-11-09 12:51:26.000000000","message":"I\u0027m sure there is a better way of doing this performance-wise.  I\u0027ll push back because I think the code is readable and we\u0027ll only do this once for each new issue.\n\nFor example let\u0027s assume a large software project with 500 current issues.  They add really bad code with 50 new issues, we\u0027ll have:\n\n50*500 \u003d 25,000 comparisons.  Since each comparison involves comparing 5 values, we\u0027ll have 125,000 \u003d\u003d checks.  IMO this is really the worst case scenario.  I\u0027d like to get this in as is and we can focus on improving performance later.\n\nWhatever we do come up with I\u0027d like to focus on readability too as bugs here are going to be really impactful and potentially hard to pinpoint if they\u0027re in a gate.","commit_id":"e9575a55790c2bfb107af3b5b3afbcc8c3ee682e"}]}
