Pin workflow actions to commit SHAs and npm exactly in publish

未关闭
#117 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, typescript
领域
ci-cd, security

调研方向

Start with .github/workflows/publish.yml and compare its uses: references and npm install command with the suggested changes; then inspect release.yml, drift-check.yml, ci.yml, pages.yml, stale.yml, and label-sync.yml for the remaining action references. Pin actions to full commit SHAs, select an exact npm version, and apply the listed publish workflow changes. Done when the requested workflow hardening is reflected in those files.

由索引模型根据 Issue 内容生成。

描述

dependencies severity: low

Summary

Every workflow uses: points at a mutable tag, including in the publish job that holds id-token: write for npm trusted publishing. publish.yml also installs a floating npm version. This is hardening; there is no known exploit.

Where

  • .github/workflows/publish.yml:8-10, .github/workflows/publish.yml:19-27 (actions/checkout@v7 and actions/setup-node@v7 under id-token: write; npm install -g npm@^11.5.1; cache: npm)
  • .github/workflows/release.yml (contents: write, actions: write)
  • .github/workflows/drift-check.yml:18 (a third-party org action @v1.20)
  • every other uses: in ci.yml, pages.yml, stale.yml and label-sync.yml

Suggested fix

  • Pin actions to full commit SHAs with a # vX.Y comment, at least in publish.yml and release.yml. Dependabot already watches github-actions and will bump the SHAs.
  • Pin npm to an exact version in publish.yml.
  • Drop cache: npm from the publish job, so a poisoned cache cannot reach the token-minting job.
  • Consider npm ci --ignore-scripts before the build in publish.

Getting started

  • Relevant files: .github/workflows/*.yml

Filed by repo-audit/full-audit at e836036. Severity: low. Effort: S. audit-key: dependencies|.github/workflows/publish.yml|uses

主要语言
TypeScript
星标
0
派生
6
平均合并
1 天 21 小时
30 天内合并 PR
8

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TMHSDigital/godot-correctness-mcp 的其他 Issue

查看 TMHSDigital/godot-correctness-mcp 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。