Use GitHub App token instead of personal access token for data generation#5417
Draft
ludeeus wants to merge 3 commits into
Draft
Use GitHub App token instead of personal access token for data generation#5417ludeeus wants to merge 3 commits into
ludeeus wants to merge 3 commits into
Conversation
Generate a short-lived GitHub App installation token in each category-data matrix job via actions/create-github-app-token instead of sharing the static DATA_GENERATOR_TOKEN secret. Because the job is a matrix (one runner per category), each category now mints its own token and gets its own GitHub API rate-limit budget. The token feeds the existing DATA_GENERATOR_TOKEN env var, so no changes to the generator script are required. Requires new secrets DATA_GENERATOR_APP_ID and DATA_GENERATOR_APP_PEM. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SwnRB6MUSuVd412MHEMpA9
client-id is the recommended input over the legacy app-id. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SwnRB6MUSuVd412MHEMpA9
Reflects that the secret holds the GitHub App Client ID. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SwnRB6MUSuVd412MHEMpA9
frenck
approved these changes
Jul 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the generate-hacs-data GitHub Actions workflow to stop using a long-lived personal access token and instead generate a short-lived GitHub App installation token at runtime, improving credential security for the data generation process.
Changes:
- Adds a step using
actions/create-github-app-token@v3.2.0(pinned by commit) to mint a temporary GitHub App token. - Switches
DATA_GENERATOR_TOKENfrom${{ secrets.DATA_GENERATOR_TOKEN }}to${{ steps.token.outputs.token }}for the data generation step.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
This change replaces the use of a static personal access token with a dynamically generated GitHub App token for the data generation workflow, improving security and token management.
Key Changes
actions/create-github-app-tokenaction${{ steps.token.outputs.token }}) instead of the static secret (${{ secrets.DATA_GENERATOR_TOKEN }})Implementation Details
actions/create-github-app-token@v3.2.0with pinned commit hash for securityhttps://claude.ai/code/session_01SwnRB6MUSuVd412MHEMpA9