{"action":"created","comment":{"url":"https://api.github.com/repos/Yelp/osxcollector/pulls/comments/22887868","id":22887868,"diff_hunk":"@@ -39,9 +41,8 @@ def _should_add_threat_info_to_blob(self, blob, threat_info):\n         Returns:\n             boolean\n         \"\"\"\n-        if blob.get('file_path', '').endswith(threat_info.get('filename', '')):","path":"osxcollector/output_filters/shadowserver/lookup_hashes.py","position":13,"original_position":13,"commit_id":"504563d9f56639028e894c42696aa30a3560e54a","original_commit_id":"504563d9f56639028e894c42696aa30a3560e54a","user":{"login":"concordbjf","id":7435756,"avatar_url":"https://avatars.githubusercontent.com/u/7435756?v=3","gravatar_id":"","url":"https://api.github.com/users/concordbjf","html_url":"https://github.com/concordbjf","followers_url":"https://api.github.com/users/concordbjf/followers","following_url":"https://api.github.com/users/concordbjf/following{/other_user}","gists_url":"https://api.github.com/users/concordbjf/gists{/gist_id}","starred_url":"https://api.github.com/users/concordbjf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concordbjf/subscriptions","organizations_url":"https://api.github.com/users/concordbjf/orgs","repos_url":"https://api.github.com/users/concordbjf/repos","events_url":"https://api.github.com/users/concordbjf/events{/privacy}","received_events_url":"https://api.github.com/users/concordbjf/received_events","type":"User","site_admin":false},"body":"Would there be a logic error here if, for example? :\r\nblob.get('file_path', '') == \"/path/long_file_name.txt\"\r\nthreat_info.get('filename', '') == \"e.txt\"\r\n\r\n^ The if statement would return true, even though the basename of the file_path does not match the filename from threat_info.","created_at":"2015-01-13T19:36:06Z","updated_at":"2015-01-13T19:36:06Z","html_url":"https://github.com/Yelp/osxcollector/pull/50#discussion_r22887868","pull_request_url":"https://api.github.com/repos/Yelp/osxcollector/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/Yelp/osxcollector/pulls/comments/22887868"},"html":{"href":"https://github.com/Yelp/osxcollector/pull/50#discussion_r22887868"},"pull_request":{"href":"https://api.github.com/repos/Yelp/osxcollector/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/Yelp/osxcollector/pulls/50","id":27156593,"html_url":"https://github.com/Yelp/osxcollector/pull/50","diff_url":"https://github.com/Yelp/osxcollector/pull/50.diff","patch_url":"https://github.com/Yelp/osxcollector/pull/50.patch","issue_url":"https://api.github.com/repos/Yelp/osxcollector/issues/50","number":50,"state":"open","locked":false,"title":"Fix Issue 44 - better compare of filenames for ShadowServer","user":{"login":"ivanlei","id":1002798,"avatar_url":"https://avatars.githubusercontent.com/u/1002798?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanlei","html_url":"https://github.com/ivanlei","followers_url":"https://api.github.com/users/ivanlei/followers","following_url":"https://api.github.com/users/ivanlei/following{/other_user}","gists_url":"https://api.github.com/users/ivanlei/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanlei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanlei/subscriptions","organizations_url":"https://api.github.com/users/ivanlei/orgs","repos_url":"https://api.github.com/users/ivanlei/repos","events_url":"https://api.github.com/users/ivanlei/events{/privacy}","received_events_url":"https://api.github.com/users/ivanlei/received_events","type":"User","site_admin":false},"body":"Use `os.path.split` to get the filename out of a path.\r\nFixes #44 ","created_at":"2015-01-11T00:04:03Z","updated_at":"2015-01-13T19:36:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff7fb850a4f9a92b74c66cb8d3b37647151bb427","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Yelp/osxcollector/pulls/50/commits","review_comments_url":"https://api.github.com/repos/Yelp/osxcollector/pulls/50/comments","review_comment_url":"https://api.github.com/repos/Yelp/osxcollector/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Yelp/osxcollector/issues/50/comments","statuses_url":"https://api.github.com/repos/Yelp/osxcollector/statuses/504563d9f56639028e894c42696aa30a3560e54a","head":{"label":"Yelp:issue_44","ref":"issue_44","sha":"504563d9f56639028e894c42696aa30a3560e54a","user":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"repo":{"id":22615096,"name":"osxcollector","full_name":"Yelp/osxcollector","owner":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yelp/osxcollector","description":"A forensic evidence collection & analysis toolkit for OSX.","fork":false,"url":"https://api.github.com/repos/Yelp/osxcollector","forks_url":"https://api.github.com/repos/Yelp/osxcollector/forks","keys_url":"https://api.github.com/repos/Yelp/osxcollector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yelp/osxcollector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yelp/osxcollector/teams","hooks_url":"https://api.github.com/repos/Yelp/osxcollector/hooks","issue_events_url":"https://api.github.com/repos/Yelp/osxcollector/issues/events{/number}","events_url":"https://api.github.com/repos/Yelp/osxcollector/events","assignees_url":"https://api.github.com/repos/Yelp/osxcollector/assignees{/user}","branches_url":"https://api.github.com/repos/Yelp/osxcollector/branches{/branch}","tags_url":"https://api.github.com/repos/Yelp/osxcollector/tags","blobs_url":"https://api.github.com/repos/Yelp/osxcollector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yelp/osxcollector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yelp/osxcollector/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yelp/osxcollector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yelp/osxcollector/statuses/{sha}","languages_url":"https://api.github.com/repos/Yelp/osxcollector/languages","stargazers_url":"https://api.github.com/repos/Yelp/osxcollector/stargazers","contributors_url":"https://api.github.com/repos/Yelp/osxcollector/contributors","subscribers_url":"https://api.github.com/repos/Yelp/osxcollector/subscribers","subscription_url":"https://api.github.com/repos/Yelp/osxcollector/subscription","commits_url":"https://api.github.com/repos/Yelp/osxcollector/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yelp/osxcollector/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yelp/osxcollector/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yelp/osxcollector/issues/comments/{number}","contents_url":"https://api.github.com/repos/Yelp/osxcollector/contents/{+path}","compare_url":"https://api.github.com/repos/Yelp/osxcollector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yelp/osxcollector/merges","archive_url":"https://api.github.com/repos/Yelp/osxcollector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yelp/osxcollector/downloads","issues_url":"https://api.github.com/repos/Yelp/osxcollector/issues{/number}","pulls_url":"https://api.github.com/repos/Yelp/osxcollector/pulls{/number}","milestones_url":"https://api.github.com/repos/Yelp/osxcollector/milestones{/number}","notifications_url":"https://api.github.com/repos/Yelp/osxcollector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yelp/osxcollector/labels{/name}","releases_url":"https://api.github.com/repos/Yelp/osxcollector/releases{/id}","created_at":"2014-08-04T18:25:29Z","updated_at":"2015-01-13T19:17:30Z","pushed_at":"2015-01-13T17:31:05Z","git_url":"git://github.com/Yelp/osxcollector.git","ssh_url":"git@github.com:Yelp/osxcollector.git","clone_url":"https://github.com/Yelp/osxcollector.git","svn_url":"https://github.com/Yelp/osxcollector","homepage":"http://yelp.github.io/osxcollector","size":1321,"stargazers_count":371,"watchers_count":371,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":10,"mirror_url":null,"open_issues_count":10,"forks":10,"open_issues":10,"watchers":371,"default_branch":"master"}},"base":{"label":"Yelp:master","ref":"master","sha":"c1c57cc64a45590943405c8780173903f341f9a8","user":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"repo":{"id":22615096,"name":"osxcollector","full_name":"Yelp/osxcollector","owner":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yelp/osxcollector","description":"A forensic evidence collection & analysis toolkit for OSX.","fork":false,"url":"https://api.github.com/repos/Yelp/osxcollector","forks_url":"https://api.github.com/repos/Yelp/osxcollector/forks","keys_url":"https://api.github.com/repos/Yelp/osxcollector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yelp/osxcollector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yelp/osxcollector/teams","hooks_url":"https://api.github.com/repos/Yelp/osxcollector/hooks","issue_events_url":"https://api.github.com/repos/Yelp/osxcollector/issues/events{/number}","events_url":"https://api.github.com/repos/Yelp/osxcollector/events","assignees_url":"https://api.github.com/repos/Yelp/osxcollector/assignees{/user}","branches_url":"https://api.github.com/repos/Yelp/osxcollector/branches{/branch}","tags_url":"https://api.github.com/repos/Yelp/osxcollector/tags","blobs_url":"https://api.github.com/repos/Yelp/osxcollector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yelp/osxcollector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yelp/osxcollector/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yelp/osxcollector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yelp/osxcollector/statuses/{sha}","languages_url":"https://api.github.com/repos/Yelp/osxcollector/languages","stargazers_url":"https://api.github.com/repos/Yelp/osxcollector/stargazers","contributors_url":"https://api.github.com/repos/Yelp/osxcollector/contributors","subscribers_url":"https://api.github.com/repos/Yelp/osxcollector/subscribers","subscription_url":"https://api.github.com/repos/Yelp/osxcollector/subscription","commits_url":"https://api.github.com/repos/Yelp/osxcollector/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yelp/osxcollector/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yelp/osxcollector/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yelp/osxcollector/issues/comments/{number}","contents_url":"https://api.github.com/repos/Yelp/osxcollector/contents/{+path}","compare_url":"https://api.github.com/repos/Yelp/osxcollector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yelp/osxcollector/merges","archive_url":"https://api.github.com/repos/Yelp/osxcollector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yelp/osxcollector/downloads","issues_url":"https://api.github.com/repos/Yelp/osxcollector/issues{/number}","pulls_url":"https://api.github.com/repos/Yelp/osxcollector/pulls{/number}","milestones_url":"https://api.github.com/repos/Yelp/osxcollector/milestones{/number}","notifications_url":"https://api.github.com/repos/Yelp/osxcollector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yelp/osxcollector/labels{/name}","releases_url":"https://api.github.com/repos/Yelp/osxcollector/releases{/id}","created_at":"2014-08-04T18:25:29Z","updated_at":"2015-01-13T19:17:30Z","pushed_at":"2015-01-13T17:31:05Z","git_url":"git://github.com/Yelp/osxcollector.git","ssh_url":"git@github.com:Yelp/osxcollector.git","clone_url":"https://github.com/Yelp/osxcollector.git","svn_url":"https://github.com/Yelp/osxcollector","homepage":"http://yelp.github.io/osxcollector","size":1321,"stargazers_count":371,"watchers_count":371,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":10,"mirror_url":null,"open_issues_count":10,"forks":10,"open_issues":10,"watchers":371,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Yelp/osxcollector/pulls/50"},"html":{"href":"https://github.com/Yelp/osxcollector/pull/50"},"issue":{"href":"https://api.github.com/repos/Yelp/osxcollector/issues/50"},"comments":{"href":"https://api.github.com/repos/Yelp/osxcollector/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/Yelp/osxcollector/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/Yelp/osxcollector/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Yelp/osxcollector/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/Yelp/osxcollector/statuses/504563d9f56639028e894c42696aa30a3560e54a"}}}}