{"action":"created","comment":{"url":"https://api.github.com/repos/projectcalico/felix/pulls/comments/184386570","pull_request_review_id":115571052,"id":184386570,"diff_hunk":"@@ -77,11 +77,18 @@ fi\n cp -a \"$CALICO_CFG\" etc_calico\n \n # Use grep -v to attempt to strip out password information\n-grep -v -i \"password\" /etc/nova/nova.conf > nova.conf 2>&1\n-grep -v -i \"password\" /etc/neutron/neutron.conf > neutron.conf 2>&1\n-grep -v -i \"password\" /etc/neutron/plugins/ml2/ml2_conf.ini > ml2_conf.ini 2>&1\n-grep -v -i \"password\" /etc/neutron/dhcp_agent.ini > dhcp_agent.ini 2>&1\n-grep -v -i \"password\" /etc/neutron/metadata_agent.ini > metadata_agent.ini 2>&1\n+function copy_and_redact() {\n+  in=$1\n+  out=$2\n+\n+  sed -e 's/^\\([ \\t]*\\(password\\|token\\|transport_url\\|connection\\)[ \\t]*=[ \\t]*\\).*/\\1REDACTED/' \"$in\" > $out 2>&1","path":"etc/calico-diags","position":13,"original_position":13,"commit_id":"8f75bae8fd4f92795462f7825f60d3d5ba0b3c5f","original_commit_id":"8f75bae8fd4f92795462f7825f60d3d5ba0b3c5f","user":{"login":"neiljerram","id":2089263,"avatar_url":"https://avatars1.githubusercontent.com/u/2089263?v=4","gravatar_id":"","url":"https://api.github.com/users/neiljerram","html_url":"https://github.com/neiljerram","followers_url":"https://api.github.com/users/neiljerram/followers","following_url":"https://api.github.com/users/neiljerram/following{/other_user}","gists_url":"https://api.github.com/users/neiljerram/gists{/gist_id}","starred_url":"https://api.github.com/users/neiljerram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neiljerram/subscriptions","organizations_url":"https://api.github.com/users/neiljerram/orgs","repos_url":"https://api.github.com/users/neiljerram/repos","events_url":"https://api.github.com/users/neiljerram/events{/privacy}","received_events_url":"https://api.github.com/users/neiljerram/received_events","type":"User","site_admin":false},"body":"Wondering about the initial `^` here - is it needed?\r\n\r\nWithout it, this expression would also catch - for example - `auth_token = xxx`.  But as it stands, I believe it would miss that.","created_at":"2018-04-26T13:23:10Z","updated_at":"2018-04-26T13:27:03Z","html_url":"https://github.com/projectcalico/felix/pull/1812#discussion_r184386570","pull_request_url":"https://api.github.com/repos/projectcalico/felix/pulls/1812","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/comments/184386570"},"html":{"href":"https://github.com/projectcalico/felix/pull/1812#discussion_r184386570"},"pull_request":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/1812"}}},"pull_request":{"url":"https://api.github.com/repos/projectcalico/felix/pulls/1812","id":184296646,"html_url":"https://github.com/projectcalico/felix/pull/1812","diff_url":"https://github.com/projectcalico/felix/pull/1812.diff","patch_url":"https://github.com/projectcalico/felix/pull/1812.patch","issue_url":"https://api.github.com/repos/projectcalico/felix/issues/1812","number":1812,"state":"open","locked":false,"title":"Improve calico-diags redaction.","user":{"login":"fasaxc","id":469264,"avatar_url":"https://avatars0.githubusercontent.com/u/469264?v=4","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"body":"\r\n## Description\r\n<!-- A few sentences describing the overall goals of the pull request's commits.\r\nPlease include\r\n- the type of fix - (e.g. bug fix, new feature, documentation)\r\n- some details on _why_ this PR should be merged\r\n- the details of the testing you've done on it (both manual and automated)\r\n- which components are affected by this PR\r\n-->\r\nReplace sensitive information with REDACTED instead of\r\nremoving whole line.\r\n\r\nAvoids confusion where config file looks to be missing essential information!\r\n## Todos\r\n- [ ] Unit tests (full coverage)\r\n- [ ] Integration tests (delete as appropriate) In plan/Not needed/Done\r\n- [ ] Documentation\r\n- [ ] Backport\r\n- [ ] Release note\r\n\r\n## Release Note\r\n<!-- Writing a release note:\r\n- By default, no release note action is required.\r\n- If you're unsure whether or not your PR needs a note, ask your reviewer for guidance.\r\n- If this PR requires a release note, update the block below to include a concise note describing\r\n  the change and any important impacts this PR may have.\r\n-->\r\n\r\n```release-note\r\nNone required\r\n```\r\n","created_at":"2018-04-26T10:36:31Z","updated_at":"2018-04-26T13:27:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0dbb48dae8bce6f4c9e50596d15a6fc3312e2749","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/projectcalico/felix/pulls/1812/commits","review_comments_url":"https://api.github.com/repos/projectcalico/felix/pulls/1812/comments","review_comment_url":"https://api.github.com/repos/projectcalico/felix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectcalico/felix/issues/1812/comments","statuses_url":"https://api.github.com/repos/projectcalico/felix/statuses/8f75bae8fd4f92795462f7825f60d3d5ba0b3c5f","head":{"label":"fasaxc:better-diags","ref":"better-diags","sha":"8f75bae8fd4f92795462f7825f60d3d5ba0b3c5f","user":{"login":"fasaxc","id":469264,"avatar_url":"https://avatars0.githubusercontent.com/u/469264?v=4","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"repo":{"id":31398578,"name":"felix","full_name":"fasaxc/felix","owner":{"login":"fasaxc","id":469264,"avatar_url":"https://avatars0.githubusercontent.com/u/469264?v=4","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fasaxc/felix","description":"Project Calico core repository.","fork":true,"url":"https://api.github.com/repos/fasaxc/felix","forks_url":"https://api.github.com/repos/fasaxc/felix/forks","keys_url":"https://api.github.com/repos/fasaxc/felix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fasaxc/felix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fasaxc/felix/teams","hooks_url":"https://api.github.com/repos/fasaxc/felix/hooks","issue_events_url":"https://api.github.com/repos/fasaxc/felix/issues/events{/number}","events_url":"https://api.github.com/repos/fasaxc/felix/events","assignees_url":"https://api.github.com/repos/fasaxc/felix/assignees{/user}","branches_url":"https://api.github.com/repos/fasaxc/felix/branches{/branch}","tags_url":"https://api.github.com/repos/fasaxc/felix/tags","blobs_url":"https://api.github.com/repos/fasaxc/felix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fasaxc/felix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fasaxc/felix/git/refs{/sha}","trees_url":"https://api.github.com/repos/fasaxc/felix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fasaxc/felix/statuses/{sha}","languages_url":"https://api.github.com/repos/fasaxc/felix/languages","stargazers_url":"https://api.github.com/repos/fasaxc/felix/stargazers","contributors_url":"https://api.github.com/repos/fasaxc/felix/contributors","subscribers_url":"https://api.github.com/repos/fasaxc/felix/subscribers","subscription_url":"https://api.github.com/repos/fasaxc/felix/subscription","commits_url":"https://api.github.com/repos/fasaxc/felix/commits{/sha}","git_commits_url":"https://api.github.com/repos/fasaxc/felix/git/commits{/sha}","comments_url":"https://api.github.com/repos/fasaxc/felix/comments{/number}","issue_comment_url":"https://api.github.com/repos/fasaxc/felix/issues/comments{/number}","contents_url":"https://api.github.com/repos/fasaxc/felix/contents/{+path}","compare_url":"https://api.github.com/repos/fasaxc/felix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fasaxc/felix/merges","archive_url":"https://api.github.com/repos/fasaxc/felix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fasaxc/felix/downloads","issues_url":"https://api.github.com/repos/fasaxc/felix/issues{/number}","pulls_url":"https://api.github.com/repos/fasaxc/felix/pulls{/number}","milestones_url":"https://api.github.com/repos/fasaxc/felix/milestones{/number}","notifications_url":"https://api.github.com/repos/fasaxc/felix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fasaxc/felix/labels{/name}","releases_url":"https://api.github.com/repos/fasaxc/felix/releases{/id}","deployments_url":"https://api.github.com/repos/fasaxc/felix/deployments","created_at":"2015-02-27T01:55:32Z","updated_at":"2016-10-07T08:22:23Z","pushed_at":"2018-04-26T13:02:01Z","git_url":"git://github.com/fasaxc/felix.git","ssh_url":"git@github.com:fasaxc/felix.git","clone_url":"https://github.com/fasaxc/felix.git","svn_url":"https://github.com/fasaxc/felix","homepage":"http://projectcalico.org/","size":9971,"stargazers_count":0,"watchers_count":0,"language":"Python","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":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"projectcalico:master","ref":"master","sha":"eda77f73aa9bdbc258986160806c8dc70f5ec074","user":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars3.githubusercontent.com/u/12304728?v=4","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"repo":{"id":21242831,"name":"felix","full_name":"projectcalico/felix","owner":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars3.githubusercontent.com/u/12304728?v=4","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectcalico/felix","description":"Project Calico's per-host agent Felix, responsible for programming routes and security policy.","fork":false,"url":"https://api.github.com/repos/projectcalico/felix","forks_url":"https://api.github.com/repos/projectcalico/felix/forks","keys_url":"https://api.github.com/repos/projectcalico/felix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectcalico/felix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectcalico/felix/teams","hooks_url":"https://api.github.com/repos/projectcalico/felix/hooks","issue_events_url":"https://api.github.com/repos/projectcalico/felix/issues/events{/number}","events_url":"https://api.github.com/repos/projectcalico/felix/events","assignees_url":"https://api.github.com/repos/projectcalico/felix/assignees{/user}","branches_url":"https://api.github.com/repos/projectcalico/felix/branches{/branch}","tags_url":"https://api.github.com/repos/projectcalico/felix/tags","blobs_url":"https://api.github.com/repos/projectcalico/felix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectcalico/felix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectcalico/felix/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectcalico/felix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectcalico/felix/statuses/{sha}","languages_url":"https://api.github.com/repos/projectcalico/felix/languages","stargazers_url":"https://api.github.com/repos/projectcalico/felix/stargazers","contributors_url":"https://api.github.com/repos/projectcalico/felix/contributors","subscribers_url":"https://api.github.com/repos/projectcalico/felix/subscribers","subscription_url":"https://api.github.com/repos/projectcalico/felix/subscription","commits_url":"https://api.github.com/repos/projectcalico/felix/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectcalico/felix/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectcalico/felix/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectcalico/felix/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectcalico/felix/contents/{+path}","compare_url":"https://api.github.com/repos/projectcalico/felix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectcalico/felix/merges","archive_url":"https://api.github.com/repos/projectcalico/felix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectcalico/felix/downloads","issues_url":"https://api.github.com/repos/projectcalico/felix/issues{/number}","pulls_url":"https://api.github.com/repos/projectcalico/felix/pulls{/number}","milestones_url":"https://api.github.com/repos/projectcalico/felix/milestones{/number}","notifications_url":"https://api.github.com/repos/projectcalico/felix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectcalico/felix/labels{/name}","releases_url":"https://api.github.com/repos/projectcalico/felix/releases{/id}","deployments_url":"https://api.github.com/repos/projectcalico/felix/deployments","created_at":"2014-06-26T14:08:43Z","updated_at":"2018-04-25T12:49:06Z","pushed_at":"2018-04-26T13:02:03Z","git_url":"git://github.com/projectcalico/felix.git","ssh_url":"git@github.com:projectcalico/felix.git","clone_url":"https://github.com/projectcalico/felix.git","svn_url":"https://github.com/projectcalico/felix","homepage":"http://projectcalico.org/","size":9891,"stargazers_count":712,"watchers_count":712,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":167,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":167,"open_issues":20,"watchers":712,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/1812"},"html":{"href":"https://github.com/projectcalico/felix/pull/1812"},"issue":{"href":"https://api.github.com/repos/projectcalico/felix/issues/1812"},"comments":{"href":"https://api.github.com/repos/projectcalico/felix/issues/1812/comments"},"review_comments":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/1812/comments"},"review_comment":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/1812/commits"},"statuses":{"href":"https://api.github.com/repos/projectcalico/felix/statuses/8f75bae8fd4f92795462f7825f60d3d5ba0b3c5f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"neiljerram"}}