mitre / canonical-ubuntu-18.04-lts-server-cis-baseline

(wip) InSpec profile for the Canonical Ubuntu 18.04 LTS CIS Benchmark
Other
4 stars 2 forks source link

refactored 4.1 checks to better use the auditd resource #19

Closed pkaeding closed 3 years ago

pkaeding commented 3 years ago

I realized there were some bugs in the checks I created the other day, when checking for rules that monitor multiple syscalls. The check was looking for strings like -S syscall1 -S syscall2 (which is the format when inspecting the rules files on disk) but they were failing because the auditd.lines resource (and auditctl -l) return this in the form -S syscall1,syscall2.

I also realized that I could make better use of the auditd resource and its fields, to better express the intent behind these checks, and the rules they are inspecting, rather than just simply comparing strings.