Skip to content

Commit e944eef

Browse files
committed
ci: verify the new installed /boot/grub2/grub.cfg permission is
`0600`
1 parent 532724d commit e944eef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ jobs:
8686
fi
8787
sudo ls /mnt/EFI/centos/{grub.cfg,${shim}}
8888
sudo umount /mnt
89+
# check /boot/grub2/grub.cfg permission
90+
root_part=$(sudo sfdisk -l -J "${device}" | jq -r '.partitiontable.partitions[] | select(.name == "root").node')
91+
sudo mount "${root_part}" /mnt/
92+
sudo ls /mnt/boot/grub2/grub.cfg
93+
[ $(sudo stat -c "%a" /mnt/boot/grub2/grub.cfg) == "600" ]
94+
sudo umount /mnt
8995
sudo losetup -D "${device}"
9096
sudo rm -f myimage.raw
9197
@@ -99,3 +105,4 @@ jobs:
99105
--disable-selinux --replace=alongside /target
100106
# Verify we injected static configs
101107
jq -re '.["static-configs"].version' /boot/bootupd-state.json
108+
[ $(sudo stat -c "%a" /boot/grub2/grub.cfg) == "600" ]

0 commit comments

Comments
 (0)