Fixed findings

List of Findings

Error: COMPILER_WARNING (CWE-704): [#def1]
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'get_systemd_scope_and_slice'
crun-HEAD/src/libcrun/cgroup-systemd.c:125:5: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  125 |   n = strchr (cgroup_path, ':');
#      |     ^
#  123|       }
#  124|   
#  125|->   n = strchr (cgroup_path, ':');
#  126|     if (n == NULL)
#  127|       xasprintf (scope, "%s.scope", cgroup_path);

Error: COMPILER_WARNING (CWE-704): [#def2]
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'append_systemd_annotation'
crun-HEAD/src/libcrun/cgroup-systemd.c:641:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  641 |       end = strchr (it + 1, '\'');
#      |           ^
#  639|         it = v_start = xstrdup (value);
#  640|   
#  641|->       end = strchr (it + 1, '\'');
#  642|         if (end == NULL)
#  643|           return crun_make_error (err, 0, "invalid variant `%s`", value);

Error: COMPILER_WARNING (CWE-704): [#def3]
crun-HEAD/src/libcrun/error.c: scope_hint: In function 'get_log_type'
crun-HEAD/src/libcrun/error.c:194:15: warning[-Wdiscarded-qualifiers]: initialization discards 'const' qualifier from pointer target type
#  192|   get_log_type (const char *log, const char **data)
#  193|   {
#  194|->   char *sep = strchr (log, ':');
#  195|     if (sep == NULL)
#  196|       {

Error: COMPILER_WARNING (CWE-704): [#def4]
crun-HEAD/src/libcrun/utils.c: scope_hint: In function 'crun_safe_ensure_at'
crun-HEAD/src/libcrun/utils.c:578:10: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  576|         cur = consume_slashes (it + 1);
#  577|         *it = '/';
#  578|->       it = strchr (cur, '/');
#  579|       }
#  580|   

Scan Properties

analyzer-version-clippy1.94.1
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.0.1
analyzer-version-gcc-analyzer16.0.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.94.1
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.0.1
diffbase-analyzer-version-gcc-analyzer16.0.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-68.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.20260320.200800.gd35503f.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namecrun-1.27-1.20260417054819369586.pr2069.9.g0a9609fa
diffbase-store-results-to/tmp/tmpdirhd9nl/crun-1.27-1.20260417054819369586.pr2069.9.g0a9609fa.tar.xz
diffbase-time-created2026-04-17 06:01:04
diffbase-time-finished2026-04-17 06:05:05
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,gcc,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpdirhd9nl/crun-1.27-1.20260417054819369586.pr2069.9.g0a9609fa.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpdirhd9nl/crun-1.27-1.20260417054819369586.pr2069.9.g0a9609fa.src.rpm'
diffbase-tool-versioncsmock-3.8.5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-68.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260320.200800.gd35503f.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namecrun-1.27-1.20260402151752063764.main.6.g0097db1d
store-results-to/tmp/tmpmf9m5_9i/crun-1.27-1.20260402151752063764.main.6.g0097db1d.tar.xz
time-created2026-04-17 05:56:55
time-finished2026-04-17 06:00:42
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,gcc,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpmf9m5_9i/crun-1.27-1.20260402151752063764.main.6.g0097db1d.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpmf9m5_9i/crun-1.27-1.20260402151752063764.main.6.g0097db1d.src.rpm'
tool-versioncsmock-3.8.5-1.el9