{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/vic/pulls/comments/122063603","pull_request_review_id":44147123,"id":122063603,"diff_hunk":"@@ -0,0 +1,136 @@\n+// Copyright 2017 VMware, Inc. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//    http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+package dynamic\n+\n+import (\n+\t\"testing\"\n+\n+\t\"github.com/stretchr/testify/assert\"\n+\n+\t\"github.com/vmware/vic/pkg/registry\"\n+)\n+\n+func TestWhitelistMerger(t *testing.T) {\n+\tvar tests = []struct {\n+\t\torig, other registry.Entry\n+\t\tres         registry.Entry\n+\t\terr         error\n+\t}{\n+\t\t{\n+\t\t\torig:  registry.ParseEntry(\"10.10.10.10\"),\n+\t\t\tother: registry.ParseEntry(\"10.10.10.10\"),\n+\t\t\tres:   registry.ParseEntry(\"10.10.10.10\"),\n+\t\t},\n+\t\t{\n+\t\t\torig:  registry.ParseEntry(\"10.10.10.10\"),\n+\t\t\tother: registry.ParseEntry(\"10.10.10.20\"),\n+\t\t},","path":"lib/config/dynamic/merger_test.go","position":38,"original_position":38,"commit_id":"b2fac1d8b914fd62c2f1441bc910cbd2f1423696","original_commit_id":"b2fac1d8b914fd62c2f1441bc910cbd2f1423696","user":{"login":"hickeng","id":3923729,"avatar_url":"https://avatars2.githubusercontent.com/u/3923729?v=3","gravatar_id":"","url":"https://api.github.com/users/hickeng","html_url":"https://github.com/hickeng","followers_url":"https://api.github.com/users/hickeng/followers","following_url":"https://api.github.com/users/hickeng/following{/other_user}","gists_url":"https://api.github.com/users/hickeng/gists{/gist_id}","starred_url":"https://api.github.com/users/hickeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hickeng/subscriptions","organizations_url":"https://api.github.com/users/hickeng/orgs","repos_url":"https://api.github.com/users/hickeng/repos","events_url":"https://api.github.com/users/hickeng/events{/privacy}","received_events_url":"https://api.github.com/users/hickeng/received_events","type":"User","site_admin":false},"body":"It's adding to the set of permitted registries rather than further restricting it, inherently weakening the limits specified by the VCH config.\r\nWith this logic, adding `my.malicious.registry.com` is permitted if the base VCH config is `*.mycorp.com`","created_at":"2017-06-14T21:01:39Z","updated_at":"2017-06-14T21:01:39Z","html_url":"https://github.com/vmware/vic/pull/5349#discussion_r122063603","pull_request_url":"https://api.github.com/repos/vmware/vic/pulls/5349","_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments/122063603"},"html":{"href":"https://github.com/vmware/vic/pull/5349#discussion_r122063603"},"pull_request":{"href":"https://api.github.com/repos/vmware/vic/pulls/5349"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/vic/pulls/5349","id":123815672,"html_url":"https://github.com/vmware/vic/pull/5349","diff_url":"https://github.com/vmware/vic/pull/5349.diff","patch_url":"https://github.com/vmware/vic/pull/5349.patch","issue_url":"https://api.github.com/repos/vmware/vic/issues/5349","number":5349,"state":"open","locked":false,"title":"Add registry set merge ability","user":{"login":"hmahmood","id":6599778,"avatar_url":"https://avatars0.githubusercontent.com/u/6599778?v=3","gravatar_id":"","url":"https://api.github.com/users/hmahmood","html_url":"https://github.com/hmahmood","followers_url":"https://api.github.com/users/hmahmood/followers","following_url":"https://api.github.com/users/hmahmood/following{/other_user}","gists_url":"https://api.github.com/users/hmahmood/gists{/gist_id}","starred_url":"https://api.github.com/users/hmahmood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmahmood/subscriptions","organizations_url":"https://api.github.com/users/hmahmood/orgs","repos_url":"https://api.github.com/users/hmahmood/repos","events_url":"https://api.github.com/users/hmahmood/events{/privacy}","received_events_url":"https://api.github.com/users/hmahmood/received_events","type":"User","site_admin":false},"body":"Fixes #5002 ","created_at":"2017-06-02T23:13:16Z","updated_at":"2017-06-14T21:01:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61cb8faba407359beade9365ad5c9cdcfc6a1871","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mdubya66","id":15821624,"avatar_url":"https://avatars3.githubusercontent.com/u/15821624?v=3","gravatar_id":"","url":"https://api.github.com/users/mdubya66","html_url":"https://github.com/mdubya66","followers_url":"https://api.github.com/users/mdubya66/followers","following_url":"https://api.github.com/users/mdubya66/following{/other_user}","gists_url":"https://api.github.com/users/mdubya66/gists{/gist_id}","starred_url":"https://api.github.com/users/mdubya66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdubya66/subscriptions","organizations_url":"https://api.github.com/users/mdubya66/orgs","repos_url":"https://api.github.com/users/mdubya66/repos","events_url":"https://api.github.com/users/mdubya66/events{/privacy}","received_events_url":"https://api.github.com/users/mdubya66/received_events","type":"User","site_admin":false},{"login":"mhagen-vmware","id":19393273,"avatar_url":"https://avatars3.githubusercontent.com/u/19393273?v=3","gravatar_id":"","url":"https://api.github.com/users/mhagen-vmware","html_url":"https://github.com/mhagen-vmware","followers_url":"https://api.github.com/users/mhagen-vmware/followers","following_url":"https://api.github.com/users/mhagen-vmware/following{/other_user}","gists_url":"https://api.github.com/users/mhagen-vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/mhagen-vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhagen-vmware/subscriptions","organizations_url":"https://api.github.com/users/mhagen-vmware/orgs","repos_url":"https://api.github.com/users/mhagen-vmware/repos","events_url":"https://api.github.com/users/mhagen-vmware/events{/privacy}","received_events_url":"https://api.github.com/users/mhagen-vmware/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/vic/pulls/5349/commits","review_comments_url":"https://api.github.com/repos/vmware/vic/pulls/5349/comments","review_comment_url":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/vic/issues/5349/comments","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/b2fac1d8b914fd62c2f1441bc910cbd2f1423696","head":{"label":"hmahmood:config","ref":"config","sha":"b2fac1d8b914fd62c2f1441bc910cbd2f1423696","user":{"login":"hmahmood","id":6599778,"avatar_url":"https://avatars0.githubusercontent.com/u/6599778?v=3","gravatar_id":"","url":"https://api.github.com/users/hmahmood","html_url":"https://github.com/hmahmood","followers_url":"https://api.github.com/users/hmahmood/followers","following_url":"https://api.github.com/users/hmahmood/following{/other_user}","gists_url":"https://api.github.com/users/hmahmood/gists{/gist_id}","starred_url":"https://api.github.com/users/hmahmood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmahmood/subscriptions","organizations_url":"https://api.github.com/users/hmahmood/orgs","repos_url":"https://api.github.com/users/hmahmood/repos","events_url":"https://api.github.com/users/hmahmood/events{/privacy}","received_events_url":"https://api.github.com/users/hmahmood/received_events","type":"User","site_admin":false},"repo":{"id":55442022,"name":"vic","full_name":"hmahmood/vic","owner":{"login":"hmahmood","id":6599778,"avatar_url":"https://avatars0.githubusercontent.com/u/6599778?v=3","gravatar_id":"","url":"https://api.github.com/users/hmahmood","html_url":"https://github.com/hmahmood","followers_url":"https://api.github.com/users/hmahmood/followers","following_url":"https://api.github.com/users/hmahmood/following{/other_user}","gists_url":"https://api.github.com/users/hmahmood/gists{/gist_id}","starred_url":"https://api.github.com/users/hmahmood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmahmood/subscriptions","organizations_url":"https://api.github.com/users/hmahmood/orgs","repos_url":"https://api.github.com/users/hmahmood/repos","events_url":"https://api.github.com/users/hmahmood/events{/privacy}","received_events_url":"https://api.github.com/users/hmahmood/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hmahmood/vic","description":"Integrated containers on vSphere","fork":true,"url":"https://api.github.com/repos/hmahmood/vic","forks_url":"https://api.github.com/repos/hmahmood/vic/forks","keys_url":"https://api.github.com/repos/hmahmood/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmahmood/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmahmood/vic/teams","hooks_url":"https://api.github.com/repos/hmahmood/vic/hooks","issue_events_url":"https://api.github.com/repos/hmahmood/vic/issues/events{/number}","events_url":"https://api.github.com/repos/hmahmood/vic/events","assignees_url":"https://api.github.com/repos/hmahmood/vic/assignees{/user}","branches_url":"https://api.github.com/repos/hmahmood/vic/branches{/branch}","tags_url":"https://api.github.com/repos/hmahmood/vic/tags","blobs_url":"https://api.github.com/repos/hmahmood/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmahmood/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmahmood/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmahmood/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmahmood/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/hmahmood/vic/languages","stargazers_url":"https://api.github.com/repos/hmahmood/vic/stargazers","contributors_url":"https://api.github.com/repos/hmahmood/vic/contributors","subscribers_url":"https://api.github.com/repos/hmahmood/vic/subscribers","subscription_url":"https://api.github.com/repos/hmahmood/vic/subscription","commits_url":"https://api.github.com/repos/hmahmood/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmahmood/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmahmood/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmahmood/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmahmood/vic/contents/{+path}","compare_url":"https://api.github.com/repos/hmahmood/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmahmood/vic/merges","archive_url":"https://api.github.com/repos/hmahmood/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmahmood/vic/downloads","issues_url":"https://api.github.com/repos/hmahmood/vic/issues{/number}","pulls_url":"https://api.github.com/repos/hmahmood/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/hmahmood/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/hmahmood/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmahmood/vic/labels{/name}","releases_url":"https://api.github.com/repos/hmahmood/vic/releases{/id}","deployments_url":"https://api.github.com/repos/hmahmood/vic/deployments","created_at":"2016-04-04T20:21:22Z","updated_at":"2016-04-04T20:21:23Z","pushed_at":"2017-06-13T18:39:43Z","git_url":"git://github.com/hmahmood/vic.git","ssh_url":"git@github.com:hmahmood/vic.git","clone_url":"https://github.com/hmahmood/vic.git","svn_url":"https://github.com/hmahmood/vic","homepage":null,"size":54459,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vmware:master","ref":"master","sha":"a32f067842bad62342db2f6976048fc6c4bd5b3a","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars3.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49597898,"name":"vic","full_name":"vmware/vic","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars3.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/vic","description":"Integrated containers engine on vSphere","fork":false,"url":"https://api.github.com/repos/vmware/vic","forks_url":"https://api.github.com/repos/vmware/vic/forks","keys_url":"https://api.github.com/repos/vmware/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/vic/teams","hooks_url":"https://api.github.com/repos/vmware/vic/hooks","issue_events_url":"https://api.github.com/repos/vmware/vic/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/vic/events","assignees_url":"https://api.github.com/repos/vmware/vic/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/vic/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/vic/tags","blobs_url":"https://api.github.com/repos/vmware/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/vic/languages","stargazers_url":"https://api.github.com/repos/vmware/vic/stargazers","contributors_url":"https://api.github.com/repos/vmware/vic/contributors","subscribers_url":"https://api.github.com/repos/vmware/vic/subscribers","subscription_url":"https://api.github.com/repos/vmware/vic/subscription","commits_url":"https://api.github.com/repos/vmware/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/vic/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/vic/merges","archive_url":"https://api.github.com/repos/vmware/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/vic/downloads","issues_url":"https://api.github.com/repos/vmware/vic/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/vic/labels{/name}","releases_url":"https://api.github.com/repos/vmware/vic/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/vic/deployments","created_at":"2016-01-13T19:53:57Z","updated_at":"2017-06-05T22:04:33Z","pushed_at":"2017-06-14T20:55:25Z","git_url":"git://github.com/vmware/vic.git","ssh_url":"git@github.com:vmware/vic.git","clone_url":"https://github.com/vmware/vic.git","svn_url":"https://github.com/vmware/vic","homepage":"http://vmware.github.io/vic","size":65793,"stargazers_count":244,"watchers_count":244,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":102,"mirror_url":null,"open_issues_count":818,"forks":102,"open_issues":818,"watchers":244,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/5349"},"html":{"href":"https://github.com/vmware/vic/pull/5349"},"issue":{"href":"https://api.github.com/repos/vmware/vic/issues/5349"},"comments":{"href":"https://api.github.com/repos/vmware/vic/issues/5349/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/vic/pulls/5349/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/vic/pulls/5349/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/vic/statuses/b2fac1d8b914fd62c2f1441bc910cbd2f1423696"}}}}
{"actor":{"display_login":"hickeng"}}