GoReleaser version floats on "~> v2" in the job that signs releases

Open Beginner friendly
#324 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, go, yaml
Domain
ci-cd, release

Research direction

Start in .github/workflows/go.yml: the goreleaser/goreleaser-action steps at lines 249 (snapshot) and 331 (release) take version: "~> v2", and the release job's permissions are around lines 286-289. Pick an exact GoReleaser version and check the release log for the version it currently resolves to. Done means both steps name that version, the repo documents how to bump it, and the release job's checkout sets persist-credentials: false. The bump method is a maintainer choice, so confirm it before editing.

Written by the indexing model from the issue text.

Description

area: release dependencies good first issue severity: low

Summary

Every action and build tool in the workflows is pinned except GoReleaser itself, which resolves to the newest 2.x at run time in both the snapshot and the release job.

Where

  • .github/workflows/go.yml:331
  • .github/workflows/go.yml:249
  • .github/workflows/go.yml:286

Details

Every action is pinned to a commit SHA, and golangci-lint (v2.15.0, go.yml:117), govulncheck (@v1.9.0, go.yml:123), syft and cosign (fixed by their pinned installer actions; the log shows syft v1.54.0) are fixed versions. GoReleaser itself is not: goreleaser/goreleaser-action@a4f02ab... # v7.3.0 is given version: "~> v2" at go.yml:249 (snapshot) and go.yml:331 (release). The release-snapshot log of run 43648865601 shows it resolved at run time: Downloading https://github.com/goreleaser/goreleaser/releases/download/v2.20.2/goreleaser_Linux_x86_64.tar.gz, checked only against checksums.txt from the same release. The release job holds contents: write, id-token: write and attestations: write (go.yml:286-289).

Impact

Whatever GoReleaser v2.x is newest on the day of a tag builds, signs and uploads the release, with nothing reviewed and no Dependabot PR. A new minor that changes or deprecates a config key fails or alters a release that the snapshot run on the previous push passed, and a compromised upstream release would run with the signing identity. It is the one build tool in the release path that is not reproducible from the repository.

Steps to reproduce

Compare go.yml:331 with the Downloading .../goreleaser/releases/download/v2.20.2/... line in job 132612931653's log.

Suggested fix

Pin an exact version (version: v2.20.2) in both steps, and keep it current by hand or with a Dependabot-visible form (a tools go.mod or a comment-driven updater such as Renovate's regex manager; Dependabot's github-actions ecosystem does not read with: version).

Notes

While here: the release job's checkout can set persist-credentials: false; GoReleaser and gh take the token from the environment.

Acceptance criteria

  • Both jobs name an exact GoReleaser version
  • There is a documented way to bump it
  • The release job's checkout does not persist credentials

Getting started

  • Relevant files: .github/workflows/go.yml
  • How to run tests: make test (or go test ./...). Tests must stay hermetic: use -simulate, -simulate-zone or the local DNS test server, never a live domain.
  • Related docs: docs/DEVELOPER_GUIDE.md, docs/ARCHITECTURE.md

Filed by repo-audit/full-audit at d0c56f0. Severity: low. Effort: S. audit-key: dependencies|.github/workflows/go.yml|goreleaser-action.version

Dominant language
Go
Stars
1
Forks
1
Avg merge
6h 42m
Merged PRs (30d)
7

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TMHSDigital/subenum

All issues in TMHSDigital/subenum

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.