bootstrap: install Homebrew from its signed pkg

Aperta
#68 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
markdown, shell
Ambito
cli, security

Direzione di ricerca

Read install/bootstrap.zsh:168 and install/brew:77 to trace both Homebrew installation paths, and check how the pinned Team ID in signers (#65) is intended to be used. Then review README.md:25 and make the documented bootstrap guidance match the issue. Done means both install paths reject packages signed by another team, no Homebrew curl | bash remains in install/, and the README says where the bootstrap line may come from.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

install/bootstrap.zsh:168 and install/brew:77 install Homebrew this
way:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This runs whatever is on Homebrew's main branch that day. Nothing is
pinned. Nothing is signed. Nothing is checked.

Homebrew also publishes a signed .pkg on its GitHub releases. A signed
package can be checked. A piped script cannot.

Do

  1. Download the .pkg for a pinned release.
  2. Check it with pkgutil --check-signature. Require Homebrew's Team ID.
    Record the Team ID once, by hand, and pin it in signers (#65).
  3. Install it with installer -pkg ... -target /.
  4. Remove the curl | bash line from both files.

If the .pkg does not fit, fall back: pin install.sh to a commit and
check its sha256 before running it.

Why now

ISC SANS diary 32942 describes a fake Homebrew page. A paid search ad
leads to it. The page shows a curl | bash line. The line installs a
stealer. It asks for the password in a popup and uploads what it
collects.

This repo does not take its install line from a search result. That is
the main defense, and it holds. But the bootstrap still teaches the same
habit: paste a curl | zsh line into Terminal (README.md:25).

Add one sentence to the README: type the URL, or clone with git. Never
copy the line from a search result.

Also note: real Homebrew and this bootstrap ask for a password only at
the sudo prompt in Terminal. A password popup means stop.

Done when

  • No curl | bash for Homebrew remains in install/.
  • A .pkg signed by any other team fails the bootstrap.
  • The README says where the bootstrap line may come from.
Lingua principale
Shell
Stelle
1
Fork
0
Merge medio
9h 5m
PR unite (30g)
5

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di indexzero/dotfiles

Tutte le issue di indexzero/dotfiles

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.