Agent-job engine-install "Setup Node.js" step ignores `runtimes.node.version`
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
- 78/100
Hướng nghiên cứu
Đọc pkg/workflow/nodejs.go và lần theo generateNodeJsSetupStep(data) cùng với resolveNodeSetupActionOverride(data) để xem các thiết lập runtime được truyền đến bước thiết lập được tạo ra như thế nào. Kiểm tra cách biểu diễn các giá trị runtimes.node.version được nhập, sau đó chạy các bài kiểm thử workflow liên quan hoặc thêm một trường hợp tập trung. Hoàn tất khi bước thiết lập cài đặt engine của agent job sử dụng phiên bản đã ghim, kể cả khi phiên bản đó được nhập, thay vì phiên bản mặc định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
When a workflow pins runtimes.node.version, the agent job still gets a second Setup Node.js step that uses the compiler default node-version: '24'. That step comes right before Install AWF binary / the engine CLI install, so it runs after the pinned runtime setup step and overrides it on PATH. The agent and the engine CLI therefore run on whatever 24.x the runner resolves, not on the pinned version.
This is the same class of bug as #65939 (threat-detection job), which ADR 66040 fixed only for the detection / evals jobs.
Repro
Frontmatter:
engine:
id: claude
runtimes:
node:
version: "24.22.1"
Compiled with gh-aw v0.93.2, the agent job contains:
- name: Setup Node.js # runtime setup step, honors the pin
uses: actions/setup-node@... # v7.1.0
with:
node-version: '24.22.1'
...
- name: Setup Node.js # engine install step, ignores the pin
uses: actions/setup-node@... # v7.1.0
with:
node-version: '24'
package-manager-cache: false
- name: Install AWF binary
- name: Install Claude Code CLI
The detection job correctly emits '24.22.1'.
Cause
pkg/workflow/nodejs.go, generateNodeJsSetupStep hardcodes constants.DefaultNodeVersion:
fmt.Sprintf(" node-version: '%s'", constants.DefaultNodeVersion),
It already honors runtimes.node.action-repo / action-version through resolveNodeSetupActionOverride(data), but not version. This is still the case on main as of 2026-11-10 (also present in v1.2.2).
Expected
When runtimes.node.version is set (including through imports), generateNodeJsSetupStep(data) should emit that version. Alternatively, it should skip the redundant setup-node step when the runtime setup step has already installed Node in the same job.
Impact
Anyone who pins Node for a security fix ends up with the engine and agent running on an unpinned Node. The only workaround is to hand-patch the .lock.yml after every gh aw compile.
- Ngôn ngữ chính
- Go
- Star
- 5.6k
- Fork
- 615
- Merge trung bình
- 5 giờ 21 phút
- Pull request đã merge (30 ngày)
- 792
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/gh-aw
-
automation documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-research cookie
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
awf community
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/gh-aw#76385 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automation cli-tools testing
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
GitHub webhook is not subscribed to release events, so `event: release` never triggersCó thể đã có người làm @qsun đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
woodpecker-ci/woodpecker#7542 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
zilliztech/milvus-backup#1386 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày