IMP(shellcheck): quote variable in tests (SC2086)

This commit is contained in:
Thibault Ayanides
2020-11-30 13:05:41 +01:00
parent dba1dae963
commit bc1aa65b91
36 changed files with 127 additions and 127 deletions

View File

@ -11,9 +11,9 @@ test_audit() {
local test_file=".netrc"
describe Tests purposely failing
useradd --create-home $test_user
touch /home/$test_user/$test_file
chmod 777 /home/$test_user/$test_file
useradd --create-home "$test_user"
touch "/home/$test_user/$test_file"
chmod 777 "/home/$test_user/$test_file"
register_test retvalshouldbe 1
register_test contain "permissions were not set to"
run noncompliant /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
@ -28,5 +28,5 @@ test_audit() {
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
# cleanup
userdel -r $test_user
userdel -r "$test_user"
}