Skip to content

Commit

Permalink
Add double quotes for SC2086
Browse files Browse the repository at this point in the history
  • Loading branch information
deajan committed Nov 17, 2024
1 parent 2a2cb8e commit 1eac35b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kickstart_source_script/post_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,23 +153,23 @@ if [ $? -eq 0 ]; then
# Let's reinstall openscap in case we're running this script on a non prepared machine
dnf install -y openscap scap-security-guide || log "OpenSCAP is missing and cannot be installed" "ERROR"
log "Setting up scap profile with remote resources"
oscap xccdf eval --profile anssi_bp28_high --fetch-remote-resources --remediate /usr/share/xml/scap/ssg/content/ssg-${DIST}${RELEASE}-ds.xml > /root/openscap_report/actions.log 2>&1
oscap xccdf eval --profile anssi_bp28_high --fetch-remote-resources --remediate "/usr/share/xml/scap/ssg/content/ssg-${DIST}${RELEASE}-ds.xml" > /root/openscap_report/actions.log 2>&1
# result 2 is partially applied, which can be normal
if [ $? -eq 1 ]; then
log "OpenSCAP failed. See /root/openscap_report/actions.log" "ERROR"
else
log "Generating scap results with remote resources"
oscap xccdf generate guide --fetch-remote-resources --profile anssi_bp28_high /usr/share/xml/scap/ssg/content/ssg-${DIST}${RELEASE}-ds.xml > "/root/openscap_report/oscap_anssi_bp028_high_$(date '+%Y-%m-%d').html" 2>> "${LOG_FILE}"
oscap xccdf generate guide --fetch-remote-resources --profile anssi_bp28_high "/usr/share/xml/scap/ssg/content/ssg-${DIST}${RELEASE}-ds.xml" > "/root/openscap_report/oscap_anssi_bp028_high_$(date '+%Y-%m-%d').html" 2>> "${LOG_FILE}"
[ $? -ne 0 ] && log "OpenSCAP results failed. See log file" "ERROR"
fi
else
log "Setting up scap profile without internet"
oscap xccdf eval --profile anssi_bp28_high --remediate /usr/share/xml/scap/ssg/content/ssg-${DIST}${RELEASE}-ds.xml > /root/openscap_report/actions.log 2>&1
oscap xccdf eval --profile anssi_bp28_high --remediate "/usr/share/xml/scap/ssg/content/ssg-${DIST}${RELEASE}-ds.xml" > /root/openscap_report/actions.log 2>&1
if [ $? -eq 1 ]; then
log "OpenSCAP failed. See /root/openscap_report/actions.log" "ERROR"
else
log "Generating scap results without internet"
oscap xccdf generate guide --profile anssi_bp28_high /usr/share/xml/scap/ssg/content/ssg-${DIST}${RELEASE}-ds.xml > "/root/openscap_report/oscap_anssi_bp028_high_$(date '+%Y-%m-%d').html" 2>> "${LOG_FILE}"
oscap xccdf generate guide --profile anssi_bp28_high "/usr/share/xml/scap/ssg/content/ssg-${DIST}${RELEASE}-ds.xml" > "/root/openscap_report/oscap_anssi_bp028_high_$(date '+%Y-%m-%d').html" 2>> "${LOG_FILE}"
[ $? -ne 0 ] && log "OpenSCAP results failed. See log file" "ERROR"
fi
fi
Expand Down

0 comments on commit 1eac35b

Please sign in to comment.