initscripts-10.21-1.fc40
List of Defects
Error: SHELLCHECK_WARNING (CWE-252): [#def1]
/usr/libexec/import-state:6:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
# 4| # Copy state into root folder:
# 5| # ============================
# 6|-> cd /run/initramfs/state
# 7|
# 8| IFS_backup=$IFS
Error: SHELLCHECK_WARNING (CWE-252): [#def2]
/usr/libexec/import-state:14:3: warning[SC2164]: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.
# 12|
# 13| for dir in $dirs_found; do
# 14|-> pushd "$dir" > /dev/null
# 15|
# 16| # Remove initial '.' char from the find's result:
Error: SHELLCHECK_WARNING (CWE-252): [#def3]
/usr/libexec/import-state:29:3: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
# 27| find . -mindepth 1 -maxdepth 1 -not -type d -exec cp -av -t "$dest_dir" {} \; > /dev/null
# 28|
# 29|-> popd > /dev/null
# 30| done
# 31|
Error: SHELLCHECK_WARNING (CWE-563): [#def4]
/usr/libexec/netconsole:23:1: warning[SC2034]: SERVER_ADDRESS_RESOLUTION appears unused. Verify use (or export if used externally).
# 21| PATH=/sbin:/usr/sbin:$PATH
# 22| RETVAL=0
# 23|-> SERVER_ADDRESS_RESOLUTION=
# 24|
# 25| # Check that networking is up.
Error: SHELLCHECK_WARNING (CWE-563): [#def5]
/usr/libexec/netconsole:39:1: warning[SC2034]: kernel appears unused. Verify use (or export if used externally).
# 37| SYSLOGMACADDR=
# 38|
# 39|-> kernel=$(uname -r | cut -d. -f1-2)
# 40|
# 41| usage ()
Error: SHELLCHECK_WARNING (CWE-156): [#def6]
/usr/libexec/netconsole:103:7: warning[SC2046]: Quote this to prevent word splitting.
# 101| exit 6
# 102| fi
# 103|-> eval $(print_address_info $SYSLOGADDR)
# 104|
# 105| if [ -z "$SYSLOGMACADDR" ]; then
Error: SHELLCHECK_WARNING (CWE-153): [#def7]
/usr/libexec/readonly-root:119:33: warning[SC2053]: Quote the right-hand side of = in [[ ]] to prevent glob matching.
# 117| prefix=0
# 118| for mount_point in "${MOUNTS[@]}"; do
# 119|-> [[ $m = $mount_point ]] && continue
# 120| if [[ $m =~ ^$mount_point/.* ]] ; then
# 121| prefix=1
Error: SHELLCHECK_WARNING (CWE-477): [#def8]
/usr/libexec/readonly-root:139:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
# 137| # must be done even if we have local storage.
# 138| ipaddr=
# 139|-> if [ "$HOSTNAME" = "localhost" -o "$HOSTNAME" = "localhost.localdomain" ]; then
# 140| ipaddr=$(ip addr show to 0.0.0.0/0 scope global | awk '/[[:space:]]inet / { print gensub("/.*","","g",$2) }')
# 141| for ip in $ipaddr ; do
Error: SHELLCHECK_WARNING (CWE-563): [#def9]
/usr/libexec/readonly-root:141:3: warning[SC2034]: ip appears unused. Verify use (or export if used externally).
# 139| if [ "$HOSTNAME" = "localhost" -o "$HOSTNAME" = "localhost.localdomain" ]; then
# 140| ipaddr=$(ip addr show to 0.0.0.0/0 scope global | awk '/[[:space:]]inet / { print gensub("/.*","","g",$2) }')
# 141|-> for ip in $ipaddr ; do
# 142| HOSTNAME=
# 143| eval $(ipcalc -h $ipaddr 2>/dev/null)
Error: SHELLCHECK_WARNING (CWE-156): [#def10]
/usr/libexec/readonly-root:143:9: warning[SC2046]: Quote this to prevent word splitting.
# 141| for ip in $ipaddr ; do
# 142| HOSTNAME=
# 143|-> eval $(ipcalc -h $ipaddr 2>/dev/null)
# 144| [ -n "$HOSTNAME" ] && { hostname ${HOSTNAME} ; break; }
# 145| done
Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
initscripts-10.21/src/genhostid.c: scope_hint: In function ‘main’
initscripts-10.21/src/genhostid.c:45:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/random", 0)’
# 43| int fd = open ("/dev/random", O_RDONLY);
# 44|
# 45|-> if (fd == -1 || read (fd, &n, sizeof (n)) != sizeof (n)) {
# 46| srand48 ((long int) time (NULL) ^ (long int) getpid ());
# 47| n = lrand48 ();
Scan Properties
analyzer-version-clang | 18.1.3 |
analyzer-version-cppcheck | 2.13.0 |
analyzer-version-gcc | 14.0.1 |
analyzer-version-gcc-analyzer | 14.0.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-110.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | initscripts-10.21-1.fc40 |
store-results-to | /tmp/tmpygfkyxk0/initscripts-10.21-1.fc40.tar.xz |
time-created | 2024-04-22 10:51:00 |
time-finished | 2024-04-22 10:52:25 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpygfkyxk0/initscripts-10.21-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpygfkyxk0/initscripts-10.21-1.fc40.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |