Skip to content

fix: isolate bundle rebuilds from the app token - #187

Merged
fengmk2 merged 1 commit into
mainfrom
fix/rebuild-bundle-token-isolation
Oct 8, 2026
Merged

fengmk2 merged 1 commit into
mainfrom
fix/rebuild-bundle-token-isolation

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 8, 2026

Copy link
Copy Markdown
Member

.github/workflows/rebuild-bundle.yml exposed a GitHub App token to PR code during dependency installation and bundle generation. That token could write repository contents.

The build now runs on a separate runner with read-only access and no persisted credentials. A second job accepts only the three expected bundle files and treats their contents as data. It creates a token with contents: write only after it checks the PR and the files. It commits through the GitHub API only if the branch still has the expected head commit. Unchanged bundles produce no commit.

@fengmk2 fengmk2 added the needs-bundle-rebuild Rebuild dist/ bundle and push to the PR (Renovate bumps to bundled deps) label Oct 8, 2026
@fengmk2
fengmk2 merged commit a0eccbf into main Oct 8, 2026
84 checks passed
@fengmk2
fengmk2 deleted the fix/rebuild-bundle-token-isolation branch October 8, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-bundle-rebuild Rebuild dist/ bundle and push to the PR (Renovate bumps to bundled deps)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant