{"action":"created","comment":{"url":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/comments/79740939","id":79740939,"diff_hunk":"@@ -89,6 +91,12 @@ def __init__(self, server, event, request):\n             raise abc.ResponseExit(\n                     status=http.HTTPStatus.UNSUPPORTED_MEDIA_TYPE, text=msg)\n \n+        binary_content = await request.read()\n+\n+        if not Host._verify_signature(server.contrib_secret_token(), binary_content,\n+                                      request.headers['HTTP_X_HUB_SIGNATURE']):\n+            raise abc.ResponseExit(status=http.HTTPStatus.UNAUTHORIZED)","path":"ni/github.py","position":15,"original_position":15,"commit_id":"f7a224ca0290179617dfe9bec8815fa1d34c5664","original_commit_id":"f7a224ca0290179617dfe9bec8815fa1d34c5664","user":{"login":"brettcannon","id":54418,"avatar_url":"https://avatars.githubusercontent.com/u/54418?v=3","gravatar_id":"","url":"https://api.github.com/users/brettcannon","html_url":"https://github.com/brettcannon","followers_url":"https://api.github.com/users/brettcannon/followers","following_url":"https://api.github.com/users/brettcannon/following{/other_user}","gists_url":"https://api.github.com/users/brettcannon/gists{/gist_id}","starred_url":"https://api.github.com/users/brettcannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettcannon/subscriptions","organizations_url":"https://api.github.com/users/brettcannon/orgs","repos_url":"https://api.github.com/users/brettcannon/repos","events_url":"https://api.github.com/users/brettcannon/events{/privacy}","received_events_url":"https://api.github.com/users/brettcannon/received_events","type":"User","site_admin":false},"body":"We should log a warning that the signature check failed and then comment out the exception raising. That way it's easy to verify things are working before we flip this on permanently.","created_at":"2016-09-21T00:26:09Z","updated_at":"2016-09-21T00:31:05Z","html_url":"https://github.com/python/the-knights-who-say-ni/pull/41#discussion_r79740939","pull_request_url":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/comments/79740939"},"html":{"href":"https://github.com/python/the-knights-who-say-ni/pull/41#discussion_r79740939"},"pull_request":{"href":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/41","id":74707377,"html_url":"https://github.com/python/the-knights-who-say-ni/pull/41","diff_url":"https://github.com/python/the-knights-who-say-ni/pull/41.diff","patch_url":"https://github.com/python/the-knights-who-say-ni/pull/41.patch","issue_url":"https://api.github.com/repos/python/the-knights-who-say-ni/issues/41","number":41,"state":"open","locked":false,"title":"Issue 20: Validate GitHub payloads using webhook secret and hashing","user":{"login":"ueg1990","id":3393794,"avatar_url":"https://avatars.githubusercontent.com/u/3393794?v=3","gravatar_id":"","url":"https://api.github.com/users/ueg1990","html_url":"https://github.com/ueg1990","followers_url":"https://api.github.com/users/ueg1990/followers","following_url":"https://api.github.com/users/ueg1990/following{/other_user}","gists_url":"https://api.github.com/users/ueg1990/gists{/gist_id}","starred_url":"https://api.github.com/users/ueg1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ueg1990/subscriptions","organizations_url":"https://api.github.com/users/ueg1990/orgs","repos_url":"https://api.github.com/users/ueg1990/repos","events_url":"https://api.github.com/users/ueg1990/events{/privacy}","received_events_url":"https://api.github.com/users/ueg1990/received_events","type":"User","site_admin":false},"body":"This is a first attempt to implement #20. I was unsure on how to update the unit tests in test_github.py to accommodate this; currently I use patching. Let me know if it  should be another way","created_at":"2016-06-22T00:25:55Z","updated_at":"2016-09-21T00:31:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9417639aab943e048a0075b452d1c014c76eaf6a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/41/commits","review_comments_url":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/41/comments","review_comment_url":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python/the-knights-who-say-ni/issues/41/comments","statuses_url":"https://api.github.com/repos/python/the-knights-who-say-ni/statuses/f7a224ca0290179617dfe9bec8815fa1d34c5664","head":{"label":"ueg1990:ueg1990_issue_20","ref":"ueg1990_issue_20","sha":"f7a224ca0290179617dfe9bec8815fa1d34c5664","user":{"login":"ueg1990","id":3393794,"avatar_url":"https://avatars.githubusercontent.com/u/3393794?v=3","gravatar_id":"","url":"https://api.github.com/users/ueg1990","html_url":"https://github.com/ueg1990","followers_url":"https://api.github.com/users/ueg1990/followers","following_url":"https://api.github.com/users/ueg1990/following{/other_user}","gists_url":"https://api.github.com/users/ueg1990/gists{/gist_id}","starred_url":"https://api.github.com/users/ueg1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ueg1990/subscriptions","organizations_url":"https://api.github.com/users/ueg1990/orgs","repos_url":"https://api.github.com/users/ueg1990/repos","events_url":"https://api.github.com/users/ueg1990/events{/privacy}","received_events_url":"https://api.github.com/users/ueg1990/received_events","type":"User","site_admin":false},"repo":{"id":61581073,"name":"the-knights-who-say-ni","full_name":"ueg1990/the-knights-who-say-ni","owner":{"login":"ueg1990","id":3393794,"avatar_url":"https://avatars.githubusercontent.com/u/3393794?v=3","gravatar_id":"","url":"https://api.github.com/users/ueg1990","html_url":"https://github.com/ueg1990","followers_url":"https://api.github.com/users/ueg1990/followers","following_url":"https://api.github.com/users/ueg1990/following{/other_user}","gists_url":"https://api.github.com/users/ueg1990/gists{/gist_id}","starred_url":"https://api.github.com/users/ueg1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ueg1990/subscriptions","organizations_url":"https://api.github.com/users/ueg1990/orgs","repos_url":"https://api.github.com/users/ueg1990/repos","events_url":"https://api.github.com/users/ueg1990/events{/privacy}","received_events_url":"https://api.github.com/users/ueg1990/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ueg1990/the-knights-who-say-ni","description":"CLA enforcement bot for Python organization projects","fork":true,"url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni","forks_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/forks","keys_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/teams","hooks_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/hooks","issue_events_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/issues/events{/number}","events_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/events","assignees_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/assignees{/user}","branches_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/branches{/branch}","tags_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/tags","blobs_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/git/refs{/sha}","trees_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/statuses/{sha}","languages_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/languages","stargazers_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/stargazers","contributors_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/contributors","subscribers_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/subscribers","subscription_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/subscription","commits_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/commits{/sha}","git_commits_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/git/commits{/sha}","comments_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/comments{/number}","issue_comment_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/issues/comments{/number}","contents_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/contents/{+path}","compare_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/merges","archive_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/downloads","issues_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/issues{/number}","pulls_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/pulls{/number}","milestones_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/milestones{/number}","notifications_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/labels{/name}","releases_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/releases{/id}","deployments_url":"https://api.github.com/repos/ueg1990/the-knights-who-say-ni/deployments","created_at":"2016-06-20T21:19:56Z","updated_at":"2016-06-20T21:19:57Z","pushed_at":"2016-06-23T00:27:39Z","git_url":"git://github.com/ueg1990/the-knights-who-say-ni.git","ssh_url":"git@github.com:ueg1990/the-knights-who-say-ni.git","clone_url":"https://github.com/ueg1990/the-knights-who-say-ni.git","svn_url":"https://github.com/ueg1990/the-knights-who-say-ni","homepage":null,"size":137,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"python:master","ref":"master","sha":"9817e75bb811cfe4713cf571f49adaf687a52bd9","user":{"login":"python","id":1525981,"avatar_url":"https://avatars.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"repo":{"id":54906742,"name":"the-knights-who-say-ni","full_name":"python/the-knights-who-say-ni","owner":{"login":"python","id":1525981,"avatar_url":"https://avatars.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/the-knights-who-say-ni","description":"CLA enforcement bot for Python organization projects","fork":false,"url":"https://api.github.com/repos/python/the-knights-who-say-ni","forks_url":"https://api.github.com/repos/python/the-knights-who-say-ni/forks","keys_url":"https://api.github.com/repos/python/the-knights-who-say-ni/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/the-knights-who-say-ni/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/the-knights-who-say-ni/teams","hooks_url":"https://api.github.com/repos/python/the-knights-who-say-ni/hooks","issue_events_url":"https://api.github.com/repos/python/the-knights-who-say-ni/issues/events{/number}","events_url":"https://api.github.com/repos/python/the-knights-who-say-ni/events","assignees_url":"https://api.github.com/repos/python/the-knights-who-say-ni/assignees{/user}","branches_url":"https://api.github.com/repos/python/the-knights-who-say-ni/branches{/branch}","tags_url":"https://api.github.com/repos/python/the-knights-who-say-ni/tags","blobs_url":"https://api.github.com/repos/python/the-knights-who-say-ni/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/the-knights-who-say-ni/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/the-knights-who-say-ni/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/the-knights-who-say-ni/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/the-knights-who-say-ni/statuses/{sha}","languages_url":"https://api.github.com/repos/python/the-knights-who-say-ni/languages","stargazers_url":"https://api.github.com/repos/python/the-knights-who-say-ni/stargazers","contributors_url":"https://api.github.com/repos/python/the-knights-who-say-ni/contributors","subscribers_url":"https://api.github.com/repos/python/the-knights-who-say-ni/subscribers","subscription_url":"https://api.github.com/repos/python/the-knights-who-say-ni/subscription","commits_url":"https://api.github.com/repos/python/the-knights-who-say-ni/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/the-knights-who-say-ni/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/the-knights-who-say-ni/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/the-knights-who-say-ni/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/the-knights-who-say-ni/contents/{+path}","compare_url":"https://api.github.com/repos/python/the-knights-who-say-ni/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/the-knights-who-say-ni/merges","archive_url":"https://api.github.com/repos/python/the-knights-who-say-ni/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/the-knights-who-say-ni/downloads","issues_url":"https://api.github.com/repos/python/the-knights-who-say-ni/issues{/number}","pulls_url":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls{/number}","milestones_url":"https://api.github.com/repos/python/the-knights-who-say-ni/milestones{/number}","notifications_url":"https://api.github.com/repos/python/the-knights-who-say-ni/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/the-knights-who-say-ni/labels{/name}","releases_url":"https://api.github.com/repos/python/the-knights-who-say-ni/releases{/id}","deployments_url":"https://api.github.com/repos/python/the-knights-who-say-ni/deployments","created_at":"2016-03-28T16:39:27Z","updated_at":"2016-08-09T20:01:07Z","pushed_at":"2016-09-21T00:03:34Z","git_url":"git://github.com/python/the-knights-who-say-ni.git","ssh_url":"git@github.com:python/the-knights-who-say-ni.git","clone_url":"https://github.com/python/the-knights-who-say-ni.git","svn_url":"https://github.com/python/the-knights-who-say-ni","homepage":null,"size":115,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":9,"forks":7,"open_issues":9,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/41"},"html":{"href":"https://github.com/python/the-knights-who-say-ni/pull/41"},"issue":{"href":"https://api.github.com/repos/python/the-knights-who-say-ni/issues/41"},"comments":{"href":"https://api.github.com/repos/python/the-knights-who-say-ni/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python/the-knights-who-say-ni/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/python/the-knights-who-say-ni/statuses/f7a224ca0290179617dfe9bec8815fa1d34c5664"}}}}
{"actor":{"display_login":"brettcannon"}}