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,7 +11,7 @@ test_audit() {
|
||||
local test_file="/etc/ssh/sshd_config"
|
||||
|
||||
describe Tests purposely failing
|
||||
chmod 777 $test_file
|
||||
chmod 777 "$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
|
||||
@ -21,8 +21,8 @@ test_audit() {
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh --apply || true
|
||||
|
||||
describe Tests purposely failing
|
||||
useradd $test_user
|
||||
chown $test_user:$test_user $test_file
|
||||
useradd "$test_user"
|
||||
chown "$test_user":"$test_user" "$test_file"
|
||||
register_test retvalshouldbe 1
|
||||
register_test contain "ownership was not set to"
|
||||
run noncompliant /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
@ -38,5 +38,5 @@ test_audit() {
|
||||
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
# Cleanup
|
||||
userdel $test_user
|
||||
userdel "$test_user"
|
||||
}
|
||||
|
Reference in New Issue
Block a user