Bug: `gh actions-lock` rewrote a composite action, but did not lock it

Đang mở
#264 2 bình luận 1 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/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, go, yaml
Lĩnh vực
cli, devtools

Hướng nghiên cứu

The bug is that gh actions-lock rewrites local composite actions (**/action.y(a)ml outside .github/workflows) into unpinned form without adding lockfile entries for their transitive action dependencies. Start in the Go code that walks workflow and composite action files and performs the rewrite, and check how transitive dependencies are recorded in the lockfile. Done means either skipping composite action files or locking their dependencies by reference, with a test covering a repo that has a local composite action.

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

Mô tả

I think this is related to #183.

I observed this in https://github.com/astral-sh/uv/pull/23077.

Expected behavior

gh actions-lock should either skip rewriting **/action.ya?ml (unless it's .github/workflows/action.ya?ml) or properly lock it, i.e. include it by reference in the workflow lockfile.

Actual behavior

gh actions-lock appears to have rewritten a local composite action into its unpinned form, but without adding lockfile entries for it. The composite action's own action dependencies appear as dependencies in each calling workflow's lockfile section, but without any indication that they're transitive rather than direct.

zizmor then flags this because workflow lockfiles are per-repo, and it can't guarantee that any external user of the action gets proper hash-pins. In other words, the rewrite degrades the immutability property for external consumers of the action, even if first-party (in-repo) uses are properly locked indirectly.

Ngôn ngữ chính
Go
Star
295
Fork
21
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
64

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 github/gh-actions-lock

Tất cả issue của github/gh-actions-lock

Issue tương tự

Thêm issue về Go

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.