Skip to content

Pin the Homebrew installer to a commit SHA (dev#99) - #100

Merged
JPDuchesne merged 1 commit into
mainfrom
jpd/99-pin-homebrew-installer
Aug 5, 2026
Merged

Pin the Homebrew installer to a commit SHA (dev#99)#100
JPDuchesne merged 1 commit into
mainfrom
jpd/99-pin-homebrew-installer

Conversation

@JPDuchesne

Copy link
Copy Markdown
Contributor

Summary

Implements the rescoped #99 (part of d3mlabs/plans#5, audit Gap 9).

  • Pin the Homebrew/install fetch in bin/docker-install-build-deps.sh to commit 2417318 (current HEAD, 2026-08-05) instead of the mutable HEAD ref. This is third-party code piped to bash inside every image build; a repointed ref would execute inside images that later run on the box and dev Macs. Homebrew/install publishes no tags, so the pin is a commit SHA — bumped deliberately, and a stale pin fails benign (it still installs current Homebrew).

Deliberately unpinned (the rescope): dev's own fetches. The consumer curl of this script from main is review-gated — org ruleset requires PR + 1 approving review with no force-push/deletion, and the ai-flow bot's bypass was removed — which is the same trust model as ai-flow's @main reusable workflows, and it preserves auto-deploy. The brew install d3mlabs/d3mlabs/dev path already checksums each release tarball via the formula.

Test plan

  • Comment-and-URL change only; set -euo pipefail behavior unchanged
  • Next image build pulls the pinned installer and completes

Made with Cursor

The bootstrap script piped Homebrew/install's HEAD to bash inside every
image build — third-party code on a mutable ref an upstream compromise
could repoint. Pin to the current commit; the repo publishes no tags,
and a stale pin fails benign (it still installs current Homebrew).

dev's own fetches stay unpinned by design: the script curl from main is
review-gated (org ruleset: PR + 1 review, no force-push, bot bypass
removed), and the brew formula already checksums each release tarball.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JPDuchesne
JPDuchesne merged commit d16b757 into main Aug 5, 2026
5 checks passed
@JPDuchesne
JPDuchesne deleted the jpd/99-pin-homebrew-installer branch August 5, 2026 18:06
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.

1 participant