Skip to content

Commit 6c34814

Browse files
committed
Improve ZFS encrypted volume detection
1 parent 7249efc commit 6c34814

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

cmd/agent/checks.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ checks:
2626
- Enable full disk encryption using LUKS
2727
- Run 'sudo cryptsetup luksFormat /dev/sdX' for each unencrypted partition
2828
- Update /etc/crypttab and /etc/fstab accordingly
29-
3029
darwin:
3130
- output: fdesetup status
3231
includes: "FileVault is Off|Encryption Not Enabled"
@@ -55,6 +54,24 @@ checks:
5554
- Enable CGD (CryptoGraphic Disk) encryption
5655
- Configure /etc/cgd/cgd.conf
5756
- See NetBSD guide on CGD configuration
57+
linux, freebsd:
58+
# Check for ZFS root encryption (zroot is common on FreeBSD and Linux)
59+
- output: (sudo zfs get -H encryption zroot 2>/dev/null || doas zfs get -H encryption zroot 2>/dev/null || zfs get -H encryption zroot 2>/dev/null) | awk '{print $3}'
60+
includes: "^off$"
61+
remediation:
62+
- ZFS root pool is not encrypted
63+
- Create an encrypted ZFS dataset or migrate to an encrypted pool
64+
- "For new pools: zpool create -O encryption=on -O keyformat=passphrase zroot ..."
65+
- Note that existing pools cannot be encrypted in-place
66+
solaris, illumos:
67+
# Check for ZFS root encryption (rpool is standard on Solaris/illumos)
68+
- output: (sudo zfs get -H encryption rpool 2>/dev/null || doas zfs get -H encryption rpool 2>/dev/null || zfs get -H encryption rpool 2>/dev/null) | awk '{print $3}'
69+
includes: "^off$"
70+
remediation:
71+
- ZFS root pool is not encrypted
72+
- Create an encrypted ZFS dataset or migrate to an encrypted pool
73+
- "For new pools: zpool create -O encryption=on -O keyformat=passphrase rpool ..."
74+
- Note that existing pools cannot be encrypted in-place
5875
windows:
5976
- output: manage-bde -status
6077
includes: "Protection Off|Encryption Percentage.*0%"

0 commit comments

Comments
 (0)