--verify passes when a local composite action's SHA pins are missing from the lockfile

Đang mở
#281 0 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
56/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, go
Lĩnh vực
cli, devtools

Hướng nghiên cứu

Start by reading the --verify implementation and the code that scans local composite actions and compares their pins with the lockfile. Reproduce the case with the SHA-pinned composite step and tag-keyed lockfile entry described here, then run the relevant verification tests. Done means --verify reports the missing SHA-keyed entry as an error instead of declaring all workflows valid.

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

Mô tả

gh actions-lock --verify (v0.4.1) reports every workflow valid when a local composite action pins its steps by commit SHA but the lockfile records those dependencies by tag. The runner rejects the same repository at job setup, so the frozen check in CI passes while the jobs never start.

A workflow calls a local composite action (uses: ./.github/actions/setup) whose step pins actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0. The lockfile lists that dependency as actions-rust-lang/[email protected], with commit sha1-ecabd13d1c56bd1345c230e542e9144811ad706f. Locally:

$ gh actions-lock --verify
Scanning 13 workflows
3 actions are pinned to a bare SHA without a tag ref
↳ run `gh actions-lock` to pin to tagged releases
All 13 workflows valid

The runner fails the job before any step runs (tox-dev/peryx run 42858830831):

##[error]lockfile missing pin for actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f

I expected --verify to report the missing entry, since its help text says it "fails if the lockfile is incomplete or the runner would reject a pin". Keying the entry by the SHA ('actions-rust-lang/setup-rust-toolchain@ecabd13…':) satisfies the runner, which is what tox-dev/peryx#2417 ended up doing. Related: #183, on how composite actions should lock their own dependencies.

Ngôn ngữ chính
Go
Star
317
Fork
24
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
50

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.