feat: Filter the filesystem to check when the list is built. (#156)

* feat: Attempt to filter-out filesystem that match exclusion regex.
This commit is contained in:
ymartin-ovh
2022-06-24 17:45:47 +02:00
committed by GitHub
parent 7a3145d7f1
commit 66ccc6316a
9 changed files with 49 additions and 18 deletions

View File

@ -5,7 +5,9 @@ test_audit() {
# shellcheck disable=2154
/opt/debian-cis/bin/hardening/"${script}".sh || true
# shellcheck disable=2016
echo 'EXCLUDED="$EXCLUDED ^/dev/.*"' >>/opt/debian-cis/etc/conf.d/"${script}".cfg
echo 'EXCLUDED="$EXCLUDED ^/home/secaudit/thisfileisignored.*|^/dev/.*"' >>/opt/debian-cis/etc/conf.d/"${script}".cfg
touch /home/secaudit/thisfileisignored
chmod 777 /home/secaudit/thisfileisignored
describe Running on blank host
register_test retvalshouldbe 0