Task #45038 - buildah-1.39.0-1.20250321123510270591.main.105.gbc4d7eb70/scan-results.err

back to task #45038
download
Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/add.bats:116:11: warning[SC2100]: Use $((..)) for arithmetics, e.g. i=$((i - 2))
#  114|   @test "add single file creates absolute path with correct permissions" {
#  115|     _prefetch ubuntu
#  116|->   imgName=ubuntu-image
#  117|     createrandom ${TEST_SCRATCH_DIR}/distutils.cfg
#  118|     permission=$(stat -c "%a" ${TEST_SCRATCH_DIR}/distutils.cfg)

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/add.bats:136:11: warning[SC2100]: Use $((..)) for arithmetics, e.g. i=$((i - 2))
#  134|   @test "add single file creates relative path with correct permissions" {
#  135|     _prefetch ubuntu
#  136|->   imgName=ubuntu-image
#  137|     createrandom ${TEST_SCRATCH_DIR}/distutils.cfg
#  138|     permission=$(stat -c "%a" ${TEST_SCRATCH_DIR}/distutils.cfg)

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/blobcache.bats:47:10: warning[SC2046]: Quote this to prevent word splitting.
#   45|   		for blob in ${blobcachedir}/* ; do
#   46|   			if cmp -s ${content} ${blob} ; then
#   47|-> 				echo $(file ${blob}) and ${content} have the same contents, was cached
#   48|   				match=true
#   49|   				break

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/blobcache.bats:88:3: warning[SC2034]: cachedir appears unused. Verify use (or export if used externally).
#   86|   	if is_rootless;
#   87|   	then
#   88|-> 		cachedir=$HOME/.local/share
#   89|   	fi
#   90|   	run rm -rf $blobcachedir/*

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/buildah/test/system/blobcache.bats:91:44: warning[SC2154]: cachefile is referenced but not assigned.
#   89|   	fi
#   90|   	run rm -rf $blobcachedir/*
#   91|-> 	assert "$status" -eq 0 "status of `run rm $cachefile` must be 0"
#   92|   
#   93|   	# In first push blob must be skipped after vendoring https://github.com/containers/image/pull/1645

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/bud.bats:174:17: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#  172|                   --authfile ${TEST_SCRATCH_DIR}/test.auth \
#  173|                   --tls-verify=false \
#  174|->                 $* \
#  175|                   $imgname \
#  176|                   docker://localhost:${REGISTRY_PORT}/$imgname

Error: SHELLCHECK_WARNING (CWE-140):
/usr/share/buildah/test/system/bud.bats:281:23: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  279|     # Containerfile must contain one or more (four, as of 2022-10) lines
#  280|     # of the form 'ARG TARGETxxx' for each of the variables of interest.
#  281|->   local -a checkvars=($(sed -ne 's/^ARG //p' <$containerfile))
#  282|     assert "${checkvars[*]}" != "" \
#  283|            "INTERNAL ERROR! No 'ARG xxx' lines in $containerfile!"

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/bud.bats:719:29: warning[SC2046]: Quote this to prevent word splitting.
#  717|     run_buildah 125 build -t testbud3 $WITH_POLICY_JSON $BUDFILES/dockerignore3
#  718|     expect_output --substring 'building.*"COPY test1.txt /upload/test1.txt".*no such file or directory'
#  719|->   expect_output --substring $(realpath "$BUDFILES/dockerignore3/.dockerignore")
#  720|   }
#  721|   

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/buildah/test/system/bud.bats:909:10: warning[SC2154]: targetArch is referenced but not assigned (did you mean 'targetarch'?).
#  907|     targetarch="arm64"
#  908|   
#  909|->   if [[ "$targetArch" == "$myarch" ]]; then
#  910|       targetarch="amd64"
#  911|     fi

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/bud.bats:1114:11: warning[SC2046]: Quote this to prevent word splitting.
# 1112|     RUN --mount=type=cache,id=${cacheid},target=/var/tmp,uid=1000,gid=1000 touch /var/tmp/should-be-able-to-write
# 1113|   EOF
# 1114|->   if test `id -u` -eq 0 ; then
# 1115|       run_buildah build --userns-uid-map 0:1:1023 --userns-gid-map 0:1:1023 $WITH_POLICY_JSON ${contextdir}
# 1116|     else

Error: SHELLCHECK_WARNING (CWE-140):
/usr/share/buildah/test/system/bud.bats:2525:27: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
# 2523|   @test "bud-from-scratch-label" {
# 2524|     run_buildah --version
# 2525|->   local -a output_fields=($output)
# 2526|     buildah_version=${output_fields[2]}
# 2527|     want_output='map["io.buildah.version":"'$buildah_version'" "test":"label"]'

Error: SHELLCHECK_WARNING (CWE-140):
/usr/share/buildah/test/system/bud.bats:2649:27: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
# 2647|   
# 2648|     run_buildah --version
# 2649|->   local -a output_fields=($output)
# 2650|     buildah_version=${output_fields[2]}
# 2651|   

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/bud.bats:3328:3: warning[SC2034]: from_cid appears unused. Verify use (or export if used externally).
# 3326|     expect_output --substring "@unique.test.string@"
# 3327|     run_buildah from --quiet ${from_target}
# 3328|->   from_cid=$output
# 3329|     run_buildah from ${target}
# 3330|   }

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/bud.bats:3343:10: warning[SC2100]: Use $((..)) for arithmetics, e.g. i=$((i - 2))
# 3341|   
# 3342|   @test "bud with Dockerfile from valid URL" {
# 3343|->   target=url-image
# 3344|     url=https://raw.githubusercontent.com/containers/buildah/main/tests/bud/from-scratch/Dockerfile
# 3345|     run_buildah build $WITH_POLICY_JSON -t ${target} ${url}

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/bud.bats:3350:10: warning[SC2100]: Use $((..)) for arithmetics, e.g. i=$((i - 2))
# 3348|   
# 3349|   @test "bud with Dockerfile from invalid URL" {
# 3350|->   target=url-image
# 3351|     url=https://raw.githubusercontent.com/containers/buildah/main/tests/bud/from-scratch/Dockerfile.bogus
# 3352|     run_buildah 125 build $WITH_POLICY_JSON -t ${target} ${url}

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/bud.bats:3941:8: warning[SC2046]: Quote this to prevent word splitting.
# 3939|   
# 3940|     # Check that both the version with --jobs 1 and --jobs=N have the same number of files
# 3941|->   test $(find $root_single_job -type f | wc -l) = $(find $root_multi_job -type f | wc -l)
# 3942|   }
# 3943|   

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/bud.bats:3941:51: warning[SC2046]: Quote this to prevent word splitting.
# 3939|   
# 3940|     # Check that both the version with --jobs 1 and --jobs=N have the same number of files
# 3941|->   test $(find $root_single_job -type f | wc -l) = $(find $root_multi_job -type f | wc -l)
# 3942|   }
# 3943|   

