Revert "Revert "Staging to master" due to rendering problems"

This commit is contained in:
Catherine Luse authored and GitHub committed 2022-04-04 17:19:35 -07:00
1 parent d857d24796
commit 7a7fa47547
25 files changed
+26998 -52

No files matched your search

+11 -12
View File
@@ -19,7 +19,7 @@ get_id_text() {
get_section_ids() {
id=${1}
jq -r --arg id "${id}" '.[] | select(.id==$id) | .checks[].id' ${results_file}
jq -r --arg id "${id}" '.[] | select(.id==$id) | .checks[].id' ${results_file} | sort -V
}
get_section_desc() {
@@ -53,12 +53,11 @@ for id in $(get_ids); do
test_desc=$(echo ${result} | jq -r '.description')
audit=$(echo ${result} | jq -r '.audit')
audit_config=$(echo ${result} | jq -r '.audit_config')
actual_value=$(echo ${result} | jq -r '.actual_value_per_node."cis-aio-0"')
actual_value=$(echo ${result} | jq -r '.actual_value_per_node[]')
type=$(echo ${result} | jq -r '.test_type')
status=$(echo ${result} | jq -r '.state')
remediation=$(echo ${result} | jq -r '.remediation')
expected_result=$(echo ${result} | jq -r '.expected_result')
# echo "#### ${test} ${test_desc}"
echo
if [ "${type}" = "skip" ]; then
echo "**Result:** Not Applicable"
@@ -76,7 +75,7 @@ for id in $(get_ids); do
if [[ ${audit} =~ ".sh" ]]; then
audit_script=$(basename $(echo ${audit} | cut -d ' ' -f1))
test_helper="${test_helpers}/${audit_script}"
echo "**Audit Script:** ${audit_script}"
echo "**Audit Script:** \`${audit_script}\`"
echo
echo '```bash'
cat ${test_helper}
@@ -106,6 +105,14 @@ for id in $(get_ids); do
echo '```'
echo
fi
if [ ! -z "${expected_result}" ]; then
echo "**Expected Result**:"
echo
echo '```console'
echo ${expected_result}
echo '```'
echo
fi
if [ ! -z "${actual_value}" ] && [ "${status}" != "PASS" ] && [ "${type}" != "skip" ] && [ "${type}" != "manual" ]; then
echo "**Returned Value**:"
echo
@@ -114,14 +121,6 @@ for id in $(get_ids); do
echo '```'
echo
fi
if [ ! -z "${expected_result}" ]; then
echo "**Expected result**:"
echo
echo '```console'
echo ${expected_result}
echo '```'
echo
fi
done
done
done