{"action":"created","comment":{"url":"https://api.github.com/repos/slackhq/go-audit/pulls/comments/224257719","pull_request_review_id":163581700,"id":224257719,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDI1NzcxOQ==","diff_hunk":"@@ -99,6 +104,52 @@ func (amg *AuditMessageGroup) AddMessage(am *AuditMessage) {\n \t}\n }\n \n+// Find all `saddr=` occurrences in a message and do a lookup\n+func (amg *AuditMessageGroup) mapDns(am *AuditMessage) {\n+\tdata := am.Data\n+\tstart := 0\n+\tend := 0\n+\n+\tfor {\n+\t\tif start = strings.Index(data, \"saddr=\"); start < 0 {\n+\t\t\tbreak\n+\t\t}\n+\n+\t\t// Progress the start point beyond the = sign\n+\t\tstart += 6\n+\t\tif end = strings.IndexByte(data[start:], spaceChar); end < 0 {\n+\t\t\tend = len(data) - start\n+\t\t\tif end > 34 {","path":"parser.go","position":52,"original_position":52,"commit_id":"588946b856af7bfe730f174281ba49489d5c9f38","original_commit_id":"588946b856af7bfe730f174281ba49489d5c9f38","user":{"login":"nbrownus","id":957319,"node_id":"MDQ6VXNlcjk1NzMxOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/957319?v=4","gravatar_id":"","url":"https://api.github.com/users/nbrownus","html_url":"https://github.com/nbrownus","followers_url":"https://api.github.com/users/nbrownus/followers","following_url":"https://api.github.com/users/nbrownus/following{/other_user}","gists_url":"https://api.github.com/users/nbrownus/gists{/gist_id}","starred_url":"https://api.github.com/users/nbrownus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbrownus/subscriptions","organizations_url":"https://api.github.com/users/nbrownus/orgs","repos_url":"https://api.github.com/users/nbrownus/repos","events_url":"https://api.github.com/users/nbrownus/events{/privacy}","received_events_url":"https://api.github.com/users/nbrownus/received_events","type":"User","site_admin":false},"body":"How did you arrive at this length? Make it a constant and document the parts that get to 34","created_at":"2018-10-10T22:07:31Z","updated_at":"2018-10-10T22:07:32Z","html_url":"https://github.com/slackhq/go-audit/pull/55#discussion_r224257719","pull_request_url":"https://api.github.com/repos/slackhq/go-audit/pulls/55","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/slackhq/go-audit/pulls/comments/224257719"},"html":{"href":"https://github.com/slackhq/go-audit/pull/55#discussion_r224257719"},"pull_request":{"href":"https://api.github.com/repos/slackhq/go-audit/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/slackhq/go-audit/pulls/55","id":220789200,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNzg5MjAw","html_url":"https://github.com/slackhq/go-audit/pull/55","diff_url":"https://github.com/slackhq/go-audit/pull/55.diff","patch_url":"https://github.com/slackhq/go-audit/pull/55.patch","issue_url":"https://api.github.com/repos/slackhq/go-audit/issues/55","number":55,"state":"open","locked":false,"title":"Start playing with dnstap","user":{"login":"alanhlam","id":1508503,"node_id":"MDQ6VXNlcjE1MDg1MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1508503?v=4","gravatar_id":"","url":"https://api.github.com/users/alanhlam","html_url":"https://github.com/alanhlam","followers_url":"https://api.github.com/users/alanhlam/followers","following_url":"https://api.github.com/users/alanhlam/following{/other_user}","gists_url":"https://api.github.com/users/alanhlam/gists{/gist_id}","starred_url":"https://api.github.com/users/alanhlam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanhlam/subscriptions","organizations_url":"https://api.github.com/users/alanhlam/orgs","repos_url":"https://api.github.com/users/alanhlam/repos","events_url":"https://api.github.com/users/alanhlam/events{/privacy}","received_events_url":"https://api.github.com/users/alanhlam/received_events","type":"User","site_admin":false},"body":"* [ ] I've read and understood the [Contributing guidelines](https://github.com/slackhq/go-audit/blob/master/.github/CONTRIBUTING.md) and have done my best effort to follow them.\r\n* [ ] I've read and agree to the [Code of Conduct](https://github.com/slackhq/go-audit/blob/master/CODE_OF_CONDUCT.md).\r\n* [ ] I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.\r\n* [ ] I've a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferrably).\r\n* [ ] I've written tests to cover the new code and functionality included in this PR.\r\n* [ ] I've read, agree to, and signed the [Contributor License Agreement (CLA)](https://docs.google.com/a/slack-corp.com/forms/d/1q_w8rlJG_x_xJOoSUMNl7R35rkpA7N6pUkKhfHHMD9c/viewform).\r\n\r\n#### PR Summary\r\n\r\nwip, go-audit dnstap client\r\n\r\n> e.g. New functionality for producing whatsits.\r\n\r\n#### Related Issues\r\n\r\n> e.g. Fixes #206 and closes #230\r\n\r\n#### Test strategy\r\n\r\n> e.g. Add tests around whatsit production.\r\n","created_at":"2018-10-05T18:38:00Z","updated_at":"2018-10-10T22:07:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"087064f03d3e03f9b40dd2fa3eb44eb04aa2a71e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/slackhq/go-audit/pulls/55/commits","review_comments_url":"https://api.github.com/repos/slackhq/go-audit/pulls/55/comments","review_comment_url":"https://api.github.com/repos/slackhq/go-audit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slackhq/go-audit/issues/55/comments","statuses_url":"https://api.github.com/repos/slackhq/go-audit/statuses/588946b856af7bfe730f174281ba49489d5c9f38","head":{"label":"alanhlam:start-playing-with-dnstap","ref":"start-playing-with-dnstap","sha":"588946b856af7bfe730f174281ba49489d5c9f38","user":{"login":"alanhlam","id":1508503,"node_id":"MDQ6VXNlcjE1MDg1MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1508503?v=4","gravatar_id":"","url":"https://api.github.com/users/alanhlam","html_url":"https://github.com/alanhlam","followers_url":"https://api.github.com/users/alanhlam/followers","following_url":"https://api.github.com/users/alanhlam/following{/other_user}","gists_url":"https://api.github.com/users/alanhlam/gists{/gist_id}","starred_url":"https://api.github.com/users/alanhlam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanhlam/subscriptions","organizations_url":"https://api.github.com/users/alanhlam/orgs","repos_url":"https://api.github.com/users/alanhlam/repos","events_url":"https://api.github.com/users/alanhlam/events{/privacy}","received_events_url":"https://api.github.com/users/alanhlam/received_events","type":"User","site_admin":false},"repo":{"id":150651442,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA2NTE0NDI=","name":"go-audit","full_name":"alanhlam/go-audit","private":false,"owner":{"login":"alanhlam","id":1508503,"node_id":"MDQ6VXNlcjE1MDg1MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1508503?v=4","gravatar_id":"","url":"https://api.github.com/users/alanhlam","html_url":"https://github.com/alanhlam","followers_url":"https://api.github.com/users/alanhlam/followers","following_url":"https://api.github.com/users/alanhlam/following{/other_user}","gists_url":"https://api.github.com/users/alanhlam/gists{/gist_id}","starred_url":"https://api.github.com/users/alanhlam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanhlam/subscriptions","organizations_url":"https://api.github.com/users/alanhlam/orgs","repos_url":"https://api.github.com/users/alanhlam/repos","events_url":"https://api.github.com/users/alanhlam/events{/privacy}","received_events_url":"https://api.github.com/users/alanhlam/received_events","type":"User","site_admin":false},"html_url":"https://github.com/alanhlam/go-audit","description":"go-audit is an alternative to the auditd daemon that ships with many distros","fork":true,"url":"https://api.github.com/repos/alanhlam/go-audit","forks_url":"https://api.github.com/repos/alanhlam/go-audit/forks","keys_url":"https://api.github.com/repos/alanhlam/go-audit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alanhlam/go-audit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alanhlam/go-audit/teams","hooks_url":"https://api.github.com/repos/alanhlam/go-audit/hooks","issue_events_url":"https://api.github.com/repos/alanhlam/go-audit/issues/events{/number}","events_url":"https://api.github.com/repos/alanhlam/go-audit/events","assignees_url":"https://api.github.com/repos/alanhlam/go-audit/assignees{/user}","branches_url":"https://api.github.com/repos/alanhlam/go-audit/branches{/branch}","tags_url":"https://api.github.com/repos/alanhlam/go-audit/tags","blobs_url":"https://api.github.com/repos/alanhlam/go-audit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alanhlam/go-audit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alanhlam/go-audit/git/refs{/sha}","trees_url":"https://api.github.com/repos/alanhlam/go-audit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alanhlam/go-audit/statuses/{sha}","languages_url":"https://api.github.com/repos/alanhlam/go-audit/languages","stargazers_url":"https://api.github.com/repos/alanhlam/go-audit/stargazers","contributors_url":"https://api.github.com/repos/alanhlam/go-audit/contributors","subscribers_url":"https://api.github.com/repos/alanhlam/go-audit/subscribers","subscription_url":"https://api.github.com/repos/alanhlam/go-audit/subscription","commits_url":"https://api.github.com/repos/alanhlam/go-audit/commits{/sha}","git_commits_url":"https://api.github.com/repos/alanhlam/go-audit/git/commits{/sha}","comments_url":"https://api.github.com/repos/alanhlam/go-audit/comments{/number}","issue_comment_url":"https://api.github.com/repos/alanhlam/go-audit/issues/comments{/number}","contents_url":"https://api.github.com/repos/alanhlam/go-audit/contents/{+path}","compare_url":"https://api.github.com/repos/alanhlam/go-audit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alanhlam/go-audit/merges","archive_url":"https://api.github.com/repos/alanhlam/go-audit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alanhlam/go-audit/downloads","issues_url":"https://api.github.com/repos/alanhlam/go-audit/issues{/number}","pulls_url":"https://api.github.com/repos/alanhlam/go-audit/pulls{/number}","milestones_url":"https://api.github.com/repos/alanhlam/go-audit/milestones{/number}","notifications_url":"https://api.github.com/repos/alanhlam/go-audit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alanhlam/go-audit/labels{/name}","releases_url":"https://api.github.com/repos/alanhlam/go-audit/releases{/id}","deployments_url":"https://api.github.com/repos/alanhlam/go-audit/deployments","created_at":"2018-09-27T21:43:56Z","updated_at":"2018-09-27T21:43:58Z","pushed_at":"2018-10-10T18:26:46Z","git_url":"git://github.com/alanhlam/go-audit.git","ssh_url":"git@github.com:alanhlam/go-audit.git","clone_url":"https://github.com/alanhlam/go-audit.git","svn_url":"https://github.com/alanhlam/go-audit","homepage":"","size":282,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"slackhq:master","ref":"master","sha":"c160a22466d30f2ec0b7e3fa3ad6397cdff96460","user":{"login":"slackhq","id":6911160,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTExNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/6911160?v=4","gravatar_id":"","url":"https://api.github.com/users/slackhq","html_url":"https://github.com/slackhq","followers_url":"https://api.github.com/users/slackhq/followers","following_url":"https://api.github.com/users/slackhq/following{/other_user}","gists_url":"https://api.github.com/users/slackhq/gists{/gist_id}","starred_url":"https://api.github.com/users/slackhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slackhq/subscriptions","organizations_url":"https://api.github.com/users/slackhq/orgs","repos_url":"https://api.github.com/users/slackhq/repos","events_url":"https://api.github.com/users/slackhq/events{/privacy}","received_events_url":"https://api.github.com/users/slackhq/received_events","type":"Organization","site_admin":false},"repo":{"id":73417046,"node_id":"MDEwOlJlcG9zaXRvcnk3MzQxNzA0Ng==","name":"go-audit","full_name":"slackhq/go-audit","private":false,"owner":{"login":"slackhq","id":6911160,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTExNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/6911160?v=4","gravatar_id":"","url":"https://api.github.com/users/slackhq","html_url":"https://github.com/slackhq","followers_url":"https://api.github.com/users/slackhq/followers","following_url":"https://api.github.com/users/slackhq/following{/other_user}","gists_url":"https://api.github.com/users/slackhq/gists{/gist_id}","starred_url":"https://api.github.com/users/slackhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slackhq/subscriptions","organizations_url":"https://api.github.com/users/slackhq/orgs","repos_url":"https://api.github.com/users/slackhq/repos","events_url":"https://api.github.com/users/slackhq/events{/privacy}","received_events_url":"https://api.github.com/users/slackhq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/slackhq/go-audit","description":"go-audit is an alternative to the auditd daemon that ships with many distros","fork":false,"url":"https://api.github.com/repos/slackhq/go-audit","forks_url":"https://api.github.com/repos/slackhq/go-audit/forks","keys_url":"https://api.github.com/repos/slackhq/go-audit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slackhq/go-audit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slackhq/go-audit/teams","hooks_url":"https://api.github.com/repos/slackhq/go-audit/hooks","issue_events_url":"https://api.github.com/repos/slackhq/go-audit/issues/events{/number}","events_url":"https://api.github.com/repos/slackhq/go-audit/events","assignees_url":"https://api.github.com/repos/slackhq/go-audit/assignees{/user}","branches_url":"https://api.github.com/repos/slackhq/go-audit/branches{/branch}","tags_url":"https://api.github.com/repos/slackhq/go-audit/tags","blobs_url":"https://api.github.com/repos/slackhq/go-audit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slackhq/go-audit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slackhq/go-audit/git/refs{/sha}","trees_url":"https://api.github.com/repos/slackhq/go-audit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slackhq/go-audit/statuses/{sha}","languages_url":"https://api.github.com/repos/slackhq/go-audit/languages","stargazers_url":"https://api.github.com/repos/slackhq/go-audit/stargazers","contributors_url":"https://api.github.com/repos/slackhq/go-audit/contributors","subscribers_url":"https://api.github.com/repos/slackhq/go-audit/subscribers","subscription_url":"https://api.github.com/repos/slackhq/go-audit/subscription","commits_url":"https://api.github.com/repos/slackhq/go-audit/commits{/sha}","git_commits_url":"https://api.github.com/repos/slackhq/go-audit/git/commits{/sha}","comments_url":"https://api.github.com/repos/slackhq/go-audit/comments{/number}","issue_comment_url":"https://api.github.com/repos/slackhq/go-audit/issues/comments{/number}","contents_url":"https://api.github.com/repos/slackhq/go-audit/contents/{+path}","compare_url":"https://api.github.com/repos/slackhq/go-audit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slackhq/go-audit/merges","archive_url":"https://api.github.com/repos/slackhq/go-audit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slackhq/go-audit/downloads","issues_url":"https://api.github.com/repos/slackhq/go-audit/issues{/number}","pulls_url":"https://api.github.com/repos/slackhq/go-audit/pulls{/number}","milestones_url":"https://api.github.com/repos/slackhq/go-audit/milestones{/number}","notifications_url":"https://api.github.com/repos/slackhq/go-audit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slackhq/go-audit/labels{/name}","releases_url":"https://api.github.com/repos/slackhq/go-audit/releases{/id}","deployments_url":"https://api.github.com/repos/slackhq/go-audit/deployments","created_at":"2016-11-10T20:07:29Z","updated_at":"2018-10-10T11:58:09Z","pushed_at":"2018-10-10T18:26:47Z","git_url":"git://github.com/slackhq/go-audit.git","ssh_url":"git@github.com:slackhq/go-audit.git","clone_url":"https://github.com/slackhq/go-audit.git","svn_url":"https://github.com/slackhq/go-audit","homepage":"","size":231,"stargazers_count":970,"watchers_count":970,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":81,"open_issues":8,"watchers":970,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/slackhq/go-audit/pulls/55"},"html":{"href":"https://github.com/slackhq/go-audit/pull/55"},"issue":{"href":"https://api.github.com/repos/slackhq/go-audit/issues/55"},"comments":{"href":"https://api.github.com/repos/slackhq/go-audit/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/slackhq/go-audit/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/slackhq/go-audit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slackhq/go-audit/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/slackhq/go-audit/statuses/588946b856af7bfe730f174281ba49489d5c9f38"}},"author_association":"NONE"}}
{"actor":{"display_login":"nbrownus"}}