mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-24 11:34:35 +02:00
IMP(shellcheck): quote variable in tests (SC2086)
This commit is contained in:
@ -11,11 +11,11 @@ test_audit() {
|
||||
local dir="/etc/passwd"
|
||||
|
||||
describe Tests purposely failing
|
||||
echo "$test_user:x:1100:1100::/home/$test_user:" >> $dir
|
||||
echo "$test_user:x:1100:1100::/home/$test_user:" >> "$dir"
|
||||
register_test retvalshouldbe 1
|
||||
register_test contain "is referenced by /etc/passwd but does not exist in /etc/group"
|
||||
run noncompliant /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
# cleanup
|
||||
userdel $test_user
|
||||
userdel "$test_user"
|
||||
}
|
||||
|
Reference in New Issue
Block a user