Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Threat-detection Setup Node.js ignores `runtimes.node.version`

Đã đóng Phù hợp với người mới
#65,939 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
84/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
ci-cd, tooling

Hướng nghiên cứu

Bắt đầu tại pkg/workflow/nodejs.go ở GenerateNodeJsSetupStep(), sau đó theo dõi cách phiên bản runtime Node đã được phân giải được chuyển đến agent job. Chạy gh aw compile với runtimes.node.version được đặt thành 24.21.0; kết quả đúng là các bước Setup Node.js của detection và evals sử dụng phiên bản đó, khớp với agent job.

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

Mô tả

ai-inspected
Summary

With runtimes.node.version set, the agent job's Setup Node.js step uses that version. The threat-detection job's Setup Node.js step still emits node-version: '24' (constants.DefaultNodeVersion).

Related history:

  • #64498 (for #64466) made the detection and evals steps honor runtimes.node.action-repo and action-version. Its description says it does not change runtimes.node.version.
  • Adding our own Setup Node.js under safe-outputs.threat-detection.steps fails to compile with "duplicate step 'Setup Node.js' found in job 'detection'".
Version

gh-aw v0.89.21; v0.90.3 behaves the same.

Reproduction
  1. Add to any workflow with threat detection enabled:

    runtimes:
      node:
        version: "24.21.0"
    
  2. Run gh aw compile.

Observed

The agent job emits node-version: '24.21.0'. The detection job emits:

- name: Setup Node.js
  uses: actions/setup-node@<sha> # v7.0.0
  with:
    node-version: '24'
Expected

The detection and evals Setup Node.js steps use runtimes.node.version when it is set, matching the agent job, so a repository that pins an exact runtime sees one version across every generated job.

Suggested change

Pass the resolved Node runtime version into GenerateNodeJsSetupStep() (pkg/workflow/nodejs.go), as #64498 did for the action reference.

Ngôn ngữ chính
Go
Star
5.4k
Fork
576
Merge trung bình
8 giờ 46 phút
Pull request đã merge (30 ngày)
753

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

Mở trong Codespaces

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.

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-aw

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

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.