Release job keeps a write token on disk while running the whole check suite
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 83/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- github-actions, javascript
研究方向
閱讀 .github/workflows/release.yml,著重檢查 workflow 權限、checkout 步驟和 CITATION push 步驟。確認其他 workflow 如何停用持久化憑證,接著執行 npm test 或完整的 npm run check 檢查。完成的標準是只有 push 步驟取得寫入權杖,而且發行時仍會更新 main 上的 CITATION.cff。
由索引模型根據 Issue 內容生成。
描述
Summary
release.yml grants contents: write at workflow level and checks out without persist-credentials: false, so the write token sits in .git/config while lint, tests, validate and build run, long before the one step that pushes.
Where
.github/workflows/release.yml:17-18(permissions).github/workflows/release.yml:35-39(checkout).github/workflows/release.yml:59-61(npm run check).github/workflows/release.yml:94(push)
Details
The other workflows already follow least privilege (PR CI uses persist-credentials: false; thumbs splits its write job). This is defence in depth; the code that runs is main's own and the job refuses non-main refs.
Impact
Narrows what any future change to the check scripts could do with the token during a release.
Suggested fix
Check out with persist-credentials: false and push in the CITATION step with an explicit token passed through env:, for example git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}" HEAD:main.
Acceptance criteria
- Checkout uses
persist-credentials: false - Only the push step has access to the write token
- A release still updates CITATION.cff on main
Getting started
- Relevant files:
.github/workflows/release.yml - Run the tests:
npm test; the full local gate isnpm run check(Node 22+, no install step) - Related docs:
CONTRIBUTING.md,site/README.md
Filed by repo-audit/full-audit at 4adb944. Severity: low. Effort: S. audit-key: security|.github/workflows/release.yml|persist-credentials
- 主要語言
- JavaScript
- 星號
- 58
- 分支
- 15
- 平均合併
- 1 天 15 小時
- 30 天內合併 PR
- 12
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/Free-Game-Dev-Assets 的其他 Issue
-
enhancement good first issue priority: medium
難度 2/5 1-3 小時 新手友好度 82/100
TMHSDigital/Free-Game-Dev-Assets#272 ·
維護者通常 1 天內回覆
-
documentation good first issue priority: low
難度 2/5 1-3 小時 新手友好度 78/100
TMHSDigital/Free-Game-Dev-Assets#270 ·
維護者通常 1 天內回覆
-
documentation priority: medium
難度 2/5 1-3 小時 新手友好度 82/100
TMHSDigital/Free-Game-Dev-Assets#269 ·
維護者通常 1 天內回覆
-
good first issue priority: low tests
難度 2/5 1-3 小時 新手友好度 88/100
TMHSDigital/Free-Game-Dev-Assets#267 ·
維護者通常 1 天內回覆
-
good first issue priority: low tests
難度 2/5 1-3 小時 新手友好度 83/100
TMHSDigital/Free-Game-Dev-Assets#266 ·
維護者通常 1 天內回覆
查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
guybedford/es-module-lexer#266 ·
-
bug documentation
難度 1/5 1-3 小時 新手友好度 88/100
apify/apify-docs#3206 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 90/100
anhnt256/cursor-swarm#21 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
-
documentation good first issue
難度 2/5 1-3 小時 新手友好度 74/100
zerohourzulu/irontrellis#16 ·