mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-24 03:24:34 +02:00
IMP(shellcheck): quote variable in tests (SC2086)
This commit is contained in:
@ -11,14 +11,14 @@ test_audit() {
|
||||
local dir="/etc/group"
|
||||
|
||||
describe Tests purposely failing
|
||||
useradd $test_group
|
||||
temp=$(tail -1 $dir)
|
||||
echo $temp >> $dir
|
||||
useradd "$test_group"
|
||||
temp=$(tail -1 "$dir")
|
||||
echo "$temp" >> "$dir"
|
||||
register_test retvalshouldbe 1
|
||||
register_test contain "Duplicate group"
|
||||
run noncompliant /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
# cleanup
|
||||
sed -i '$ d' $dir
|
||||
userdel $test_group
|
||||
sed -i '$ d' "$dir"
|
||||
userdel "$test_group"
|
||||
}
|
||||
|
Reference in New Issue
Block a user