Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix content file name #513

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions misc/genOSCAPreport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ CONTENT="0.1.74"
function download_content {
if ! [ -f "scap-security-guide-${CONTENT}.zip" ]; then
wget -nc "https://github.com/ComplianceAsCode/content/releases/download/v${CONTENT}/scap-security-guide-${CONTENT}.zip"
unzip -n "scap-security-guide-${CONTENT}.zip"
fi
unzip -n "scap-security-guide-${CONTENT}.zip"
}

function generate_report () {
Expand All @@ -31,7 +31,7 @@ function generate_report () {
fi
download_content
cd "scap-security-guide-${CONTENT}" || exit 1
sudo oscap xccdf eval --fetch-remote-resources --profile "xccdf_org.ssgproject.content_profile_${PROFILE}" --results-arf "results-${REPORT_DATE}.xml" --report "${REPORT_NAME}" "./ssg-ubuntu${RELEASE}-ds-1.2.xml"
sudo oscap xccdf eval --fetch-remote-resources --profile "xccdf_org.ssgproject.content_profile_${PROFILE}" --results-arf "results-${REPORT_DATE}.xml" --report "${REPORT_NAME}" "./ssg-ubuntu${RELEASE}-ds.xml"
fi

if grep -qo '^AlmaLinux\s' /etc/redhat-release; then
Expand All @@ -51,10 +51,10 @@ function generate_report () {
sudo chown "$(id -u):$(id -g)" "${REPORT_NAME}"
cp -v "${REPORT_NAME}" ~/"${REPORT_NAME}"
fi

cd .. || exit 1
}

generate_report "cis"
generate_report "cui"
generate_report "stig"

cd .. || exit 1
Loading