# image-builder-55-1.20260324150647185021.main.1.gf17ba3e - findings not occurring in image-builder-55-1.20260324150647185021.main.1.gf17ba3e

## List of Findings

    Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’
    image-builder-55-build/image-builder-cli-55/vendor/github.com/containers/storage/pkg/unshare/unshare.c:156:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
    #  154|   	ret[i] = NULL;
    #  155|   	return ret;
    #  156|-> }
    #  157|
    #  158|   /*

    Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/containers/storage/pkg/unshare/unshare.c:156:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
    #  154|   	ret[i] = NULL;
    #  155|   	return ret;
    #  156|-> }
    #  157|
    #  158|   /*

    Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/containers/storage/pkg/unshare/unshare.c:156:1: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’
    #  154|   	ret[i] = NULL;
    #  155|   	return ret;
    #  156|-> }
    #  157|
    #  158|   /*

    Error: COMPILER_WARNING (CWE-704): [#def4]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c: scope_hint: In function ‘sqlite3ShadowTableName’
    image-builder-55-build/image-builder-cli-55/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c:124684:9: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
    #124682|     char *zTail;                  /* Pointer to the last "_" in zName */
    #124683|     Table *pTab;                  /* Table that zName is a shadow of */
    #124684|->   zTail = strrchr(zName, '_');
    #124685|     if( zTail==0 ) return 0;
    #124686|     *zTail = 0;

    Error: CPPCHECK_WARNING (CWE-476): [#def5]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/miekg/pkcs11/pkcs11.go:77: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c
    #   75|   	CK_C_GetFunctionList list;
    #   76|   	struct ctx *c = calloc(1, sizeof(struct ctx));
    #   77|-> 	c->handle = dlopen(module, RTLD_LAZY);
    #   78|   	if (c->handle == NULL) {
    #   79|   		free(c);

    Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function 'New'
    image-builder-55-build/image-builder-cli-55/vendor/github.com/miekg/pkcs11/pkcs11.go:77:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'c'
    #   75|   	CK_C_GetFunctionList list;
    #   76|   	struct ctx *c = calloc(1, sizeof(struct ctx));
    #   77|-> 	c->handle = dlopen(module, RTLD_LAZY);
    #   78|   	if (c->handle == NULL) {
    #   79|   		free(c);

    Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘New’
    image-builder-55-build/image-builder-cli-55/vendor/github.com/miekg/pkcs11/pkcs11.go:77:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘c’
    #   75|   	CK_C_GetFunctionList list;
    #   76|   	struct ctx *c = calloc(1, sizeof(struct ctx));
    #   77|-> 	c->handle = dlopen(module, RTLD_LAZY);
    #   78|   	if (c->handle == NULL) {
    #   79|   		free(c);

    Error: CPPCHECK_WARNING (CWE-476): [#def8]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/miekg/pkcs11/pkcs11.go:78: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c
    #   76|   	struct ctx *c = calloc(1, sizeof(struct ctx));
    #   77|   	c->handle = dlopen(module, RTLD_LAZY);
    #   78|-> 	if (c->handle == NULL) {
    #   79|   		free(c);
    #   80|   		return NULL;

    Error: CPPCHECK_WARNING (CWE-476): [#def9]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/miekg/pkcs11/pkcs11.go:82: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c
    #   80|   		return NULL;
    #   81|   	}
    #   82|-> 	list = (CK_C_GetFunctionList) dlsym(c->handle, "C_GetFunctionList");
    #   83|   	if (list == NULL) {
    #   84|   		free(c);

    Error: CPPCHECK_WARNING (CWE-476): [#def10]
    image-builder-55-build/image-builder-cli-55/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): [#def11]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function 'gnu_ext_crypt'
    image-builder-55-build/image-builder-cli-55/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
    image-builder-55-build/image-builder-cli-55/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): [#def12]
    image-builder-55-build/image-builder-cli-55/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function ‘gnu_ext_crypt’
    image-builder-55-build/image-builder-cli-55/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
    image-builder-55-build/image-builder-cli-55/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): [#def13]
    image-builder-55-build/image-builder-cli-55/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-clippy | 1.94.1
analyzer-version-cppcheck | 2.20.0
analyzer-version-gcc | 16.0.1
analyzer-version-gcc-analyzer | 16.0.1
analyzer-version-shellcheck | 0.11.0
analyzer-version-unicontrol | 0.0.2
diffbase-analyzer-version-clippy | 1.94.1
diffbase-analyzer-version-cppcheck | 2.20.0
diffbase-analyzer-version-gcc | 16.0.1
diffbase-analyzer-version-gcc-analyzer | 16.0.1
diffbase-analyzer-version-shellcheck | 0.11.0
diffbase-analyzer-version-unicontrol | 0.0.2
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code | 0
diffbase-host | ip-172-16-1-187.us-west-2.compute.internal
diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20260320.200800.gd35503f.main-1.el9.noarch
diffbase-mock-config | fedora-rawhide-x86_64
diffbase-project-name | image-builder-55-1.20260324150647185021.main.1.gf17ba3e
diffbase-store-results-to | /tmp/tmpx3abf5as/image-builder-55-1.20260324150647185021.main.1.gf17ba3e.tar.xz
diffbase-time-created | 2026-03-30 18:59:19
diffbase-time-finished | 2026-03-30 19:03:15
diffbase-tool | csmock
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,gcc,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpx3abf5as/image-builder-55-1.20260324150647185021.main.1.gf17ba3e.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpx3abf5as/image-builder-55-1.20260324150647185021.main.1.gf17ba3e.src.rpm'
diffbase-tool-version | csmock-3.8.4.20260302.153719.g8203630-1.el9
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol
exit-code | 0
host | ip-172-16-1-187.us-west-2.compute.internal
known-false-positives | /usr/share/csmock/known-false-positives.js
known-false-positives-rpm | known-false-positives-0.0.0.20260320.200800.gd35503f.main-1.el9.noarch
mock-config | fedora-rawhide-x86_64
project-name | image-builder-55-1.20260324150647185021.main.1.gf17ba3e
store-results-to | /tmp/tmpx3abf5as/image-builder-55-1.20260324150647185021.main.1.gf17ba3e.tar.xz
time-created | 2026-03-30 18:59:19
time-finished | 2026-03-30 19:03:15
tool | csmock
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,gcc,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpx3abf5as/image-builder-55-1.20260324150647185021.main.1.gf17ba3e.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpx3abf5as/image-builder-55-1.20260324150647185021.main.1.gf17ba3e.src.rpm'
tool-version | csmock-3.8.4.20260302.153719.g8203630-1.el9