{"action":"closed","number":887,"pull_request":{"url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls/887","id":174875159,"html_url":"https://github.com/Azure/pcs-remote-monitoring-webui/pull/887","diff_url":"https://github.com/Azure/pcs-remote-monitoring-webui/pull/887.diff","patch_url":"https://github.com/Azure/pcs-remote-monitoring-webui/pull/887.patch","issue_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues/887","number":887,"state":"closed","locked":false,"title":"Docker container excessively privileged running root user","user":{"login":"zhang-hua","id":2011059,"avatar_url":"https://avatars1.githubusercontent.com/u/2011059?v=4","gravatar_id":"","url":"https://api.github.com/users/zhang-hua","html_url":"https://github.com/zhang-hua","followers_url":"https://api.github.com/users/zhang-hua/followers","following_url":"https://api.github.com/users/zhang-hua/following{/other_user}","gists_url":"https://api.github.com/users/zhang-hua/gists{/gist_id}","starred_url":"https://api.github.com/users/zhang-hua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhang-hua/subscriptions","organizations_url":"https://api.github.com/users/zhang-hua/orgs","repos_url":"https://api.github.com/users/zhang-hua/repos","events_url":"https://api.github.com/users/zhang-hua/events{/privacy}","received_events_url":"https://api.github.com/users/zhang-hua/received_events","type":"User","site_admin":false},"body":"* Add default non-root user 'pcsuser'\r\n* Install sudo and add 'pcsuser' as sudoer\r\n* Run service as 'pcsuser'\r\n\r\nPBI[2211778]\r\n\r\n# Type of change? <!-- [x] all the boxes that apply -->\r\n\r\n- [ ] Bug fix\r\n- [ ] New feature\r\n- [x] Enhancement\r\n- [ ] Breaking change (breaks backward compatibility)\r\n\r\n# Description, Context, Motivation <!-- Please help us reviewing your PR -->\r\n\r\nWithout explicitly defining a running user in a Dockerfile definition, the root user is utilized by default.\r\nEach respective Dockerfile should explicitly define a user and mandate that user to be the service runner via the USER instruction. Further, the service user should also have a defined GROUP. Without one, the primary group for the user will fall back to the root group.\r\n\r\n**Checklist:**\r\n\r\n- [x] All tests passed\r\n- [x] The code follows the code style and conventions of this project\r\n- [ ] The change requires a change to the documentation\r\n- [ ] I have updated the documentation accordingly\r\n","created_at":"2018-03-14T07:42:36Z","updated_at":"2018-03-29T22:49:36Z","closed_at":"2018-03-29T22:49:36Z","merged_at":"2018-03-29T22:49:36Z","merge_commit_sha":"fc82fad77a5be7423c32a08c6329723af17a269d","assignee":{"login":"zhang-hua","id":2011059,"avatar_url":"https://avatars1.githubusercontent.com/u/2011059?v=4","gravatar_id":"","url":"https://api.github.com/users/zhang-hua","html_url":"https://github.com/zhang-hua","followers_url":"https://api.github.com/users/zhang-hua/followers","following_url":"https://api.github.com/users/zhang-hua/following{/other_user}","gists_url":"https://api.github.com/users/zhang-hua/gists{/gist_id}","starred_url":"https://api.github.com/users/zhang-hua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhang-hua/subscriptions","organizations_url":"https://api.github.com/users/zhang-hua/orgs","repos_url":"https://api.github.com/users/zhang-hua/repos","events_url":"https://api.github.com/users/zhang-hua/events{/privacy}","received_events_url":"https://api.github.com/users/zhang-hua/received_events","type":"User","site_admin":false},"assignees":[{"login":"zhang-hua","id":2011059,"avatar_url":"https://avatars1.githubusercontent.com/u/2011059?v=4","gravatar_id":"","url":"https://api.github.com/users/zhang-hua","html_url":"https://github.com/zhang-hua","followers_url":"https://api.github.com/users/zhang-hua/followers","following_url":"https://api.github.com/users/zhang-hua/following{/other_user}","gists_url":"https://api.github.com/users/zhang-hua/gists{/gist_id}","starred_url":"https://api.github.com/users/zhang-hua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhang-hua/subscriptions","organizations_url":"https://api.github.com/users/zhang-hua/orgs","repos_url":"https://api.github.com/users/zhang-hua/repos","events_url":"https://api.github.com/users/zhang-hua/events{/privacy}","received_events_url":"https://api.github.com/users/zhang-hua/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":681656714,"url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/labels/GA","name":"GA","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls/887/commits","review_comments_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls/887/comments","review_comment_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues/887/comments","statuses_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/statuses/f382084eb95d42c749766a72a10e5ccd4614763a","head":{"label":"Azure:nonroot-user","ref":"nonroot-user","sha":"f382084eb95d42c749766a72a10e5ccd4614763a","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":89969457,"name":"pcs-remote-monitoring-webui","full_name":"Azure/pcs-remote-monitoring-webui","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/pcs-remote-monitoring-webui","description":"Azure IoT PCS Remote Monitoring Web UI","fork":false,"url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui","forks_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/forks","keys_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/teams","hooks_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/hooks","issue_events_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/events","assignees_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/tags","blobs_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/languages","stargazers_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/stargazers","contributors_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/contributors","subscribers_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/subscribers","subscription_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/subscription","commits_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/merges","archive_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/downloads","issues_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/labels{/name}","releases_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/deployments","created_at":"2017-05-01T22:47:49Z","updated_at":"2018-03-27T20:24:50Z","pushed_at":"2018-03-29T22:49:36Z","git_url":"git://github.com/Azure/pcs-remote-monitoring-webui.git","ssh_url":"git@github.com:Azure/pcs-remote-monitoring-webui.git","clone_url":"https://github.com/Azure/pcs-remote-monitoring-webui.git","svn_url":"https://github.com/Azure/pcs-remote-monitoring-webui","homepage":null,"size":2514,"stargazers_count":23,"watchers_count":23,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":125,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":17,"open_issues":125,"watchers":23,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"01dfd9c040f00a8eed5833b43ca67598794f089b","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":89969457,"name":"pcs-remote-monitoring-webui","full_name":"Azure/pcs-remote-monitoring-webui","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/pcs-remote-monitoring-webui","description":"Azure IoT PCS Remote Monitoring Web UI","fork":false,"url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui","forks_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/forks","keys_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/teams","hooks_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/hooks","issue_events_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/events","assignees_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/tags","blobs_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/languages","stargazers_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/stargazers","contributors_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/contributors","subscribers_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/subscribers","subscription_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/subscription","commits_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/merges","archive_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/downloads","issues_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/labels{/name}","releases_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/deployments","created_at":"2017-05-01T22:47:49Z","updated_at":"2018-03-27T20:24:50Z","pushed_at":"2018-03-29T22:49:36Z","git_url":"git://github.com/Azure/pcs-remote-monitoring-webui.git","ssh_url":"git@github.com:Azure/pcs-remote-monitoring-webui.git","clone_url":"https://github.com/Azure/pcs-remote-monitoring-webui.git","svn_url":"https://github.com/Azure/pcs-remote-monitoring-webui","homepage":null,"size":2514,"stargazers_count":23,"watchers_count":23,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":125,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":17,"open_issues":125,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls/887"},"html":{"href":"https://github.com/Azure/pcs-remote-monitoring-webui/pull/887"},"issue":{"href":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues/887"},"comments":{"href":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/issues/887/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls/887/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/pulls/887/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/pcs-remote-monitoring-webui/statuses/f382084eb95d42c749766a72a10e5ccd4614763a"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"ppathan","id":16170750,"avatar_url":"https://avatars2.githubusercontent.com/u/16170750?v=4","gravatar_id":"","url":"https://api.github.com/users/ppathan","html_url":"https://github.com/ppathan","followers_url":"https://api.github.com/users/ppathan/followers","following_url":"https://api.github.com/users/ppathan/following{/other_user}","gists_url":"https://api.github.com/users/ppathan/gists{/gist_id}","starred_url":"https://api.github.com/users/ppathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppathan/subscriptions","organizations_url":"https://api.github.com/users/ppathan/orgs","repos_url":"https://api.github.com/users/ppathan/repos","events_url":"https://api.github.com/users/ppathan/events{/privacy}","received_events_url":"https://api.github.com/users/ppathan/received_events","type":"User","site_admin":false},"comments":3,"review_comments":8,"maintainer_can_modify":false,"commits":2,"additions":19,"deletions":9,"changed_files":5}}
{"actor":{"display_login":"ppathan"}}