authselect-1.5.1-1.fc43

List of Findings

Error: SHELLCHECK_WARNING (CWE-758): [#def1]
/etc/bash_completion.d/authselect-completion.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
#    1|-> #
#    2|   #    Authors:
#    3|   #        Tomas Halman <thalman@redhat.com>

Error: SHELLCHECK_WARNING (CWE-140): [#def2]
/etc/bash_completion.d/authselect-completion.sh:199:24: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  197|       if [[ "$possibleopts" != "" ]]; then
#  198|           if [[ "${COMP_WORDS[$COMP_CWORD]}" = "=" ]]; then
#  199|->             COMPREPLY=($(compgen -W "$possibleopts"))
#  200|           else
#  201|               COMPREPLY=($(compgen -W "$possibleopts" -- "${COMP_WORDS[$COMP_CWORD]}"))

Error: SHELLCHECK_WARNING (CWE-140): [#def3]
/etc/bash_completion.d/authselect-completion.sh:201:24: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  199|               COMPREPLY=($(compgen -W "$possibleopts"))
#  200|           else
#  201|->             COMPREPLY=($(compgen -W "$possibleopts" -- "${COMP_WORDS[$COMP_CWORD]}"))
#  202|           fi
#  203|       else

Error: SHELLCHECK_WARNING (CWE-569): [#def4]
/etc/bash_completion.d/authselect-completion.sh:206:26: warning[SC2124]: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
#  204|           command="$(get_command)"
#  205|           if [[ "$command" = "" ]]; then
#  206|->             possibleopts="$(get_global_options) ${COMMANDS[@]}"
#  207|           else
#  208|               possibleopts="$(get_global_options) $(get_command_params) $(get_command_keywords) $(get_command_options)"

Error: SHELLCHECK_WARNING (CWE-140): [#def5]
/etc/bash_completion.d/authselect-completion.sh:210:20: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  208|               possibleopts="$(get_global_options) $(get_command_params) $(get_command_keywords) $(get_command_options)"
#  209|           fi
#  210|->         COMPREPLY=($(compgen -W "$possibleopts" -- "${COMP_WORDS[$COMP_CWORD]}"))
#  211|       fi
#  212|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
authselect-1.5.1/src/cli/main.c:540:12: warning[-Wanalyzer-malloc-leak]: leak of ‘features’
authselect-1.5.1/src/cli/main.c:501:16: enter_function: entry to ‘requirements’
authselect-1.5.1/src/cli/main.c:509:11: call_function: calling ‘parse_profile_options’ from ‘requirements’
authselect-1.5.1/src/cli/main.c:509:11: return_function: returning to ‘requirements’ from ‘parse_profile_options’
authselect-1.5.1/src/cli/main.c:510:8: branch_false: following ‘false’ branch...
authselect-1.5.1/src/cli/main.c:514:11: branch_false: ...to here
authselect-1.5.1/src/cli/main.c:515:8: branch_true: following ‘true’ branch...
authselect-1.5.1/src/cli/main.c:516:9: branch_true: ...to here
authselect-1.5.1/src/cli/main.c:540:12: danger: ‘features’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  538|       authselect_profile_free(profile);
#  539|   
#  540|->     return ret;
#  541|   }
#  542|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
authselect-1.5.1/src/lib/profiles/read.c:289:5: warning[-Wanalyzer-malloc-leak]: leak of 'authselect_profile_init(profile_id)'
authselect-1.5.1/src/lib/profiles/read.c:269:1: enter_function: entry to 'authselect_profile_read'
authselect-1.5.1/src/lib/profiles/read.c:278:11: call_function: calling 'authselect_profile_open' from 'authselect_profile_read'
authselect-1.5.1/src/lib/profiles/read.c:278:11: return_function: returning to 'authselect_profile_read' from 'authselect_profile_open'
authselect-1.5.1/src/lib/profiles/read.c:279:8: branch_false: following 'false' branch...
authselect-1.5.1/src/lib/profiles/read.c:283:15: branch_false: ...to here
authselect-1.5.1/src/lib/profiles/read.c:283:15: call_function: calling 'authselect_profile_init' from 'authselect_profile_read'
authselect-1.5.1/src/lib/profiles/read.c:283:15: return_function: returning to 'authselect_profile_read' from 'authselect_profile_init'
authselect-1.5.1/src/lib/profiles/read.c:284:8: branch_false: following 'false' branch...
authselect-1.5.1/src/lib/profiles/read.c:289:5: branch_false: ...to here
authselect-1.5.1/src/lib/profiles/read.c:291:11: call_function: calling 'authselect_profile_read_readme' from 'authselect_profile_read'
authselect-1.5.1/src/lib/profiles/read.c:291:11: return_function: returning to 'authselect_profile_read' from 'authselect_profile_read_readme'
authselect-1.5.1/src/lib/profiles/read.c:293:8: branch_true: following 'true' branch...
authselect-1.5.1/src/lib/profiles/read.c:294:9: branch_true: ...to here
authselect-1.5.1/src/lib/profiles/read.c:289:5: danger: 'authselect_profile_init(profile_id)' leaks here; was allocated at [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18)
#  287|       }
#  288|   
#  289|->     profile->path = location;
#  290|   
#  291|       ret = authselect_profile_read_readme(location, dirfd, &profile->name,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
authselect-1.5.1/src/lib/profiles/read.c:315:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
authselect-1.5.1/src/lib/profiles/read.c:269:1: enter_function: entry to 'authselect_profile_read'
authselect-1.5.1/src/lib/profiles/read.c:278:11: call_function: calling 'authselect_profile_open' from 'authselect_profile_read'
authselect-1.5.1/src/lib/profiles/read.c:278:11: return_function: returning to 'authselect_profile_read' from 'authselect_profile_open'
authselect-1.5.1/src/lib/profiles/read.c:279:8: branch_false: following 'false' branch...
authselect-1.5.1/src/lib/profiles/read.c:283:15: branch_false: ...to here
authselect-1.5.1/src/lib/profiles/read.c:283:15: call_function: calling 'authselect_profile_init' from 'authselect_profile_read'
authselect-1.5.1/src/lib/profiles/read.c:283:15: return_function: returning to 'authselect_profile_read' from 'authselect_profile_init'
authselect-1.5.1/src/lib/profiles/read.c:284:8: branch_false: following 'false' branch...
authselect-1.5.1/src/lib/profiles/read.c:289:5: branch_false: ...to here
authselect-1.5.1/src/lib/profiles/read.c:291:11: call_function: calling 'authselect_profile_read_readme' from 'authselect_profile_read'
authselect-1.5.1/src/lib/profiles/read.c:291:11: return_function: returning to 'authselect_profile_read' from 'authselect_profile_read_readme'
authselect-1.5.1/src/lib/profiles/read.c:293:8: branch_true: following 'true' branch...
authselect-1.5.1/src/lib/profiles/read.c:294:9: branch_true: ...to here
authselect-1.5.1/src/lib/profiles/read.c:315:8: danger: '<unknown>' leaks here; was allocated at [(21)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/20)
#  313|       close(dirfd);
#  314|   
#  315|->     if (ret != EOK) {
#  316|           ERROR("Unable to find profile [%s] [%d]: %s",
#  317|                 profile_id, ret, strerror(ret));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def9]
authselect-1.5.1/src/lib/util/file.c:340:11: warning[-Wanalyzer-null-argument]: use of NULL 'path' where non-null expected
authselect-1.5.1/src/lib/util/file.c:454:1: enter_function: entry to 'file_copy'
authselect-1.5.1/src/lib/util/file.c:469:11: call_function: calling 'file_make_path' from 'file_copy'
#  338|       }
#  339|   
#  340|->     ret = mkdir(path, mode);
#  341|       if (ret != 0) {
#  342|           return errno;

Error: GCC_ANALYZER_WARNING (CWE-416): [#def10]
authselect-1.5.1/src/lib/util/string_array.c:100:17: warning[-Wanalyzer-use-after-free]: use after 'reallocarray' of 'array'
authselect-1.5.1/src/lib/util/string_array.c:171:1: enter_function: entry to 'string_array_add_value'
authselect-1.5.1/src/lib/util/string_array.c:173:12: call_function: calling 'string_array_add_value_safe' from 'string_array_add_value'
#   98|       }
#   99|   
#  100|->     for (i = 0; array[i] != NULL; i++) {
#  101|           free(array[i]);
#  102|       }

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-32.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameauthselect-1.5.1-1.fc43
store-results-to/tmp/tmp9apnistf/authselect-1.5.1-1.fc43.tar.xz
time-created2025-04-25 12:03:33
time-finished2025-04-25 12:05:43
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp9apnistf/authselect-1.5.1-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp9apnistf/authselect-1.5.1-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9