{"action":"created","comment":{"url":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/comments/212324552","pull_request_review_id":148930284,"id":212324552,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjMyNDU1Mg==","diff_hunk":"@@ -859,12 +859,18 @@ groups:\n     description: \"Ensure a user for the container has been created (Scored)\"\n     audit: \"docker ps --quiet --all | xargs docker inspect --format '{{ .Id }}: User={{ .Config.User }}'\"\n     tests:\n+      bin_op: and","path":"cfg/17.06/definitions.yaml","position":40,"original_position":40,"commit_id":"7e03ef573439cbaa10d6330a240a2a9d4372bffd","original_commit_id":"7e03ef573439cbaa10d6330a240a2a9d4372bffd","user":{"login":"semion-a","id":27425371,"node_id":"MDQ6VXNlcjI3NDI1Mzcx","avatar_url":"https://avatars1.githubusercontent.com/u/27425371?v=4","gravatar_id":"","url":"https://api.github.com/users/semion-a","html_url":"https://github.com/semion-a","followers_url":"https://api.github.com/users/semion-a/followers","following_url":"https://api.github.com/users/semion-a/following{/other_user}","gists_url":"https://api.github.com/users/semion-a/gists{/gist_id}","starred_url":"https://api.github.com/users/semion-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semion-a/subscriptions","organizations_url":"https://api.github.com/users/semion-a/orgs","repos_url":"https://api.github.com/users/semion-a/repos","events_url":"https://api.github.com/users/semion-a/events{/privacy}","received_events_url":"https://api.github.com/users/semion-a/received_events","type":"User","site_admin":false},"body":"@lizrice ,\r\n>I'm pretty sure in this example the container is running as root, and therefore the test should fail, but I'm not convinced that our check will find it.\r\nYes, the root flag is incorrect. I also wondered why is it specified \"root\" as flag. The regex will work correctly though, it will return \"\", and both checks will be false  as \"\" is contained in every string, so the !string.Contains() wll return false and \"\" not eq \"\" will return false. The check however will also fail when a user will be set. I think the checks need to be revisited. Will change the check flag to User. \r\n\r\nIn case flag is User, the checks pass or fail as expected: https://play.golang.org/p/HvwadS87D-i\r\n\r\nUnit tests will be added. Assigned Itai in bench-common.","created_at":"2018-08-23T14:12:23Z","updated_at":"2018-08-23T14:12:23Z","html_url":"https://github.com/aquasecurity/docker-bench/pull/11#discussion_r212324552","pull_request_url":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/11","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/comments/212324552"},"html":{"href":"https://github.com/aquasecurity/docker-bench/pull/11#discussion_r212324552"},"pull_request":{"href":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/11"}},"in_reply_to_id":212289158},"pull_request":{"url":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/11","id":210342411,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMzQyNDEx","html_url":"https://github.com/aquasecurity/docker-bench/pull/11","diff_url":"https://github.com/aquasecurity/docker-bench/pull/11.diff","patch_url":"https://github.com/aquasecurity/docker-bench/pull/11.patch","issue_url":"https://api.github.com/repos/aquasecurity/docker-bench/issues/11","number":11,"state":"open","locked":false,"title":"Change several checks in definitions.yaml","user":{"login":"semion-a","id":27425371,"node_id":"MDQ6VXNlcjI3NDI1Mzcx","avatar_url":"https://avatars1.githubusercontent.com/u/27425371?v=4","gravatar_id":"","url":"https://api.github.com/users/semion-a","html_url":"https://github.com/semion-a","followers_url":"https://api.github.com/users/semion-a/followers","following_url":"https://api.github.com/users/semion-a/following{/other_user}","gists_url":"https://api.github.com/users/semion-a/gists{/gist_id}","starred_url":"https://api.github.com/users/semion-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semion-a/subscriptions","organizations_url":"https://api.github.com/users/semion-a/orgs","repos_url":"https://api.github.com/users/semion-a/repos","events_url":"https://api.github.com/users/semion-a/events{/privacy}","received_events_url":"https://api.github.com/users/semion-a/received_events","type":"User","site_admin":false},"body":"The following checks were changed:\r\n2.16: changed to nothave instead of has as this is checking that seccomp profile is *not* default.\r\n2.18: added check --no-new-privileges flag is set without a value.\r\n3.7: changed to check that root:root is present.\r\n4.1: added check that that root flag is not equal to \"\", since flag is \"\" means that user is not set.","created_at":"2018-08-23T06:23:55Z","updated_at":"2018-08-23T14:12:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f587612209a7fb38d033adac0240f01bb2b834a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/11/commits","review_comments_url":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/11/comments","review_comment_url":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aquasecurity/docker-bench/issues/11/comments","statuses_url":"https://api.github.com/repos/aquasecurity/docker-bench/statuses/7e03ef573439cbaa10d6330a240a2a9d4372bffd","head":{"label":"semion-a:semion_change_checks","ref":"semion_change_checks","sha":"7e03ef573439cbaa10d6330a240a2a9d4372bffd","user":{"login":"semion-a","id":27425371,"node_id":"MDQ6VXNlcjI3NDI1Mzcx","avatar_url":"https://avatars1.githubusercontent.com/u/27425371?v=4","gravatar_id":"","url":"https://api.github.com/users/semion-a","html_url":"https://github.com/semion-a","followers_url":"https://api.github.com/users/semion-a/followers","following_url":"https://api.github.com/users/semion-a/following{/other_user}","gists_url":"https://api.github.com/users/semion-a/gists{/gist_id}","starred_url":"https://api.github.com/users/semion-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semion-a/subscriptions","organizations_url":"https://api.github.com/users/semion-a/orgs","repos_url":"https://api.github.com/users/semion-a/repos","events_url":"https://api.github.com/users/semion-a/events{/privacy}","received_events_url":"https://api.github.com/users/semion-a/received_events","type":"User","site_admin":false},"repo":{"id":120004023,"node_id":"MDEwOlJlcG9zaXRvcnkxMjAwMDQwMjM=","name":"docker-bench","full_name":"semion-a/docker-bench","owner":{"login":"semion-a","id":27425371,"node_id":"MDQ6VXNlcjI3NDI1Mzcx","avatar_url":"https://avatars1.githubusercontent.com/u/27425371?v=4","gravatar_id":"","url":"https://api.github.com/users/semion-a","html_url":"https://github.com/semion-a","followers_url":"https://api.github.com/users/semion-a/followers","following_url":"https://api.github.com/users/semion-a/following{/other_user}","gists_url":"https://api.github.com/users/semion-a/gists{/gist_id}","starred_url":"https://api.github.com/users/semion-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semion-a/subscriptions","organizations_url":"https://api.github.com/users/semion-a/orgs","repos_url":"https://api.github.com/users/semion-a/repos","events_url":"https://api.github.com/users/semion-a/events{/privacy}","received_events_url":"https://api.github.com/users/semion-a/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/semion-a/docker-bench","description":null,"fork":true,"url":"https://api.github.com/repos/semion-a/docker-bench","forks_url":"https://api.github.com/repos/semion-a/docker-bench/forks","keys_url":"https://api.github.com/repos/semion-a/docker-bench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/semion-a/docker-bench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/semion-a/docker-bench/teams","hooks_url":"https://api.github.com/repos/semion-a/docker-bench/hooks","issue_events_url":"https://api.github.com/repos/semion-a/docker-bench/issues/events{/number}","events_url":"https://api.github.com/repos/semion-a/docker-bench/events","assignees_url":"https://api.github.com/repos/semion-a/docker-bench/assignees{/user}","branches_url":"https://api.github.com/repos/semion-a/docker-bench/branches{/branch}","tags_url":"https://api.github.com/repos/semion-a/docker-bench/tags","blobs_url":"https://api.github.com/repos/semion-a/docker-bench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/semion-a/docker-bench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/semion-a/docker-bench/git/refs{/sha}","trees_url":"https://api.github.com/repos/semion-a/docker-bench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/semion-a/docker-bench/statuses/{sha}","languages_url":"https://api.github.com/repos/semion-a/docker-bench/languages","stargazers_url":"https://api.github.com/repos/semion-a/docker-bench/stargazers","contributors_url":"https://api.github.com/repos/semion-a/docker-bench/contributors","subscribers_url":"https://api.github.com/repos/semion-a/docker-bench/subscribers","subscription_url":"https://api.github.com/repos/semion-a/docker-bench/subscription","commits_url":"https://api.github.com/repos/semion-a/docker-bench/commits{/sha}","git_commits_url":"https://api.github.com/repos/semion-a/docker-bench/git/commits{/sha}","comments_url":"https://api.github.com/repos/semion-a/docker-bench/comments{/number}","issue_comment_url":"https://api.github.com/repos/semion-a/docker-bench/issues/comments{/number}","contents_url":"https://api.github.com/repos/semion-a/docker-bench/contents/{+path}","compare_url":"https://api.github.com/repos/semion-a/docker-bench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/semion-a/docker-bench/merges","archive_url":"https://api.github.com/repos/semion-a/docker-bench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/semion-a/docker-bench/downloads","issues_url":"https://api.github.com/repos/semion-a/docker-bench/issues{/number}","pulls_url":"https://api.github.com/repos/semion-a/docker-bench/pulls{/number}","milestones_url":"https://api.github.com/repos/semion-a/docker-bench/milestones{/number}","notifications_url":"https://api.github.com/repos/semion-a/docker-bench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/semion-a/docker-bench/labels{/name}","releases_url":"https://api.github.com/repos/semion-a/docker-bench/releases{/id}","deployments_url":"https://api.github.com/repos/semion-a/docker-bench/deployments","created_at":"2018-02-02T16:23:53Z","updated_at":"2018-06-07T23:13:39Z","pushed_at":"2018-08-23T09:36:11Z","git_url":"git://github.com/semion-a/docker-bench.git","ssh_url":"git@github.com:semion-a/docker-bench.git","clone_url":"https://github.com/semion-a/docker-bench.git","svn_url":"https://github.com/semion-a/docker-bench","homepage":null,"size":3248,"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":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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aquasecurity:master","ref":"master","sha":"e15ff82dc0f9680c102d5947f9c4066356b4e2e2","user":{"login":"aquasecurity","id":12783832,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzgzODMy","avatar_url":"https://avatars1.githubusercontent.com/u/12783832?v=4","gravatar_id":"","url":"https://api.github.com/users/aquasecurity","html_url":"https://github.com/aquasecurity","followers_url":"https://api.github.com/users/aquasecurity/followers","following_url":"https://api.github.com/users/aquasecurity/following{/other_user}","gists_url":"https://api.github.com/users/aquasecurity/gists{/gist_id}","starred_url":"https://api.github.com/users/aquasecurity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquasecurity/subscriptions","organizations_url":"https://api.github.com/users/aquasecurity/orgs","repos_url":"https://api.github.com/users/aquasecurity/repos","events_url":"https://api.github.com/users/aquasecurity/events{/privacy}","received_events_url":"https://api.github.com/users/aquasecurity/received_events","type":"Organization","site_admin":false},"repo":{"id":106416084,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY0MTYwODQ=","name":"docker-bench","full_name":"aquasecurity/docker-bench","owner":{"login":"aquasecurity","id":12783832,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzgzODMy","avatar_url":"https://avatars1.githubusercontent.com/u/12783832?v=4","gravatar_id":"","url":"https://api.github.com/users/aquasecurity","html_url":"https://github.com/aquasecurity","followers_url":"https://api.github.com/users/aquasecurity/followers","following_url":"https://api.github.com/users/aquasecurity/following{/other_user}","gists_url":"https://api.github.com/users/aquasecurity/gists{/gist_id}","starred_url":"https://api.github.com/users/aquasecurity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquasecurity/subscriptions","organizations_url":"https://api.github.com/users/aquasecurity/orgs","repos_url":"https://api.github.com/users/aquasecurity/repos","events_url":"https://api.github.com/users/aquasecurity/events{/privacy}","received_events_url":"https://api.github.com/users/aquasecurity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aquasecurity/docker-bench","description":null,"fork":false,"url":"https://api.github.com/repos/aquasecurity/docker-bench","forks_url":"https://api.github.com/repos/aquasecurity/docker-bench/forks","keys_url":"https://api.github.com/repos/aquasecurity/docker-bench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aquasecurity/docker-bench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aquasecurity/docker-bench/teams","hooks_url":"https://api.github.com/repos/aquasecurity/docker-bench/hooks","issue_events_url":"https://api.github.com/repos/aquasecurity/docker-bench/issues/events{/number}","events_url":"https://api.github.com/repos/aquasecurity/docker-bench/events","assignees_url":"https://api.github.com/repos/aquasecurity/docker-bench/assignees{/user}","branches_url":"https://api.github.com/repos/aquasecurity/docker-bench/branches{/branch}","tags_url":"https://api.github.com/repos/aquasecurity/docker-bench/tags","blobs_url":"https://api.github.com/repos/aquasecurity/docker-bench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aquasecurity/docker-bench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aquasecurity/docker-bench/git/refs{/sha}","trees_url":"https://api.github.com/repos/aquasecurity/docker-bench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aquasecurity/docker-bench/statuses/{sha}","languages_url":"https://api.github.com/repos/aquasecurity/docker-bench/languages","stargazers_url":"https://api.github.com/repos/aquasecurity/docker-bench/stargazers","contributors_url":"https://api.github.com/repos/aquasecurity/docker-bench/contributors","subscribers_url":"https://api.github.com/repos/aquasecurity/docker-bench/subscribers","subscription_url":"https://api.github.com/repos/aquasecurity/docker-bench/subscription","commits_url":"https://api.github.com/repos/aquasecurity/docker-bench/commits{/sha}","git_commits_url":"https://api.github.com/repos/aquasecurity/docker-bench/git/commits{/sha}","comments_url":"https://api.github.com/repos/aquasecurity/docker-bench/comments{/number}","issue_comment_url":"https://api.github.com/repos/aquasecurity/docker-bench/issues/comments{/number}","contents_url":"https://api.github.com/repos/aquasecurity/docker-bench/contents/{+path}","compare_url":"https://api.github.com/repos/aquasecurity/docker-bench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aquasecurity/docker-bench/merges","archive_url":"https://api.github.com/repos/aquasecurity/docker-bench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aquasecurity/docker-bench/downloads","issues_url":"https://api.github.com/repos/aquasecurity/docker-bench/issues{/number}","pulls_url":"https://api.github.com/repos/aquasecurity/docker-bench/pulls{/number}","milestones_url":"https://api.github.com/repos/aquasecurity/docker-bench/milestones{/number}","notifications_url":"https://api.github.com/repos/aquasecurity/docker-bench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aquasecurity/docker-bench/labels{/name}","releases_url":"https://api.github.com/repos/aquasecurity/docker-bench/releases{/id}","deployments_url":"https://api.github.com/repos/aquasecurity/docker-bench/deployments","created_at":"2017-10-10T12:45:39Z","updated_at":"2018-07-13T04:32:03Z","pushed_at":"2018-08-23T09:36:12Z","git_url":"git://github.com/aquasecurity/docker-bench.git","ssh_url":"git@github.com:aquasecurity/docker-bench.git","clone_url":"https://github.com/aquasecurity/docker-bench.git","svn_url":"https://github.com/aquasecurity/docker-bench","homepage":null,"size":3247,"stargazers_count":4,"watchers_count":4,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2,"open_issues":8,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/11"},"html":{"href":"https://github.com/aquasecurity/docker-bench/pull/11"},"issue":{"href":"https://api.github.com/repos/aquasecurity/docker-bench/issues/11"},"comments":{"href":"https://api.github.com/repos/aquasecurity/docker-bench/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aquasecurity/docker-bench/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/aquasecurity/docker-bench/statuses/7e03ef573439cbaa10d6330a240a2a9d4372bffd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"semion-a"}}