fix(ci): authenticate setup-beam's api.github.com lookups and correct the rebar3 rationale - #852
Merged
Merged
Conversation
… the rebar3 rationale `elixir-ci-reusable.yml` exposes a `rebar3-version` input that cannot work reliably as shipped. Setting it makes `erlef/setup-beam` resolve the version by listing `erlang/rebar3` releases on api.github.com and downloading the binary from GitHub releases — calls the action leaves unauthenticated unless it receives its own `github-token` input, which this reusable never forwarded and exposed no way to supply. Consumers that set the input therefore fail in the setup step within seconds, before any dependency work. bofig's Elixir CI has been red from 2026-06-24 (the day its pin landed) through 2026-09 for exactly this, across both its reusable wrapper and its legacy local copy. The rationale in the input's description was also stale: builds.hex.pm's chain was verified clean on 2026-09-18 (Let's Encrypt YR1 -> Root YR -> Root X1, with correct Certificate Sign key usage, valid to 2026-11-08), so the `key_usage_mismatch` workaround it documents no longer applies. - add an optional `github-token` input, forwarded to setup-beam - warn (not fail) when `rebar3-version` is set without it: the rate limit is conditional on runner IP reputation, so a hard failure could break a consumer that currently passes - rewrite both input descriptions to state what the input does and what it requires, recording the verification date so the workaround is not re-added from memory - add an Elixir note to CICD-WORKFLOW-CATALOG.md, where authors decide what to adopt No `uses:` change, so actions.lock needs no regeneration. actionlint-clean.
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
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.



What this fixes
elixir-ci-reusable.ymloffers arebar3-versioninput that cannot work reliably as shipped,and documents it with a rationale that no longer applies. Consumers that set that input are pushed
onto unauthenticated
api.github.comcalls (setup-beam resolves the rebar3 version by listingerlang/rebar3releases) which are rate-limited on shared GitHub-hosted runner ranges. The visiblesymptom is a setup-step failure within seconds, before any dependency work.
This is the cause of bofig's Elixir CI outage: the pin was added on 2026-06-24 and every run
since has died at
Set up BEAM (OTP + Elixir)in 4–7 s, across both its wrapper and its legacylocal copy. bofig is fixed separately by removing the pin (rebar3 is not needed there).
The other half of the problem is the documentation: the input is described as "a workaround for the
OTP TLS
key_usage_mismatchcert error on that host" (builds.hex.pm). That host's chain is cleantoday — verified 2026-09-18: Let's Encrypt
YR1→Root YR→Root X1, correctCertificate Signkey usage, valid to 2026-11-08. So the estate is steering consumers into a trap with a stale reason.
Changes
.github/workflows/elixir-ci-reusable.ymlgithub-tokeninput (default"") forwarded toerlef/setup-beam, so a consumerwith a genuine rebar-based dependency can authenticate the lookup;
::warning::whenrebar3-versionis set withoutgithub-token—warning, not failure, because whether the unauthenticated call is rate-limited depends on runner
IP reputation, so hard-failing could break a consumer that is currently passing;
it; it makes setup-beam use GitHub instead of
mix local.rebar; it therefore requires the token),and records the 2026-09-18 verification date so the stale workaround is not re-added from memory.
CICD-WORKFLOW-CATALOG.mdto adopt. Without it, the next repo re-adopts the same trap from documentation alone.
Compatibility and verification
to older SHAs see no change at all.
permissions:change — a reusable must never widen the caller's permissions; an un-grantedpermission aborts the run as
startup_failurewith zero jobs (as the file's own comments record).uses:change, soactions.lockneeds no regeneration. Verified: the lock entry for thisworkflow and the file's real action refs are identical before and after.
actionlintv1.7.7: clean on the modified file. (It did catch one real error duringdevelopment — a
secretsexpression in an input description — which is fixed.)scripts/check-workflow-duplicate-keys.sh: 52 workflows clean.I did not add an estate gate or a
KNOWN_BAD_BEFOREentry: this defect only bites consumers thatset the input (one repo today), and the staleness checker's own header documents why fleet-wide reds
for conditional defects are a false-positive treadmill. The runtime warning is the proportionate guard.