{"action":"opened","number":1004,"pull_request":{"url":"https://api.github.com/repos/cuckoosandbox/cuckoo/pulls/1004","id":76647341,"html_url":"https://github.com/cuckoosandbox/cuckoo/pull/1004","diff_url":"https://github.com/cuckoosandbox/cuckoo/pull/1004.diff","patch_url":"https://github.com/cuckoosandbox/cuckoo/pull/1004.patch","issue_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/1004","number":1004,"state":"open","locked":false,"title":"Adding a check so the analysis don't get stuck when cuckoo has no permissions to access target file","user":{"login":"thejustaguy","id":7113817,"avatar_url":"https://avatars.githubusercontent.com/u/7113817?v=3","gravatar_id":"","url":"https://api.github.com/users/thejustaguy","html_url":"https://github.com/thejustaguy","followers_url":"https://api.github.com/users/thejustaguy/followers","following_url":"https://api.github.com/users/thejustaguy/following{/other_user}","gists_url":"https://api.github.com/users/thejustaguy/gists{/gist_id}","starred_url":"https://api.github.com/users/thejustaguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejustaguy/subscriptions","organizations_url":"https://api.github.com/users/thejustaguy/orgs","repos_url":"https://api.github.com/users/thejustaguy/repos","events_url":"https://api.github.com/users/thejustaguy/events{/privacy}","received_events_url":"https://api.github.com/users/thejustaguy/received_events","type":"User","site_admin":false},"body":"What happens before this commit:\r\nuser \"normaluser\" does \r\n`/opt/cuckoo/utils/submit.py --options route=proxy0 /tmp/evil.js`\r\n\r\nand cuckoo runs as user \"cuckoo\"\r\n\r\nAnd the following behavior happens:\r\n\r\n```\r\n2016-07-07 20:52:09,893 [lib.cuckoo.core.scheduler] INFO: Starting analysis of FILE \"evil.js\" (task #84, options \"route=proxy0\")\r\n2016-07-07 20:52:09,899 [lib.cuckoo.core.scheduler] ERROR: Failure in AnalysisManager.run\r\nTraceback (most recent call last):\r\n  File \"/opt/cuckoo/lib/cuckoo/core/scheduler.py\", line 502, in run\r\n    self.launch_analysis()\r\n  File \"/opt/cuckoo/lib/cuckoo/core/scheduler.py\", line 324, in launch_analysis\r\n    if not self.check_file():\r\n  File \"/opt/cuckoo/lib/cuckoo/core/scheduler.py\", line 91, in check_file\r\n    sha256 = File(self.task.target).get_sha256()\r\n  File \"/opt/cuckoo/lib/cuckoo/common/objects.py\", line 208, in get_sha256\r\n    self.calc_hashes()\r\n  File \"/opt/cuckoo/lib/cuckoo/common/objects.py\", line 153, in calc_hashes\r\n    for chunk in self.get_chunks():\r\n  File \"/opt/cuckoo/lib/cuckoo/common/objects.py\", line 138, in get_chunks\r\n    with open(self.file_path, \"rb\") as fd:\r\nIOError: [Errno 13] Permission denied: u'/tmp/evil.js'\r\n```\r\nAnd the analysis is stuck forever (until you restart cuckoo.)\r\nThis commit will fix this and it will tell the user what happened.","created_at":"2016-07-07T18:57:26Z","updated_at":"2016-07-07T18:57:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/pulls/1004/commits","review_comments_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/pulls/1004/comments","review_comment_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/1004/comments","statuses_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/statuses/5779d75a5fc36cfc8961dbdf5f9dc58141b14168","head":{"label":"thejustaguy:master","ref":"master","sha":"5779d75a5fc36cfc8961dbdf5f9dc58141b14168","user":{"login":"thejustaguy","id":7113817,"avatar_url":"https://avatars.githubusercontent.com/u/7113817?v=3","gravatar_id":"","url":"https://api.github.com/users/thejustaguy","html_url":"https://github.com/thejustaguy","followers_url":"https://api.github.com/users/thejustaguy/followers","following_url":"https://api.github.com/users/thejustaguy/following{/other_user}","gists_url":"https://api.github.com/users/thejustaguy/gists{/gist_id}","starred_url":"https://api.github.com/users/thejustaguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejustaguy/subscriptions","organizations_url":"https://api.github.com/users/thejustaguy/orgs","repos_url":"https://api.github.com/users/thejustaguy/repos","events_url":"https://api.github.com/users/thejustaguy/events{/privacy}","received_events_url":"https://api.github.com/users/thejustaguy/received_events","type":"User","site_admin":false},"repo":{"id":62501195,"name":"cuckoo","full_name":"thejustaguy/cuckoo","owner":{"login":"thejustaguy","id":7113817,"avatar_url":"https://avatars.githubusercontent.com/u/7113817?v=3","gravatar_id":"","url":"https://api.github.com/users/thejustaguy","html_url":"https://github.com/thejustaguy","followers_url":"https://api.github.com/users/thejustaguy/followers","following_url":"https://api.github.com/users/thejustaguy/following{/other_user}","gists_url":"https://api.github.com/users/thejustaguy/gists{/gist_id}","starred_url":"https://api.github.com/users/thejustaguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejustaguy/subscriptions","organizations_url":"https://api.github.com/users/thejustaguy/orgs","repos_url":"https://api.github.com/users/thejustaguy/repos","events_url":"https://api.github.com/users/thejustaguy/events{/privacy}","received_events_url":"https://api.github.com/users/thejustaguy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thejustaguy/cuckoo","description":"Cuckoo Sandbox is an automated dynamic malware analysis system","fork":true,"url":"https://api.github.com/repos/thejustaguy/cuckoo","forks_url":"https://api.github.com/repos/thejustaguy/cuckoo/forks","keys_url":"https://api.github.com/repos/thejustaguy/cuckoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thejustaguy/cuckoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thejustaguy/cuckoo/teams","hooks_url":"https://api.github.com/repos/thejustaguy/cuckoo/hooks","issue_events_url":"https://api.github.com/repos/thejustaguy/cuckoo/issues/events{/number}","events_url":"https://api.github.com/repos/thejustaguy/cuckoo/events","assignees_url":"https://api.github.com/repos/thejustaguy/cuckoo/assignees{/user}","branches_url":"https://api.github.com/repos/thejustaguy/cuckoo/branches{/branch}","tags_url":"https://api.github.com/repos/thejustaguy/cuckoo/tags","blobs_url":"https://api.github.com/repos/thejustaguy/cuckoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thejustaguy/cuckoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thejustaguy/cuckoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/thejustaguy/cuckoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thejustaguy/cuckoo/statuses/{sha}","languages_url":"https://api.github.com/repos/thejustaguy/cuckoo/languages","stargazers_url":"https://api.github.com/repos/thejustaguy/cuckoo/stargazers","contributors_url":"https://api.github.com/repos/thejustaguy/cuckoo/contributors","subscribers_url":"https://api.github.com/repos/thejustaguy/cuckoo/subscribers","subscription_url":"https://api.github.com/repos/thejustaguy/cuckoo/subscription","commits_url":"https://api.github.com/repos/thejustaguy/cuckoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/thejustaguy/cuckoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/thejustaguy/cuckoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/thejustaguy/cuckoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/thejustaguy/cuckoo/contents/{+path}","compare_url":"https://api.github.com/repos/thejustaguy/cuckoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thejustaguy/cuckoo/merges","archive_url":"https://api.github.com/repos/thejustaguy/cuckoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thejustaguy/cuckoo/downloads","issues_url":"https://api.github.com/repos/thejustaguy/cuckoo/issues{/number}","pulls_url":"https://api.github.com/repos/thejustaguy/cuckoo/pulls{/number}","milestones_url":"https://api.github.com/repos/thejustaguy/cuckoo/milestones{/number}","notifications_url":"https://api.github.com/repos/thejustaguy/cuckoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thejustaguy/cuckoo/labels{/name}","releases_url":"https://api.github.com/repos/thejustaguy/cuckoo/releases{/id}","deployments_url":"https://api.github.com/repos/thejustaguy/cuckoo/deployments","created_at":"2016-07-03T14:52:30Z","updated_at":"2016-07-03T14:52:35Z","pushed_at":"2016-07-07T18:43:58Z","git_url":"git://github.com/thejustaguy/cuckoo.git","ssh_url":"git@github.com:thejustaguy/cuckoo.git","clone_url":"https://github.com/thejustaguy/cuckoo.git","svn_url":"https://github.com/thejustaguy/cuckoo","homepage":"http://www.cuckoosandbox.org","size":21579,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cuckoosandbox:master","ref":"master","sha":"3916ea4b462a7c16f16cf0c448078a791e5be4a0","user":{"login":"cuckoosandbox","id":1032683,"avatar_url":"https://avatars.githubusercontent.com/u/1032683?v=3","gravatar_id":"","url":"https://api.github.com/users/cuckoosandbox","html_url":"https://github.com/cuckoosandbox","followers_url":"https://api.github.com/users/cuckoosandbox/followers","following_url":"https://api.github.com/users/cuckoosandbox/following{/other_user}","gists_url":"https://api.github.com/users/cuckoosandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/cuckoosandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuckoosandbox/subscriptions","organizations_url":"https://api.github.com/users/cuckoosandbox/orgs","repos_url":"https://api.github.com/users/cuckoosandbox/repos","events_url":"https://api.github.com/users/cuckoosandbox/events{/privacy}","received_events_url":"https://api.github.com/users/cuckoosandbox/received_events","type":"Organization","site_admin":false},"repo":{"id":2341302,"name":"cuckoo","full_name":"cuckoosandbox/cuckoo","owner":{"login":"cuckoosandbox","id":1032683,"avatar_url":"https://avatars.githubusercontent.com/u/1032683?v=3","gravatar_id":"","url":"https://api.github.com/users/cuckoosandbox","html_url":"https://github.com/cuckoosandbox","followers_url":"https://api.github.com/users/cuckoosandbox/followers","following_url":"https://api.github.com/users/cuckoosandbox/following{/other_user}","gists_url":"https://api.github.com/users/cuckoosandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/cuckoosandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuckoosandbox/subscriptions","organizations_url":"https://api.github.com/users/cuckoosandbox/orgs","repos_url":"https://api.github.com/users/cuckoosandbox/repos","events_url":"https://api.github.com/users/cuckoosandbox/events{/privacy}","received_events_url":"https://api.github.com/users/cuckoosandbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cuckoosandbox/cuckoo","description":"Cuckoo Sandbox is an automated dynamic malware analysis system","fork":false,"url":"https://api.github.com/repos/cuckoosandbox/cuckoo","forks_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/forks","keys_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/teams","hooks_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/hooks","issue_events_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/events{/number}","events_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/events","assignees_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/assignees{/user}","branches_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/branches{/branch}","tags_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/tags","blobs_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/statuses/{sha}","languages_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/languages","stargazers_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/stargazers","contributors_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/contributors","subscribers_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/subscribers","subscription_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/subscription","commits_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/contents/{+path}","compare_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/merges","archive_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/downloads","issues_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues{/number}","pulls_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/pulls{/number}","milestones_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/milestones{/number}","notifications_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/labels{/name}","releases_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/releases{/id}","deployments_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/deployments","created_at":"2011-09-07T12:12:38Z","updated_at":"2016-07-07T18:16:39Z","pushed_at":"2016-07-06T18:04:31Z","git_url":"git://github.com/cuckoosandbox/cuckoo.git","ssh_url":"git@github.com:cuckoosandbox/cuckoo.git","clone_url":"https://github.com/cuckoosandbox/cuckoo.git","svn_url":"https://github.com/cuckoosandbox/cuckoo","homepage":"http://www.cuckoosandbox.org","size":37647,"stargazers_count":1839,"watchers_count":1839,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":667,"mirror_url":null,"open_issues_count":166,"forks":667,"open_issues":166,"watchers":1839,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cuckoosandbox/cuckoo/pulls/1004"},"html":{"href":"https://github.com/cuckoosandbox/cuckoo/pull/1004"},"issue":{"href":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/1004"},"comments":{"href":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/1004/comments"},"review_comments":{"href":"https://api.github.com/repos/cuckoosandbox/cuckoo/pulls/1004/comments"},"review_comment":{"href":"https://api.github.com/repos/cuckoosandbox/cuckoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cuckoosandbox/cuckoo/pulls/1004/commits"},"statuses":{"href":"https://api.github.com/repos/cuckoosandbox/cuckoo/statuses/5779d75a5fc36cfc8961dbdf5f9dc58141b14168"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":13,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"thejustaguy"}}