bootstrap: install Homebrew from its signed pkg

Abierto
#68 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
markdown, shell
Área
cli, security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Shell
Estrellas
1
Forks
0
Merge medio
9 h 5 min
PR fusionados (30 d)
5

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de indexzero/dotfiles

Todos los issues de indexzero/dotfiles

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.