dnsconfd-1.7.3-1

List of Findings

Error: SHELLCHECK_WARNING (CWE-457): [#def1]
/usr/lib/dracut/modules.d/99dnsconfd/module-setup.sh:16:18: warning[SC2154]: moddir is referenced but not assigned.
#   14|   install() {
#   15|       inst_simple /usr/lib/systemd/system/micro-dnsconfd.service
#   16|->     inst_simple "$moddir/unbound_non_empty.conf" /etc/systemd/system/unbound.service.d/unbound_non_empty.conf
#   17|       inst_simple "$moddir/micro_dnsconfd_no_fail.conf" /etc/systemd/system/micro-dnsconfd.service.d/micro_dnsconfd_no_fail.conf
#   18|       inst_simple /usr/lib/sysusers.d/dnsconfd.conf

Error: SHELLCHECK_WARNING (CWE-457): [#def2]
/usr/lib/dracut/modules.d/99dnsconfd/module-setup.sh:25:27: warning[SC2154]: initdir is referenced but not assigned.
#   23|       inst_multiple -o /etc/pki/dns/extracted/pem/*
#   24|   
#   25|->     $SYSTEMCTL -q --root "$initdir" enable micro-dnsconfd.service
#   26|   }

Error: CPPCHECK_WARNING (CWE-476): [#def3]
dnsconfd-1.7.3/micro-dnsconfd/tests/test-nm-config-parsing.c:54: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: devnull
#   52|       g_string_free(resolvconf_content, 1);
#   53|     }
#   54|->   fclose(devnull);
#   55|   }
#   56|   END_TEST

Error: GCC_ANALYZER_WARNING (CWE-688): [#def4]
dnsconfd-1.7.3/micro-dnsconfd/tests/test-nm-config-parsing.c: scope_hint: In function ‘test_get_resolv_conf_string_fn’
dnsconfd-1.7.3/micro-dnsconfd/tests/test-nm-config-parsing.c:54:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen("/dev/null", "w")’ where non-null expected
dnsconfd-1.7.3/micro-dnsconfd/tests/test-nm-config-parsing.c:4: included_from: Included from here.
/usr/include/stdio.h:187:12: note: argument 1 of ‘fclose’ must be non-null
#   52|       g_string_free(resolvconf_content, 1);
#   53|     }
#   54|->   fclose(devnull);
#   55|   }
#   56|   END_TEST

Error: CPPCHECK_WARNING (CWE-476): [#def5]
dnsconfd-1.7.3/micro-dnsconfd/tests/test-nm-config-parsing.c:156: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: devnull
#  154|       g_variant_dict_unref(domain_dict);
#  155|     }
#  156|->   fclose(devnull);
#  157|   }
#  158|   END_TEST

Error: GCC_ANALYZER_WARNING (CWE-688): [#def6]
dnsconfd-1.7.3/micro-dnsconfd/tests/test-uri-parsing.c: scope_hint: In function ‘test_parsing_fn’
dnsconfd-1.7.3/micro-dnsconfd/tests/test-uri-parsing.c:57:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen("/dev/null", "w")’ where non-null expected
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/glib-2.0/gio/gioenums.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/giotypes.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/gio.h:28: included_from: Included from here.
dnsconfd-1.7.3/micro-dnsconfd/uri-parsing.h:1: included_from: Included from here.
dnsconfd-1.7.3/micro-dnsconfd/tests/test-uri-parsing.c:6: included_from: Included from here.
dnsconfd-1.7.3/micro-dnsconfd/tests/test-uri-parsing.c:4: included_from: Included from here.
/usr/include/stdio.h:187:12: note: argument 1 of ‘fclose’ must be non-null
#   55|     }
#   56|     g_string_free(config_string, 1);
#   57|->   fclose(dev_null);
#   58|   }
#   59|   END_TEST

Scan Properties

analyzer-version-clippy1.87.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.1.1
analyzer-version-gcc-analyzer15.1.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-92.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namednsconfd-1.7.3-1
store-results-to/tmp/tmpcn9sl5mn/dnsconfd-1.7.3-1.tar.xz
time-created2025-06-02 13:32:21
time-finished2025-06-02 13:33:47
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'clippy,shellcheck,gcc,cppcheck,unicontrol' '-o' '/tmp/tmpcn9sl5mn/dnsconfd-1.7.3-1.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpcn9sl5mn/dnsconfd-1.7.3-1.src.rpm'
tool-versioncsmock-3.8.1.20250522.153104.ga728c5b-1.el9