Error: SHELLCHECK_WARNING (CWE-140):
/usr/share/buildah/test/system/bud.bats:4387:27: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
# 4385|   @test "bud-no-change-label" {
# 4386|     run_buildah --version
# 4387|->   local -a output_fields=($output)
# 4388|     buildah_version=${output_fields[2]}
# 4389|     want_output='map["io.buildah.version":"'$buildah_version'" "test":"label"]'

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4818:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4816|     mkdir -p $ocidir/blobs/sha256
# 4817|     # Build an image config and image manifest in parallel
# 4818|->   local configos=$(${BUILDAH_BINARY} info --format '{{.host.os}}')
# 4819|     local configarch=$(${BUILDAH_BINARY} info --format '{{.host.arch}}')
# 4820|     local configvariant=$(${BUILDAH_BINARY} info --format '{{.host.variant}}')

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4819:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4817|     # Build an image config and image manifest in parallel
# 4818|     local configos=$(${BUILDAH_BINARY} info --format '{{.host.os}}')
# 4819|->   local configarch=$(${BUILDAH_BINARY} info --format '{{.host.arch}}')
# 4820|     local configvariant=$(${BUILDAH_BINARY} info --format '{{.host.variant}}')
# 4821|     local configvariantkv=${configvariant:+'"variant": "'${configvariant}'", '}

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4820:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4818|     local configos=$(${BUILDAH_BINARY} info --format '{{.host.os}}')
# 4819|     local configarch=$(${BUILDAH_BINARY} info --format '{{.host.arch}}')
# 4820|->   local configvariant=$(${BUILDAH_BINARY} info --format '{{.host.variant}}')
# 4821|     local configvariantkv=${configvariant:+'"variant": "'${configvariant}'", '}
# 4822|     echo '{"architecture": "'"${configarch}"'", "os": "'"${configos}"'", '"${configvariantkv}"'"rootfs": {"type": "layers", "diff_ids": [' > ${TEST_SCRATCH_DIR}/config.json

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4831:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4829|       tar -c -C ${TEST_SCRATCH_DIR} -f ${TEST_SCRATCH_DIR}/layer$layer.tar file$layer
# 4830|       # Get the layer blob's digest and size
# 4831|->     local diffid=$(sha256sum ${TEST_SCRATCH_DIR}/layer$layer.tar)
# 4832|       local diffsize=$(wc -c ${TEST_SCRATCH_DIR}/layer$layer.tar)
# 4833|       # Link the blob into where an OCI layout would put it.

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4832:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4830|       # Get the layer blob's digest and size
# 4831|       local diffid=$(sha256sum ${TEST_SCRATCH_DIR}/layer$layer.tar)
# 4832|->     local diffsize=$(wc -c ${TEST_SCRATCH_DIR}/layer$layer.tar)
# 4833|       # Link the blob into where an OCI layout would put it.
# 4834|       ln ${TEST_SCRATCH_DIR}/layer$layer.tar $ocidir/blobs/sha256/${diffid%% *}

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4851:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4849|     echo ']}, "config": { "Cmd": ["/bin/sh"], "Env": [ "PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin" ]}}' >> ${TEST_SCRATCH_DIR}/config.json
# 4850|     # Compute the config blob's digest and size, so that we can list it in the manifest.
# 4851|->   local configsize=$(wc -c ${TEST_SCRATCH_DIR}/config.json)
# 4852|     local configdigest=$(sha256sum ${TEST_SCRATCH_DIR}/config.json)
# 4853|     # Finish the manifest with information about the config blob.

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4852:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4850|     # Compute the config blob's digest and size, so that we can list it in the manifest.
# 4851|     local configsize=$(wc -c ${TEST_SCRATCH_DIR}/config.json)
# 4852|->   local configdigest=$(sha256sum ${TEST_SCRATCH_DIR}/config.json)
# 4853|     # Finish the manifest with information about the config blob.
# 4854|     echo '], "config": { "mediaType": "application/vnd.oci.image.config.v1+json", "digest": "sha256:'${configdigest%% *}'", "size": '${configsize%% *}'}}' >> ${TEST_SCRATCH_DIR}/manifest.json

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4856:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4854|     echo '], "config": { "mediaType": "application/vnd.oci.image.config.v1+json", "digest": "sha256:'${configdigest%% *}'", "size": '${configsize%% *}'}}' >> ${TEST_SCRATCH_DIR}/manifest.json
# 4855|     # Compute the manifest's digest and size, so that we can list it in the OCI layout index.
# 4856|->   local manifestsize=$(wc -c ${TEST_SCRATCH_DIR}/manifest.json)
# 4857|     local manifestdigest=$(sha256sum ${TEST_SCRATCH_DIR}/manifest.json)
# 4858|     # Link the config blob and manifest into where an OCI layout would put them.

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4857:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4855|     # Compute the manifest's digest and size, so that we can list it in the OCI layout index.
# 4856|     local manifestsize=$(wc -c ${TEST_SCRATCH_DIR}/manifest.json)
# 4857|->   local manifestdigest=$(sha256sum ${TEST_SCRATCH_DIR}/manifest.json)
# 4858|     # Link the config blob and manifest into where an OCI layout would put them.
# 4859|     ln ${TEST_SCRATCH_DIR}/config.json $ocidir/blobs/sha256/${configdigest%% *}

Error: SHELLCHECK_WARNING (CWE-670):
/usr/share/buildah/test/system/bud.bats:4873:11: warning[SC2128]: Expanding an array without an index only gives the first element.
# 4871|     # out of all of this.
# 4872|     run_buildah inspect --format '{{.History}}' fakeregistry.podman.invalid/notreal
# 4873|->   assert "${lines}" == '[]'  "base image generated for test had history field that was not an empty slice"
# 4874|     # Build images using our image-with-no-history as a base, to check that we
# 4875|     # don't trip over ourselves when doing so.

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/bud.bats:4922:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 4920|   
# 4921|     # Envariable from environment
# 4922|->   export foo=$(random_string 20)
# 4923|     run_buildah build $WITH_POLICY_JSON -t ${target} --build-arg foo $BUDFILES/build-arg
# 4924|     assert "${lines[3]}" = "$foo"

Error: SHELLCHECK_WARNING (CWE-140):
/usr/share/buildah/test/system/bud.bats:4949:27: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
# 4947|     run_buildah build $WITH_POLICY_JSON -t ${target} $BUDFILES/from-scratch
# 4948|     run_buildah --version
# 4949|->   local -a output_fields=($output)
# 4950|     buildah_version=${output_fields[2]}
# 4951|   

Error: SHELLCHECK_WARNING (CWE-153):
/usr/share/buildah/test/system/bud.bats:5168:23: warning[SC2053]: Quote the right-hand side of != in [[ ]] to prevent glob matching.
# 5166|       # as a sanity thing.
# 5167|       for other in $actions; do
# 5168|->       if [[ $other != $action ]]; then
# 5169|           assert "$(< ${TEST_SCRATCH_DIR}/${action}1)" != "$(< ${TEST_SCRATCH_DIR}/${other}1)" \
# 5170|                  "iidfile(${action}1) != iidfile(${other}1)"

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/bud.bats:6661:17: warning[SC2046]: Quote this to prevent word splitting.
# 6659|     # Build and export container to tar
# 6660|     run_buildah build --no-cache $WITH_POLICY_JSON -t ${target} -f $BUDFILES/containerfile/Containerfile.in $BUDFILES/containerfile
# 6661|->   podman export $(podman create --name ${target} --net=host ${target}) --output=$contextdir.tar
# 6662|   
# 6663|     # We are done exporting so remove images and containers which are not needed

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/bud.bats:6686:17: warning[SC2046]: Quote this to prevent word splitting.
# 6684|     # Build and export container to tar
# 6685|     run_buildah build --no-cache $WITH_POLICY_JSON -t ${target} -f $BUDFILES/add-run-dir/Dockerfile
# 6686|->   podman export $(podman create --name ${target} --net=host ${target}) --output=$contextdir.tar
# 6687|   
# 6688|     # We are done exporting so remove images and containers which are not needed

Error: SHELLCHECK_WARNING (CWE-149):
/usr/share/buildah/test/system/bud.bats:6872:21: warning[SC2140]: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
# 6870|   _EOF
# 6871|     target=env-image
# 6872|->   check="FTP_PROXY="FTP" ftp_proxy=ftp http_proxy=http HTTPS_PROXY=HTTPS"
# 6873|     bogus="BOGUS_PROXY=BOGUS"
# 6874|     eval $check $bogus run_buildah build --unsetenv PATH $WITH_POLICY_JSON -t oci-${target} -f $mytmpdir/Containerfile .

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/buildah/test/system/bud.bats:7133:9: warning[SC2154]: http_proxy is referenced but not assigned.
# 7131|     expect_rc=6
# 7132|     expect_err="Could not resolve host: www.redhat.com"
# 7133|->   if [[ $http_proxy != "" ]]; then
# 7134|       expect_rc=5
# 7135|       expect_err="Could not resolve proxy:"

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/bud.bats:7248:11: warning[SC2046]: Quote this to prevent word splitting.
# 7246|     echo FROM busybox > ${TEST_SCRATCH_DIR}/Containerfile
# 7247|     arch=amd64
# 7248|->   if test $(arch) = x86_64 ; then
# 7249|       arch=arm64
# 7250|     fi

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/bud/masks/test.sh:1:2: error[SC1115]: Remove spaces between # and ! in the shebang.
#    1|-> # !/bin/sh
#    2|   
#    3|   function output {

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/bud/masks/test.sh:3:1: warning[SC2113]: 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.
#    1|   # !/bin/sh
#    2|   
#    3|-> function output {
#    4|       for mask in /proc/acpi /proc/kcore /proc/keys /proc/latency_stats /proc/sched_debug /proc/scsi /proc/timer_list /proc/timer_stats /sys/dev/block /sys/devices/virtual/powercap /sys/firmware /sys/fs/selinux; do
#    5|   	test -e $mask || continue

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/bud/masks/test.sh:11:14: warning[SC3014]: In POSIX sh, == in place of = is undefined.
#    9|   }
#   10|   output=$(output | wc -c )
#   11|-> if [ $output == 0 ]; then
#   12|       echo "masked"
#   13|   else

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/cdi.bats:12:3: error[SC2284]: Use [ x = y ] to compare values (or quote '==' if literal).
#   10|     sed -e s:@@hostcdipath@@:$cdidir:g $BUDFILES/cdi/containers-cdi.yaml > $cdidir/containers-cdi.yaml
#   11|     chmod 644 $cdidir/containers-cdi.yaml
#   12|->   echo === Begin CDI configuration in $cdidir/containers-cdi.yaml ===
#   13|     cat $cdidir/containers-cdi.yaml
#   14|     echo === End CDI configuration ===

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/cdi.bats:14:3: error[SC2284]: Use [ x = y ] to compare values (or quote '==' if literal).
#   12|     echo === Begin CDI configuration in $cdidir/containers-cdi.yaml ===
#   13|     cat $cdidir/containers-cdi.yaml
#   14|->   echo === End CDI configuration ===
#   15|     run_buildah build $WITH_POLICY_JSON --cdi-config-dir=$cdidir --security-opt label=disable --device=containers.github.io/sample=all --device=/dev/null:/dev/outsidenull:rwm $BUDFILES/cdi
#   16|   }

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/cdi.bats:25:3: error[SC2284]: Use [ x = y ] to compare values (or quote '==' if literal).
#   23|     sed -e s:@@hostcdipath@@:$cdidir:g $BUDFILES/cdi/containers-cdi.yaml > $cdidir/containers-cdi.yaml
#   24|     chmod 644 $cdidir/containers-cdi.yaml
#   25|->   echo === Begin CDI configuration in $cdidir/containers-cdi.yaml ===
#   26|     cat $cdidir/containers-cdi.yaml
#   27|     echo === End CDI configuration ===

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/cdi.bats:27:3: error[SC2284]: Use [ x = y ] to compare values (or quote '==' if literal).
#   25|     echo === Begin CDI configuration in $cdidir/containers-cdi.yaml ===
#   26|     cat $cdidir/containers-cdi.yaml
#   27|->   echo === End CDI configuration ===
#   28|     run_buildah from $WITH_POLICY_JSON --security-opt label=disable --cdi-config-dir=$cdidir --device=containers.github.io/sample=all --device=/dev/null:/dev/outsidenull:rwm busybox
#   29|     cid="$output"

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/cdi.bats:40:3: error[SC2284]: Use [ x = y ] to compare values (or quote '==' if literal).
#   38|     sed -e s:@@hostcdipath@@:$cdidir:g $BUDFILES/cdi/containers-cdi.yaml > $cdidir/containers-cdi.yaml
#   39|     chmod 644 $cdidir/containers-cdi.yaml
#   40|->   echo === Begin CDI configuration in $cdidir/containers-cdi.yaml ===
#   41|     cat $cdidir/containers-cdi.yaml
#   42|     echo === End CDI configuration ===

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/cdi.bats:42:3: error[SC2284]: Use [ x = y ] to compare values (or quote '==' if literal).
#   40|     echo === Begin CDI configuration in $cdidir/containers-cdi.yaml ===
#   41|     cat $cdidir/containers-cdi.yaml
#   42|->   echo === End CDI configuration ===
#   43|     run_buildah from $WITH_POLICY_JSON --security-opt label=disable busybox
#   44|     cid="$output"

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/chroot.bats:50:14: warning[SC2046]: Quote this to prevent word splitting.
#   48|     # looking for $storagedir, so tweak perms to let them do at least that much
#   49|     fixupdir=$storagedir
#   50|->   while test $(stat -c %d:%i $fixupdir) != $(stat -c %d:%i /) ; do
#   51|       # walk up to root, or the first parent that we don't own
#   52|       if test $(stat -c %u $fixupdir) -ne $(id -u) ; then

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/chroot.bats:50:44: warning[SC2046]: Quote this to prevent word splitting.
#   48|     # looking for $storagedir, so tweak perms to let them do at least that much
#   49|     fixupdir=$storagedir
#   50|->   while test $(stat -c %d:%i $fixupdir) != $(stat -c %d:%i /) ; do
#   51|       # walk up to root, or the first parent that we don't own
#   52|       if test $(stat -c %u $fixupdir) -ne $(id -u) ; then

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/chroot.bats:52:13: warning[SC2046]: Quote this to prevent word splitting.
#   50|     while test $(stat -c %d:%i $fixupdir) != $(stat -c %d:%i /) ; do
#   51|       # walk up to root, or the first parent that we don't own
#   52|->     if test $(stat -c %u $fixupdir) -ne $(id -u) ; then
#   53|         break
#   54|       fi

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/chroot.bats:52:41: warning[SC2046]: Quote this to prevent word splitting.
#   50|     while test $(stat -c %d:%i $fixupdir) != $(stat -c %d:%i /) ; do
#   51|       # walk up to root, or the first parent that we don't own
#   52|->     if test $(stat -c %u $fixupdir) -ne $(id -u) ; then
#   53|         break
#   54|       fi

