{"action":"created","comment":{"url":"https://api.github.com/repos/yoavAqua/bench-common/pulls/comments/234991205","pull_request_review_id":176751610,"id":234991205,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDk5MTIwNQ==","diff_hunk":"@@ -86,19 +87,28 @@ func colorPrint(state check.State, s string) {\n }\n \n // prettyPrint outputs the results to stdout in human-readable format\n-func PrettyPrint(r *check.Controls, summary check.Summary) {\n+func PrettyPrint(r *check.Controls, summary check.Summary, noRemediations bool) {\n \tcolorPrint(check.INFO, fmt.Sprintf(\"%s %s\\n\", r.ID, r.Description))\n \tfor _, g := range r.Groups {\n \t\tcolorPrint(check.INFO, fmt.Sprintf(\"%s %s\\n\", g.ID, g.Description))\n \t\tfor _, c := range g.Checks {\n \t\t\tcolorPrint(c.State, fmt.Sprintf(\"%s %s\\n\", c.ID, c.Description))\n+\n+\t\t\tif c.State == check.FAIL {\n+\t\t\t\tif len(c.ActualValue) == 0 {\n+\t\t\t\t\tfmt.Println(\"\\t\", c.FailedDescription)\n+\t\t\t\t} else {\n+\t\t\t\t\tPrintAttributes(c.ActualValue)\n+\t\t\t\t}\n+\t\t\t\tfmt.Println()\n+\t\t\t}\n \t\t}\n \t}\n \n \tfmt.Println()\n \n \t// Print remediations.\n-\tif summary.Fail > 0 || summary.Warn > 0 {\n+\tif !noRemediations && (summary.Fail > 0 || summary.Warn > 0) {","path":"util/util.go","position":35,"original_position":35,"commit_id":"992808dc1bf7d01e9b86e9e267888c10f577f518","original_commit_id":"992808dc1bf7d01e9b86e9e267888c10f577f518","user":{"login":"yoavAqua","id":44805943,"node_id":"MDQ6VXNlcjQ0ODA1OTQz","avatar_url":"https://avatars0.githubusercontent.com/u/44805943?v=4","gravatar_id":"","url":"https://api.github.com/users/yoavAqua","html_url":"https://github.com/yoavAqua","followers_url":"https://api.github.com/users/yoavAqua/followers","following_url":"https://api.github.com/users/yoavAqua/following{/other_user}","gists_url":"https://api.github.com/users/yoavAqua/gists{/gist_id}","starred_url":"https://api.github.com/users/yoavAqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoavAqua/subscriptions","organizations_url":"https://api.github.com/users/yoavAqua/orgs","repos_url":"https://api.github.com/users/yoavAqua/repos","events_url":"https://api.github.com/users/yoavAqua/events{/privacy}","received_events_url":"https://api.github.com/users/yoavAqua/received_events","type":"User","site_admin":false},"body":"I agree, the only reason this variable has negative meaning is because the app (docker-bench) has a \"no remediations\" flag, so it felt right to keep the variable as is. I'l change it because the bench-common doesn't need to be affected by the apps that are using it.","created_at":"2018-11-20T12:58:03Z","updated_at":"2018-11-20T12:58:03Z","html_url":"https://github.com/yoavAqua/bench-common/pull/1#discussion_r234991205","pull_request_url":"https://api.github.com/repos/yoavAqua/bench-common/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/yoavAqua/bench-common/pulls/comments/234991205"},"html":{"href":"https://github.com/yoavAqua/bench-common/pull/1#discussion_r234991205"},"pull_request":{"href":"https://api.github.com/repos/yoavAqua/bench-common/pulls/1"}},"in_reply_to_id":234965667},"pull_request":{"url":"https://api.github.com/repos/yoavAqua/bench-common/pulls/1","id":232270616,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyMjcwNjE2","html_url":"https://github.com/yoavAqua/bench-common/pull/1","diff_url":"https://github.com/yoavAqua/bench-common/pull/1.diff","patch_url":"https://github.com/yoavAqua/bench-common/pull/1.patch","issue_url":"https://api.github.com/repos/yoavAqua/bench-common/issues/1","number":1,"state":"open","locked":false,"title":"Failed functionallity","user":{"login":"yoavAqua","id":44805943,"node_id":"MDQ6VXNlcjQ0ODA1OTQz","avatar_url":"https://avatars0.githubusercontent.com/u/44805943?v=4","gravatar_id":"","url":"https://api.github.com/users/yoavAqua","html_url":"https://github.com/yoavAqua","followers_url":"https://api.github.com/users/yoavAqua/followers","following_url":"https://api.github.com/users/yoavAqua/following{/other_user}","gists_url":"https://api.github.com/users/yoavAqua/gists{/gist_id}","starred_url":"https://api.github.com/users/yoavAqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoavAqua/subscriptions","organizations_url":"https://api.github.com/users/yoavAqua/orgs","repos_url":"https://api.github.com/users/yoavAqua/repos","events_url":"https://api.github.com/users/yoavAqua/events{/privacy}","received_events_url":"https://api.github.com/users/yoavAqua/received_events","type":"User","site_admin":false},"body":"This branch holds 3 features:\r\n- Enabling the usage of the no remediations flag\r\n- Changed actual result to be a new type.\r\n- Support tests on multiple values for example test of containers with no privileges.\r\n- Automated \"Not scored\" checks will be counted as Warn when fail.\r\n- Printing the actual result if the test fails, id the actual result is empty, print failed description.","created_at":"2018-11-20T10:48:58Z","updated_at":"2018-11-20T12:58:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb2e947fb16666dd41f9c656cda035fdbad18d12","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yoavAqua/bench-common/pulls/1/commits","review_comments_url":"https://api.github.com/repos/yoavAqua/bench-common/pulls/1/comments","review_comment_url":"https://api.github.com/repos/yoavAqua/bench-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yoavAqua/bench-common/issues/1/comments","statuses_url":"https://api.github.com/repos/yoavAqua/bench-common/statuses/992808dc1bf7d01e9b86e9e267888c10f577f518","head":{"label":"yoavAqua:failed-functionallity","ref":"failed-functionallity","sha":"992808dc1bf7d01e9b86e9e267888c10f577f518","user":{"login":"yoavAqua","id":44805943,"node_id":"MDQ6VXNlcjQ0ODA1OTQz","avatar_url":"https://avatars0.githubusercontent.com/u/44805943?v=4","gravatar_id":"","url":"https://api.github.com/users/yoavAqua","html_url":"https://github.com/yoavAqua","followers_url":"https://api.github.com/users/yoavAqua/followers","following_url":"https://api.github.com/users/yoavAqua/following{/other_user}","gists_url":"https://api.github.com/users/yoavAqua/gists{/gist_id}","starred_url":"https://api.github.com/users/yoavAqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoavAqua/subscriptions","organizations_url":"https://api.github.com/users/yoavAqua/orgs","repos_url":"https://api.github.com/users/yoavAqua/repos","events_url":"https://api.github.com/users/yoavAqua/events{/privacy}","received_events_url":"https://api.github.com/users/yoavAqua/received_events","type":"User","site_admin":false},"repo":{"id":157060959,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcwNjA5NTk=","name":"bench-common","full_name":"yoavAqua/bench-common","private":false,"owner":{"login":"yoavAqua","id":44805943,"node_id":"MDQ6VXNlcjQ0ODA1OTQz","avatar_url":"https://avatars0.githubusercontent.com/u/44805943?v=4","gravatar_id":"","url":"https://api.github.com/users/yoavAqua","html_url":"https://github.com/yoavAqua","followers_url":"https://api.github.com/users/yoavAqua/followers","following_url":"https://api.github.com/users/yoavAqua/following{/other_user}","gists_url":"https://api.github.com/users/yoavAqua/gists{/gist_id}","starred_url":"https://api.github.com/users/yoavAqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoavAqua/subscriptions","organizations_url":"https://api.github.com/users/yoavAqua/orgs","repos_url":"https://api.github.com/users/yoavAqua/repos","events_url":"https://api.github.com/users/yoavAqua/events{/privacy}","received_events_url":"https://api.github.com/users/yoavAqua/received_events","type":"User","site_admin":false},"html_url":"https://github.com/yoavAqua/bench-common","description":null,"fork":true,"url":"https://api.github.com/repos/yoavAqua/bench-common","forks_url":"https://api.github.com/repos/yoavAqua/bench-common/forks","keys_url":"https://api.github.com/repos/yoavAqua/bench-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yoavAqua/bench-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yoavAqua/bench-common/teams","hooks_url":"https://api.github.com/repos/yoavAqua/bench-common/hooks","issue_events_url":"https://api.github.com/repos/yoavAqua/bench-common/issues/events{/number}","events_url":"https://api.github.com/repos/yoavAqua/bench-common/events","assignees_url":"https://api.github.com/repos/yoavAqua/bench-common/assignees{/user}","branches_url":"https://api.github.com/repos/yoavAqua/bench-common/branches{/branch}","tags_url":"https://api.github.com/repos/yoavAqua/bench-common/tags","blobs_url":"https://api.github.com/repos/yoavAqua/bench-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yoavAqua/bench-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yoavAqua/bench-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/yoavAqua/bench-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yoavAqua/bench-common/statuses/{sha}","languages_url":"https://api.github.com/repos/yoavAqua/bench-common/languages","stargazers_url":"https://api.github.com/repos/yoavAqua/bench-common/stargazers","contributors_url":"https://api.github.com/repos/yoavAqua/bench-common/contributors","subscribers_url":"https://api.github.com/repos/yoavAqua/bench-common/subscribers","subscription_url":"https://api.github.com/repos/yoavAqua/bench-common/subscription","commits_url":"https://api.github.com/repos/yoavAqua/bench-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/yoavAqua/bench-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/yoavAqua/bench-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/yoavAqua/bench-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/yoavAqua/bench-common/contents/{+path}","compare_url":"https://api.github.com/repos/yoavAqua/bench-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yoavAqua/bench-common/merges","archive_url":"https://api.github.com/repos/yoavAqua/bench-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yoavAqua/bench-common/downloads","issues_url":"https://api.github.com/repos/yoavAqua/bench-common/issues{/number}","pulls_url":"https://api.github.com/repos/yoavAqua/bench-common/pulls{/number}","milestones_url":"https://api.github.com/repos/yoavAqua/bench-common/milestones{/number}","notifications_url":"https://api.github.com/repos/yoavAqua/bench-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yoavAqua/bench-common/labels{/name}","releases_url":"https://api.github.com/repos/yoavAqua/bench-common/releases{/id}","deployments_url":"https://api.github.com/repos/yoavAqua/bench-common/deployments","created_at":"2018-11-11T08:28:07Z","updated_at":"2018-11-11T08:28:09Z","pushed_at":"2018-11-20T10:48:59Z","git_url":"git://github.com/yoavAqua/bench-common.git","ssh_url":"git@github.com:yoavAqua/bench-common.git","clone_url":"https://github.com/yoavAqua/bench-common.git","svn_url":"https://github.com/yoavAqua/bench-common","homepage":null,"size":39,"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":"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":1,"watchers":0,"default_branch":"master"}},"base":{"label":"yoavAqua:master","ref":"master","sha":"596c8e9625c5ff36b716f482106889964a7c3941","user":{"login":"yoavAqua","id":44805943,"node_id":"MDQ6VXNlcjQ0ODA1OTQz","avatar_url":"https://avatars0.githubusercontent.com/u/44805943?v=4","gravatar_id":"","url":"https://api.github.com/users/yoavAqua","html_url":"https://github.com/yoavAqua","followers_url":"https://api.github.com/users/yoavAqua/followers","following_url":"https://api.github.com/users/yoavAqua/following{/other_user}","gists_url":"https://api.github.com/users/yoavAqua/gists{/gist_id}","starred_url":"https://api.github.com/users/yoavAqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoavAqua/subscriptions","organizations_url":"https://api.github.com/users/yoavAqua/orgs","repos_url":"https://api.github.com/users/yoavAqua/repos","events_url":"https://api.github.com/users/yoavAqua/events{/privacy}","received_events_url":"https://api.github.com/users/yoavAqua/received_events","type":"User","site_admin":false},"repo":{"id":157060959,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcwNjA5NTk=","name":"bench-common","full_name":"yoavAqua/bench-common","private":false,"owner":{"login":"yoavAqua","id":44805943,"node_id":"MDQ6VXNlcjQ0ODA1OTQz","avatar_url":"https://avatars0.githubusercontent.com/u/44805943?v=4","gravatar_id":"","url":"https://api.github.com/users/yoavAqua","html_url":"https://github.com/yoavAqua","followers_url":"https://api.github.com/users/yoavAqua/followers","following_url":"https://api.github.com/users/yoavAqua/following{/other_user}","gists_url":"https://api.github.com/users/yoavAqua/gists{/gist_id}","starred_url":"https://api.github.com/users/yoavAqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoavAqua/subscriptions","organizations_url":"https://api.github.com/users/yoavAqua/orgs","repos_url":"https://api.github.com/users/yoavAqua/repos","events_url":"https://api.github.com/users/yoavAqua/events{/privacy}","received_events_url":"https://api.github.com/users/yoavAqua/received_events","type":"User","site_admin":false},"html_url":"https://github.com/yoavAqua/bench-common","description":null,"fork":true,"url":"https://api.github.com/repos/yoavAqua/bench-common","forks_url":"https://api.github.com/repos/yoavAqua/bench-common/forks","keys_url":"https://api.github.com/repos/yoavAqua/bench-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yoavAqua/bench-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yoavAqua/bench-common/teams","hooks_url":"https://api.github.com/repos/yoavAqua/bench-common/hooks","issue_events_url":"https://api.github.com/repos/yoavAqua/bench-common/issues/events{/number}","events_url":"https://api.github.com/repos/yoavAqua/bench-common/events","assignees_url":"https://api.github.com/repos/yoavAqua/bench-common/assignees{/user}","branches_url":"https://api.github.com/repos/yoavAqua/bench-common/branches{/branch}","tags_url":"https://api.github.com/repos/yoavAqua/bench-common/tags","blobs_url":"https://api.github.com/repos/yoavAqua/bench-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yoavAqua/bench-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yoavAqua/bench-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/yoavAqua/bench-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yoavAqua/bench-common/statuses/{sha}","languages_url":"https://api.github.com/repos/yoavAqua/bench-common/languages","stargazers_url":"https://api.github.com/repos/yoavAqua/bench-common/stargazers","contributors_url":"https://api.github.com/repos/yoavAqua/bench-common/contributors","subscribers_url":"https://api.github.com/repos/yoavAqua/bench-common/subscribers","subscription_url":"https://api.github.com/repos/yoavAqua/bench-common/subscription","commits_url":"https://api.github.com/repos/yoavAqua/bench-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/yoavAqua/bench-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/yoavAqua/bench-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/yoavAqua/bench-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/yoavAqua/bench-common/contents/{+path}","compare_url":"https://api.github.com/repos/yoavAqua/bench-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yoavAqua/bench-common/merges","archive_url":"https://api.github.com/repos/yoavAqua/bench-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yoavAqua/bench-common/downloads","issues_url":"https://api.github.com/repos/yoavAqua/bench-common/issues{/number}","pulls_url":"https://api.github.com/repos/yoavAqua/bench-common/pulls{/number}","milestones_url":"https://api.github.com/repos/yoavAqua/bench-common/milestones{/number}","notifications_url":"https://api.github.com/repos/yoavAqua/bench-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yoavAqua/bench-common/labels{/name}","releases_url":"https://api.github.com/repos/yoavAqua/bench-common/releases{/id}","deployments_url":"https://api.github.com/repos/yoavAqua/bench-common/deployments","created_at":"2018-11-11T08:28:07Z","updated_at":"2018-11-11T08:28:09Z","pushed_at":"2018-11-20T10:48:59Z","git_url":"git://github.com/yoavAqua/bench-common.git","ssh_url":"git@github.com:yoavAqua/bench-common.git","clone_url":"https://github.com/yoavAqua/bench-common.git","svn_url":"https://github.com/yoavAqua/bench-common","homepage":null,"size":39,"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":"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":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yoavAqua/bench-common/pulls/1"},"html":{"href":"https://github.com/yoavAqua/bench-common/pull/1"},"issue":{"href":"https://api.github.com/repos/yoavAqua/bench-common/issues/1"},"comments":{"href":"https://api.github.com/repos/yoavAqua/bench-common/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/yoavAqua/bench-common/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/yoavAqua/bench-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yoavAqua/bench-common/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/yoavAqua/bench-common/statuses/992808dc1bf7d01e9b86e9e267888c10f577f518"}},"author_association":"OWNER"}}
{"actor":{"display_login":"yoavAqua"}}