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 ·