Skip to content

Fix: [CI] Use unprivileged env to build website#69

Open
glx22 wants to merge 1 commit intoOpenTTD:mainfrom
glx22:safe_publish
Open

Fix: [CI] Use unprivileged env to build website#69
glx22 wants to merge 1 commit intoOpenTTD:mainfrom
glx22:safe_publish

Conversation

@glx22
Copy link
Copy Markdown

@glx22 glx22 commented Apr 22, 2026

There is some nastiness going around on GitHub, where people create a PR which tries to exfil repo secrets. And publish.yml is potentially vulnerable because it's using pull_request_target.

Split build and publish, so build workflow is always done in an unprivileged env.
Build result is then uploaded as artifacts and publish workflow (using workflow_run) can retrieve it to do the actual upload to cloudflare.

Also migrated from cloudflare/pages-action (deprecated) to cloudflare/wrangler-action.

Not really tested, but I did the same thing as for OpenTTD/website.

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