GoReleaser version floats on "~> v2" in the job that signs releases
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 66/100
研究方向
從 .github/workflows/go.yml 開始:第 249 行(snapshot)和第 331 行(release)的 goreleaser/goreleaser-action 步驟使用 version: "~> v2",發佈工作的權限位於第 286-289 行附近。選定一個確切的 GoReleaser 版本,並在發佈日誌中檢查目前解析到的版本。兩個步驟都指定該版本、儲存庫中記錄了如何升級該版本,且發佈工作的 checkout 設定了 persist-credentials: false,即為完成。升級方式由維護者決定,因此編輯前請先確認。
由索引模型根據 Issue 內容生成。
描述
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(orgo test ./...). Tests must stay hermetic: use-simulate,-simulate-zoneor 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
- 主要語言
- Go
- 星號
- 1
- 分支
- 1
- 平均合併
- 6 小時 42 分鐘
- 30 天內合併 PR
- 7
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/subenum 的其他 Issue
-
good first issue severity: low tech-debt
難度 2/5 半天 新手友好度 75/100
TMHSDigital/subenum#329 ·
維護者通常 1 天內回覆
-
area: docs documentation good first issue severity: low
難度 2/5 1-3 小時 新手友好度 85/100
TMHSDigital/subenum#327 ·
維護者通常 1 天內回覆
-
ci good first issue severity: low
難度 2/5 1-3 小時 新手友好度 62/100
TMHSDigital/subenum#323 ·
維護者通常 1 天內回覆
-
area: output bug good first issue severity: low
難度 2/5 1-3 小時 新手友好度 76/100
TMHSDigital/subenum#319 ·
維護者通常 1 天內回覆
-
community documentation good first issue
難度 2/5 1-3 小時 新手友好度 85/100
TMHSDigital/subenum#135 ·
維護者通常 1 天內回覆
查看 TMHSDigital/subenum 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
GillMacedo/godebugdiff#13 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
GillMacedo/racesift#14 ·
-
IsTextFile reads the whole file into memory (OOM on large files in the file watcher)可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
gtsteffaniak/filebrowser#3395 ·
維護者通常 1 天內回覆
-
effort:s impact:low raised-by:worker risk:low
難度 1/5 1 小時以內 新手友好度 70/100
medici-finance/assay#6496 · 1 則留言 ·
維護者通常 1 天內回覆
-
kind/bug require/reproduce require/severity
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