Skip to content

ci: replace pull_request_target fork CI with rotating public token - #4298

Open
mfazekas wants to merge 2 commits into
mainfrom
claude/fork-ci-setup-failure-ef8f9f
Open

ci: replace pull_request_target fork CI with rotating public token#4298
mfazekas wants to merge 2 commits into
mainfrom
claude/fork-ci-setup-failure-ef8f9f

Conversation

@mfazekas

Copy link
Copy Markdown
Contributor

Description

actions/checkout v4.4.0+ refuses to check out fork PR code from pull_request_target workflows (pwn-request hardening), which broke ci-for-forked-repos.yml. Rather than opting into the unsafe checkout, this removes that workflow entirely.

Fork PRs now run the native builds through the regular pull_request trigger in on-push.yml, like any other CI job. They get no repo secrets, so MAPBOX_ACCESS_TOKEN falls back to a token fetched and decoded via scripts/ci/fetch-mapbox-token.sh from rnmapbox/ci-config. That token is public by design (any fork PR could print whatever token CI uses anyway); the obfuscation only keeps it out of secret scanners, and the real defense is automatic rotation twice a week plus minimal read-only scopes. See the ci-config README for the full design.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder — N/A, CI workflow change only
  • I have tested the new feature on /example app. — N/A, CI infra change; verified via live GitHub Actions runs of the rotate workflow and the fetch script against the published token
  • I added/updated a sample - if a new feature was implemented (/example) — N/A

Screenshot OR Video

N/A — CI configuration change, no UI impact.

Component to reproduce the issue you're fixing

N/A — not a bug fix; see linked ci-config repo for the rotation design.

mfazekas added 2 commits July 22, 2026 19:33
…tated token

actions/checkout v4.4.0+ refuses to check out fork PR code from
pull_request_target workflows (pwn-request hardening). Instead of opting
into the unsafe checkout, drop the privileged fork workflow entirely:
fork PRs now run the regular pull_request CI, falling back to a public
rotatable Mapbox token fetched from rnmapbox/ci-config when secrets are
unavailable. The Mapbox SDK download no longer requires a secret token,
so the only token needed is the semi-public runtime access token.
…pbox/ci-config

The token is public by design (any fork PR could print it); obfuscation
only keeps it out of secret scanners. Rotation 2x/week in ci-config is
the actual defense. Obfuscation key is versioned (v1) so it can be
rotated by bumping the URL/key in scripts/ci/fetch-mapbox-token.sh.
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