Error: SHELLCHECK_WARNING (CWE-140):
/usr/share/buildah/test/system/commit.bats:169:33: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
#  167|   
#  168|   	run_buildah --version
#  169|->         local -a output_fields=($output)
#  170|   	buildah_version=${output_fields[2]}
#  171|   

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/commit.bats:302:30: warning[SC2046]: Quote this to prevent word splitting.
#  300|     cid=$output
#  301|     run_buildah run $cid touch /testfile
#  302|->   run_buildah run $cid chown $(id -u):$(id -g) /testfile
#  303|     run_buildah commit $cid dir:${TEST_SCRATCH_DIR}/new-image
#  304|     config=$(jq -r .config.digest ${TEST_SCRATCH_DIR}/new-image/manifest.json)

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/commit.bats:302:39: warning[SC2046]: Quote this to prevent word splitting.
#  300|     cid=$output
#  301|     run_buildah run $cid touch /testfile
#  302|->   run_buildah run $cid chown $(id -u):$(id -g) /testfile
#  303|     run_buildah commit $cid dir:${TEST_SCRATCH_DIR}/new-image
#  304|     config=$(jq -r .config.digest ${TEST_SCRATCH_DIR}/new-image/manifest.json)

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/commit.bats:315:23: warning[SC2046]: Quote this to prevent word splitting.
#  313|     # ownership information should be forced to be in number/number format
#  314|     # instead of name/name because the names are gone
#  315|->   assert "$output" =~ $(id -u)/$(id -g)
#  316|   }
#  317|   

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/commit.bats:315:32: warning[SC2046]: Quote this to prevent word splitting.
#  313|     # ownership information should be forced to be in number/number format
#  314|     # instead of name/name because the names are gone
#  315|->   assert "$output" =~ $(id -u)/$(id -g)
#  316|   }
#  317|   

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/containers.bats:18:3: warning[SC2034]: cid2 appears unused. Verify use (or export if used externally).
#   16|     cid1=$output
#   17|     run_buildah from --quiet --pull=false $WITH_POLICY_JSON busybox
#   18|->   cid2=$output
#   19|     run_buildah containers --filter name=$cid1
#   20|     expect_line_count 2

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/digest.bats:12:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   10|   
#   11|     # If image includes '_v2sN', verify that image is schema version N
#   12|->   local expected_schemaversion=$(expr "$img" : '.*_v2s\([0-9]\)')
#   13|     if [ -n "$expected_schemaversion" ]; then
#   14|         actual_schemaversion=$(imgtype -expected-manifest-type '*' -show-manifest $img | jq .schemaVersion)

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/digest.bats:52:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   50|     #
#   51|     # Check that the first and second .fsLayers and .history elements are dups
#   52|->   local manifest=$(imgtype -expected-manifest-type '*' -show-manifest ${IMG})
#   53|     for element in fsLayers history; do
#   54|         local first=$(jq ".${element}[0]" <<<"$manifest")

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/digest.bats:54:13: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   52|     local manifest=$(imgtype -expected-manifest-type '*' -show-manifest ${IMG})
#   53|     for element in fsLayers history; do
#   54|->       local first=$(jq ".${element}[0]" <<<"$manifest")
#   55|         local second=$(jq ".${element}[1]" <<<"$manifest")
#   56|         expect_output --from="$second" "$first" "${IMG}: .${element}[1] == [0]"

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/digest.bats:55:13: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   53|     for element in fsLayers history; do
#   54|         local first=$(jq ".${element}[0]" <<<"$manifest")
#   55|->       local second=$(jq ".${element}[1]" <<<"$manifest")
#   56|         expect_output --from="$second" "$first" "${IMG}: .${element}[1] == [0]"
#   57|     done

Error: SHELLCHECK_WARNING (CWE-477):
/usr/share/buildah/test/system/digest/make-v2sN:58:17: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   56|   # FIXME: do we really need to know? Will it ever, in practice, be non-root?
#   57|   user=$(id -un)
#   58|-> if [ -n "$user" -a "$user" != "root" ]; then
#   59|       add_to_readme "By (user)" "$user"
#   60|   fi

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/digest/make-v2sN:62:20: warning[SC2046]: Quote this to prevent word splitting.
#   60|   fi
#   61|   
#   62|-> create_script=$(cd $(dirname $0) && git ls-files --full-name $ME)
#   63|   if [ -z "$create_script" ]; then
#   64|       create_script=$0

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/digest/make-v2sN:68:16: warning[SC2046]: Quote this to prevent word splitting.
#   66|   add_to_readme "By (script)" "$create_script"
#   67|   
#   68|-> git_state=$(cd $(dirname $0) && git describe --dirty)
#   69|   if [ -n "$git_state" ]; then
#   70|       add_to_readme "git state" "$git_state"

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/digest/make-v2sN:88:29: warning[SC2046]: Quote this to prevent word splitting.
#   86|   # clean up interim layers. It's also necessary for dealing with v2s1 layers.
#   87|   
#   88|-> TMPDIR=$(mktemp --tmpdir -d $(basename $0).XXXXXXX)
#   89|   push_flags=
#   90|   if [[ $schemaversion -eq 1 ]]; then

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/digest/make-v2sN:133:26: warning[SC2046]: Quote this to prevent word splitting.
#  131|       # Manifest is embedded in the image but as a string, not actual JSON;
#  132|       # the eval-echo converts it to usable JSON
#  133|->     manifest=$(eval echo $(buildah inspect ${IMGNAME} | jq .Manifest))
#  134|   
#  135|       # Check desired schema version:

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/formats.bats:16:3: warning[SC2034]: expect appears unused. Verify use (or export if used externally).
#   14|     imgtype_dkr="application/vnd.docker.distribution.manifest.v2+json"
#   15|   
#   16|->   expect=""
#   17|     case "$2" in
#   18|         oci)    want=$imgtype_oci; reject=$imgtype_dkr;;

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/from.bats:498:60: warning[SC2046]: Quote this to prevent word splitting.
#  496|     run_buildah from --quiet --pull $WITH_POLICY_JSON --arch=arm64 alpine
#  497|     other=$output
#  498|->   run_buildah from --quiet --pull $WITH_POLICY_JSON --arch=$(go env GOARCH) alpine
#  499|     cid=$output
#  500|     run_buildah copy --from $other $cid /etc/apk/arch /root/other-arch

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/from.bats:541:3: warning[SC2034]: target appears unused. Verify use (or export if used externally).
#  539|     run_buildah login --tls-verify=false --authfile ${TEST_SCRATCH_DIR}/test.auth --username testuser --password testpassword localhost:${REGISTRY_PORT}
#  540|     run_buildah push $WITH_POLICY_JSON --tls-verify=false --authfile ${TEST_SCRATCH_DIR}/test.auth busybox docker://localhost:${REGISTRY_PORT}/buildah/busybox:latest
#  541|->   target=busybox-image
#  542|     run_buildah from -q $WITH_POLICY_JSON --tls-verify=false --authfile ${TEST_SCRATCH_DIR}/test.auth docker://localhost:${REGISTRY_PORT}/buildah/busybox:latest
#  543|     run_buildah rm $output

