Newly introduced findings

List of Findings

Error: SHELLCHECK_WARNING (CWE-457): [#def1]
/usr/bin/dracut:1609:67: warning[SC2154]: dbusconfdir is referenced but not assigned.
# 1607|   [[ $hostonly ]] && set_global_var "dbus" "dbusconfdir" "/etc/dbus-1"
# 1608|   set_global_var "dbus" "dbusinterfaces" "${dbus}/interfaces"
# 1609|-> [[ $hostonly ]] && set_global_var "dbus" "dbusinterfacesconfdir" "${dbusconfdir}/interfaces"
# 1610|   set_global_var "dbus" "dbusservices" "${dbus}/services"
# 1611|   [[ $hostonly ]] && set_global_var "dbus" "dbusservicesconfdir" "${dbusconfdir}/services"

Error: SHELLCHECK_WARNING (CWE-457): [#def2]
/usr/bin/dracut:1623:62: warning[SC2154]: udevconfdir is referenced but not assigned.
# 1621|   [[ $hostonly ]] && set_global_var "udev" "udevconfdir" "/etc/udev"
# 1622|   set_global_var "udev" "udevrulesdir" "${udevdir}/rules.d"
# 1623|-> [[ $hostonly ]] && set_global_var "udev" "udevrulesconfdir" "${udevconfdir}/rules.d"
# 1624|   
# 1625|   # systemd global variables

Error: SHELLCHECK_WARNING (CWE-457): [#def3]
/usr/bin/dracut:1637:70: warning[SC2154]: systemdutilconfdir is referenced but not assigned.
# 1635|   set_global_var "systemd" "systemdcatalog" "${systemdutildir}/catalog"
# 1636|   set_global_var "systemd" "systemdnetwork" "${systemdutildir}/network"
# 1637|-> [[ $hostonly ]] && set_global_var "systemd" "systemdnetworkconfdir" "${systemdutilconfdir}/network"
# 1638|   set_global_var "systemd" "systemdntpunits" "${systemdutildir}/ntp-units.d"
# 1639|   [[ $hostonly ]] && set_global_var "systemd" "systemdntpunitsconfdir" "${systemdutilconfdir}/ntp-units.d"

Error: SHELLCHECK_WARNING (CWE-457): [#def4]
/usr/bin/dracut:2725:31: warning[SC2154]: compres is referenced but not assigned (did you mean 'compress'?).
# 2723|               ;;
# 2724|       esac
# 2725|->     dwarn "custom compressor '${compres}' mapped to 3cpio config '${compress_3cpio}'"
# 2726|   fi
# 2727|   

Error: SHELLCHECK_WARNING (CWE-758): [#def5]
/usr/lib/dracut/dracut-version.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
#    1|-> DRACUT_VERSION=109-2.fc45

Error: SHELLCHECK_WARNING (CWE-563): [#def6]
/usr/lib/dracut/dracut-version.sh:1:1: warning[SC2034]: DRACUT_VERSION appears unused. Verify use (or export if used externally).
#    1|-> DRACUT_VERSION=109-2.fc45

Error: SHELLCHECK_WARNING (CWE-457): [#def7]
/usr/lib/dracut/modules.d/11fips/module-setup.sh:49:30: warning[SC2154]: hostonly_default_device is referenced but not assigned.
#   47|   
#   48|       # with hostonly_default_device fs module for /boot is not installed by default
#   49|->     if [[ $hostonly ]] && [[ $hostonly_default_device == "no" ]]; then
#   50|           _bootfstype=$(find_mp_fstype /boot)
#   51|           if [[ -n $_bootfstype ]]; then

Error: SHELLCHECK_WARNING (CWE-457): [#def8]
/usr/lib/dracut/modules.d/11systemd-cryptsetup/module-setup.sh:70:33: warning[SC2154]: initdir is referenced but not assigned.
#   68|       fi
#   69|   
#   70|->     if [[ $hostonly ]] && [[ -f $initdir/etc/crypttab ]]; then
#   71|           # for each entry in /etc/crypttab check if the key file is backed by a socket unit and if so,
#   72|           # include it along with its corresponding service unit.

Error: SHELLCHECK_WARNING (CWE-457): [#def9]
/usr/lib/dracut/modules.d/11systemd-networkd/module-setup.sh:85:14: warning[SC2154]: systemdnetworkconfdir is referenced but not assigned.
#   83|               "$systemdutilconfdir"/networkd.conf \
#   84|               "$systemdutilconfdir/networkd.conf.d/*.conf" \
#   85|->             "$systemdnetworkconfdir/*" \
#   86|               "$systemdsystemconfdir"/systemd-networkd.service \
#   87|               "$systemdsystemconfdir/systemd-networkd.service.d/*.conf" \

Error: SHELLCHECK_WARNING (CWE-457): [#def10]
/usr/lib/dracut/modules.d/11systemd-sysext/module-setup.sh:58:19: warning[SC2154]: initdir is referenced but not assigned.
#   56|           systemd-confext.service \
#   57|           systemd-sysext.service; do
#   58|->         if [[ -e "$initdir$systemdsystemunitdir"/"$i" ]]; then
#   59|               $SYSTEMCTL -q --root "$initdir" enable "$i"
#   60|           fi

Error: SHELLCHECK_WARNING (CWE-457): [#def11]
/usr/lib/dracut/modules.d/14watchdog-modules/module-setup.sh:28:17: warning[SC2154]: initdir is referenced but not assigned.
#   26|               IFS=,
#   27|               echo "${!_drivers[*]}"
#   28|->         )\"" > "${initdir}"/etc/cmdline.d/20-watchdog.conf
#   29|       fi
#   30|       return 0

Error: SHELLCHECK_WARNING (CWE-457): [#def12]
/usr/lib/dracut/modules.d/20i18n/module-setup.sh:312:36: warning[SC2154]: i18n_install_all is referenced but not assigned.
#  310|           install_base
#  311|   
#  312|->         if [[ $hostonly ]] && ! [[ ${i18n_install_all} == "yes" ]]; then
#  313|               install_local_i18n || install_all_kbd
#  314|           else

Error: SHELLCHECK_WARNING (CWE-457): [#def13]
/usr/lib/dracut/modules.d/35network-manager/module-setup.sh:85:49: warning[SC2154]: systemdnetworkconfdir is referenced but not assigned.
#   83|               "${systemdnetwork}/99-default.link" \
#   84|               "${systemdnetwork}/98-default-mac-none.link"
#   85|->         [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
#   86|       fi
#   87|   

Error: SHELLCHECK_WARNING (CWE-457): [#def14]
/usr/lib/dracut/modules.d/40network/module-setup.sh:22:38: warning[SC2154]: omit_dracutmodules is referenced but not assigned.
#   20|           # install the first viable module, unless there omitted
#   21|           module_check $module > /dev/null 2>&1
#   22|->         if [[ $? == 255 ]] && ! [[ " $omit_dracutmodules " == *\ $module\ * ]]; then
#   23|               echo "$module"
#   24|               return 0

Error: SHELLCHECK_WARNING (CWE-457): [#def15]
/usr/lib/dracut/modules.d/45plymouth/module-setup.sh:4:30: warning[SC2154]: libdirs is referenced but not assigned.
#    2|   
#    3|   pkglib_dir() {
#    4|->     for _dir in /usr/libexec $libdirs; do
#    5|           if [ -x "${dracutsysrootdir-}$_dir/plymouth/plymouth-populate-initrd" ]; then
#    6|               echo "$_dir/plymouth"

Error: SHELLCHECK_WARNING (CWE-457): [#def16]
/usr/lib/dracut/modules.d/45plymouth/module-setup.sh:60:29: warning[SC2154]: moddir is referenced but not assigned.
#   58|           "${dracutsysrootdir-}${PKGLIBDIR}"/plymouth-populate-initrd -t "$initdir" 2> /dev/null
#   59|   
#   60|->     inst_hook emergency 50 "$moddir"/plymouth-emergency.sh
#   61|   
#   62|       inst_multiple readlink

Error: SHELLCHECK_WARNING (CWE-457): [#def17]
/usr/lib/dracut/modules.d/70btrfs/module-setup.sh:61:39: warning[SC2154]: initdir is referenced but not assigned.
#   59|   
#   60|       if [[ $hostonly_cmdline == "yes" ]]; then
#   61|->         printf "%s\n" "$(cmdline)" > "${initdir}/etc/cmdline.d/20-btrfs.conf"
#   62|       fi
#   63|   }

Error: SHELLCHECK_WARNING (CWE-457): [#def18]
/usr/lib/dracut/modules.d/70crypt/module-setup.sh:84:62: warning[SC2154]: initdir is referenced but not assigned.
#   82|           local _cryptconf
#   83|           _cryptconf=$(cmdline)
#   84|->         [[ $_cryptconf ]] && printf "%s\n" "$_cryptconf" >> "${initdir}/etc/cmdline.d/20-crypt.conf"
#   85|       fi
#   86|   

Error: SHELLCHECK_WARNING (CWE-457): [#def19]
/usr/lib/dracut/modules.d/70dmraid/module-setup.sh:71:60: warning[SC2154]: initdir is referenced but not assigned.
#   69|       if [[ $hostonly_cmdline == "yes" ]]; then
#   70|           _raidconf=$(cmdline)
#   71|->         [[ $_raidconf ]] && printf "%s\n" "$_raidconf" >> "${initdir}/etc/cmdline.d/20-dmraid.conf"
#   72|       fi
#   73|   

Error: SHELLCHECK_WARNING (CWE-457): [#def20]
/usr/lib/dracut/modules.d/70kernel-modules-export/module-setup.sh:12:29: warning[SC2154]: moddir is referenced but not assigned.
#   10|   
#   11|   install() {
#   12|->     inst_hook pre-pivot 90 "$moddir/modules-export.sh"
#   13|   }

Error: SHELLCHECK_WARNING (CWE-457): [#def21]
/usr/lib/dracut/modules.d/70lvm/module-setup.sh:56:58: warning[SC2154]: initdir is referenced but not assigned.
#   54|           local _lvmconf
#   55|           _lvmconf=$(cmdline)
#   56|->         [[ $_lvmconf ]] && printf "%s\n" "$_lvmconf" >> "${initdir}/etc/cmdline.d/20-lvm.conf"
#   57|       fi
#   58|   

Error: SHELLCHECK_WARNING (CWE-457): [#def22]
/usr/lib/dracut/modules.d/70lvm/module-setup.sh:61:30: warning[SC2154]: lvmconf is referenced but not assigned (did you mean '_lvmconf'?).
#   59|       inst_rules "$moddir/64-lvm.rules"
#   60|   
#   61|->     if [[ $hostonly ]] || [[ $lvmconf == "yes" ]]; then
#   62|           if [[ -f "${dracutsysrootdir-}/etc/lvm/lvm.conf" ]]; then
#   63|               inst_simple -H /etc/lvm/lvm.conf

Error: SHELLCHECK_WARNING (CWE-457): [#def23]
/usr/lib/dracut/modules.d/70mdraid/module-setup.sh:76:60: warning[SC2154]: initdir is referenced but not assigned.
#   74|           local _raidconf
#   75|           _raidconf=$(cmdline)
#   76|->         [[ $_raidconf ]] && printf "%s\n" "$_raidconf" >> "${initdir}/etc/cmdline.d/20-mdraid.conf"
#   77|       fi
#   78|   

Error: SHELLCHECK_WARNING (CWE-457): [#def24]
/usr/lib/dracut/modules.d/70mdraid/module-setup.sh:94:30: warning[SC2154]: mdadmconf is referenced but not assigned.
#   92|       inst_rules "$moddir/59-persistent-storage-md.rules"
#   93|   
#   94|->     if [[ $hostonly ]] || [[ $mdadmconf == "yes" ]]; then
#   95|           if [[ -f "${dracutsysrootdir-}/etc/mdadm.conf" ]]; then
#   96|               inst -H /etc/mdadm.conf

Error: SHELLCHECK_WARNING (CWE-457): [#def25]
/usr/lib/dracut/modules.d/70multipath/module-setup.sh:114:34: warning[SC2154]: hostonly_mode is referenced but not assigned.
#  112|   
#  113|       mpathconf_installed \
#  114|->         && [[ $hostonly ]] && [[ $hostonly_mode == "strict" ]] && {
#  115|           for_each_host_dev_and_slaves_all add_hostonly_mpath_conf
#  116|           if ((${#_allow[@]} > 0)); then

Error: SHELLCHECK_WARNING (CWE-457): [#def26]
/usr/lib/dracut/modules.d/70ppcmac/module-setup.sh:36:15: warning[SC2154]: hostonly_mode is referenced but not assigned.
#   34|       # only PowerMac3,6 has a module, special case
#   35|       if [[ ${DRACUT_ARCH:-$(uname -m)} != ppc64* ]]; then
#   36|->         if [[ $hostonly_mode != "strict" ]] || [[ $hostonly && "$(pmac_model)" == "PowerMac3,6" ]]; then
#   37|               hostonly=$(optional_hostonly) instmods therm_windtunnel
#   38|           fi

Error: SHELLCHECK_WARNING (CWE-457): [#def27]
/usr/lib/dracut/modules.d/74iscsi/module-setup.sh:204:62: warning[SC2154]: initdir is referenced but not assigned.
#  202|           local _iscsiconf
#  203|           _iscsiconf=$(cmdline)
#  204|->         [[ $_iscsiconf ]] && printf "%s\n" "$_iscsiconf" >> "${initdir}/etc/cmdline.d/20-iscsi.conf"
#  205|       fi
#  206|   

Error: SHELLCHECK_WARNING (CWE-457): [#def28]
/usr/lib/dracut/modules.d/74lunmask/module-setup.sh:66:43: warning[SC2154]: initdir is referenced but not assigned.
#   64|   
#   65|           for _lunmask in $(cmdline); do
#   66|->             printf "%s\n" "$_lunmask" >> "${initdir}/etc/cmdline.d/20-lunmask.conf"
#   67|           done
#   68|       fi

Error: SHELLCHECK_WARNING (CWE-457): [#def29]
/usr/lib/dracut/modules.d/74nfs/module-setup.sh:87:58: warning[SC2154]: initdir is referenced but not assigned.
#   85|           local _netconf
#   86|           _netconf="$(cmdline)"
#   87|->         [[ $_netconf ]] && printf "%s\n" "$_netconf" >> "${initdir}/etc/cmdline.d/20-nfs.conf"
#   88|       fi
#   89|   

Error: SHELLCHECK_WARNING (CWE-457): [#def30]
/usr/lib/dracut/modules.d/74nvmf/module-setup.sh:151:62: warning[SC2154]: initdir is referenced but not assigned.
#  149|           local _nvmf_args
#  150|           _nvmf_args=$(cmdline)
#  151|->         [[ "$_nvmf_args" ]] && printf "%s" "$_nvmf_args" >> "${initdir}/etc/cmdline.d/20-nvmf-args.conf"
#  152|       fi
#  153|       inst_simple -H "/etc/nvme/hostnqn"

Error: SHELLCHECK_WARNING (CWE-457): [#def31]
/usr/lib/dracut/modules.d/74nvmf/parse-nvmf-boot-connections.sh:330:33: warning[SC2154]: hookdir is referenced but not assigned.
#  328|   /sbin/initqueue --timeout --onetime --name nvmf-connect-timeout /sbin/nvmf-autoconnect.sh timeout
#  329|   # Make sure the autoconnect script is run at least once
#  330|-> echo '[ -f /tmp/nvmf.done ]' > "$hookdir/initqueue/finished/74-nvmf.sh"
#  331|   
#  332|   # shellcheck disable=SC2034

Error: SHELLCHECK_WARNING (CWE-457): [#def32]
/usr/lib/dracut/modules.d/74resume/module-setup.sh:66:64: warning[SC2154]: initdir is referenced but not assigned.
#   64|       if [[ $hostonly_cmdline == "yes" ]]; then
#   65|           _resumeconf=$(cmdline)
#   66|->         [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/20-resume.conf"
#   67|       fi
#   68|   

Error: SHELLCHECK_WARNING (CWE-457): [#def33]
/usr/lib/dracut/modules.d/74rootfs-block/module-setup.sh:70:64: warning[SC2154]: initdir is referenced but not assigned.
#   68|           local _journaldev
#   69|           _journaldev=$(cmdline_journal)
#   70|->         [[ $_journaldev ]] && printf "%s\n" "$_journaldev" >> "${initdir}/etc/cmdline.d/20-root-journaldev.conf"
#   71|           local _rootdev
#   72|           _rootdev=$(cmdline_rootfs)

Error: SHELLCHECK_WARNING (CWE-457): [#def34]
/usr/lib/dracut/modules.d/77initqueue/module-setup.sh:20:31: warning[SC2154]: initdir is referenced but not assigned.
#   18|   
#   19|           # Enable systemd type unit(s)
#   20|->         $SYSTEMCTL -q --root "$initdir" enable dracut-initqueue.service
#   21|       fi
#   22|   

Error: SHELLCHECK_WARNING (CWE-457): [#def35]
/usr/lib/dracut/modules.d/80base/init.sh:153:2: warning[SC2154]: systemdutildir is referenced but not assigned.
#  151|   
#  152|   # start up udev and trigger cold plugs
#  153|-> "$systemdutildir"/systemd-udevd --daemon --resolve-names=never
#  154|   
#  155|   UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"

Error: SHELLCHECK_WARNING (CWE-457): [#def36]
/usr/lib/dracut/modules.d/80base/module-setup.sh:8:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned.
#    6|       deps="udev-rules"
#    7|   
#    8|->     if [[ $hostonly_cmdline == "yes" ]]; then
#    9|           if [[ -n ${host_devs[*]} ]] || [[ -n ${user_devs[*]} ]]; then
#   10|               deps+=" initqueue"

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.95.0
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-12.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namedracut-108-6.fc44
diffbase-store-results-to/tmp/tmpe7uxr09j/dracut-108-6.fc44.tar.xz
diffbase-time-created2026-06-01 11:49:18
diffbase-time-finished2026-06-01 11:51:36
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpe7uxr09j/dracut-108-6.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpe7uxr09j/dracut-108-6.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-12.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namedracut-109-2.fc45
store-results-to/tmp/tmp_pzud041/dracut-109-2.fc45.tar.xz
time-created2026-06-01 11:52:02
time-finished2026-06-01 11:53:49
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp_pzud041/dracut-109-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp_pzud041/dracut-109-2.fc45.src.rpm'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9