{"action":"opened","number":640,"pull_request":{"url":"https://api.github.com/repos/presidentbeef/brakeman/pulls/640","id":31668537,"html_url":"https://github.com/presidentbeef/brakeman/pull/640","diff_url":"https://github.com/presidentbeef/brakeman/pull/640.diff","patch_url":"https://github.com/presidentbeef/brakeman/pull/640.patch","issue_url":"https://api.github.com/repos/presidentbeef/brakeman/issues/640","number":640,"state":"open","locked":false,"title":"Special case `if [...].include? x`","user":{"login":"presidentbeef","id":75613,"avatar_url":"https://avatars.githubusercontent.com/u/75613?v=3","gravatar_id":"","url":"https://api.github.com/users/presidentbeef","html_url":"https://github.com/presidentbeef","followers_url":"https://api.github.com/users/presidentbeef/followers","following_url":"https://api.github.com/users/presidentbeef/following{/other_user}","gists_url":"https://api.github.com/users/presidentbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/presidentbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/presidentbeef/subscriptions","organizations_url":"https://api.github.com/users/presidentbeef/orgs","repos_url":"https://api.github.com/users/presidentbeef/repos","events_url":"https://api.github.com/users/presidentbeef/events{/privacy}","received_events_url":"https://api.github.com/users/presidentbeef/received_events","type":"User","site_admin":false},"body":"For code like this:\r\n\r\n```ruby\r\nif [1, 2, \"a\", \"b\"].include? x\r\n  do_something_with x\r\nend\r\n```\r\n\r\ninside the true branch `x` will be the first value of the array (in this case, `1`) because, logically, `x` must be one of those values, and all of them are likely just as safe (when they are all literals).\r\n\r\nThis allows Brakeman to avoid warning when a value has been whitelisted using this pattern","created_at":"2015-03-21T08:55:31Z","updated_at":"2015-03-21T08:55:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/presidentbeef/brakeman/pulls/640/commits","review_comments_url":"https://api.github.com/repos/presidentbeef/brakeman/pulls/640/comments","review_comment_url":"https://api.github.com/repos/presidentbeef/brakeman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/presidentbeef/brakeman/issues/640/comments","statuses_url":"https://api.github.com/repos/presidentbeef/brakeman/statuses/32a7bc625d72d398b0fedd6928f0114db85338a3","head":{"label":"presidentbeef:handle_array_include_guard","ref":"handle_array_include_guard","sha":"32a7bc625d72d398b0fedd6928f0114db85338a3","user":{"login":"presidentbeef","id":75613,"avatar_url":"https://avatars.githubusercontent.com/u/75613?v=3","gravatar_id":"","url":"https://api.github.com/users/presidentbeef","html_url":"https://github.com/presidentbeef","followers_url":"https://api.github.com/users/presidentbeef/followers","following_url":"https://api.github.com/users/presidentbeef/following{/other_user}","gists_url":"https://api.github.com/users/presidentbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/presidentbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/presidentbeef/subscriptions","organizations_url":"https://api.github.com/users/presidentbeef/orgs","repos_url":"https://api.github.com/users/presidentbeef/repos","events_url":"https://api.github.com/users/presidentbeef/events{/privacy}","received_events_url":"https://api.github.com/users/presidentbeef/received_events","type":"User","site_admin":false},"repo":{"id":865250,"name":"brakeman","full_name":"presidentbeef/brakeman","owner":{"login":"presidentbeef","id":75613,"avatar_url":"https://avatars.githubusercontent.com/u/75613?v=3","gravatar_id":"","url":"https://api.github.com/users/presidentbeef","html_url":"https://github.com/presidentbeef","followers_url":"https://api.github.com/users/presidentbeef/followers","following_url":"https://api.github.com/users/presidentbeef/following{/other_user}","gists_url":"https://api.github.com/users/presidentbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/presidentbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/presidentbeef/subscriptions","organizations_url":"https://api.github.com/users/presidentbeef/orgs","repos_url":"https://api.github.com/users/presidentbeef/repos","events_url":"https://api.github.com/users/presidentbeef/events{/privacy}","received_events_url":"https://api.github.com/users/presidentbeef/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/presidentbeef/brakeman","description":"A static analysis security vulnerability scanner for Ruby on Rails applications","fork":false,"url":"https://api.github.com/repos/presidentbeef/brakeman","forks_url":"https://api.github.com/repos/presidentbeef/brakeman/forks","keys_url":"https://api.github.com/repos/presidentbeef/brakeman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/presidentbeef/brakeman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/presidentbeef/brakeman/teams","hooks_url":"https://api.github.com/repos/presidentbeef/brakeman/hooks","issue_events_url":"https://api.github.com/repos/presidentbeef/brakeman/issues/events{/number}","events_url":"https://api.github.com/repos/presidentbeef/brakeman/events","assignees_url":"https://api.github.com/repos/presidentbeef/brakeman/assignees{/user}","branches_url":"https://api.github.com/repos/presidentbeef/brakeman/branches{/branch}","tags_url":"https://api.github.com/repos/presidentbeef/brakeman/tags","blobs_url":"https://api.github.com/repos/presidentbeef/brakeman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/presidentbeef/brakeman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/presidentbeef/brakeman/git/refs{/sha}","trees_url":"https://api.github.com/repos/presidentbeef/brakeman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/presidentbeef/brakeman/statuses/{sha}","languages_url":"https://api.github.com/repos/presidentbeef/brakeman/languages","stargazers_url":"https://api.github.com/repos/presidentbeef/brakeman/stargazers","contributors_url":"https://api.github.com/repos/presidentbeef/brakeman/contributors","subscribers_url":"https://api.github.com/repos/presidentbeef/brakeman/subscribers","subscription_url":"https://api.github.com/repos/presidentbeef/brakeman/subscription","commits_url":"https://api.github.com/repos/presidentbeef/brakeman/commits{/sha}","git_commits_url":"https://api.github.com/repos/presidentbeef/brakeman/git/commits{/sha}","comments_url":"https://api.github.com/repos/presidentbeef/brakeman/comments{/number}","issue_comment_url":"https://api.github.com/repos/presidentbeef/brakeman/issues/comments{/number}","contents_url":"https://api.github.com/repos/presidentbeef/brakeman/contents/{+path}","compare_url":"https://api.github.com/repos/presidentbeef/brakeman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/presidentbeef/brakeman/merges","archive_url":"https://api.github.com/repos/presidentbeef/brakeman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/presidentbeef/brakeman/downloads","issues_url":"https://api.github.com/repos/presidentbeef/brakeman/issues{/number}","pulls_url":"https://api.github.com/repos/presidentbeef/brakeman/pulls{/number}","milestones_url":"https://api.github.com/repos/presidentbeef/brakeman/milestones{/number}","notifications_url":"https://api.github.com/repos/presidentbeef/brakeman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/presidentbeef/brakeman/labels{/name}","releases_url":"https://api.github.com/repos/presidentbeef/brakeman/releases{/id}","created_at":"2010-08-27T00:00:58Z","updated_at":"2015-03-20T19:41:18Z","pushed_at":"2015-03-21T08:49:12Z","git_url":"git://github.com/presidentbeef/brakeman.git","ssh_url":"git@github.com:presidentbeef/brakeman.git","clone_url":"https://github.com/presidentbeef/brakeman.git","svn_url":"https://github.com/presidentbeef/brakeman","homepage":"http://brakemanscanner.org/","size":27366,"stargazers_count":2375,"watchers_count":2375,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":187,"mirror_url":null,"open_issues_count":31,"forks":187,"open_issues":31,"watchers":2375,"default_branch":"master"}},"base":{"label":"presidentbeef:master","ref":"master","sha":"2994bb5155a7870429bf47d6c84ba5b2eb56d158","user":{"login":"presidentbeef","id":75613,"avatar_url":"https://avatars.githubusercontent.com/u/75613?v=3","gravatar_id":"","url":"https://api.github.com/users/presidentbeef","html_url":"https://github.com/presidentbeef","followers_url":"https://api.github.com/users/presidentbeef/followers","following_url":"https://api.github.com/users/presidentbeef/following{/other_user}","gists_url":"https://api.github.com/users/presidentbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/presidentbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/presidentbeef/subscriptions","organizations_url":"https://api.github.com/users/presidentbeef/orgs","repos_url":"https://api.github.com/users/presidentbeef/repos","events_url":"https://api.github.com/users/presidentbeef/events{/privacy}","received_events_url":"https://api.github.com/users/presidentbeef/received_events","type":"User","site_admin":false},"repo":{"id":865250,"name":"brakeman","full_name":"presidentbeef/brakeman","owner":{"login":"presidentbeef","id":75613,"avatar_url":"https://avatars.githubusercontent.com/u/75613?v=3","gravatar_id":"","url":"https://api.github.com/users/presidentbeef","html_url":"https://github.com/presidentbeef","followers_url":"https://api.github.com/users/presidentbeef/followers","following_url":"https://api.github.com/users/presidentbeef/following{/other_user}","gists_url":"https://api.github.com/users/presidentbeef/gists{/gist_id}","starred_url":"https://api.github.com/users/presidentbeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/presidentbeef/subscriptions","organizations_url":"https://api.github.com/users/presidentbeef/orgs","repos_url":"https://api.github.com/users/presidentbeef/repos","events_url":"https://api.github.com/users/presidentbeef/events{/privacy}","received_events_url":"https://api.github.com/users/presidentbeef/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/presidentbeef/brakeman","description":"A static analysis security vulnerability scanner for Ruby on Rails applications","fork":false,"url":"https://api.github.com/repos/presidentbeef/brakeman","forks_url":"https://api.github.com/repos/presidentbeef/brakeman/forks","keys_url":"https://api.github.com/repos/presidentbeef/brakeman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/presidentbeef/brakeman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/presidentbeef/brakeman/teams","hooks_url":"https://api.github.com/repos/presidentbeef/brakeman/hooks","issue_events_url":"https://api.github.com/repos/presidentbeef/brakeman/issues/events{/number}","events_url":"https://api.github.com/repos/presidentbeef/brakeman/events","assignees_url":"https://api.github.com/repos/presidentbeef/brakeman/assignees{/user}","branches_url":"https://api.github.com/repos/presidentbeef/brakeman/branches{/branch}","tags_url":"https://api.github.com/repos/presidentbeef/brakeman/tags","blobs_url":"https://api.github.com/repos/presidentbeef/brakeman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/presidentbeef/brakeman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/presidentbeef/brakeman/git/refs{/sha}","trees_url":"https://api.github.com/repos/presidentbeef/brakeman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/presidentbeef/brakeman/statuses/{sha}","languages_url":"https://api.github.com/repos/presidentbeef/brakeman/languages","stargazers_url":"https://api.github.com/repos/presidentbeef/brakeman/stargazers","contributors_url":"https://api.github.com/repos/presidentbeef/brakeman/contributors","subscribers_url":"https://api.github.com/repos/presidentbeef/brakeman/subscribers","subscription_url":"https://api.github.com/repos/presidentbeef/brakeman/subscription","commits_url":"https://api.github.com/repos/presidentbeef/brakeman/commits{/sha}","git_commits_url":"https://api.github.com/repos/presidentbeef/brakeman/git/commits{/sha}","comments_url":"https://api.github.com/repos/presidentbeef/brakeman/comments{/number}","issue_comment_url":"https://api.github.com/repos/presidentbeef/brakeman/issues/comments{/number}","contents_url":"https://api.github.com/repos/presidentbeef/brakeman/contents/{+path}","compare_url":"https://api.github.com/repos/presidentbeef/brakeman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/presidentbeef/brakeman/merges","archive_url":"https://api.github.com/repos/presidentbeef/brakeman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/presidentbeef/brakeman/downloads","issues_url":"https://api.github.com/repos/presidentbeef/brakeman/issues{/number}","pulls_url":"https://api.github.com/repos/presidentbeef/brakeman/pulls{/number}","milestones_url":"https://api.github.com/repos/presidentbeef/brakeman/milestones{/number}","notifications_url":"https://api.github.com/repos/presidentbeef/brakeman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/presidentbeef/brakeman/labels{/name}","releases_url":"https://api.github.com/repos/presidentbeef/brakeman/releases{/id}","created_at":"2010-08-27T00:00:58Z","updated_at":"2015-03-20T19:41:18Z","pushed_at":"2015-03-21T08:49:12Z","git_url":"git://github.com/presidentbeef/brakeman.git","ssh_url":"git@github.com:presidentbeef/brakeman.git","clone_url":"https://github.com/presidentbeef/brakeman.git","svn_url":"https://github.com/presidentbeef/brakeman","homepage":"http://brakemanscanner.org/","size":27366,"stargazers_count":2375,"watchers_count":2375,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":187,"mirror_url":null,"open_issues_count":31,"forks":187,"open_issues":31,"watchers":2375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/presidentbeef/brakeman/pulls/640"},"html":{"href":"https://github.com/presidentbeef/brakeman/pull/640"},"issue":{"href":"https://api.github.com/repos/presidentbeef/brakeman/issues/640"},"comments":{"href":"https://api.github.com/repos/presidentbeef/brakeman/issues/640/comments"},"review_comments":{"href":"https://api.github.com/repos/presidentbeef/brakeman/pulls/640/comments"},"review_comment":{"href":"https://api.github.com/repos/presidentbeef/brakeman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/presidentbeef/brakeman/pulls/640/commits"},"statuses":{"href":"https://api.github.com/repos/presidentbeef/brakeman/statuses/32a7bc625d72d398b0fedd6928f0114db85338a3"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":61,"deletions":1,"changed_files":3}}