Error: SHELLCHECK_WARNING (CWE-138):
/usr/share/buildah/test/system/help.bats:72:64: error[SC2145]: Argument mixes string and array. Use * or separate argument.
#   70|       # the old command parser and cobra.
#   71|       assert "$count" -gt 0 \
#   72|->            "Internal error: no commands found in 'buildah help $@' list"
#   73|   
#   74|       # Sanity check: make sure the special loops above triggered at least once.

Error: SHELLCHECK_WARNING (CWE-1164):
/usr/share/buildah/test/system/help.bats:79:18: warning[SC2043]: This loop will only ever run once. Bad quoting or missing glob/expansion?
#   77|           # This loop is copied from podman test and redundant for buildah now.
#   78|           # But this is kept for future extension.
#   79|->         for i in subcommands; do
#   80|               if [[ -z ${found[$i]} ]]; then
#   81|                   die "Internal error: '$i' subtest did not trigger"

Error: SHELLCHECK_WARNING (CWE-670):
/usr/share/buildah/test/system/helpers.bash:4:40: warning[SC2128]: Expanding an array without an index only gives the first element.
#    2|   
#    3|   # Directory in which tests live
#    4|-> TEST_SOURCES=${TEST_SOURCES:-$(dirname ${BASH_SOURCE})}
#    5|   
#    6|   BUILDAH_BINARY=${BUILDAH_BINARY:-$TEST_SOURCES/../bin/buildah}

Error: SHELLCHECK_WARNING (CWE-670):
/usr/share/buildah/test/system/helpers.bash:12:16: warning[SC2128]: Expanding an array without an index only gives the first element.
#   10|   INET_BINARY=${INET_BINARY:-$TEST_SOURCES/../bin/inet}
#   11|   STORAGE_DRIVER=${STORAGE_DRIVER:-vfs}
#   12|-> PATH=$(dirname ${BASH_SOURCE})/../bin:${PATH}
#   13|   OCI=${CI_DESIRED_RUNTIME:-$(${BUILDAH_BINARY} info --format '{{.host.OCIRuntime}}' || command -v runc || command -v crun)}
#   14|   # Default timeout for a buildah command.

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/helpers.bash:26:6: warning[SC2046]: Quote this to prevent word splitting.
#   24|   # Prompt to display when logging buildah commands; distinguish root/rootless
#   25|   _LOG_PROMPT='$'
#   26|-> if [ $(id -u) -eq 0 ]; then
#   27|       _LOG_PROMPT='#'
#   28|   fi

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/helpers.bash:31:1: warning[SC2034]: BUDFILES appears unused. Verify use (or export if used externally).
#   29|   
#   30|   # Shortcut for directory containing Containerfiles for bud.bats
#   31|-> BUDFILES=${TEST_SOURCES}/bud
#   32|   
#   33|   # Used hundreds of times throughout all the tests

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/helpers.bash:34:1: warning[SC2034]: WITH_POLICY_JSON appears unused. Verify use (or export if used externally).
#   32|   
#   33|   # Used hundreds of times throughout all the tests
#   34|-> WITH_POLICY_JSON="--signature-policy ${TEST_SOURCES}/policy.json"
#   35|   
#   36|   # We don't invoke gnupg directly in many places, but this avoids ENOTTY errors

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/helpers.bash:46:5: warning[SC2164]: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.
#   44|   
#   45|   function setup_tests() {
#   46|->     pushd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
#   47|   
#   48|       # $TEST_SCRATCH_DIR is a custom scratch directory for each @test,

Error: SHELLCHECK_WARNING (CWE-670):
/usr/share/buildah/test/system/helpers.bash:46:38: warning[SC2128]: Expanding an array without an index only gives the first element.
#   44|   
#   45|   function setup_tests() {
#   46|->     pushd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
#   47|   
#   48|       # $TEST_SCRATCH_DIR is a custom scratch directory for each @test,

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/helpers.bash:93:5: warning[SC2164]: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.
#   91|         chmod 600 "$4"
#   92|       fi
#   93|->     pushd ${2:-${TEST_SCRATCH_DIR}} > /dev/null
#   94|       go build -o serve ${TEST_SOURCES}/serve/serve.go
#   95|       portfile=$(mktemp)

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/helpers.bash:124:5: warning[SC2034]: HTTP_SERVER_PORT appears unused. Verify use (or export if used externally).
#  122|           fi
#  123|       done
#  124|->     HTTP_SERVER_PORT=$(cat ${portfile})
#  125|       rm -f ${portfile}
#  126|       popd > /dev/null

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/helpers.bash:126:5: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#  124|       HTTP_SERVER_PORT=$(cat ${portfile})
#  125|       rm -f ${portfile}
#  126|->     popd > /dev/null
#  127|   }
#  128|   

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/helpers.bash:158:5: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#  156|       rm -fr ${TEST_SCRATCH_DIR}
#  157|   
#  158|->     popd
#  159|   }
#  160|   

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/helpers.bash:184:25: warning[SC2076]: Remove quotes from right-hand side of =~ to match as a regex rather than literally.
#  182|       local storage=
#  183|       for img in "$@"; do
#  184|->         if [[ "$img" =~ '[vfs@' ]] ; then
#  185|               storage="$img"
#  186|               continue

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/helpers.bash:206:9: warning[SC2034]: attempt appears unused. Verify use (or export if used externally).
#  204|           rm -fr ${_BUILDAH_IMAGE_CACHEDIR:?THIS CAN NEVER HAPPEN}/$fname
#  205|           echo "# [copy docker://$img dir:$_BUILDAH_IMAGE_CACHEDIR/$fname]" >&2
#  206|->         for attempt in $(seq 3) ; do
#  207|               if copy $COPY_REGISTRY_OPTS docker://"$img" dir:$_BUILDAH_IMAGE_CACHEDIR/$fname ; then
#  208|                   break

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/buildah/test/system/helpers.bash:319:15: warning[SC2154]: status is referenced but not assigned.
#  317|           run "$@"
#  318|           echo "$output"
#  319|->         if [ "$status" -ne 0 ]; then
#  320|               echo -n "[ rc=$status ";
#  321|               if [ -n "$expected_rc" ]; then

Error: SHELLCHECK_WARNING (CWE-670):
/usr/share/buildah/test/system/helpers.bash:391:62: warning[SC2128]: Expanding an array without an index only gives the first element.
#  389|           # stdout is only emitted upon error; this echo is to help a debugger
#  390|           echo "${_LOG_PROMPT} $BUILDAH_BINARY $*"
#  391|->         run env CONTAINERS_CONF=${CONTAINERS_CONF:-$(dirname ${BASH_SOURCE})/containers.conf} timeout --foreground --kill=10 $BUILDAH_TIMEOUT ${BUILDAH_BINARY} ${BUILDAH_REGISTRY_OPTS} ${ROOTDIR_OPTS} "$@"
#  392|           # without "quotes", multiple lines are glommed together into one
#  393|           if [ -n "$output" ]; then

Error: SHELLCHECK_WARNING (CWE-477):
/usr/share/buildah/test/system/helpers.bash:408:32: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  406|           fi
#  407|   
#  408|->         if [ "$status" -eq 124 -o "$status" -eq 137 ]; then
#  409|               # FIXME: 'timeout -v' requires coreutils-8.29; travis seems to have
#  410|               #        an older version. If/when travis updates, please add -v

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/helpers.bash:553:15: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  551|       local opt
#  552|       for opt; do
#  553|->         local value=$(expr "$opt" : '[^=]*=\(.*\)')
#  554|           case "$opt" in
#  555|               --from=*)       actual="$value";   shift;;

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/buildah/test/system/helpers.bash:576:19: warning[SC2154]: lines is referenced but not assigned (did you mean 'line'?).
#  574|       local testname="${2:-${MOST_RECENT_BUILDAH_COMMAND:-[no test name given]}}"
#  575|   
#  576|->     local actual="${#lines[@]}"
#  577|       if [ "$actual" -eq "$expect" ]; then
#  578|           return

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/helpers.bash:685:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  683|   ##################
#  684|   function is_cgroupsv2() {
#  685|->     local cgroupfs_t=$(stat -f -c %T /sys/fs/cgroup)
#  686|       test "$cgroupfs_t" = "cgroup2fs"
#  687|   }

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/helpers.bash:744:31: warning[SC2046]: Quote this to prevent word splitting.
#  742|       skip "unshare was not able to create a pid namespace"
#  743|     fi
#  744|->   if ! unshare -U --map-users $(id -u),0,1 true ; then
#  745|       skip "unshare does not support --map-users"
#  746|     fi

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/helpers.bash:772:3: warning[SC2034]: GITPORT appears unused. Verify use (or export if used externally).
#  770|       fi
#  771|     done
#  772|->   GITPORT=$(cat ${TEST_SCRATCH_DIR}/git-daemon/port)
#  773|   }
#  774|   

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/helpers.bash:777:10: warning[SC2046]: Quote this to prevent word splitting.
#  775|   function stop_git_daemon() {
#  776|     if test -s ${TEST_SCRATCH_DIR}/git-daemon/pid ; then
#  777|->     kill $(cat ${TEST_SCRATCH_DIR}/git-daemon/pid)
#  778|       rm -f ${TEST_SCRATCH_DIR}/git-daemon/pid
#  779|     fi

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/helpers.bash.t:6:3: warning[SC2046]: Quote this to prevent word splitting.
#    4|   #
#    5|   
#    6|-> . $(dirname ${BASH_SOURCE})/helpers.bash
#    7|   
#    8|   INDEX=1

