{"action":"created","comment":{"url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/comments/52677599","id":52677599,"diff_hunk":"@@ -0,0 +1,52 @@\n+module CC\n+  module Engine\n+    module BundlerAudit\n+      class Remediation","path":"lib/cc/engine/bundler_audit/remediation.rb","position":4,"original_position":4,"commit_id":"3bad277197d8c87e4684755e980c1af6f45d7ccf","original_commit_id":"3bad277197d8c87e4684755e980c1af6f45d7ccf","user":{"login":"dblandin","id":123595,"avatar_url":"https://avatars.githubusercontent.com/u/123595?v=3","gravatar_id":"","url":"https://api.github.com/users/dblandin","html_url":"https://github.com/dblandin","followers_url":"https://api.github.com/users/dblandin/followers","following_url":"https://api.github.com/users/dblandin/following{/other_user}","gists_url":"https://api.github.com/users/dblandin/gists{/gist_id}","starred_url":"https://api.github.com/users/dblandin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblandin/subscriptions","organizations_url":"https://api.github.com/users/dblandin/orgs","repos_url":"https://api.github.com/users/dblandin/repos","events_url":"https://api.github.com/users/dblandin/events{/privacy}","received_events_url":"https://api.github.com/users/dblandin/received_events","type":"User","site_admin":false},"body":"Definitely.","created_at":"2016-02-11T22:24:06Z","updated_at":"2016-02-11T22:24:06Z","html_url":"https://github.com/codeclimate/codeclimate-bundler-audit/pull/16#discussion_r52677599","pull_request_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/comments/52677599"},"html":{"href":"https://github.com/codeclimate/codeclimate-bundler-audit/pull/16#discussion_r52677599"},"pull_request":{"href":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/16","id":59102300,"html_url":"https://github.com/codeclimate/codeclimate-bundler-audit/pull/16","diff_url":"https://github.com/codeclimate/codeclimate-bundler-audit/pull/16.diff","patch_url":"https://github.com/codeclimate/codeclimate-bundler-audit/pull/16.patch","issue_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues/16","number":16,"state":"open","locked":false,"title":"Use Bundler::Audit::Scanner for analysis","user":{"login":"dblandin","id":123595,"avatar_url":"https://avatars.githubusercontent.com/u/123595?v=3","gravatar_id":"","url":"https://api.github.com/users/dblandin","html_url":"https://github.com/dblandin","followers_url":"https://api.github.com/users/dblandin/followers","following_url":"https://api.github.com/users/dblandin/following{/other_user}","gists_url":"https://api.github.com/users/dblandin/gists{/gist_id}","starred_url":"https://api.github.com/users/dblandin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblandin/subscriptions","organizations_url":"https://api.github.com/users/dblandin/orgs","repos_url":"https://api.github.com/users/dblandin/repos","events_url":"https://api.github.com/users/dblandin/events{/privacy}","received_events_url":"https://api.github.com/users/dblandin/received_events","type":"User","site_admin":false},"body":"This PR updates the engine analysis to use bundler-audit's internal `Scanner` class which offers better access to gem and advisory information.\r\n\r\nThis particular change is also necessary to disable the gem's network access attempt in order to determine whether a Gemfile source is internal or external, an update which will be introduced following this PR.\r\n\r\nThis PR also takes a few refactoring steps to improve overall structure and clarify remediation point calculation.\r\n\r\nThere should be no behavioral changes as a result of the updates in this PR.\r\n\r\n@codeclimate/review :mag_right:\r\n\r\n**Before**\r\n\r\n```json\r\n{\r\n    \"categories\": [\r\n        \"Security\"\r\n    ],\r\n    \"check_name\": \"Insecure Dependency\",\r\n    \"content\": {\r\n        \"body\": \"**Advisory**: CVE-2013-1800\\n\\n**Criticality**: High\\n\\n**URL**: http://osvdb.org/show/osvdb/90742\\n\\n**Solution**: upgrade to >= 0.3.2\"\r\n    },\r\n    \"description\": \"crack Gem for Ruby Type Casting Parameter Parsing Remote Code Execution\",\r\n    \"location\": {\r\n        \"lines\": {\r\n            \"begin\": 87,\r\n            \"end\": 87\r\n        },\r\n        \"path\": \"Gemfile.lock\"\r\n    },\r\n    \"remediation_points\": 500000,\r\n    \"severity\": \"critical\",\r\n    \"type\": \"Issue\"\r\n}\r\n\r\n```\r\n\r\n**After**\r\n\r\n```json\r\n{\r\n    \"categories\": [\r\n        \"Security\"\r\n    ],\r\n    \"check_name\": \"Insecure Dependency\",\r\n    \"content\": {\r\n        \"body\": \"**Advisory**: CVE-2013-1800\\n\\n**Criticality**: High\\n\\n**URL**: http://osvdb.org/show/osvdb/90742\\n\\n**Solution**: upgrade to >= 0.3.2\"\r\n    },\r\n    \"description\": \"crack Gem for Ruby Type Casting Parameter Parsing Remote Code Execution\",\r\n    \"location\": {\r\n        \"lines\": {\r\n            \"begin\": 87,\r\n            \"end\": 87\r\n        },\r\n        \"path\": \"Gemfile.lock\"\r\n    },\r\n    \"remediation_points\": 500000,\r\n    \"severity\": \"critical\",\r\n    \"type\": \"Issue\"\r\n}\r\n```","created_at":"2016-02-11T22:12:50Z","updated_at":"2016-02-11T22:24:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aaf1c1fb8c8af25907004530ae3424ea51bf283f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/16/commits","review_comments_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/16/comments","review_comment_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues/16/comments","statuses_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/statuses/3bad277197d8c87e4684755e980c1af6f45d7ccf","head":{"label":"codeclimate:devon/use-bundler-audit-scanner-for-analysis","ref":"devon/use-bundler-audit-scanner-for-analysis","sha":"3bad277197d8c87e4684755e980c1af6f45d7ccf","user":{"login":"codeclimate","id":789641,"avatar_url":"https://avatars.githubusercontent.com/u/789641?v=3","gravatar_id":"","url":"https://api.github.com/users/codeclimate","html_url":"https://github.com/codeclimate","followers_url":"https://api.github.com/users/codeclimate/followers","following_url":"https://api.github.com/users/codeclimate/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate/subscriptions","organizations_url":"https://api.github.com/users/codeclimate/orgs","repos_url":"https://api.github.com/users/codeclimate/repos","events_url":"https://api.github.com/users/codeclimate/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate/received_events","type":"Organization","site_admin":false},"repo":{"id":37723493,"name":"codeclimate-bundler-audit","full_name":"codeclimate/codeclimate-bundler-audit","owner":{"login":"codeclimate","id":789641,"avatar_url":"https://avatars.githubusercontent.com/u/789641?v=3","gravatar_id":"","url":"https://api.github.com/users/codeclimate","html_url":"https://github.com/codeclimate","followers_url":"https://api.github.com/users/codeclimate/followers","following_url":"https://api.github.com/users/codeclimate/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate/subscriptions","organizations_url":"https://api.github.com/users/codeclimate/orgs","repos_url":"https://api.github.com/users/codeclimate/repos","events_url":"https://api.github.com/users/codeclimate/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codeclimate/codeclimate-bundler-audit","description":"Code Climate Engine for bundler-audit","fork":false,"url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit","forks_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/forks","keys_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/teams","hooks_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/hooks","issue_events_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues/events{/number}","events_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/events","assignees_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/assignees{/user}","branches_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/branches{/branch}","tags_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/tags","blobs_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/statuses/{sha}","languages_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/languages","stargazers_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/stargazers","contributors_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/contributors","subscribers_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/subscribers","subscription_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/subscription","commits_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/contents/{+path}","compare_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/merges","archive_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/downloads","issues_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues{/number}","pulls_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls{/number}","milestones_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/milestones{/number}","notifications_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/labels{/name}","releases_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/releases{/id}","deployments_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/deployments","created_at":"2015-06-19T13:33:42Z","updated_at":"2016-01-12T02:52:46Z","pushed_at":"2016-02-11T22:12:51Z","git_url":"git://github.com/codeclimate/codeclimate-bundler-audit.git","ssh_url":"git@github.com:codeclimate/codeclimate-bundler-audit.git","clone_url":"https://github.com/codeclimate/codeclimate-bundler-audit.git","svn_url":"https://github.com/codeclimate/codeclimate-bundler-audit","homepage":null,"size":32,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"codeclimate:master","ref":"master","sha":"f97ba5019c9cbdffabcf2b562cf6ea1332c46c87","user":{"login":"codeclimate","id":789641,"avatar_url":"https://avatars.githubusercontent.com/u/789641?v=3","gravatar_id":"","url":"https://api.github.com/users/codeclimate","html_url":"https://github.com/codeclimate","followers_url":"https://api.github.com/users/codeclimate/followers","following_url":"https://api.github.com/users/codeclimate/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate/subscriptions","organizations_url":"https://api.github.com/users/codeclimate/orgs","repos_url":"https://api.github.com/users/codeclimate/repos","events_url":"https://api.github.com/users/codeclimate/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate/received_events","type":"Organization","site_admin":false},"repo":{"id":37723493,"name":"codeclimate-bundler-audit","full_name":"codeclimate/codeclimate-bundler-audit","owner":{"login":"codeclimate","id":789641,"avatar_url":"https://avatars.githubusercontent.com/u/789641?v=3","gravatar_id":"","url":"https://api.github.com/users/codeclimate","html_url":"https://github.com/codeclimate","followers_url":"https://api.github.com/users/codeclimate/followers","following_url":"https://api.github.com/users/codeclimate/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate/subscriptions","organizations_url":"https://api.github.com/users/codeclimate/orgs","repos_url":"https://api.github.com/users/codeclimate/repos","events_url":"https://api.github.com/users/codeclimate/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codeclimate/codeclimate-bundler-audit","description":"Code Climate Engine for bundler-audit","fork":false,"url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit","forks_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/forks","keys_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/teams","hooks_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/hooks","issue_events_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues/events{/number}","events_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/events","assignees_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/assignees{/user}","branches_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/branches{/branch}","tags_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/tags","blobs_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/statuses/{sha}","languages_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/languages","stargazers_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/stargazers","contributors_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/contributors","subscribers_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/subscribers","subscription_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/subscription","commits_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/contents/{+path}","compare_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/merges","archive_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/downloads","issues_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues{/number}","pulls_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls{/number}","milestones_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/milestones{/number}","notifications_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/labels{/name}","releases_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/releases{/id}","deployments_url":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/deployments","created_at":"2015-06-19T13:33:42Z","updated_at":"2016-01-12T02:52:46Z","pushed_at":"2016-02-11T22:12:51Z","git_url":"git://github.com/codeclimate/codeclimate-bundler-audit.git","ssh_url":"git@github.com:codeclimate/codeclimate-bundler-audit.git","clone_url":"https://github.com/codeclimate/codeclimate-bundler-audit.git","svn_url":"https://github.com/codeclimate/codeclimate-bundler-audit","homepage":null,"size":32,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/16"},"html":{"href":"https://github.com/codeclimate/codeclimate-bundler-audit/pull/16"},"issue":{"href":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues/16"},"comments":{"href":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/codeclimate/codeclimate-bundler-audit/statuses/3bad277197d8c87e4684755e980c1af6f45d7ccf"}}}}