{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/versions/pulls/comments/78023199","id":78023199,"diff_hunk":"@@ -82,5 +96,82 @@ public class CommitPushedController : ApiController\n \n             Trace.TraceInformation(\"CommitPushed Complete\");\n         }\n+\n+        private void VerifyPayloadSignature(byte[] requestContent)","path":"Maestro/src/Microsoft.DotNet.Maestro.WebApi/Controllers/CommitPushedController.cs","position":40,"original_position":40,"commit_id":"7b73ff3737e37ef0a59c5b2ef228a15a700e59cd","original_commit_id":"7b73ff3737e37ef0a59c5b2ef228a15a700e59cd","user":{"login":"eerhardt","id":8291187,"avatar_url":"https://avatars.githubusercontent.com/u/8291187?v=3","gravatar_id":"","url":"https://api.github.com/users/eerhardt","html_url":"https://github.com/eerhardt","followers_url":"https://api.github.com/users/eerhardt/followers","following_url":"https://api.github.com/users/eerhardt/following{/other_user}","gists_url":"https://api.github.com/users/eerhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/eerhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eerhardt/subscriptions","organizations_url":"https://api.github.com/users/eerhardt/orgs","repos_url":"https://api.github.com/users/eerhardt/repos","events_url":"https://api.github.com/users/eerhardt/events{/privacy}","received_events_url":"https://api.github.com/users/eerhardt/received_events","type":"User","site_admin":false},"body":"I think it would make sense to move all this logic off into its own class.","created_at":"2016-09-08T14:57:22Z","updated_at":"2016-09-08T14:57:22Z","html_url":"https://github.com/dotnet/versions/pull/63#discussion_r78023199","pull_request_url":"https://api.github.com/repos/dotnet/versions/pulls/63","_links":{"self":{"href":"https://api.github.com/repos/dotnet/versions/pulls/comments/78023199"},"html":{"href":"https://github.com/dotnet/versions/pull/63#discussion_r78023199"},"pull_request":{"href":"https://api.github.com/repos/dotnet/versions/pulls/63"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/versions/pulls/63","id":84383862,"html_url":"https://github.com/dotnet/versions/pull/63","diff_url":"https://github.com/dotnet/versions/pull/63.diff","patch_url":"https://github.com/dotnet/versions/pull/63.patch","issue_url":"https://api.github.com/repos/dotnet/versions/issues/63","number":63,"state":"open","locked":false,"title":"Verify payload signatures from webhooks","user":{"login":"naamunds","id":8249261,"avatar_url":"https://avatars.githubusercontent.com/u/8249261?v=3","gravatar_id":"","url":"https://api.github.com/users/naamunds","html_url":"https://github.com/naamunds","followers_url":"https://api.github.com/users/naamunds/followers","following_url":"https://api.github.com/users/naamunds/following{/other_user}","gists_url":"https://api.github.com/users/naamunds/gists{/gist_id}","starred_url":"https://api.github.com/users/naamunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naamunds/subscriptions","organizations_url":"https://api.github.com/users/naamunds/orgs","repos_url":"https://api.github.com/users/naamunds/repos","events_url":"https://api.github.com/users/naamunds/events{/privacy}","received_events_url":"https://api.github.com/users/naamunds/received_events","type":"User","site_admin":false},"body":"When Maestro receives an HTTP request, verify that it's from an\r\nauthorized source and wasn't corrupted by comparing the payload\r\nsignature to the HMAC calculated from the HTTP request's content with\r\nthe webhook's secret token as the key.\r\n\r\ncc: @eerhardt @bartonjs ","created_at":"2016-09-07T22:18:33Z","updated_at":"2016-09-08T14:57:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"912ccc308297765ced3286cd46aef93925884aea","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/versions/pulls/63/commits","review_comments_url":"https://api.github.com/repos/dotnet/versions/pulls/63/comments","review_comment_url":"https://api.github.com/repos/dotnet/versions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/versions/issues/63/comments","statuses_url":"https://api.github.com/repos/dotnet/versions/statuses/7b73ff3737e37ef0a59c5b2ef228a15a700e59cd","head":{"label":"naamunds:VerifyPayloadSignature","ref":"VerifyPayloadSignature","sha":"7b73ff3737e37ef0a59c5b2ef228a15a700e59cd","user":{"login":"naamunds","id":8249261,"avatar_url":"https://avatars.githubusercontent.com/u/8249261?v=3","gravatar_id":"","url":"https://api.github.com/users/naamunds","html_url":"https://github.com/naamunds","followers_url":"https://api.github.com/users/naamunds/followers","following_url":"https://api.github.com/users/naamunds/following{/other_user}","gists_url":"https://api.github.com/users/naamunds/gists{/gist_id}","starred_url":"https://api.github.com/users/naamunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naamunds/subscriptions","organizations_url":"https://api.github.com/users/naamunds/orgs","repos_url":"https://api.github.com/users/naamunds/repos","events_url":"https://api.github.com/users/naamunds/events{/privacy}","received_events_url":"https://api.github.com/users/naamunds/received_events","type":"User","site_admin":false},"repo":{"id":62753705,"name":"versions","full_name":"naamunds/versions","owner":{"login":"naamunds","id":8249261,"avatar_url":"https://avatars.githubusercontent.com/u/8249261?v=3","gravatar_id":"","url":"https://api.github.com/users/naamunds","html_url":"https://github.com/naamunds","followers_url":"https://api.github.com/users/naamunds/followers","following_url":"https://api.github.com/users/naamunds/following{/other_user}","gists_url":"https://api.github.com/users/naamunds/gists{/gist_id}","starred_url":"https://api.github.com/users/naamunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naamunds/subscriptions","organizations_url":"https://api.github.com/users/naamunds/orgs","repos_url":"https://api.github.com/users/naamunds/repos","events_url":"https://api.github.com/users/naamunds/events{/privacy}","received_events_url":"https://api.github.com/users/naamunds/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/naamunds/versions","description":"This repo contains information about the various component versions that ship with .NET Core. ","fork":true,"url":"https://api.github.com/repos/naamunds/versions","forks_url":"https://api.github.com/repos/naamunds/versions/forks","keys_url":"https://api.github.com/repos/naamunds/versions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/naamunds/versions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/naamunds/versions/teams","hooks_url":"https://api.github.com/repos/naamunds/versions/hooks","issue_events_url":"https://api.github.com/repos/naamunds/versions/issues/events{/number}","events_url":"https://api.github.com/repos/naamunds/versions/events","assignees_url":"https://api.github.com/repos/naamunds/versions/assignees{/user}","branches_url":"https://api.github.com/repos/naamunds/versions/branches{/branch}","tags_url":"https://api.github.com/repos/naamunds/versions/tags","blobs_url":"https://api.github.com/repos/naamunds/versions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/naamunds/versions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/naamunds/versions/git/refs{/sha}","trees_url":"https://api.github.com/repos/naamunds/versions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/naamunds/versions/statuses/{sha}","languages_url":"https://api.github.com/repos/naamunds/versions/languages","stargazers_url":"https://api.github.com/repos/naamunds/versions/stargazers","contributors_url":"https://api.github.com/repos/naamunds/versions/contributors","subscribers_url":"https://api.github.com/repos/naamunds/versions/subscribers","subscription_url":"https://api.github.com/repos/naamunds/versions/subscription","commits_url":"https://api.github.com/repos/naamunds/versions/commits{/sha}","git_commits_url":"https://api.github.com/repos/naamunds/versions/git/commits{/sha}","comments_url":"https://api.github.com/repos/naamunds/versions/comments{/number}","issue_comment_url":"https://api.github.com/repos/naamunds/versions/issues/comments{/number}","contents_url":"https://api.github.com/repos/naamunds/versions/contents/{+path}","compare_url":"https://api.github.com/repos/naamunds/versions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/naamunds/versions/merges","archive_url":"https://api.github.com/repos/naamunds/versions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/naamunds/versions/downloads","issues_url":"https://api.github.com/repos/naamunds/versions/issues{/number}","pulls_url":"https://api.github.com/repos/naamunds/versions/pulls{/number}","milestones_url":"https://api.github.com/repos/naamunds/versions/milestones{/number}","notifications_url":"https://api.github.com/repos/naamunds/versions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/naamunds/versions/labels{/name}","releases_url":"https://api.github.com/repos/naamunds/versions/releases{/id}","deployments_url":"https://api.github.com/repos/naamunds/versions/deployments","created_at":"2016-07-06T21:13:19Z","updated_at":"2016-07-06T21:13:20Z","pushed_at":"2016-09-07T22:16:18Z","git_url":"git://github.com/naamunds/versions.git","ssh_url":"git@github.com:naamunds/versions.git","clone_url":"https://github.com/naamunds/versions.git","svn_url":"https://github.com/naamunds/versions","homepage":null,"size":1451,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"dotnet:master","ref":"master","sha":"b1b19cf6db0b90e96e616ecf2f514f49faa260e7","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":56803734,"name":"versions","full_name":"dotnet/versions","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/versions","description":"This repo contains information about the various component versions that ship with .NET Core. ","fork":false,"url":"https://api.github.com/repos/dotnet/versions","forks_url":"https://api.github.com/repos/dotnet/versions/forks","keys_url":"https://api.github.com/repos/dotnet/versions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/versions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/versions/teams","hooks_url":"https://api.github.com/repos/dotnet/versions/hooks","issue_events_url":"https://api.github.com/repos/dotnet/versions/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/versions/events","assignees_url":"https://api.github.com/repos/dotnet/versions/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/versions/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/versions/tags","blobs_url":"https://api.github.com/repos/dotnet/versions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/versions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/versions/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/versions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/versions/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/versions/languages","stargazers_url":"https://api.github.com/repos/dotnet/versions/stargazers","contributors_url":"https://api.github.com/repos/dotnet/versions/contributors","subscribers_url":"https://api.github.com/repos/dotnet/versions/subscribers","subscription_url":"https://api.github.com/repos/dotnet/versions/subscription","commits_url":"https://api.github.com/repos/dotnet/versions/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/versions/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/versions/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/versions/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/versions/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/versions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/versions/merges","archive_url":"https://api.github.com/repos/dotnet/versions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/versions/downloads","issues_url":"https://api.github.com/repos/dotnet/versions/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/versions/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/versions/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/versions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/versions/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/versions/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/versions/deployments","created_at":"2016-04-21T20:30:21Z","updated_at":"2016-09-08T10:16:27Z","pushed_at":"2016-09-08T08:01:28Z","git_url":"git://github.com/dotnet/versions.git","ssh_url":"git@github.com:dotnet/versions.git","clone_url":"https://github.com/dotnet/versions.git","svn_url":"https://github.com/dotnet/versions","homepage":null,"size":1556,"stargazers_count":10,"watchers_count":10,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":2,"forks":16,"open_issues":2,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/versions/pulls/63"},"html":{"href":"https://github.com/dotnet/versions/pull/63"},"issue":{"href":"https://api.github.com/repos/dotnet/versions/issues/63"},"comments":{"href":"https://api.github.com/repos/dotnet/versions/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/versions/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/versions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/versions/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/versions/statuses/7b73ff3737e37ef0a59c5b2ef228a15a700e59cd"}}}}
{"actor":{"display_login":"eerhardt"}}