talos-devel-1.13.9-alt1.noarch	unsafe-tmp-usage-in-scripts	fail	The test discovered scripts with errors which may be used by a user for damaging important system files. For example if a script uses in its work a temp file which is created in /tmp directory, then every user can create symlinks with the same name (pattern) in this directory in order to destroy or rewrite some system or another user's files. Scripts _must_ _use_ mktemp/tempfile or must use $TMPDIR. mktemp/tempfile is safest. $TMPDIR is safer than /tmp/ because libpam-tmpdir creates a subdirectory of /tmp that is only accessible by that user, and then sets TMPDIR and other variables to that. Hence, it doesn't matter nearly as much if you create a non-random filename, because nobody but you can access it. Found error in /usr/share/gocode/src/github.com/siderolabs/talos/hack/test/e2e-qemu.sh: $ grep /tmp/ /usr/share/gocode/src/github.com/siderolabs/talos/hack/test/e2e-qemu.sh QEMU_FLAGS+=("--image-cache-path=${TMP}/image-cache") QEMU_FLAGS+=("--image-cache-tls-cert-file=${TMP}/image-cache-tls.crt") QEMU_FLAGS+=("--image-cache-tls-key-file=${TMP}/image-cache-tls.key") ;; http-proxy) "${TALOSCTL}" debug-tool air-gapped 172.20.1.1 > /tmp/airgapped.log 2>&1 & sleep 5 # wait for the air-gapped server to start cat air-gapped-patch.yaml mv air-gapped-patch.yaml "${TMP}/air-gapped-patch.yaml" QEMU_FLAGS+=("--config-patch=@${TMP}/air-gapped-patch.yaml") ;; secure-http-proxy) "${TALOSCTL}" debug-tool air-gapped 172.20.1.1 > /tmp/airgapped-secure.log 2>&1 & sleep 5 # wait for the air-gapped server to start cat air-gapped-patch.yaml mv air-gapped-patch.yaml "${TMP}/air-gapped-patch.yaml" QEMU_FLAGS+=("--config-patch=@${TMP}/air-gapped-patch.yaml") ;; https-reverse-proxy) "${TALOSCTL}" debug-tool air-gapped 172.20.1.1 > /tmp/airgapped-reverse-proxy.log 2>&1 & sleep 5 # wait for the air-gapped server to start cat air-gapped-patch.yaml mv air-gapped-patch.yaml "${TMP}/air-gapped-patch.yaml" QEMU_FLAGS+=("--config-patch=@${TMP}/air-gapped-patch.yaml") jobs -p | xargs -r kill "${TALOSCTL}" cluster destroy \ --name "${CLUSTER_NAME}" \ --provisioner "${PROVISIONER}" \ --save-cluster-logs-archive-path="/tmp/logs-${LOG_ARCHIVE_SUFFIX}.tar.gz" \ --save-support-archive-path="/tmp/support-${LOG_ARCHIVE_SUFFIX}.zip" } trap destroy_cluster SIGINT EXIT create_cluster; 
