tuned-2.24.0-6.fc42

List of Findings

Error: SHELLCHECK_WARNING (CWE-563): [#def1]
/usr/lib/kernel/install.d/92-tuned.install:4:1: warning[SC2034]: KERNEL_VERSION appears unused. Verify use (or export if used externally).
#    2|   
#    3|   COMMAND="$1"
#    4|-> KERNEL_VERSION="$2"
#    5|   BOOT_DIR_ABS="$3"
#    6|   KERNEL_IMAGE="$4"

Error: SHELLCHECK_WARNING (CWE-563): [#def2]
/usr/lib/kernel/install.d/92-tuned.install:5:1: warning[SC2034]: BOOT_DIR_ABS appears unused. Verify use (or export if used externally).
#    3|   COMMAND="$1"
#    4|   KERNEL_VERSION="$2"
#    5|-> BOOT_DIR_ABS="$3"
#    6|   KERNEL_IMAGE="$4"
#    7|   

Error: SHELLCHECK_WARNING (CWE-563): [#def3]
/usr/lib/kernel/install.d/92-tuned.install:6:1: warning[SC2034]: KERNEL_IMAGE appears unused. Verify use (or export if used externally).
#    4|   KERNEL_VERSION="$2"
#    5|   BOOT_DIR_ABS="$3"
#    6|-> KERNEL_IMAGE="$4"
#    7|   
#    8|   # skip if systemd-boot is used

Error: SHELLCHECK_WARNING (CWE-252): [#def4]
/usr/lib/kernel/install.d/92-tuned.install:27:1: warning[SC2164]: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.
#   25|   ARCH=`uname -m`
#   26|   
#   27|-> pushd "$LOADER_ENTRIES" &> /dev/null
#   28|   for f in `basename "$MACHINE_ID"`-*.conf; do
#   29|     # Skip non-files and rescue entries

Error: SHELLCHECK_WARNING (CWE-477): [#def5]
/usr/lib/kernel/install.d/92-tuned.install:30:18: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   28|   for f in `basename "$MACHINE_ID"`-*.conf; do
#   29|     # Skip non-files and rescue entries
#   30|->   if [ ! -f "$f" -o "${f: -12}" == "-rescue.conf" ]; then
#   31|       continue
#   32|     fi

Error: SHELLCHECK_WARNING (CWE-252): [#def6]
/usr/lib/kernel/install.d/92-tuned.install:51:1: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#   49|     fi
#   50|   done
#   51|-> popd &> /dev/null
#   52|   
#   53|   exit 0

Error: SHELLCHECK_WARNING (CWE-138): [#def7]
/usr/lib/tuned/profiles/cpu-partitioning/00-tuned-pre-udev.sh:11:16: error[SC2145]: Argument mixes string and array. Use * or separate argument.
#    9|   log()
#   10|   {
#   11|->   echo "tuned: $@" >> /dev/kmsg
#   12|   }
#   13|   

Error: SHELLCHECK_WARNING (CWE-457): [#def8]
/usr/lib/tuned/profiles/cpu-partitioning/script.sh:6:15: warning[SC2154]: TUNED_tmpdir is referenced but not assigned.
#    4|   
#    5|   start() {
#    6|->     mkdir -p "${TUNED_tmpdir}/etc/systemd"
#    7|       mkdir -p "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev"
#    8|       cp /etc/systemd/system.conf "${TUNED_tmpdir}/etc/systemd/"

Error: SHELLCHECK_WARNING (CWE-88): [#def9]
/usr/lib/tuned/profiles/cpu-partitioning/script.sh:24:9: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   22|   }
#   23|   
#   24|-> process $@

Error: SHELLCHECK_WARNING (CWE-88): [#def10]
/usr/lib/tuned/profiles/laptop-ac-powersave/script.sh:15:9: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   13|   }
#   14|   
#   15|-> process $@

Error: SHELLCHECK_WARNING (CWE-88): [#def11]
/usr/lib/tuned/profiles/powersave/script.sh:17:9: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   15|   }
#   16|   
#   17|-> process $@

Error: SHELLCHECK_WARNING (CWE-88): [#def12]
/usr/lib/tuned/profiles/realtime-virtual-guest/script.sh:17:9: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   15|   }
#   16|   
#   17|-> process $@

Error: SHELLCHECK_WARNING (CWE-477): [#def13]
/usr/lib/tuned/profiles/realtime-virtual-host/script.sh:23:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   21|       if [ -f /sys/module/kvm/parameters/kvmclock_periodic_sync ]; then
#   22|           kps=$(cat /sys/module/kvm/parameters/kvmclock_periodic_sync)
#   23|->         if [ "$kps" = "N" -o "$kps" = "0" ]; then
#   24|               echo "  kvmclock_periodic_sync:($kps): disabled: okay"
#   25|           else

Error: SHELLCHECK_WARNING (CWE-477): [#def14]
/usr/lib/tuned/profiles/realtime-virtual-host/script.sh:41:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   39|       if [ -f /sys/module/kvm/parameters/nx_huge_pages ]; then
#   40|           kps=$(cat /sys/module/kvm/parameters/nx_huge_pages)
#   41|->         if [ "$kps" = "N" -o "$kps" = "0" ]; then
#   42|               echo "  kvmclock_periodic_sync:($kps): disabled: okay"
#   43|           else

Error: SHELLCHECK_WARNING (CWE-88): [#def15]
/usr/lib/tuned/profiles/realtime-virtual-host/script.sh:51:9: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   49|   }
#   50|   
#   51|-> process $@

Error: SHELLCHECK_WARNING (CWE-88): [#def16]
/usr/lib/tuned/profiles/realtime/script.sh:22:9: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   20|   }
#   21|   
#   22|-> process $@

Error: SHELLCHECK_WARNING (CWE-88): [#def17]
/usr/lib/tuned/profiles/spindown-disk/script.sh:32:9: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   30|   }
#   31|   
#   32|-> process $@

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-20.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-nametuned-2.24.0-6.fc42
store-results-to/tmp/tmp8lt0w8ux/tuned-2.24.0-6.fc42.tar.xz
time-created2024-11-13 03:25:22
time-finished2024-11-13 03:26:30
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp8lt0w8ux/tuned-2.24.0-6.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp8lt0w8ux/tuned-2.24.0-6.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9