{
    "scan": {
        "analyzer-version-clippy": "1.80.1",
        "analyzer-version-cppcheck": "2.14.2",
        "analyzer-version-gcc": "14.1.1",
        "analyzer-version-gcc-analyzer": "14.1.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-105.us-west-2.compute.internal",
        "mock-config": "fedora-rawhide-x86_64",
        "project-name": "initscripts-10.25-1.20240808102801165023.main.1.g67743ca1",
        "store-results-to": "/tmp/tmpuannrlo3/initscripts-10.25-1.20240808102801165023.main.1.g67743ca1.tar.xz",
        "time-created": "2024-08-14 14:23:35",
        "time-finished": "2024-08-14 14:24:56",
        "tool": "csmock",
        "tool-args": "'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'clippy,gcc,cppcheck,shellcheck,unicontrol' '-o' '/tmp/tmpuannrlo3/initscripts-10.25-1.20240808102801165023.main.1.g67743ca1.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '/tmp/tmpuannrlo3/initscripts-10.25-1.20240808102801165023.main.1.g67743ca1.src.rpm'",
        "tool-version": "csmock-3.6.1-1.el9"
    },
    "defects": [
        {
            "checker": "GCC_ANALYZER_WARNING",
            "cwe": 775,
            "language": "c/c++",
            "tool": "gcc-analyzer",
            "hash_v1": "07be1758cfe480b2196126bf6d0ab8496caac8ab",
            "key_event_idx": 1,
            "events": [
                {
                    "file_name": "initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 0,
                    "event": "scope_hint",
                    "message": "In function ‘main’",
                    "verbosity_level": 1
                },
                {
                    "file_name": "initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 16,
                    "event": "warning[-Wanalyzer-fd-leak]",
                    "message": "leak of file descriptor ‘open(\"/dev/random\", 0)’",
                    "verbosity_level": 0
                },
                {
                    "file_name": "initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 43,
                    "column": 12,
                    "event": "note",
                    "message": "(1) opened here",
                    "verbosity_level": 2
                },
                {
                    "file_name": "initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 6,
                    "event": "note",
                    "message": "(2) assuming ‘open(\"/dev/random\", 0)’ is a valid file descriptor (>= 0)",
                    "verbosity_level": 2
                },
                {
                    "file_name": "initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 6,
                    "event": "note",
                    "message": "(3) following ‘false’ branch...",
                    "verbosity_level": 2
                },
                {
                    "file_name": "initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 19,
                    "event": "note",
                    "message": "(4) ...to here",
                    "verbosity_level": 2
                },
                {
                    "file_name": "initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 16,
                    "event": "note",
                    "message": "(5) ‘open(\"/dev/random\", 0)’ leaks here; was opened at (1)",
                    "verbosity_level": 2
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   43|     int fd = open (\"/dev/random\", O_RDONLY);",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   44|   ",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   45|->   if (fd == -1 || read (fd, &n, sizeof (n)) != sizeof (n)) {",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   46|       srand48 ((long int) time (NULL) ^ (long int) getpid ());",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   47|       n = lrand48 ();",
                    "verbosity_level": 1
                }
            ]
        }
    ]
}