Error: SHELLCHECK_WARNING (CWE-670):
/usr/share/buildah/test/system/helpers.bash.t:6:13: warning[SC2128]: Expanding an array without an index only gives the first element.
#    4|   #
#    5|   
#    6|-> . $(dirname ${BASH_SOURCE})/helpers.bash
#    7|   
#    8|   INDEX=1

Error: SHELLCHECK_WARNING (CWE-140):
/usr/share/buildah/test/system/inspect.bats:34:27: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
#   32|     # including version. Strip it out,
#   33|     run_buildah --version
#   34|->   local -a output_fields=($output)
#   35|     buildah_version=${output_fields[2]}
#   36|     inspect_cleaned=$(echo "$inspect_after_commit" | sed "s/io.buildah.version:${buildah_version}//g")

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:261:36: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
#  259|   @test "manifest-from-tag" {
#  260|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST}
#  261|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST}
#  262|       expect_output --substring $(go env GOARCH)
#  263|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:261:37: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
#  259|   @test "manifest-from-tag" {
#  260|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST}
#  261|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST}
#  262|       expect_output --substring $(go env GOARCH)
#  263|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:261:57: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it.
#  259|   @test "manifest-from-tag" {
#  260|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST}
#  261|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST}
#  262|       expect_output --substring $(go env GOARCH)
#  263|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:261:58: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it.
#  259|   @test "manifest-from-tag" {
#  260|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST}
#  261|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST}
#  262|       expect_output --substring $(go env GOARCH)
#  263|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/lists.bats:261:59: warning[SC1078]: Did you forget to close this single quoted string?
#  259|   @test "manifest-from-tag" {
#  260|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST}
#  261|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST}
#  262|       expect_output --substring $(go env GOARCH)
#  263|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/lists.bats:264:31: warning[SC2046]: Quote this to prevent word splitting.
#  262|       expect_output --substring $(go env GOARCH)
#  263|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container
#  264|->     expect_output --substring $(go env GOARCH)
#  265|   }
#  266|   

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:269:36: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
#  267|   @test "manifest-from-digest" {
#  268|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_DIGEST}
#  269|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_DIGEST}
#  270|       expect_output --substring $(go env GOARCH)
#  271|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:269:37: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
#  267|   @test "manifest-from-digest" {
#  268|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_DIGEST}
#  269|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_DIGEST}
#  270|       expect_output --substring $(go env GOARCH)
#  271|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:269:57: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it.
#  267|   @test "manifest-from-digest" {
#  268|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_DIGEST}
#  269|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_DIGEST}
#  270|       expect_output --substring $(go env GOARCH)
#  271|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:269:58: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it.
#  267|   @test "manifest-from-digest" {
#  268|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_DIGEST}
#  269|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_DIGEST}
#  270|       expect_output --substring $(go env GOARCH)
#  271|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/lists.bats:269:59: warning[SC1078]: Did you forget to close this single quoted string?
#  267|   @test "manifest-from-digest" {
#  268|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_DIGEST}
#  269|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_DIGEST}
#  270|       expect_output --substring $(go env GOARCH)
#  271|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/lists.bats:272:31: warning[SC2046]: Quote this to prevent word splitting.
#  270|       expect_output --substring $(go env GOARCH)
#  271|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container
#  272|->     expect_output --substring $(go env GOARCH)
#  273|   }
#  274|   

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:277:36: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
#  275|   @test "manifest-from-instance" {
#  276|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_INSTANCE}
#  277|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_INSTANCE}
#  278|       expect_output --substring arm64
#  279|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:277:37: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
#  275|   @test "manifest-from-instance" {
#  276|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_INSTANCE}
#  277|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_INSTANCE}
#  278|       expect_output --substring arm64
#  279|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:277:57: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it.
#  275|   @test "manifest-from-instance" {
#  276|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_INSTANCE}
#  277|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_INSTANCE}
#  278|       expect_output --substring arm64
#  279|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/lists.bats:277:58: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it.
#  275|   @test "manifest-from-instance" {
#  276|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_INSTANCE}
#  277|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_INSTANCE}
#  278|       expect_output --substring arm64
#  279|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/lists.bats:277:59: warning[SC1078]: Did you forget to close this single quoted string?
#  275|   @test "manifest-from-instance" {
#  276|       run_buildah from $WITH_POLICY_JSON --name test-container ${IMAGE_LIST_INSTANCE}
#  277|->     run_buildah inspect --format ''{{.OCIv1.Architecture}}' ${IMAGE_LIST_INSTANCE}
#  278|       expect_output --substring arm64
#  279|       run_buildah inspect --format ''{{.OCIv1.Architecture}}' test-container

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/lists.bats:302:40: warning[SC2046]: Quote this to prevent word splitting.
#  300|       run_buildah bud --layers --iidfile ${TEST_SCRATCH_DIR}/image-id.txt ${TEST_SCRATCH_DIR}/build
#  301|       # Make sure we can add the new image to the list.
#  302|->     run_buildah manifest add test-list $(< ${TEST_SCRATCH_DIR}/image-id.txt)
#  303|   }
#  304|   

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/mkcw.bats:98:20: warning[SC2046]: Quote this to prevent word splitting.
#   96|     iidfile="$TEST_SCRATCH_DIR/iid"
#   97|     run_buildah commit --iidfile $iidfile --cw type=SEV,ignore_attestation_errors,passphrase="$passphrase" "$ctrID"
#   98|->   mkcw_check_image $(< $iidfile)
#   99|   
#  100|     run_buildah commit --iidfile $iidfile --cw type=sev,ignore_attestation_errors,passphrase="$passphrase" "$ctrID"

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/mkcw.bats:101:20: warning[SC2046]: Quote this to prevent word splitting.
#   99|   
#  100|     run_buildah commit --iidfile $iidfile --cw type=sev,ignore_attestation_errors,passphrase="$passphrase" "$ctrID"
#  101|->   mkcw_check_image $(< $iidfile)
#  102|   }
#  103|   

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/mkcw.bats:114:20: warning[SC2046]: Quote this to prevent word splitting.
#  112|     echo -n "mkcw build" > "$TEST_SCRATCH_DIR"/key
#  113|     run_buildah build --iidfile "$TEST_SCRATCH_DIR"/iid --cw type=SEV,ignore_attestation_errors,passphrase="mkcw build" -f bud/env/Dockerfile.check-env bud/env
#  114|->   mkcw_check_image $(cat "$TEST_SCRATCH_DIR"/iid)
#  115|   
#  116|     run_buildah build --iidfile "$TEST_SCRATCH_DIR"/iid --cw type=sev,ignore_attestation_errors,passphrase="mkcw build" -f bud/env/Dockerfile.check-env bud/env

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/mkcw.bats:117:20: warning[SC2046]: Quote this to prevent word splitting.
#  115|   
#  116|     run_buildah build --iidfile "$TEST_SCRATCH_DIR"/iid --cw type=sev,ignore_attestation_errors,passphrase="mkcw build" -f bud/env/Dockerfile.check-env bud/env
#  117|->   mkcw_check_image $(cat "$TEST_SCRATCH_DIR"/iid)
#  118|   
#  119|     # the key thing about this next bit is mixing --layers with a final

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/mkcw.bats:123:20: warning[SC2046]: Quote this to prevent word splitting.
#  121|     echo -n "mkcw build --layers" > "$TEST_SCRATCH_DIR"/key
#  122|     run_buildah build --iidfile "$TEST_SCRATCH_DIR"/iid --cw type=SEV,ignore_attestation_errors,passphrase="mkcw build --layers" --layers -f bud/env/Dockerfile.check-env bud/env
#  123|->   mkcw_check_image $(cat "$TEST_SCRATCH_DIR"/iid)
#  124|   }

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/namespaces.bats:88:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   86|   
#   87|     assert "$_output_idmap" != "" "Internal error: output_idmap is empty"
#   88|->   local _idmap=$(sed -E -e 's, +, ,g' -e 's,^ +,,g' <<< "${_output_idmap}")
#   89|     expect_output --from="$_idmap" "${_expect_idmap}" "$_testname"
#   90|   

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/namespaces.bats:135:17: warning[SC2046]: Quote this to prevent word splitting.
#  133|         # Look for a name that's in both the subuid and subgid files.
#  134|         for candidate in $(sed -e 's,:.*,,g' /etc/subuid); do
#  135|->         if test $(sed -e 's,:.*,,g' -e "/$candidate/!d" /etc/subgid) == "$candidate"; then
#  136|             # Read the start of the subuid/subgid ranges.  Assume length=65536.
#  137|             userbase=$(sed -e "/^${candidate}:/!d" -e 's,^[^:]*:,,g' -e 's,:[^:]*,,g' /etc/subuid)

