Repository navigation
Conversation
…trategy cortex's release assets are in a private repository. The tap gains lib/github_private_release_download_strategy.rb, which downloads them through GitHub's release-asset API with HOMEBREW_GITHUB_API_TOKEN: - the token reaches curl only through a 0600 header file (--header @file) that is deleted after use: never on argv, never in a URL; - the release is looked up by tag and the asset by exact name, then fetched with Accept: application/octet-stream; curl does not resend the header after the cross-host redirect to the signed asset URL; - no unauthenticated HEAD probe of the private URL; - it fails before any network call without a token, and refuses to run with HOMEBREW_CURL_VERBOSE or HOMEBREW_CURLRC, which can print request headers. Formula/cortex.rb installs cortex v1.0.0-rc.46 (darwin and musl, both architectures); each sha256 equals GitHub's asset digest. The licence is proprietary, so license :cannot_represent. The README gains cortex's brew and mise lines and the private-tool setup. Refs OPS-1744
Member
Author
|
Superseded by cerebral-work/homebrew-cerebral#4, the canonical tap for cortex now (Christian, 2026-10-24: "homebrew-cerebral; move the release formula there"). #4 carries this PR's private-release download strategy unchanged, cortex at v1.0.0-rc.47 on all four platforms (this PR was rc.46), antikithera v0.3.0, and tap CI that can fail. homebrew-unsigned keeps herdr (and kd). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tap's first private tool: cortex
v1.0.0-rc.46, plus a vendored download strategy for private GitHub release assets. paas reviews and merges. The cortex lane is copied through the advisor.The token is not here and is not needed to review this. Acceptance with the real read-only installer token (
github-installer-readonly) runs separately, once Christian has minted it.Change
lib/github_private_release_download_strategy.rb, aCurlDownloadStrategysubclass:https://github.com/<owner>/<repo>/releases/download/<tag>/<asset>).GET /repos/<owner>/<repo>/releases/tags/<tag>and picks the asset by its exact name. It doesn't uselatest, which skips prereleases.GET /repos/<owner>/<repo>/releases/assets/<id>withAccept: application/octet-stream.HOMEBREW_GITHUB_API_TOKENreaches curl only through a header file:--header @<file>, mode 0600, deleted after use.headers:option would put the value on curl's argv, so it isn't used. A value on argv shows in a process list and in the command line Homebrew prints when curl fails.resolve_url_basename_time_file_sizeis local.HOMEBREW_CURL_VERBOSEorHOMEBREW_CURLRCset, since curl's verbose mode, or options a curlrc can add, print request headers.Formula/cortex.rbcovers darwin and musl, on x86_64 and aarch64.1.0.0-rc.46) is parsed from the URL. An explicitversionwould be redundant, asaudit --strictsays.license :cannot_represent: cortex's LICENSE is proprietary ("All rights reserved").cortex --versioncontainscortex 1.0.0-rc.46. The binary printscortex 1.0.0-rc.46 (f207b86).README.md: cortex's brew line and mise line (mise use github:cerebral-work/cortex@v1.0.0-rc.46).HOMEBREW_GITHUB_API_TOKENfor brew,GITHUB_TOKENfor mise), never on a command line.Proof without the token (pinned
homebrew/brew@sha256:b0072bfd…, Homebrew 4.6.20, curl 7.81.0)HOMEBREW_CURL_VERBOSE=1: install rc 1, "unset HOMEBREW_CURL_VERBOSE and HOMEBREW_CURLRC; they would print the token".brew install --verbose --debugand a loop snapshotting every process's command line:--header @….127.0.0.1tolocalhost. curl given--header @filesent Authorization to the first host only; the redirect target got the Accept header and no Authorization. GitHub's asset redirect is likewise cross-host (API host to the signed asset host).Tempfilecreates the header file 0600.brew style unsigned-gg/unsignedgives 2 files, no offenses.brew audit --strict --tap unsigned-gg/unsignedgives rc 0.Expected red, not a defect
brew audit --onlinewould probe the url and homepage anonymously, and a private repo answers 404.Not yet tested (needs the token)
brew test, and the misegithub:install. The tarball nests the binary under one top-level directory; brew handles that, and mise must findcortexinside it.--env-file, shredded afterwards. The token is never read or printed. A run with the token unset is the negative control.Refs OPS-1744