Skip to content

Commit

Permalink
test/scripts: chown results.xml
Browse files Browse the repository at this point in the history
The `results.xml` file is owned by root, chown the file so we can read the results.
  • Loading branch information
kingsleyzissou authored and achilleas-k committed Mar 27, 2024
1 parent eb01407 commit 0754ccc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/scripts/base-host-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ get_oscap_score() {
"${datastream}" || true # oscap returns exit code 2 for any failed rules

echo "📄 Saving results"
sudo chown "$UID" results.xml

echo "📗 Checking oscap score"
hardened_score=$(xmlstarlet sel -N x="http://checklists.nist.gov/xccdf/1.2" -t -v "//x:score" results.xml)
Expand Down

0 comments on commit 0754ccc

Please sign in to comment.