Error: SHELLCHECK_WARNING (CWE-88):
/usr/share/buildah/test/system/namespaces.bats:323:24: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#  321|       # "run" doesn't have --userns option.
#  322|       if [ "$nsflag" != "userns" ]; then
#  323|->       for different in ${types[@]} ; do
#  324|           # Check that, if we override it, we get what we specify for "run".
#  325|           run_buildah run $RUNOPTS --"$nsflag"=$different "$ctr" readlink /proc/self/ns/"$nstype"

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/rm.bats:40:3: warning[SC2034]: cid1 appears unused. Verify use (or export if used externally).
#   38|     _prefetch alpine busybox
#   39|     run_buildah from $WITH_POLICY_JSON scratch
#   40|->   cid1=$output
#   41|     run_buildah from --quiet $WITH_POLICY_JSON alpine
#   42|     cid2=$output

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/rmi.bats:62:3: warning[SC2034]: cid1 appears unused. Verify use (or export if used externally).
#   60|     _prefetch alpine busybox
#   61|     run_buildah from $WITH_POLICY_JSON scratch
#   62|->   cid1=$output
#   63|     run_buildah from --quiet $WITH_POLICY_JSON alpine
#   64|     cid2=$output

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/rmi.bats:64:3: warning[SC2034]: cid2 appears unused. Verify use (or export if used externally).
#   62|     cid1=$output
#   63|     run_buildah from --quiet $WITH_POLICY_JSON alpine
#   64|->   cid2=$output
#   65|     run_buildah from --quiet $WITH_POLICY_JSON busybox
#   66|     cid3=$output

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/rmi.bats:66:3: warning[SC2034]: cid3 appears unused. Verify use (or export if used externally).
#   64|     cid2=$output
#   65|     run_buildah from --quiet $WITH_POLICY_JSON busybox
#   66|->   cid3=$output
#   67|     run_buildah 125 rmi --all
#   68|     run_buildah images -q

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/run.bats:186:7: warning[SC2046]: Quote this to prevent word splitting.
#  184|   	skip_if_no_runtime
#  185|   
#  186|-> 	eval $(go env)
#  187|   	echo CGO_ENABLED=${CGO_ENABLED}
#  188|   	if test "$CGO_ENABLED" -ne 1; then

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/run.bats:627:5: error[SC1035]: You need a space after the [ and before the ].
#  625|   
#  626|   	rootless=0
#  627|-> 	if ["$(id -u)" -ne 0 ]; then
#  628|   		rootless=1
#  629|   	fi

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/run.bats:676:8: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  674|   	_prefetch ubuntu
#  675|   
#  676|-> 	local hostname=h-$(random_string)
#  677|   
#  678|   	run_buildah from --quiet --pull=false $WITH_POLICY_JSON ubuntu

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/run.bats:719:23: error[SC1087]: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
#  717|   	cid=$output
#  718|   	run_buildah run --network=host --hostname $hostname $cid cat /etc/hosts
#  719|-> 	assert "$output" =~ "$ip[[:blank:]]$hostname"
#  720|   	hostOutput=$output
#  721|   	m=$(buildah mount $cid)

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/run.bats:729:23: error[SC1087]: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
#  727|   	# --isolation chroot implies host networking so check for the correct hosts entry
#  728|   	run_buildah run --isolation chroot --hostname $hostname $cid cat /etc/hosts
#  729|-> 	assert "$output" =~ "$ip[[:blank:]]$hostname"
#  730|   	run_buildah rm -a
#  731|   

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/run.bats:752:8: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  750|   	cid=$output
#  751|   
#  752|-> 	local hostname=h-$(random_string)
#  753|   	ip=$(hostname -I | cut -f 1 -d " ")
#  754|   	run_buildah run --network pasta --hostname $hostname $cid cat /etc/hosts

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/run.bats:755:23: error[SC1087]: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
#  753|   	ip=$(hostname -I | cut -f 1 -d " ")
#  754|   	run_buildah run --network pasta --hostname $hostname $cid cat /etc/hosts
#  755|-> 	assert "$output" =~ "$ip[[:blank:]]$hostname $cid" "--network pasta adds correct hostname"
#  756|   	# FIXME we need pasta 20240814 or newer in the VMs to enable this
#  757|   	# assert "$output" =~ "169.254.1.2[[:blank:]]host.containers.internal" "--network pasta adds correct internal entry"

Error: SHELLCHECK_WARNING (CWE-398):
/usr/share/buildah/test/system/run.bats:762:23: error[SC1087]: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
#  760|   	echo -e "[network]\ndefault_rootless_network_cmd = \"pasta\"" > ${TEST_SCRATCH_DIR}/containers.conf
#  761|   	CONTAINERS_CONF_OVERRIDE=${TEST_SCRATCH_DIR}/containers.conf run_buildah run --hostname $hostname $cid cat /etc/hosts
#  762|-> 	assert "$output" =~ "$ip[[:blank:]]$hostname $cid" "default_rootless_network_cmd = \"pasta\" works"
#  763|   
#  764|   	# resolv.conf checks

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/buildah/test/system/run.bats:944:9: warning[SC2154]: test is referenced but not assigned (for output from commands, use "$(test ...)" ).
#  942|   	skip_if_root_environment
#  943|   	if test "$DBUS_SESSION_BUS_ADDRESS" = ""; then
#  944|-> 		skip "$test does not work when DBUS_SESSION_BUS_ADDRESS is not defined"
#  945|   	fi
#  946|   	_prefetch alpine

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/run.bats:1012:22: warning[SC2046]: Quote this to prevent word splitting.
# 1010|     cname="$output"
# 1011|     run_buildah run "$cname" hostname
# 1012|->   assert "$output" = $(cut -c1-12 < ${TEST_SCRATCH_DIR}/cid)
# 1013|     CONTAINERS_CONF=${TEST_SCRATCH_DIR}/containers.conf run_buildah run "$cname" hostname
# 1014|     expect_output "$sanitizedname"

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/run.bats:1020:11: warning[SC2046]: Quote this to prevent word splitting.
# 1018|   
# 1019|   @test "root fs only mounted once" {
# 1020|->   if test `uname` != Linux ; then
# 1021|       skip "not meaningful except on Linux"
# 1022|     fi

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/run.bats:1036:10: warning[SC2046]: Quote this to prevent word splitting.
# 1034|     echo "# mountinfo count:"
# 1035|     cat ${TEST_SCRATCH_DIR}/mountinfo3
# 1036|->   assert $(cat ${TEST_SCRATCH_DIR}/mountinfo3) -eq 1
# 1037|   }

