Skip to content

chore: harden test-action workflow permissions and pin kind-action - #226

Merged
davidkarlsen merged 1 commit into
helm:mainfrom
cpanato:harden-workflow-permissions
Sep 21, 2026
Merged

davidkarlsen merged 1 commit into
helm:mainfrom
cpanato:harden-workflow-permissions

Conversation

@cpanato

@cpanato cpanato commented Sep 17, 2026

Copy link
Copy Markdown
Member

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.

@cpanato
cpanato force-pushed the harden-workflow-permissions branch from 13eb40f to 4ffea0e Compare September 17, 2026 08:29
@davidkarlsen
davidkarlsen enabled auto-merge (squash) September 19, 2026 16:08
@davidkarlsen

Copy link
Copy Markdown
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
cpanato force-pushed the harden-workflow-permissions branch from 4ffea0e to 9fa9f02 Compare September 21, 2026 12:47
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Sep 21, 2026
@davidkarlsen
davidkarlsen merged commit f3ef15d into helm:main Sep 21, 2026
5 checks passed
@cpanato
cpanato deleted the harden-workflow-permissions branch September 21, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants