Skip to content

Commit

Permalink
Add new rule file_permissions_sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
Mab879 committed Feb 16, 2024
1 parent 9a72a41 commit 257bf01
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/sudo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ rules:
- sudoers_no_command_negation
- sudoers_no_root_target
- sudoers_validate_passwd
- file_permissions_sudo
templates:
- sudo_defaults_option
1 change: 1 addition & 0 deletions controls/anssi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ controls:
rules:
- sudo_dedicated_group
- var_sudo_dedicated_group=sudogrp
- file_permissions_sudo

- id: R39
title: Sudo configuration guidelines
Expand Down
24 changes: 24 additions & 0 deletions linux_os/guide/system/software/sudo/file_permissions_sudo/rule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
documentation_complete: true

title: 'Ensure That the sudo Binary Has the Correct Permissions'

description: |-
{{{ describe_file_permissions("/usr/bin/sudo", "4111") | indent(4) }}}

rationale: |-
The sudoers program should only be usable by people who have the correct permissions.
identifiers:
cce@rhel7: CCE-86949-5
cce@rhel8: CCE-86950-3
cce@rhel9: CCE-86951-1

severity: medium

platform: package[sudo]

template:
name: "file_permissions"
vars:
filepath: "/usr/bin/sudo"
filemode: '4111'
3 changes: 0 additions & 3 deletions shared/references/cce-redhat-avail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,6 @@ CCE-86939-6
CCE-86940-4
CCE-86941-2
CCE-86942-0
CCE-86949-5
CCE-86950-3
CCE-86951-1
CCE-86952-9
CCE-86953-7
CCE-86955-2
Expand Down

0 comments on commit 257bf01

Please sign in to comment.