test: mutations for the claude script, desktop key and go channel

Piping the Claude Code installer into bash, placing the Claude Desktop key
unverified, and running the go channel before go is unpacked. The unit suite
kills all three.
This commit is contained in:
bcherb2 committed 2026-11-18 02:01:01 -05:00
1 parent 01f77bceaa
commit 6fa7603633
3 files changed
+33

No files matched your search

@@ -0,0 +1,11 @@
# what: Claude Code's installer piped straight into bash instead of downloaded and checked
# why: no pipefail: a 404 or truncated body runs AND reports success
# kills: …checks it arrived non-empty
# run: unit
<<<OLD
run_sh "curl -fsSL https://claude.ai/install.sh -o '$WORKDIR/claude-install.sh' && [ -s '$WORKDIR/claude-install.sh' ]" \
|| { note_fail "$key" "the Claude Code install script download failed or arrived empty"; continue; }
run_sh "bash '$WORKDIR/claude-install.sh'" \
<<<NEW
run_sh "curl -fsSL https://claude.ai/install.sh | bash" \
<<<END
@@ -0,0 +1,10 @@
# what: the Claude Desktop signing key is placed without checking its fingerprint
# why: apt would trust whatever key arrived for packages it installs as root
# kills: a key with the wrong fingerprint is refused
# run: unit
<<<OLD
[ "$cd_fpr" = "$CLAUDE_DESKTOP_FPR" ] || {
note_fail "$key" "signing key fingerprint is not Anthropic's — refusing to trust it"; continue; }
<<<NEW
: "$cd_fpr"
<<<END
@@ -0,0 +1,12 @@
# what: the go channel runs before the tarball channel that unpacks go
# why: every go install on a fresh box would be "go: not found"
# kills: the go tarball is unpacked before any go install
# run: unit
<<<OLD
install_brew "$(col brew) $BREW_EXTRA"
install_bespoke tarball "$(keys tarball)"
<<<NEW
install_brew "$(col brew) $BREW_EXTRA"
install_bespoke go "$(keys go)"
install_bespoke tarball "$(keys tarball)"
<<<END