Newly introduced findings

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   58|   
#   59|   		ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null
#   60|-> 		strcpy(ret, enc);
#   61|   		ret[strlen(enc)]= '\0';
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def2]
osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function 'gnu_ext_crypt'
osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'ret' where non-null expected
osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:45: included_from: Included from here.
/usr/include/string.h:156:14: note: argument 1 of 'strcpy' must be non-null
#   58|   
#   59|   		ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null
#   60|-> 		strcpy(ret, enc);
#   61|   		ret[strlen(enc)]= '\0';
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function ‘gnu_ext_crypt’
osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected
osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:45: included_from: Included from here.
/usr/include/string.h:156:14: note: argument 1 of ‘strcpy’ must be non-null
#   58|   
#   59|   		ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null
#   60|-> 		strcpy(ret, enc);
#   61|   		ret[strlen(enc)]= '\0';
#   62|   

Error: CPPCHECK_WARNING (CWE-476): [#def4]
osbuild-composer-174/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:61: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#   59|   		ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null
#   60|   		strcpy(ret, enc);
#   61|-> 		ret[strlen(enc)]= '\0';
#   62|   
#   63|   	 return ret;

Scan Properties

analyzer-version-clippy1.96.0
analyzer-version-cppcheck2.21.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.96.0
diffbase-analyzer-version-cppcheck2.21.0
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-242.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameosbuild-composer-174-1.20260619115723107569.main.22.g34ab7f051
diffbase-store-results-to/tmp/tmp2va7kov9/osbuild-composer-174-1.20260619115723107569.main.22.g34ab7f051.tar.xz
diffbase-time-created2026-06-19 14:25:24
diffbase-time-finished2026-06-19 14:33:15
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,gcc,clippy,cppcheck' '-o' '/tmp/tmp2va7kov9/osbuild-composer-174-1.20260619115723107569.main.22.g34ab7f051.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp2va7kov9/osbuild-composer-174-1.20260619115723107569.main.22.g34ab7f051.src.rpm'
diffbase-tool-versioncsmock-3.8.6.20260619.162144.gb9cd2d0-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-242.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameosbuild-composer-174-1.20260619140627818328.pr5185.24.g5051b71ff
store-results-to/tmp/tmpb76wcj06/osbuild-composer-174-1.20260619140627818328.pr5185.24.g5051b71ff.tar.xz
time-created2026-06-19 14:33:54
time-finished2026-06-19 14:40:56
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,gcc,clippy,cppcheck' '-o' '/tmp/tmpb76wcj06/osbuild-composer-174-1.20260619140627818328.pr5185.24.g5051b71ff.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpb76wcj06/osbuild-composer-174-1.20260619140627818328.pr5185.24.g5051b71ff.src.rpm'
tool-versioncsmock-3.8.6.20260619.162144.gb9cd2d0-1.el9