Skip to content

fix(security): use HTTPS for binary download in shell scripts [DEVA11Y-474]#13

Merged
Crash0v3rrid3 merged 2 commits into
mainfrom
fix/DEVA11Y-474-https-shell-download
May 27, 2026
Merged

fix(security): use HTTPS for binary download in shell scripts [DEVA11Y-474]#13
Crash0v3rrid3 merged 2 commits into
mainfrom
fix/DEVA11Y-474-https-shell-download

Conversation

@sunny-se
Copy link
Copy Markdown
Collaborator

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

Summary

  • DEVA11Y-474 / F-002 — All three cli.sh shell variants (bash, zsh, fish) downloaded the CLI binary via plaintext http://, exposing users to MitM binary substitution (CWE-319).
  • Switched the curl download URL from http:// to https:// in the download_binary() function of each script.

Files changed

  • scripts/bash/cli.sh (line 91)
  • scripts/zsh/cli.sh (line 102)
  • scripts/fish/cli.sh (line 103)

Verification

# Should return zero matches:
grep -r 'http://api.browserstack.com' scripts/

Jira

DEVA11Y-474

🤖 Generated with Claude Code

F-002 / DEVA11Y-474 — All three cli.sh variants (bash, zsh, fish)
downloaded the CLI binary over plaintext HTTP (CWE-319), enabling
MitM binary substitution. Switch to HTTPS.

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:58
@Crash0v3rrid3 Crash0v3rrid3 merged commit 9993b99 into main May 27, 2026
4 checks passed
sunny-se added a commit that referenced this pull request May 27, 2026
Instead of removing script_self_update() entirely, restore it with
hardening: HTTPS-only fetch (pairs with PR #13) + SHA-256 checksum
verification against a .sha256 sidecar file. Silently skips update
if checksum fetch fails or hash mismatch — never overwrites with
unverified content.

Requires publishing .sha256 sidecar files alongside each script.

DEVA11Y-475

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants