Skip to content

ci: pin actions by SHA and scope release token to the job - #548

Open
lbarrosby wants to merge 1 commit into
awslabs:mainfrom
lbarrosby:ci-harden-workflows
Open

lbarrosby wants to merge 1 commit into
awslabs:mainfrom
lbarrosby:ci-harden-workflows

Conversation

@lbarrosby

@lbarrosby lbarrosby commented Nov 6, 2026 •

Copy link
Copy Markdown

Follow-up to #481. No change to what the workflows do.

  • release.yaml: the workflow-level permissions was contents: write. It is now contents: read, and contents: write moves to the build job, which is the one that runs goreleaser to create the release. Same effective permissions for that job, but any job added later starts read-only.
  • Pinned actions: actions/checkout, actions/setup-go and goreleaser/goreleaser-action now point to the commit SHA their tag resolves to today (goreleaser-action@v4 → v4.6.0), with the version in a comment.
  • Dependabot: added the github-actions ecosystem to the existing .github/dependabot.yaml so these pins get bumped by PR like the Go modules.

Checked with actionlint and zizmor. OpenSSF Scorecard run locally on the branch: Token-Permissions 0 → 10, Pinned-Dependencies 0 → 6 (the remaining points are go-version: stable / goreleaser version: latest, left as they are).

Follow-up to awslabs#481. The release workflow granted contents: write at the
workflow level; make the default contents: read and grant write only to
the build job that runs goreleaser.

Pin the actions to the commit SHA of the tags in use and let Dependabot
keep them updated.

Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
@lbarrosby
lbarrosby requested a review from a team as a code owner November 6, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant