Skip to content

Commit

Permalink
Update test_xccdf_values_in_ds.sh to account for Bash variables
Browse files Browse the repository at this point in the history
Bash variables whose names start with `$XCCDF_VALUE_` are valid in SCE
content. The `$XCCDF_VALUE_` variables are exported by `oscap` so that
the SCE check can use XCCDF Values in its code.
  • Loading branch information
matusmarhefka committed Nov 4, 2024
1 parent 0d2a030 commit 6e1a694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_xccdf_values_in_ds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if grep -iq "dangling reference to" "$DS" ; then
printf "Found dangling reference in %s, ensure correct usage of the xccdf_value Jinja macro!" "$DS" >&2
exit 1
fi
if grep -iq "xccdf_value" "$DS" ; then
if grep -iq "[^$]xccdf_value" "$DS" ; then
printf "Found obtrusive xccdf_value in %s, ensure correct usage of the xccdf_value Jinja macro!" "$DS" >&2
exit 1
fi
Expand Down

0 comments on commit 6e1a694

Please sign in to comment.