fix(ci): replace GITHUB_TOKEN by fine-grained one#284
Open
cjdcordeiro wants to merge 1 commit intocanonical:mainfrom
Open
fix(ci): replace GITHUB_TOKEN by fine-grained one#284cjdcordeiro wants to merge 1 commit intocanonical:mainfrom
cjdcordeiro wants to merge 1 commit intocanonical:mainfrom
Conversation
upils
approved these changes
Apr 7, 2026
Collaborator
upils
left a comment
There was a problem hiding this comment.
Thanks @cjdcordeiro. I was a bit worried because this workflow is executed in PRs, but this step is only executed for releases and the secret is only loaded for this specific step so I understand this is fine.
I see that we now have a growing collection of fine-grained tokens and it makes me wonder how much of a burden that will be to maintain. Maybe we should revisit at some point and use the permissions keyword at steps/jobs level to give a bit more permissions to the GITHUB_TOKEN when needed.
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.
After the recent changes to the
GITHUB_TOKEN, thebuild.ymlworkflow can no longer push the release artifacts to the GitHub release: https://github.com/canonical/chisel/actions/runs/24026969346This PR replaces the
GITHUB_TOKENwith a new one, managed by us. This new token hascontents: writepermissions (similarly to theGITHUB_TOKEN), which are unfortunately broad, because GitHub does not offer fine-grained control for releases. The use of the secret is bound to a single step, which runs our own CI script, and always in the context of the base repo and onreleaseevents.