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

Đang mở Phù hợp với người mới
#137 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, typescript
Lĩnh vực
ci-cd, security

Hướng nghiên cứu

Đọc .github/workflows/nf-registry-release.yml quanh dòng 80–87 và so sánh cách cài đặt CLI với cách workflow ghim phiên bản các action của bên thứ ba. Chọn và triển khai một trong các phương án đã nêu: dùng phiên bản CLI chính xác với lộ trình cập nhật dễ bảo trì, hoặc gọi phiên bản đã khóa của kho consumer. Hoàn tất khi các bản phát hành registry không còn cài CLI latest chưa được ghim phiên bản và các lệnh đăng nhập, phát hành của workflow vẫn dùng phiên bản dự kiến.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
15 giờ 51 phút
Pull request đã merge (30 ngày)
21

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NanoForge-dev/actions

Tất cả issue của NanoForge-dev/actions

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.