Location: install.sh:242-253.
Kind: insecure temp file / symlink following.
Impact: SETUP_ERR="${TMPDIR:-/tmp}/insta-setup-err.$$" is pid-derived, not random, and 2>"$SETUP_ERR" follows symlinks. A local attacker who pre-creates /tmp/insta-setup-err.<pid> as a symlink to a file the installing user owns (~/.bashrc, ~/.ssh/authorized_keys) gets it truncated and filled with setup agent stderr. agents-staging.sh:33-34 already uses mktemp + trap for the same purpose.
Evidence:
SETUP_ERR="${TMPDIR:-/tmp}/insta-setup-err.$$"
if "$INSTALL_DIR/$BIN" setup agent $YFLAG $SETUP_ENV_ARGS 2>"$SETUP_ERR"; then
Fix would touch: install.sh only: SETUP_ERR="$(mktemp)" and trap 'rm -f "$SETUP_ERR"' EXIT.
Found by Yun Tianming: nightly sweep 2026-09-17-1000 at ecfe5168a32e. Report only; no code was changed for this finding.
🤖 Generated with Claude Code
Location:
install.sh:242-253.Kind: insecure temp file / symlink following.
Impact:
SETUP_ERR="${TMPDIR:-/tmp}/insta-setup-err.$$"is pid-derived, not random, and2>"$SETUP_ERR"follows symlinks. A local attacker who pre-creates/tmp/insta-setup-err.<pid>as a symlink to a file the installing user owns (~/.bashrc,~/.ssh/authorized_keys) gets it truncated and filled withsetup agentstderr.agents-staging.sh:33-34already usesmktemp+trapfor the same purpose.Evidence:
Fix would touch:
install.shonly:SETUP_ERR="$(mktemp)"andtrap 'rm -f "$SETUP_ERR"' EXIT.Found by Yun Tianming: nightly sweep
2026-09-17-1000atecfe5168a32e. Report only; no code was changed for this finding.🤖 Generated with Claude Code