{"action":"opened","number":974,"pull_request":{"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/974","id":56600363,"html_url":"https://github.com/OpenSCAP/scap-security-guide/pull/974","diff_url":"https://github.com/OpenSCAP/scap-security-guide/pull/974.diff","patch_url":"https://github.com/OpenSCAP/scap-security-guide/pull/974.patch","issue_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/974","number":974,"state":"open","locked":false,"title":"[BugFix] [Infrastructure] Fix behaviour of 'perform_audit_rules_privileged_commands_remediation helper remediation' function","user":{"login":"iankko","id":8414918,"avatar_url":"https://avatars.githubusercontent.com/u/8414918?v=3","gravatar_id":"","url":"https://api.github.com/users/iankko","html_url":"https://github.com/iankko","followers_url":"https://api.github.com/users/iankko/followers","following_url":"https://api.github.com/users/iankko/following{/other_user}","gists_url":"https://api.github.com/users/iankko/gists{/gist_id}","starred_url":"https://api.github.com/users/iankko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iankko/subscriptions","organizations_url":"https://api.github.com/users/iankko/orgs","repos_url":"https://api.github.com/users/iankko/repos","events_url":"https://api.github.com/users/iankko/events{/privacy}","received_events_url":"https://api.github.com/users/iankko/received_events","type":"User","site_admin":false},"body":"<br/>\r\nThe ```perform_audit_rules_privileged_commands_remediation``` remediation function (which is used to implement the remediation for ```audit_rules_privileged_commands``` rule) keeps the array / list of SUID / SGID binaries, that have been previously found for meeting the requirement (and if encountering the same SUID / SGID binary second time, we don't add the rule into ```/etc/audit/audit.rules``` | ```/etc/audit/rules.d/privileged.rules``` files.\r\n\r\nBut the current comparison / check for SUID / SGID binary name match is based on prefix match (not whole SUID basename match). This way of matching (prefix match) won't work in the following case:\r\n* the ```ping6``` binary has been handled before, and we encountered ```ping``` executable,\r\n* since the prefix match matched, ```ping``` would be <b>incorrectly</b> added to the list of SUID / SGID executables, not to be evaluated in subsequent for loop passes,\r\n* this leads to the result when remediation of audit rules privileged commands does not insert rule for ```ping``` binary into necessary file, despite of the fact it should be inserted there.\r\n\r\nTherefore fix this by replacing the current prefix match, with new exact sbinary name match requirement. From now on ```ping``` is being included properly and the remediation succeeds.\r\n\r\nTesting report:\r\n\r\n--\r\nThe change has been tested manually on recent RHEL-6 system and it's working fine (AFAICT from testing. Old behaviours - remediation returns 'error', now it returns 'fixed').\r\n\r\nPlease review.\r\n\r\nThank you, Jan.\r\n","created_at":"2016-01-20T12:18:16Z","updated_at":"2016-01-20T12:18:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":{"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/milestones/20","html_url":"https://github.com/OpenSCAP/scap-security-guide/milestones/0.1.29","labels_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/milestones/20/labels","id":1512910,"number":20,"title":"0.1.29","description":null,"creator":{"login":"iankko","id":8414918,"avatar_url":"https://avatars.githubusercontent.com/u/8414918?v=3","gravatar_id":"","url":"https://api.github.com/users/iankko","html_url":"https://github.com/iankko","followers_url":"https://api.github.com/users/iankko/followers","following_url":"https://api.github.com/users/iankko/following{/other_user}","gists_url":"https://api.github.com/users/iankko/gists{/gist_id}","starred_url":"https://api.github.com/users/iankko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iankko/subscriptions","organizations_url":"https://api.github.com/users/iankko/orgs","repos_url":"https://api.github.com/users/iankko/repos","events_url":"https://api.github.com/users/iankko/events{/privacy}","received_events_url":"https://api.github.com/users/iankko/received_events","type":"User","site_admin":false},"open_issues":27,"closed_issues":1,"state":"open","created_at":"2016-01-18T16:07:57Z","updated_at":"2016-01-20T12:18:16Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/974/commits","review_comments_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/974/comments","review_comment_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/974/comments","statuses_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/statuses/16c47b9562e7248ad24567387d95cd3a42cac87d","head":{"label":"iankko:rhel6_audit_rules_privileged_commands_rem_fix","ref":"rhel6_audit_rules_privileged_commands_rem_fix","sha":"16c47b9562e7248ad24567387d95cd3a42cac87d","user":{"login":"iankko","id":8414918,"avatar_url":"https://avatars.githubusercontent.com/u/8414918?v=3","gravatar_id":"","url":"https://api.github.com/users/iankko","html_url":"https://github.com/iankko","followers_url":"https://api.github.com/users/iankko/followers","following_url":"https://api.github.com/users/iankko/following{/other_user}","gists_url":"https://api.github.com/users/iankko/gists{/gist_id}","starred_url":"https://api.github.com/users/iankko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iankko/subscriptions","organizations_url":"https://api.github.com/users/iankko/orgs","repos_url":"https://api.github.com/users/iankko/repos","events_url":"https://api.github.com/users/iankko/events{/privacy}","received_events_url":"https://api.github.com/users/iankko/received_events","type":"User","site_admin":false},"repo":{"id":23708376,"name":"scap-security-guide","full_name":"iankko/scap-security-guide","owner":{"login":"iankko","id":8414918,"avatar_url":"https://avatars.githubusercontent.com/u/8414918?v=3","gravatar_id":"","url":"https://api.github.com/users/iankko","html_url":"https://github.com/iankko","followers_url":"https://api.github.com/users/iankko/followers","following_url":"https://api.github.com/users/iankko/following{/other_user}","gists_url":"https://api.github.com/users/iankko/gists{/gist_id}","starred_url":"https://api.github.com/users/iankko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iankko/subscriptions","organizations_url":"https://api.github.com/users/iankko/orgs","repos_url":"https://api.github.com/users/iankko/repos","events_url":"https://api.github.com/users/iankko/events{/privacy}","received_events_url":"https://api.github.com/users/iankko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iankko/scap-security-guide","description":"Baseline compliance content in SCAP formats","fork":true,"url":"https://api.github.com/repos/iankko/scap-security-guide","forks_url":"https://api.github.com/repos/iankko/scap-security-guide/forks","keys_url":"https://api.github.com/repos/iankko/scap-security-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iankko/scap-security-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iankko/scap-security-guide/teams","hooks_url":"https://api.github.com/repos/iankko/scap-security-guide/hooks","issue_events_url":"https://api.github.com/repos/iankko/scap-security-guide/issues/events{/number}","events_url":"https://api.github.com/repos/iankko/scap-security-guide/events","assignees_url":"https://api.github.com/repos/iankko/scap-security-guide/assignees{/user}","branches_url":"https://api.github.com/repos/iankko/scap-security-guide/branches{/branch}","tags_url":"https://api.github.com/repos/iankko/scap-security-guide/tags","blobs_url":"https://api.github.com/repos/iankko/scap-security-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iankko/scap-security-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iankko/scap-security-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/iankko/scap-security-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iankko/scap-security-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/iankko/scap-security-guide/languages","stargazers_url":"https://api.github.com/repos/iankko/scap-security-guide/stargazers","contributors_url":"https://api.github.com/repos/iankko/scap-security-guide/contributors","subscribers_url":"https://api.github.com/repos/iankko/scap-security-guide/subscribers","subscription_url":"https://api.github.com/repos/iankko/scap-security-guide/subscription","commits_url":"https://api.github.com/repos/iankko/scap-security-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/iankko/scap-security-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/iankko/scap-security-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/iankko/scap-security-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/iankko/scap-security-guide/contents/{+path}","compare_url":"https://api.github.com/repos/iankko/scap-security-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iankko/scap-security-guide/merges","archive_url":"https://api.github.com/repos/iankko/scap-security-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iankko/scap-security-guide/downloads","issues_url":"https://api.github.com/repos/iankko/scap-security-guide/issues{/number}","pulls_url":"https://api.github.com/repos/iankko/scap-security-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/iankko/scap-security-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/iankko/scap-security-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iankko/scap-security-guide/labels{/name}","releases_url":"https://api.github.com/repos/iankko/scap-security-guide/releases{/id}","created_at":"2014-09-05T15:38:32Z","updated_at":"2016-01-14T20:17:48Z","pushed_at":"2016-01-20T12:07:09Z","git_url":"git://github.com/iankko/scap-security-guide.git","ssh_url":"git@github.com:iankko/scap-security-guide.git","clone_url":"https://github.com/iankko/scap-security-guide.git","svn_url":"https://github.com/iankko/scap-security-guide","homepage":"https://fedorahosted.org/scap-security-guide/","size":13005,"stargazers_count":0,"watchers_count":0,"language":"XSLT","has_issues":false,"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":"OpenSCAP:master","ref":"master","sha":"f722dd9f1d632586502c6fef4f2c2030421e6066","user":{"login":"OpenSCAP","id":7439934,"avatar_url":"https://avatars.githubusercontent.com/u/7439934?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenSCAP","html_url":"https://github.com/OpenSCAP","followers_url":"https://api.github.com/users/OpenSCAP/followers","following_url":"https://api.github.com/users/OpenSCAP/following{/other_user}","gists_url":"https://api.github.com/users/OpenSCAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSCAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSCAP/subscriptions","organizations_url":"https://api.github.com/users/OpenSCAP/orgs","repos_url":"https://api.github.com/users/OpenSCAP/repos","events_url":"https://api.github.com/users/OpenSCAP/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSCAP/received_events","type":"Organization","site_admin":false},"repo":{"id":19279458,"name":"scap-security-guide","full_name":"OpenSCAP/scap-security-guide","owner":{"login":"OpenSCAP","id":7439934,"avatar_url":"https://avatars.githubusercontent.com/u/7439934?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenSCAP","html_url":"https://github.com/OpenSCAP","followers_url":"https://api.github.com/users/OpenSCAP/followers","following_url":"https://api.github.com/users/OpenSCAP/following{/other_user}","gists_url":"https://api.github.com/users/OpenSCAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSCAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSCAP/subscriptions","organizations_url":"https://api.github.com/users/OpenSCAP/orgs","repos_url":"https://api.github.com/users/OpenSCAP/repos","events_url":"https://api.github.com/users/OpenSCAP/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSCAP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenSCAP/scap-security-guide","description":"Baseline compliance content in SCAP formats","fork":false,"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide","forks_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/forks","keys_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/teams","hooks_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/hooks","issue_events_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/events{/number}","events_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/events","assignees_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/assignees{/user}","branches_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/branches{/branch}","tags_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/tags","blobs_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/languages","stargazers_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/stargazers","contributors_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/contributors","subscribers_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/subscribers","subscription_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/subscription","commits_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/contents/{+path}","compare_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/merges","archive_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/downloads","issues_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues{/number}","pulls_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/labels{/name}","releases_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/releases{/id}","created_at":"2014-04-29T14:32:02Z","updated_at":"2016-01-17T13:29:08Z","pushed_at":"2016-01-20T12:01:32Z","git_url":"git://github.com/OpenSCAP/scap-security-guide.git","ssh_url":"git@github.com:OpenSCAP/scap-security-guide.git","clone_url":"https://github.com/OpenSCAP/scap-security-guide.git","svn_url":"https://github.com/OpenSCAP/scap-security-guide","homepage":"http://www.open-scap.org/security-policies/scap-security-guide","size":15196,"stargazers_count":115,"watchers_count":115,"language":"XSLT","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":84,"forks":65,"open_issues":84,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/974"},"html":{"href":"https://github.com/OpenSCAP/scap-security-guide/pull/974"},"issue":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/974"},"comments":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/974/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/974/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/974/commits"},"statuses":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/statuses/16c47b9562e7248ad24567387d95cd3a42cac87d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":3,"deletions":2,"changed_files":1}}