Registry release installs an unpinned nf CLI in the job that holds the registry key

未关闭 适合新手
#137 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

阅读 .github/workflows/nf-registry-release.yml 第 80–87 行附近的内容,并比较 CLI 的安装方式与 workflow 固定第三方 action 版本的方式。选择并实施一种已说明的方案:使用准确的 CLI 版本并提供易于维护的更新途径,或者调用 consumer 仓库中锁定的版本。完成标准是 registry 发布不再安装未固定版本的 latest CLI,且 workflow 的登录和发布命令仍使用预期版本。

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

描述

bug dependencies
Issue description

The registry release job installs the CLI with no version (.github/workflows/nf-registry-release.yml#L80-L87):

- name: Install the nf CLI
  run: pnpm install -g @nanoforge-dev/cli
- name: Log in to the NanoForge registry
  run: nf login -k "$NF_REGISTRY_KEY"

Every registry release in every consumer repo therefore runs whatever latest is at that moment. It runs in a job with contents: write, and it receives NF_REGISTRY_KEY. The consequences (traced, not run):

  • a broken or compromised CLI release reaches every registry release at once;
  • a breaking major (cli 3.0.0 shipped this month) that changes nf publish -d or nf login -k breaks them all;
  • nothing records which CLI version a release used.

Third-party actions in this repo are pinned by commit SHA; this npm install is not pinned at all.

Expected: the CLI version is pinned (e.g. an input with an exact default, kept current by Dependabot), or taken from the consumer's lockfile (pnpm exec nf) when the repo already depends on it.

Found by a read-only audit of main at 435a16b (first done at 046494f; this file didn't change in between), report audits/actions-2026-11-11.md in the workspace repo.

Code sample

No response

Versions
  • @nanoforge-dev/actions 3.3.0 (main at 435a16b)
Issue priority

High (immediate attention needed)

I have tested this issue on a development release

435a16b

主要语言
TypeScript
星标
0
派生
0
平均合并
15 小时 51 分钟
30 天内合并 PR
21

环境准备

从这里开始

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

NanoForge-dev/actions 的其他 Issue

查看 NanoForge-dev/actions 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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