bootstrap: install Homebrew from its signed pkg

Đang mở
#68 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
markdown, shell
Lĩnh vực
cli, security

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Shell
Star
1
Fork
0
Merge trung bình
9 giờ 5 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của indexzero/dotfiles

Tất cả issue của indexzero/dotfiles

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.