Skip to content

Commit

Permalink
cukinia: security: check /boot only readable by root
Browse files Browse the repository at this point in the history
Follows ANSI-BP28-R29

Signed-off-by: Enguerrand de Ribaucourt <[email protected]>
  • Loading branch information
deribaucourt committed Dec 10, 2024
1 parent 8e22f10 commit c09dd1e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ cukinia_log "$(_colorize yellow "--- check bootloader hardening ---")"

/usr/share/update/mount_boot.sh mount

boot_mounted() { mountpoint -q /boot; }

when "boot_mounted" \
id "SEAPATH-00007" as "grub password is set" cukinia_cmd \
grep -q '^password_pbkdf2 root grub.pbkdf2' /boot/EFI/BOOT/grub.cfg

/usr/share/update/mount_boot.sh umount
when "boot_mounted" \
id "SEAPATH-00077" as "boot partition is only readable by root" cukinia_test \
"$(stat -c "%a %U %G" /boot)" == "750 root root"

/usr/share/update/mount_boot.sh umount 2>/dev/null

0 comments on commit c09dd1e

Please sign in to comment.