Error: SHELLCHECK_WARNING (CWE-277):
/usr/share/buildah/test/system/sign.bats:11:12: warning[SC2174]: When used with -p, -m only applies to the deepest directory.
#    9|   
#   10|     export GNUPGHOME=${TEST_SCRATCH_DIR}/.gnupg
#   11|->   mkdir -p --mode=0700 $GNUPGHOME
#   12|   
#   13|     # gpg on f30 and above needs this, otherwise:

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/sign.bats:53:3: error[SC2314]: In Bats, ! does not cause a test failure. Use 'run ! ' (on Bats >= 1.5.0) instead.
#   51|     run_buildah push $WITH_POLICY_JSON --remove-signatures signed-alpine-image dir:${TEST_SCRATCH_DIR}/unsigned-image
#   52|     ls -l ${TEST_SCRATCH_DIR}/unsigned-image/
#   53|->   ! test -s ${TEST_SCRATCH_DIR}/unsigned-image/signature-1
#   54|   
#   55|     run_buildah commit $WITH_POLICY_JSON $cid unsigned-alpine-image

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/sign.bats:69:3: error[SC2314]: In Bats, ! does not cause a test failure. Use 'run ! ' (on Bats >= 1.5.0) instead.
#   67|     run_buildah push $WITH_POLICY_JSON "$imageID" dir:${TEST_SCRATCH_DIR}/unsigned-image
#   68|     ls -l ${TEST_SCRATCH_DIR}/unsigned-image/
#   69|->   ! test -s ${TEST_SCRATCH_DIR}/unsigned-image/signature-1
#   70|   
#   71|     # Build a manifest list and try to push the list with signatures.

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_authentication.sh:139:16: warning[SC2046]: Quote this to prevent word splitting.
#  137|   ########
#  138|   buildah rm $ctrid
#  139|-> buildah rmi -f $(buildah images -q)
#  140|   
#  141|   ########

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_authentication.sh:205:16: warning[SC2046]: Quote this to prevent word splitting.
#  203|   ########
#  204|   buildah rm --all
#  205|-> buildah rmi -f $(buildah images -q)
#  206|   
#  207|   ########

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_authentication.sh:235:14: warning[SC2046]: Quote this to prevent word splitting.
#  233|   rm -f ./Dockerfile
#  234|   rm -rf ${TESTDIR}/auth
#  235|-> docker rm -f $(docker ps --all -q)
#  236|   docker rmi -f $(docker images -q)
#  237|   buildah rm $(buildah containers -q)

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_authentication.sh:236:15: warning[SC2046]: Quote this to prevent word splitting.
#  234|   rm -rf ${TESTDIR}/auth
#  235|   docker rm -f $(docker ps --all -q)
#  236|-> docker rmi -f $(docker images -q)
#  237|   buildah rm $(buildah containers -q)
#  238|   buildah rmi -f $(buildah images -q)

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_authentication.sh:237:12: warning[SC2046]: Quote this to prevent word splitting.
#  235|   docker rm -f $(docker ps --all -q)
#  236|   docker rmi -f $(docker images -q)
#  237|-> buildah rm $(buildah containers -q)
#  238|   buildah rmi -f $(buildah images -q)

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_authentication.sh:238:16: warning[SC2046]: Quote this to prevent word splitting.
#  236|   docker rmi -f $(docker images -q)
#  237|   buildah rm $(buildah containers -q)
#  238|-> buildah rmi -f $(buildah images -q)

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/test_buildah_build_rpm.sh:32:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   30|   # Clone buildah from GitHub.com
#   31|   ########
#   32|-> cd $SBOX
#   33|   git clone https://github.com/containers/buildah.git
#   34|   cd $GITROOT

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/test_buildah_build_rpm.sh:34:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   32|   cd $SBOX
#   33|   git clone https://github.com/containers/buildah.git
#   34|-> cd $GITROOT
#   35|   
#   36|   ########

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_build_rpm.sh:102:12: warning[SC2046]: Quote this to prevent word splitting.
#  100|   # Clean up Buildah
#  101|   ########
#  102|-> buildah rm $(buildah containers -q)
#  103|   buildah rmi -f $(buildah images -q)
#  104|   

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_build_rpm.sh:103:16: warning[SC2046]: Quote this to prevent word splitting.
#  101|   ########
#  102|   buildah rm $(buildah containers -q)
#  103|-> buildah rmi -f $(buildah images -q)
#  104|   
#  105|   ########

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_build_rpm.sh:122:12: warning[SC2046]: Quote this to prevent word splitting.
#  120|   rm -rf ${SBOX}
#  121|   rm -rf ${PACKAGES}
#  122|-> buildah rm $(buildah containers -q)
#  123|   buildah rmi -f $(buildah images -q)
#  124|   ${PACKAGER} remove -y buildah

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_buildah_build_rpm.sh:123:16: warning[SC2046]: Quote this to prevent word splitting.
#  121|   rm -rf ${PACKAGES}
#  122|   buildah rm $(buildah containers -q)
#  123|-> buildah rmi -f $(buildah images -q)
#  124|   ${PACKAGER} remove -y buildah

Error: SHELLCHECK_WARNING (CWE-670):
/usr/share/buildah/test/system/test_runner.sh:4:31: warning[SC2128]: Expanding an array without an index only gives the first element.
#    2|   set -e
#    3|   
#    4|-> cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
#    5|   
#    6|   # Default to using /tmp for test space.

Error: SHELLCHECK_WARNING (CWE-138):
/usr/share/buildah/test/system/test_runner.sh:10:15: error[SC2145]: Argument mixes string and array. Use * or separate argument.
#    8|   
#    9|   function execute() {
#   10|-> 	>&2 echo "++ $@"
#   11|   	eval "$@"
#   12|   }

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/test_runner.sh:11:8: warning[SC2294]: eval negates the benefit of arrays. Drop eval to preserve whitespace/symbols (or eval as string).
#    9|   function execute() {
#   10|   	>&2 echo "++ $@"
#   11|-> 	eval "$@"
#   12|   }
#   13|   

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/test_runner.sh:15:22: warning[SC2046]: Quote this to prevent word splitting.
#   13|   
#   14|   # Run the tests.
#   15|-> execute time bats -j $(nproc) --tap "${@:-.}"

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/github.com/golangci/misspell/install-misspell.sh:338:1: warning[SC2034]: PROJECT_NAME appears unused. Verify use (or export if used externally).
#  336|   EOF
#  337|   
#  338|-> PROJECT_NAME="misspell"
#  339|   OWNER=golangci
#  340|   REPO="misspell"

Error: SHELLCHECK_WARNING (CWE-829):
/usr/share/buildah/test/system/tools/vendor/github.com/pelletier/go-toml/benchmark.sh:8:6: warning[SC2092]: Remove backticks to avoid executing output (or use eval if intentional).
#    6|   reference_git=${2:-.}
#    7|   
#    8|-> if ! `hash benchstat 2>/dev/null`; then
#    9|       echo "Installing benchstat"
#   10|       go get golang.org/x/perf/cmd/benchstat

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/tools/vendor/github.com/pelletier/go-toml/v2/ci.sh:78:5: warning[SC2164]: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.
#   76|       fi
#   77|   
#   78|->     pushd "$dir"
#   79|       go test -covermode=atomic  -coverpkg=./... -coverprofile=coverage.out.tmp ./...
#   80|       grep -Ev '(fuzz|testsuite|tomltestgen|gotoml-test-decoder|gotoml-test-encoder)' coverage.out.tmp > coverage.out

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/tools/vendor/github.com/pelletier/go-toml/v2/ci.sh:83:5: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#   81|       go tool cover -func=coverage.out
#   82|       echo "Coverage profile for ${branch}: ${dir}/coverage.out" >&2
#   83|->     popd
#   84|   
#   85|       if [ "${branch}" != "HEAD" ]; then

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/tools/vendor/github.com/pelletier/go-toml/v2/ci.sh:147:5: warning[SC2164]: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.
#  145|       fi
#  146|   
#  147|->     pushd "$dir"
#  148|   
#  149|       if [ "${replace}" != "" ]; then

Error: SHELLCHECK_WARNING (CWE-252):
/usr/share/buildah/test/system/tools/vendor/github.com/pelletier/go-toml/v2/ci.sh:156:5: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#  154|       export GOMAXPROCS=2
#  155|       go test '-bench=^Benchmark(Un)?[mM]arshal' -count=10 -run=Nothing ./... | tee "${out}"
#  156|->     popd
#  157|   
#  158|       if [ "${branch}" != "HEAD" ]; then

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/tools/vendor/github.com/pelletier/go-toml/v2/ci.sh:277:23: warning[SC2046]: Quote this to prevent word splitting.
#  275|       esac
#  276|   
#  277|->     bench "${1-HEAD}" `mktemp`
#  278|   }
#  279|   

Error: SHELLCHECK_WARNING (CWE-88):
/usr/share/buildah/test/system/tools/vendor/github.com/pelletier/go-toml/v2/ci.sh:281:31: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#  279|   
#  280|   case "$1" in
#  281|->     coverage) shift; coverage $@;;
#  282|       benchmark) shift; benchmark $@;;
#  283|       *) usage "bad argument $1";;

Error: SHELLCHECK_WARNING (CWE-88):
/usr/share/buildah/test/system/tools/vendor/github.com/pelletier/go-toml/v2/ci.sh:282:33: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#  280|   case "$1" in
#  281|       coverage) shift; coverage $@;;
#  282|->     benchmark) shift; benchmark $@;;
#  283|       *) usage "bad argument $1";;
#  284|   esac

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/tools/vendor/github.com/securego/gosec/v2/entrypoint.sh:11:12: warning[SC2048]: Use "${array[@]}" (with quotes) to prevent whitespace problems.
#    9|   fi
#   10|   
#   11|-> /bin/gosec ${ARGS[*]}

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/github.com/securego/gosec/v2/install.sh:340:1: warning[SC2034]: BINARY appears unused. Verify use (or export if used externally).
#  338|   OWNER=securego
#  339|   REPO="gosec"
#  340|-> BINARY=gosec
#  341|   FORMAT=tar.gz
#  342|   OS=$(uname_os)

Error: SHELLCHECK_WARNING:
/usr/share/buildah/test/system/tools/vendor/github.com/securego/gosec/v2/perf-diff.sh:34:7: warning[SC1014]: Use 'if cmd; then ..' to check exit code, or 'if [[ $(cmd) == .. ]]' to check output.
#   32|   # Compute the difference of the execution time.
#   33|   diff=$(($duration - $duration_master))
#   34|-> if [[ diff -lt 0 ]]; then
#   35|     diff=$(($diff * -1))
#   36|   fi

Error: SHELLCHECK_WARNING (CWE-156):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkall.sh:53:47: warning[SC2046]: Quote this to prevent word splitting.
#   51|   	# Files generated through docker (use $cmd so you can Ctl-C the build or run)
#   52|   	$cmd docker build --tag generate:$GOOS $GOOS
#   53|-> 	$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS
#   54|   	exit
#   55|   fi

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkall.sh:59:1: warning[SC2221]: This pattern always overrides a later one on line 59.
#   57|   GOOSARCH_in=syscall_$GOOSARCH.go
#   58|   case "$GOOSARCH" in
#   59|-> _* | *_ | _)
#   60|   	echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
#   61|   	exit 1

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkall.sh:59:6: warning[SC2221]: This pattern always overrides a later one on line 59.
#   57|   GOOSARCH_in=syscall_$GOOSARCH.go
#   58|   case "$GOOSARCH" in
#   59|-> _* | *_ | _)
#   60|   	echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
#   61|   	exit 1

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkall.sh:59:11: warning[SC2222]: This pattern never matches because of a previous pattern on line 59.
#   57|   GOOSARCH_in=syscall_$GOOSARCH.go
#   58|   case "$GOOSARCH" in
#   59|-> _* | *_ | _)
#   60|   	echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
#   61|   	exit 1

