{
    "scan": {
        "analyzer-version-clippy": "1.85.0",
        "analyzer-version-cppcheck": "2.17 dev",
        "analyzer-version-gcc": "15.0.1",
        "analyzer-version-gcc-analyzer": "15.0.1",
        "analyzer-version-shellcheck": "0.10.0",
        "analyzer-version-unicontrol": "0.0.2",
        "enabled-plugins": "clippy, cppcheck, gcc, shellcheck, unicontrol",
        "exit-code": 0,
        "host": "ip-172-16-1-142.us-west-2.compute.internal",
        "mock-config": "fedora-rawhide-x86_64",
        "project-name": "dnsconfd-1.7.2-1",
        "store-results-to": "/tmp/tmpp519fzgb/dnsconfd-1.7.2-1.tar.xz",
        "time-created": "2025-03-06 12:28:04",
        "time-finished": "2025-03-06 12:29:59",
        "tool": "csmock",
        "tool-args": "'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,unicontrol,clippy,gcc,cppcheck' '-o' '/tmp/tmpp519fzgb/dnsconfd-1.7.2-1.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpp519fzgb/dnsconfd-1.7.2-1.src.rpm'",
        "tool-version": "csmock-3.8.0-1.el9"
    },
    "defects": [
        {
            "checker": "GCC_ANALYZER_WARNING",
            "cwe": 688,
            "language": "c/c++",
            "tool": "gcc-analyzer",
            "hash_v1": "0268aa7812604711c87825a1bd20472f9111c0b4",
            "key_event_idx": 1,
            "events": [
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-nm-config-parsing.c",
                    "line": 0,
                    "event": "scope_hint",
                    "message": "In function ‘test_get_resolv_conf_string_fn’",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-nm-config-parsing.c",
                    "line": 54,
                    "column": 3,
                    "event": "warning[-Wanalyzer-possible-null-argument]",
                    "message": "use of possibly-NULL ‘fopen(\"/dev/null\", \"w\")’ where non-null expected",
                    "verbosity_level": 0
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-nm-config-parsing.c",
                    "line": 35,
                    "column": 19,
                    "event": "note",
                    "message": "(1) this call could return NULL",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-nm-config-parsing.c",
                    "line": 37,
                    "column": 30,
                    "event": "note",
                    "message": "(2) following ‘false’ branch (when ‘cur_output’ is NULL)...",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-nm-config-parsing.c",
                    "line": 54,
                    "column": 3,
                    "event": "note",
                    "message": "(3) ...to here",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-nm-config-parsing.c",
                    "line": 54,
                    "column": 3,
                    "event": "note",
                    "message": "(4) argument 1 (‘fopen(\"/dev/null\", \"w\")’) from (1) could be NULL where non-null expected",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-nm-config-parsing.c",
                    "line": 4,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/usr/include/stdio.h",
                    "line": 184,
                    "column": 12,
                    "event": "note",
                    "message": "argument 1 of ‘fclose’ must be non-null",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   52|       g_string_free(resolvconf_content, 1);",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   53|     }",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   54|->   fclose(devnull);",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   55|   }",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   56|   END_TEST",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "GCC_ANALYZER_WARNING",
            "cwe": 688,
            "language": "c/c++",
            "tool": "gcc-analyzer",
            "hash_v1": "6ca9491f13c8cceaf79a7c98aa30e26ba8eb0445",
            "key_event_idx": 1,
            "events": [
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-uri-parsing.c",
                    "line": 0,
                    "event": "scope_hint",
                    "message": "In function ‘test_parsing_fn’",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-uri-parsing.c",
                    "line": 57,
                    "column": 3,
                    "event": "warning[-Wanalyzer-possible-null-argument]",
                    "message": "use of possibly-NULL ‘fopen(\"/dev/null\", \"w\")’ where non-null expected",
                    "verbosity_level": 0
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-uri-parsing.c",
                    "line": 43,
                    "column": 20,
                    "event": "note",
                    "message": "(1) this call could return NULL",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-uri-parsing.c",
                    "line": 45,
                    "column": 36,
                    "event": "note",
                    "message": "(2) following ‘false’ branch...",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/usr/include/glib-2.0/glib/giochannel.h",
                    "line": 36,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/usr/include/glib-2.0/glib.h",
                    "line": 56,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/usr/include/glib-2.0/gobject/gbinding.h",
                    "line": 30,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/usr/include/glib-2.0/glib-object.h",
                    "line": 24,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/usr/include/glib-2.0/gio/gioenums.h",
                    "line": 30,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/usr/include/glib-2.0/gio/giotypes.h",
                    "line": 30,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/usr/include/glib-2.0/gio/gio.h",
                    "line": 28,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/uri-parsing.h",
                    "line": 1,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-uri-parsing.c",
                    "line": 6,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-uri-parsing.c",
                    "line": 56,
                    "column": 3,
                    "event": "note",
                    "message": "(3) ...to here",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-uri-parsing.c",
                    "line": 57,
                    "column": 3,
                    "event": "note",
                    "message": "(4) argument 1 (‘fopen(\"/dev/null\", \"w\")’) from (1) could be NULL where non-null expected",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-uri-parsing.c",
                    "line": 4,
                    "event": "included_from",
                    "message": "Included from here.",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/usr/include/stdio.h",
                    "line": 184,
                    "column": 12,
                    "event": "note",
                    "message": "argument 1 of ‘fclose’ must be non-null",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   55|     }",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   56|     g_string_free(config_string, 1);",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   57|->   fclose(dev_null);",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   58|   }",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   59|   END_TEST",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "CPPCHECK_WARNING",
            "cwe": 476,
            "language": "c/c++",
            "tool": "cppcheck",
            "hash_v1": "670d6fee3fdce71405de4c04793a4588c93ffc1b",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-nm-config-parsing.c",
                    "line": 54,
                    "event": "warning[nullPointerOutOfResources]",
                    "message": "If resource allocation fails, then there is a possible null pointer dereference: devnull",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   52|       g_string_free(resolvconf_content, 1);",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   53|     }",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   54|->   fclose(devnull);",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   55|   }",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   56|   END_TEST",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "CPPCHECK_WARNING",
            "cwe": 476,
            "language": "c/c++",
            "tool": "cppcheck",
            "hash_v1": "670d6fee3fdce71405de4c04793a4588c93ffc1b",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/dnsconfd-1.7.2/micro-dnsconfd/tests/test-nm-config-parsing.c",
                    "line": 156,
                    "event": "warning[nullPointerOutOfResources]",
                    "message": "If resource allocation fails, then there is a possible null pointer dereference: devnull",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "  154|       g_variant_dict_unref(domain_dict);",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "  155|     }",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "  156|->   fclose(devnull);",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "  157|   }",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "  158|   END_TEST",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 457,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "46eda396080db8c3ab380ee0c5319773fac0e0c0",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/BUILDROOT/usr/lib/dracut/modules.d/99dnsconfd/module-setup.sh",
                    "line": 16,
                    "column": 18,
                    "h_size": 7,
                    "event": "warning[SC2154]",
                    "message": "moddir is referenced but not assigned.",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   14|   install() {",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   15|       inst_simple /usr/lib/systemd/system/micro-dnsconfd.service",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   16|->     inst_simple \"$moddir/unbound_non_empty.conf\" /etc/systemd/system/unbound.service.d/unbound_non_empty.conf",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   17|       inst_simple \"$moddir/micro_dnsconfd_no_fail.conf\" /etc/systemd/system/micro-dnsconfd.service.d/micro_dnsconfd_no_fail.conf",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   18|       inst_simple /usr/lib/sysusers.d/dnsconfd.conf",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 457,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "ef1cd2d51f9f80deb56a2193649660fad6b18f21",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/builddir/build/BUILD/dnsconfd-1.7.2-build/BUILDROOT/usr/lib/dracut/modules.d/99dnsconfd/module-setup.sh",
                    "line": 25,
                    "column": 27,
                    "h_size": 8,
                    "event": "warning[SC2154]",
                    "message": "initdir is referenced but not assigned.",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   23|       inst_multiple -o /etc/pki/dns/extracted/pem/*",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   24|   ",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   25|->     $SYSTEMCTL -q --root \"$initdir\" enable micro-dnsconfd.service",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   26|   }",
                    "verbosity_level": 1
                }
            ]
        }
    ]
}
