Repository navigation
Explicitly use GITHUB_TOKEN for role membership checks - #6267
Merged
Merged
Conversation
Co-authored-by: pelikhan <[email protected]>
pelikhan
approved these changes
Dec 12, 2025
Collaborator
|
@copilot generate comment stating that it must use the secrets.GITHUB_TOKEN value |
Copilot
AI
changed the title
[WIP] Implement role membership check using GitHub action token
Explicitly use GITHUB_TOKEN for role membership checks
Dec 12, 2025
Contributor
Author
The role membership check now explicitly uses The implementation is in commit 9424bbc where:
|
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.
Role membership checks must use the GitHub Actions token, not custom secrets like
GH_AW_GITHUB_TOKENorGH_AW_AGENT_TOKEN.Changes
Modified
pkg/workflow/role_checks.go:github-token: ${{ secrets.GITHUB_TOKEN }}parameter tocheck_membershipstep generationAdded
pkg/workflow/role_checks_test.go:GITHUB_TOKENusageRecompiled workflow lock files:
Example
Before:
After:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/user/usr/bin/gh gh api user --jq .login it/ref/tags/v5 GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile env action.git GO111MODULE 5587045/b348=> GOINSECURE GOMOD GOMODCACHE go(http block)/usr/bin/gh gh api user --jq .login -action.git -action.git /opt/hostedtoolcache/go/1.25.0/x--systemd-cgroup GOINSECURE GOMOD GOMODCACHE go env tags/v6 GO111MODULE e/git by/c4492a94cba91infocmp /" + .name GOMODCACHE e/git(http block)/usr/bin/gh gh api user --jq .login -bun.git -bun.git b5e99e9af048032cf35e09b0a05bca982bb/log.json GOINSECURE GOMOD GOMODCACHE 5587045/b374/styles.test e=/t�� t0 GO111MODULE(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.