Error: SHELLCHECK_WARNING (CWE-149):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkall.sh:234:125: warning[SC2027]: The surrounding quotes actually unquote this. Remove or escape them.
#  232|   			if [ "$GOOSARCH" == "aix_ppc64" ]; then
#  233|   				# aix/ppc64 script generates files instead of writing to stdin.
#  234|-> 				echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
#  235|   			elif [ "$GOOS" == "illumos" ]; then
#  236|   			        # illumos code generation requires a --illumos switch

Error: SHELLCHECK_WARNING (CWE-149):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkall.sh:234:167: warning[SC2027]: The surrounding quotes actually unquote this. Remove or escape them.
#  232|   			if [ "$GOOSARCH" == "aix_ppc64" ]; then
#  233|   				# aix/ppc64 script generates files instead of writing to stdin.
#  234|-> 				echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
#  235|   			elif [ "$GOOS" == "illumos" ]; then
#  236|   			        # illumos code generation requires a --illumos switch

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:37:1: warning[SC2034]: uname appears unused. Verify use (or export if used externally).
#   35|   fi
#   36|   
#   37|-> uname=$(uname)
#   38|   
#   39|   includes_AIX='

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:39:1: warning[SC2034]: includes_AIX appears unused. Verify use (or export if used externally).
#   37|   uname=$(uname)
#   38|   
#   39|-> includes_AIX='
#   40|   #include <net/if.h>
#   41|   #include <net/netopt.h>

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:55:1: warning[SC2034]: includes_Darwin appears unused. Verify use (or export if used externally).
#   53|   '
#   54|   
#   55|-> includes_Darwin='
#   56|   #define _DARWIN_C_SOURCE
#   57|   #define KERNEL 1

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:93:1: warning[SC2034]: includes_DragonFly appears unused. Verify use (or export if used externally).
#   91|   '
#   92|   
#   93|-> includes_DragonFly='
#   94|   #include <sys/types.h>
#   95|   #include <sys/event.h>

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:116:1: warning[SC2034]: includes_FreeBSD appears unused. Verify use (or export if used externally).
#  114|   '
#  115|   
#  116|-> includes_FreeBSD='
#  117|   #include <sys/capsicum.h>
#  118|   #include <sys/param.h>

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:153:1: warning[SC2034]: includes_Linux appears unused. Verify use (or export if used externally).
#  151|   '
#  152|   
#  153|-> includes_Linux='
#  154|   #define _LARGEFILE_SOURCE
#  155|   #define _LARGEFILE64_SOURCE

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:343:1: warning[SC2034]: includes_NetBSD appears unused. Verify use (or export if used externally).
#  341|   '
#  342|   
#  343|-> includes_NetBSD='
#  344|   #include <sys/types.h>
#  345|   #include <sys/param.h>

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:372:1: warning[SC2034]: includes_OpenBSD appears unused. Verify use (or export if used externally).
#  370|   '
#  371|   
#  372|-> includes_OpenBSD='
#  373|   #include <sys/types.h>
#  374|   #include <sys/param.h>

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:413:1: warning[SC2034]: includes_SunOS appears unused. Verify use (or export if used externally).
#  411|   '
#  412|   
#  413|-> includes_SunOS='
#  414|   #include <limits.h>
#  415|   #include <sys/types.h>

Error: SHELLCHECK_WARNING (CWE-569):
/usr/share/buildah/test/system/tools/vendor/golang.org/x/sys/unix/mkerrors.sh:454:9: warning[SC2124]: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
#  452|   #include <time.h>
#  453|   '
#  454|-> ccflags="$@"
#  455|   
#  456|   # Write go tool cgo -godefs input.

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/tutorial.bats:18:2: error[SC2314]: In Bats, ! does not cause a test failure. Use 'run ! ' (on Bats >= 1.5.0) instead.
#   16|   	echo "build output:"
#   17|   	echo "${output}"
#   18|-> 	! grep -q init.scope <<< "$buildoutput"
#   19|   	run sed -e '0,/^CUT START/d' -e '/^CUT END/,//d' <<< "$buildoutput"
#   20|   	# should've found a /sys/fs/cgroup with stuff in it

Error: SHELLCHECK_WARNING (CWE-153):
/usr/share/buildah/test/system/validate/pr-should-include-tests.t:63:25: warning[SC2053]: Quote the right-hand side of != in [[ ]] to prevent glob matching.
#   61|       local actual_rc=$?
#   62|   
#   63|->     if [[ $actual_rc != $expected_rc ]]; then
#   64|           echo "not ok $testnum $testname"
#   65|           echo "#  expected rc $expected_rc"

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/buildah/test/system/validate/pr-should-include-tests.t:120:12: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  118|       export GITVALIDATE_EPOCH=$parent_sha
#  119|       export CIRRUS_CHANGE_IN_REPO=$commit_sha
#  120|->     export CIRRUS_CHANGE_TITLE=$(git log -1 --format=%s $commit_sha)
#  121|       export CIRRUS_CHANGE_MESSAGE=
#  122|       export CIRRUS_PR=$pr

Error: GCC_ANALYZER_WARNING (CWE-775):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c:118:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(list, 0)’
#  116|   		new_size = used + BUFSTEP;
#  117|   		new_buf = realloc(buf, new_size);
#  118|-> 		if (new_buf == NULL) {
#  119|   			free(buf);
#  120|   			fprintf(stderr, "realloc(%ld): out of memory\n", (long)(size + BUFSTEP));

Error: GCC_ANALYZER_WARNING (CWE-775):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c:125:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(list, 0)’
#  123|   		buf = new_buf;
#  124|   		size = new_size;
#  125|-> 		memset(buf + used, '\0', size - used);
#  126|   		n = read(fd, buf + used, size - used - 1);
#  127|   		if (n < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c:125:28: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_proc_stringlist("/proc/self/cmdline")’
#  123|   		buf = new_buf;
#  124|   		size = new_size;
#  125|-> 		memset(buf + used, '\0', size - used);
#  126|   		n = read(fd, buf + used, size - used - 1);
#  127|   		if (n < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c:128:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
#  126|   		n = read(fd, buf + used, size - used - 1);
#  127|   		if (n < 0) {
#  128|-> 			fprintf(stderr, "read(): %m\n");
#  129|   			return NULL;
#  130|   		}

Error: GCC_ANALYZER_WARNING (CWE-401):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c:128:25: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’
#  126|   		n = read(fd, buf + used, size - used - 1);
#  127|   		if (n < 0) {
#  128|-> 			fprintf(stderr, "read(): %m\n");
#  129|   			return NULL;
#  130|   		}

Error: GCC_ANALYZER_WARNING (CWE-401):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c:154:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
#  152|   		}
#  153|   	}
#  154|-> 	ret[i] = NULL;
#  155|   	return ret;
#  156|   }

Error: GCC_ANALYZER_WARNING (CWE-401):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c:154:16: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’
#  152|   		}
#  153|   	}
#  154|-> 	ret[i] = NULL;
#  155|   	return ret;
#  156|   }

Error: GCC_ANALYZER_WARNING (CWE-401):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c:291:12: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_proc_stringlist("/proc/self/cmdline")’
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/containers/storage/pkg/unshare/unshare.c:18: included_from: Included from here.
#  289|   		return fd;
#  290|   
#  291|-> 	if (fexecve(fd, argv, environ) == -1) {
#  292|   		close(fd);
#  293|   		fprintf(stderr, "Error during reexec(...): %m\n");

Error: COMPILER_WARNING (CWE-1164):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/mattn/go-sqlite3/sqlite3.go:85:1: warning[-Wunused-function]: ‘_sqlite3_exec’ defined but not used
#   85 | _sqlite3_exec(sqlite3* db, const char* pcmd, long long* rowid, long long* changes)
#      | ^~~~~~~~~~~~~
#   83|   
#   84|   static int
#   85|-> _sqlite3_exec(sqlite3* db, const char* pcmd, long long* rowid, long long* changes)
#   86|   {
#   87|     int rv = sqlite3_exec(db, pcmd, 0, 0, 0);

Error: CPPCHECK_WARNING (CWE-476):
buildah-1.39.0-build/buildah-1.39.0/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):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function 'New'
buildah-1.39.0-build/buildah-1.39.0/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):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘New’
buildah-1.39.0-build/buildah-1.39.0/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):
buildah-1.39.0-build/buildah-1.39.0/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):
buildah-1.39.0-build/buildah-1.39.0/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: GCC_ANALYZER_WARNING (CWE-401):
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘GetAttributeValue.part.0’
buildah-1.39.0-build/buildah-1.39.0/vendor/github.com/miekg/pkcs11/pkcs11.go:316:32: warning[-Wanalyzer-malloc-leak]: leak of ‘*((CK_ATTRIBUTE *)temp).pValue’
#  314|   			continue;
#  315|   		}
#  316|-> 		temp[i].pValue = calloc(temp[i].ulValueLen, sizeof(CK_BYTE));
#  317|   	}
#  318|   	return c->sym->C_GetAttributeValue(session, object, temp, templen);