ComplianceAsCode/content

View on GitHub

Showing 1,093 of 1,093 total issues

Don't use variables in the printf format string. Use printf "..%s.." "$foo".
Open

printf "Usage: $(basename $0) <DATASTREAM> <UNSELECT_LIST_FILE>
Severity: Minor
Found in tests/ds_unselect_rules.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

sed -i "/<.*Rule.*id=\"$rule/s/selected=\"true\"/selected=\"false\"/g" $DS || exit 1
Severity: Minor
Found in tests/ds_unselect_rules.sh by shellcheck

You need a space after the '{'.
Open

{{% else %}}
Severity: Minor
Found in tests/shared/grub2.sh by shellcheck

Consider using { cmd1; cmd2; } >> file instead of individual redirects.
Open

echo '<html lang="en">' >> index.html

Double quote to prevent globbing and word splitting.
Open

cp -rf build/$product/profile-statistics $STATS_DIR/$product/profile-statistics
Severity: Minor
Found in utils/generate_html_pages.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

mkdir -p $PAGES_DIR/guides
Severity: Minor
Found in utils/generate_html_pages.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

pushd $PAGES_DIR
Severity: Minor
Found in utils/generate_html_pages.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

pushd $PAGES_DIR

Double quote to prevent globbing and word splitting.
Open

printf "Usage: $(basename $0) <DATASTREAM> <UNSELECT_LIST_FILE>
Severity: Minor
Found in tests/ds_unselect_rules.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

echo "<title>Statistics</title>" >> $STATS_DIR/index.html
Severity: Minor
Found in utils/generate_html_pages.sh by shellcheck

RSYSLOG_CONF appears unused. Verify it or export it.
Open

RSYSLOG_CONF='/etc/rsyslog.conf'

Double quote to prevent globbing and word splitting.
Open

umount -l ${path}
Severity: Minor
Found in tests/shared/partition.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

DS="/tmp/$(basename $DS)"
Severity: Minor
Found in tests/ds_unselect_rules.sh by shellcheck

You need a space after the '{'.
Open

{{% else %}}
Severity: Minor
Found in tests/shared/grub2.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

sed -i "/<.*select.*idref=\"$rule/s/selected=\"true\"/selected=\"false\"/g" $DS || exit 1
Severity: Minor
Found in tests/ds_unselect_rules.sh by shellcheck

Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
Open

if [ $? -ne 0 ]; then

You need a space after the '{'.
Open

{{% if 'ubuntu' in product %}}
Severity: Minor
Found in tests/shared/grub2.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

touch $STATS_DIR/index.html
Severity: Minor
Found in utils/generate_html_pages.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

cp -rf build/$product/product-statistics $STATS_DIR/$product/product-statistics
Severity: Minor
Found in utils/generate_html_pages.sh by shellcheck

Double quote to prevent globbing and word splitting.
Open

cp -rf build/$product/profile-statistics $STATS_DIR/$product/profile-statistics
Severity: Minor
Found in utils/generate_html_pages.sh by shellcheck
Severity
Category
Status
Source
Language