brew: pin cask signers; verify before install
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start by reading install/brew, the Brewfiles it uses, and the existing install scripts; check the installed apps in /Applications to confirm each vendor's Team ID before adding pins to install/brew.d/signers. Implement the checks described for install/verify-casks and integrate them into install/brew. Done means every Brewfile cask is pinned or refused, a one-character-wrong pin fails --before, and unverified apps are never copied into /Applications.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A cask is a URL and a hash. The hash proves the bytes did not change.
It does not prove who made them. Apple code signing does.
Every Developer ID app carries a Team ID. Pin one Team ID per cask.
Check the pin before the app reaches /Applications.
Files
install/brew.d/signers holds the pins. One cask per line:
# <cask> <Team ID> # vendor
slack BQR82RBBHL # Slack Technologies
1password 2BUA8C4S2C # AgileBits Inc.
The Team IDs for the casks installed today come from the copies in
/Applications. That is trust on first use. Check each vendor name.
install/verify-casks checks the pins. It has three modes:
--before <Brewfile>: fetch each cask not yet installed. Unpack it
in a temp directory. Verify it there. Install nothing.--installed <Brewfile>: verify the apps in /Applications.--record <cask>: print the signer of an installed app. Ask.
Append a pin.
The check
One requirement does most of the work:
anchor apple generic
and certificate 1[field.1.2.840.113635.100.6.2.6] exists
and certificate leaf[field.1.2.840.113635.100.6.1.13] exists
and certificate leaf[subject.OU] = "<Team ID>"
It requires an Apple root, a Developer ID intermediate, a Developer ID
Application leaf, and the pinned team. Pass it to codesign --verify --deep --strict -R=. Then run spctl --assess --type execute to require
notarization.
In install/brew
verify-casks --before "$BREWFILE" || exit 1
brew bundle --verbose --file="$BREWFILE"
verify-casks --installed "$BREWFILE"
A cask with no pin is refused. To trust a new vendor, add one line to
signers. The diff is the review.
Details
codexis a bare binary in /opt/homebrew/bin. Gatekeeper cannot assess
it. Run the codesign check only.google-chromeusessha256 :no_check. Brew may download it again at
install time. Then the verified file and the installed file can differ.
Find out. If so, install Chrome from the verified copy.- A
.pkgcask needspkgutil --check-signature. None exist in the
desktop set today. - The four hand-installed apps (Brave, Chrome, Slack, 1Password) need
brew install --cask --adoptfirst. - Pass
--no-upgradetobrew bundle. The apps update themselves.
Done when
- Each cask in each Brewfile has a pin, or the install refuses it.
- A cask signed by the wrong team fails
--before. Test with a pin
changed by one character. - Nothing unverified is copied into /Applications.
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của indexzero/dotfiles
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
Tất cả issue của indexzero/dotfiles
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Frogging-Family/linux-tkg#1265 ·
-
False AMD GPU DetectionĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
community-scripts/core#217 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
known-red S3: friction & debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MedakaLang/medaka#4969 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement needs:sonnet ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày