{
    "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-18.us-west-2.compute.internal",
        "mock-config": "fedora-rawhide-x86_64",
        "project-name": "stratisd-3.8.0~202503101612gitc4343c2f-D",
        "store-results-to": "/tmp/tmpan2vhy60/stratisd-3.8.0~202503101612gitc4343c2f-D.tar.xz",
        "time-created": "2025-03-11 13:58:26",
        "time-finished": "2025-03-11 14:06:56",
        "tool": "csmock",
        "tool-args": "'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,unicontrol,clippy,gcc,cppcheck' '-o' '/tmp/tmpan2vhy60/stratisd-3.8.0~202503101612gitc4343c2f-D.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpan2vhy60/stratisd-3.8.0~202503101612gitc4343c2f-D.src.rpm'",
        "tool-version": "csmock-3.8.0-1.el9"
    },
    "defects": [
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 457,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "ac71843a6ede8981499b954b91e61d59f96410eb",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/dracut/modules.d/90stratis-clevis/module-setup.sh",
                    "line": 27,
                    "column": 3,
                    "h_size": 15,
                    "event": "warning[SC2154]",
                    "message": "systemdutildir is referenced but not assigned.",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   25|   \t\tclevis-luks-common-functions \\",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   26|   \t\tmktemp \\",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   27|-> \t\t$systemdutildir/system-generators/stratis-clevis-setup-generator ||",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   28|   \t\treturn 1",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   29|   \trequire_any_binary tpm2_pcrread tpm2_pcrlist || return 1",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "af8ba2e99a8dbe4f2c5b3b0eda0eda3a76df8960",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/dracut/modules.d/90stratis-clevis/module-setup.sh",
                    "line": 41,
                    "column": 23,
                    "h_size": 17,
                    "event": "error[SC2283]",
                    "message": "Remove spaces around = to assign (or use [ ] to compare, or quote '=' if literal).",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   39|   # called by dracut",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   40|   installkernel() {",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   41|-> \thostonly='' instmods =drivers/char/tpm",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   42|   }",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   43|   ",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 457,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "fd87029923bcf423be028efcb48260e6761205a7",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/dracut/modules.d/90stratis-clevis/module-setup.sh",
                    "line": 72,
                    "column": 15,
                    "h_size": 7,
                    "event": "warning[SC2154]",
                    "message": "moddir is referenced but not assigned.",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   70|   \t# Dracut dependencies",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   71|   \tinst_multiple $systemdutildir/system-generators/stratis-clevis-setup-generator",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   72|-> \tinst_simple \"$moddir/stratis-clevis-rootfs-setup\" $systemdutildir/stratis-clevis-rootfs-setup",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   73|   }",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 829,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "98d0000fc414a4a0e12223489cc179f519455d35",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/dracut/modules.d/90stratis-clevis/stratis-clevis-rootfs-setup",
                    "line": 18,
                    "column": 4,
                    "h_size": 53,
                    "event": "warning[SC2091]",
                    "message": "Remove surrounding $() to avoid executing output (or use eval if intentional).",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   16|   done",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   17|   ",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   18|-> if $(stratis-min pool is-stopped \"$STRATIS_ROOTFS_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   19|   \tif $(stratis-min pool is-encrypted \"$STRATIS_ROOTFS_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   20|   \t\tif ! stratis-min pool start --token-slot=any \"$STRATIS_ROOTFS_UUID\"; then",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 829,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "9642dbba70f44ad5834dab194d6fca792c7814b0",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/dracut/modules.d/90stratis-clevis/stratis-clevis-rootfs-setup",
                    "line": 19,
                    "column": 5,
                    "h_size": 55,
                    "event": "warning[SC2091]",
                    "message": "Remove surrounding $() to avoid executing output (or use eval if intentional).",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   17|   ",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   18|   if $(stratis-min pool is-stopped \"$STRATIS_ROOTFS_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   19|-> \tif $(stratis-min pool is-encrypted \"$STRATIS_ROOTFS_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   20|   \t\tif ! stratis-min pool start --token-slot=any \"$STRATIS_ROOTFS_UUID\"; then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   21|   \t\t\techo Failed to start pool with UUID $STRATIS_ROOTFS_UUID using an unattended unlock method. >&2",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 457,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "8ec482a2e3fac9f116f9dd71c980e513abbe621d",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/dracut/modules.d/90stratis/module-setup.sh",
                    "line": 7,
                    "column": 3,
                    "h_size": 15,
                    "event": "warning[SC2154]",
                    "message": "systemdutildir is referenced but not assigned.",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "    5|   \trequire_binaries stratis-min \\",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "    6|   \t\t/usr/libexec/stratisd-min \\",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "    7|-> \t\t$systemdutildir/system-generators/stratis-setup-generator \\",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "    8|   \t\tthin_check \\",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "    9|   \t\tthin_repair \\",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 457,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "5dd0459b47ca26f0da8896c21b0c94145964e505",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/dracut/modules.d/90stratis/module-setup.sh",
                    "line": 52,
                    "column": 14,
                    "h_size": 7,
                    "event": "warning[SC2154]",
                    "message": "moddir is referenced but not assigned.",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   50|   \tinst_multiple $systemdutildir/system-generators/stratis-setup-generator",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   51|   ",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   52|-> \tinst_rules \"$moddir/61-stratisd.rules\"",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   53|   \tinst_simple \"$moddir/stratisd-min.service\" $systemdutildir/system/stratisd-min.service",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   54|   \tinst_simple \"$moddir/stratis-rootfs-setup\" $systemdutildir/stratis-rootfs-setup",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 829,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "6227e36ff95fbf3f9c68d7af0803f6e599b0b607",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/dracut/modules.d/90stratis/stratis-rootfs-setup",
                    "line": 18,
                    "column": 4,
                    "h_size": 53,
                    "event": "warning[SC2091]",
                    "message": "Remove surrounding $() to avoid executing output (or use eval if intentional).",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   16|   done",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   17|   ",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   18|-> if $(stratis-min pool is-stopped \"$STRATIS_ROOTFS_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   19|   \tif $(stratis-min pool is-encrypted \"$STRATIS_ROOTFS_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   20|   \t\tATTEMPTS_REMAINING=3",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 829,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "11ae7d20d8ece0e621f2d1a84bed14c9eb500f30",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/dracut/modules.d/90stratis/stratis-rootfs-setup",
                    "line": 19,
                    "column": 5,
                    "h_size": 55,
                    "event": "warning[SC2091]",
                    "message": "Remove surrounding $() to avoid executing output (or use eval if intentional).",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   17|   ",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   18|   if $(stratis-min pool is-stopped \"$STRATIS_ROOTFS_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   19|-> \tif $(stratis-min pool is-encrypted \"$STRATIS_ROOTFS_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   20|   \t\tATTEMPTS_REMAINING=3",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   21|   \t\tif",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 829,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "5c306d94d815f2f660567f372a929062e4eca589",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/systemd/stratis-fstab-setup",
                    "line": 20,
                    "column": 4,
                    "h_size": 43,
                    "event": "warning[SC2091]",
                    "message": "Remove surrounding $() to avoid executing output (or use eval if intentional).",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   18|   done",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   19|   ",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   20|-> if $(stratis-min pool is-stopped \"$POOL_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   21|   \tif $(stratis-min pool is-encrypted \"$POOL_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   22|   \t\tif stratis-min pool start --token-slot=any \"$POOL_UUID\"; then",
                    "verbosity_level": 1
                }
            ]
        },
        {
            "checker": "SHELLCHECK_WARNING",
            "cwe": 829,
            "language": "shell",
            "tool": "shellcheck",
            "hash_v1": "e737cb7248b3e9c42f086afdc94514c826002540",
            "key_event_idx": 0,
            "events": [
                {
                    "file_name": "/usr/lib/systemd/stratis-fstab-setup",
                    "line": 21,
                    "column": 5,
                    "h_size": 45,
                    "event": "warning[SC2091]",
                    "message": "Remove surrounding $() to avoid executing output (or use eval if intentional).",
                    "verbosity_level": 0
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   19|   ",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   20|   if $(stratis-min pool is-stopped \"$POOL_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   21|-> \tif $(stratis-min pool is-encrypted \"$POOL_UUID\"); then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   22|   \t\tif stratis-min pool start --token-slot=any \"$POOL_UUID\"; then",
                    "verbosity_level": 1
                },
                {
                    "file_name": "",
                    "line": 0,
                    "event": "#",
                    "message": "   23|   \t\t\texit 0",
                    "verbosity_level": 1
                }
            ]
        }
    ]
}
