feat(agent-token): request workflows, issues, packages:read in minted tokens#620
Merged
Merged
Conversation
… tokens Minted installation tokens carried only contents/pull_requests/actions:write, so runner tokens could not push .github/workflows files (blocking the required Pipeline Complete pipeline), edit/comment tracking issues, or resolve published packages for local builds. GitHubAppInstallationTokenClient.REQUESTED_PERMISSIONS now also requests issues:write, workflows:write, and packages:read. administration is still never requested (rulesets/settings stay operator-owned) and packages stays read-only — artifact publishing is done by the release workflow's own GITHUB_TOKEN, not by runner tokens. Tests and the App setup doc (manifest, troubleshooting, fix steps) are updated to the widened set. Takes effect once the App permissions are approved on each installation and a fresh token is minted (cached token dropped). Part of #605. Closes #606.
14 tasks
jorisjonkers-dev-agents Bot
pushed a commit
that referenced
this pull request
Jun 8, 2026
#620 is merged and the minter now grants workflows/issues, so: workflow pushes work, repo-template#1 is merged, issues are editable with a per-repo token, and personal-stack already merges (full.yml already emits the Pipeline Complete job the ruleset requires). Records the narrowed remaining #608 scope (fold the three separate PR workflows into the aggregator) and that #610 waits on M1 artifacts. Part of #605.
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 changed
GitHubAppInstallationTokenClient.REQUESTED_PERMISSIONSnow requestsissues:write,workflows:write, andpackages:readin addition to the existingcontents/pull_requests/actions:write.Why
Minted installation tokens were scoped to
contents/pull_requests/actions:writeonly. Even with the App granted broader permissions, GitHub narrows a token to the requested set — so runner tokens could not:.github/workflows/*(blocking the requiredPipeline Completepipeline in every repo),dev.extratoast.*/@extratoastpackages for local builds.administrationremains deliberately unrequested (rulesets and repo settings stay operator-owned), andpackagesis read-only — artifact publishing is done by the release workflow's ownGITHUB_TOKEN, not by runner tokens.Scope
GitHubAppInstallationTokenClient.kt— widenedREQUESTED_PERMISSIONS+ KDoc.GitHubAppInstallationTokenClientTest.kt— request/response assertions +narrowedPermissionsexpectations updated to the new set.platform/cluster/flux/apps/agents/GITHUB-APP-SETUP.md— manifestdefault_permissions, troubleshooting, and fix steps updated; "do not grant Administration" retained.Activation
Takes effect once (1) the App's repository permissions are widened + approved on each installation, and (2) a fresh token is minted (drop the cached
/tmp/.gh-app-tokenor recreate the runner Pod). No assistant-api restart needed beyond deploying this change.Verification
Pure unit-test change (no Testcontainers). Tests updated for parity but not run locally in this session — relies on CI (
Pipeline Complete, once activated) and the follow-up session that picks up the re-minted token.Versioning impact
None (no published artifact); enables the agent to author the versioning/CI infrastructure in later PRs.
Part of #605. Closes #606.