Skip to content

fix(security): remove insecure self-update from cli.sh scripts [DEVA11Y-475]#16

Open
sunny-se wants to merge 1 commit into
mainfrom
fix/DEVA11Y-475-remove-cli-self-update
Open

fix(security): remove insecure self-update from cli.sh scripts [DEVA11Y-475]#16
sunny-se wants to merge 1 commit into
mainfrom
fix/DEVA11Y-475-remove-cli-self-update

Conversation

@sunny-se
Copy link
Copy Markdown
Collaborator

@sunny-se sunny-se commented May 26, 2026

Summary

  • Removes script_self_update() function and its invocation from all 3 CLI scripts
  • scripts/bash/cli.sh — removed function (lines 81-88) and call (line 95)
  • scripts/zsh/cli.sh — removed function (lines 92-98) and call (line 106)
  • scripts/fish/cli.sh — removed function (lines 93-99) and call (line 107)

Why: script_self_update() fetched the script from a mutable branch head (refs/heads/main) via curl with no integrity verification (CWE-494). The only guard was a ^#! regex — trivially bypassed by any attacker who controls the response. This ran unconditionally before any subcommand, making it a silent supply-chain vector.

Users should update scripts via git pull or their package manager.

Verification

grep -r "script_self_update" scripts/*/cli.sh
# returns nothing

Jira

DEVA11Y-475 — F-003

🤖 Generated with Claude Code

F-003 / DEVA11Y-475 — script_self_update() fetched the script from
a mutable branch head with no integrity verification (CWE-494).
The ^#! regex check is trivially bypassed. Remove self-update
entirely; users should update via git pull or package manager.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sunny-se sunny-se requested a review from a team as a code owner May 26, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant