Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit f8c52d6

Browse files
🧹 Revert the grub audit matchers (#191)
I would revert the GRUB audit matchers. The current one does not work. --------- Signed-off-by: Michée lengronne <michee.lengronne@limawi.io>
1 parent 6bf8d06 commit f8c52d6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

core/mondoo-linux-security.mql.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,16 +1105,16 @@ queries:
11051105
impact: 80
11061106
mql: |
11071107
if( file("/boot/grub2/grub.cfg" ).exists) {
1108-
file("/boot/grub2/grub.cfg").content.lines.where( _ == /^[^#]/ ).contains("audit\=(\s+)?1")
1108+
file("/boot/grub2/grub.cfg").content.lines.where( _ == /^[^#]/ ).any(_ == /audit(\s+)?\=(\s+)?1/)
11091109
}
11101110
if( file("/boot/grub/grub.cfg").exists ) {
1111-
file("/boot/grub/grub.cfg").content.lines.where( _ == /^[^#]/ ).contains("audit\=(\s+)?1")
1111+
file("/boot/grub/grub.cfg").content.lines.where( _ == /^[^#]/ ).any(_ == /audit(\s+)?\=(\s+)?1/)
11121112
}
11131113
if( file("/boot/grub/grub.conf").exists ) {
1114-
file("/boot/grub/grub.conf").content.lines.where( _ == /^[^#]/ ).contains("audit\=(\s+)?1")
1114+
file("/boot/grub/grub.conf").content.lines.where( _ == /^[^#]/ ).any(_ == /audit(\s+)?\=(\s+)?1/)
11151115
}
11161116
if( file('/etc/secboot/config.json').exists ) {
1117-
parse.json('/etc/secboot/config.json').params['kernel-params'].contains('audit\=(\s+)?1')
1117+
parse.json('/etc/secboot/config.json').params['kernel-params'] == /audit(\s+)?\=(\s+)?1/
11181118
}
11191119
docs:
11201120
desc: |-

0 commit comments

Comments
 (0)