Repository navigation
fix(install): find the latest release without the rate-limited GitHub API - #603
Conversation
… API The installer asked api.github.com for the latest release, which allows 60 anonymous requests an hour per IP, so it failed with a 403 on shared or busy networks. Read the tag from the github.com releases/latest redirect instead, falling back to the API (with GITHUB_TOKEN when set). The progress line now goes to stderr, so it is no longer captured into the version.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94e076b32d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if [ -z "$tag" ]; then | ||
| local auth=() | ||
| if [ -n "${GITHUB_TOKEN:-}" ]; then | ||
| auth=(-H "Authorization: Bearer ${GITHUB_TOKEN}") |
There was a problem hiding this comment.
Keep the token out of curl's process arguments
When GITHUB_TOKEN is set and the redirect lookup falls back to the API, this places the bearer credential directly in curl's argv, where another local user can read it from the process list while the request is running. Curl's security guidance explicitly warns that command-line options are visible through tools such as ps and recommends supplying secrets through -K or stdin instead; pass this header through stdin or a protected temporary file rather than an argument. curl security considerations
Useful? React with 👍 / 👎.
Summary
install.shaskedapi.github.comfor the latest release. GitHub allows 60 anonymous API requests an hour per IP, so on a shared or busy network the installer failed withcurl: (56) ... 403and "Failed to determine the latest release version."https://github.com/linroid/Ketch/releases/latest, which is not under that limit. If that fails, it falls back to the API, sendingGITHUB_TOKENwhen it is set.version="$(resolve_version)"captured it along with the version.KETCH_VERSION.Testing
resolve_versionon its own while the API answered 403 (x-ratelimit-remaining: 0). It returned0.10.0.ketch-cli-0.10.0-macos-arm64.tar.gzanswers 200 at the release download URL the script builds.bash -n install.shpasses.