chore: harden test-action workflow permissions and pin kind-action - #226
Merged
Merged
Conversation
cpanato
force-pushed
the
harden-workflow-permissions
branch
from
September 17, 2026 08:29
13eb40f to
4ffea0e
Compare
davidkarlsen
approved these changes
Sep 19, 2026
davidkarlsen
enabled auto-merge (squash)
September 19, 2026 16:08
Member
|
@copilot fix conflicts |
Three hardening changes to the e2e workflow:
- Add a top-level `permissions: {}` so jobs no longer inherit the
repository default token scope, and grant each job only
`contents: read`, which is all any of them needs.
- Set `persist-credentials: false` on all three `actions/checkout`
steps. These jobs run the action under test and then `ct install`,
which invokes helm and kubectl, so leaving the checkout token in
`.git/config` exposes it to third-party code for no benefit. Nothing
in these jobs pushes or otherwise needs git credentials.
- Pin `helm/kind-action` to a commit SHA. It was the only action in the
repository still referenced by a mutable tag (`v1.15.0`); every other
action is already SHA-pinned with a version comment.
Verified: actionlint clean.
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
cpanato
force-pushed
the
harden-workflow-permissions
branch
from
September 21, 2026 12:47
4ffea0e to
9fa9f02
Compare
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.
Three hardening changes to the e2e workflow:
Add a top-level
permissions: {}so jobs no longer inherit the repository default token scope, and grant each job onlycontents: read, which is all any of them needs.Set
persist-credentials: falseon all threeactions/checkoutsteps. These jobs run the action under test and thenct install, which invokes helm and kubectl, so leaving the checkout token in.git/configexposes it to third-party code for no benefit. Nothing in these jobs pushes or otherwise needs git credentials.Pin
helm/kind-actionto a commit SHA. It was the only action in the repository still referenced by a mutable tag (v1.15.0); every other action is already SHA-pinned with a version comment.Verified: actionlint clean.