Threat detection never runs on arc-dind: stage step deletes the rootless-installed detector before copying it
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
- 76/100
Hướng nghiên cứu
Bắt đầu với stage_threat_detection_arc_dind.sh và theo dõi cách tập lệnh xử lý THREAT_DETECT_BINARY và ${BIN_DIR}/threat-detect khi cả hai đường dẫn đều trỏ đến cùng một tệp. Tái hiện tình huống cài đặt rootless đã được báo cáo, sau đó kiểm tra các bài kiểm thử hoặc bên gọi liên quan đến tập lệnh staging. Công việc hoàn tất khi staging thành công dù nguồn và đích giống hệt nhau, đồng thời detector vẫn khả dụng cho bước thực thi tiếp theo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
On self-hosted ARC runners with runner.topology: arc-dind, threat detection never runs: the stage step deletes the detector binary it is about to copy. Because detection defaults to warn mode, the job still ends green and the safe outputs only get a "Threat detection engine error" banner, so the failure is easy to miss.
Version
gh-aw v1.3.1 (github/gh-aw-actions/setup@dfe97a19c8249d41e2adfc95f92db2b8facea58f), threat-detect v0.5.3, AWF 0.29.14.
What happens
install_threat_detect_binary.sh ... --rootless(no sudo on the runner) installs toprepare_rootless_install_dir, i.e.$RUNNER_TEMP/gh-aw/bin/threat-detect, and outputs that path asbinary-path, which the execute step receives asTHREAT_DETECT_BINARY.- In the execute step,
stage_threat_detection_arc_dind.sh stagedoes:detector="${THREAT_DETECT_BINARY:?...}" # = $RUNNER_TEMP/gh-aw/bin/threat-detect BIN_DIR="${RUNNER_TEMP}/gh-aw/bin" ... rm -f "${BIN_DIR}/threat-detect" # deletes the detector itself cp "$detector" "${BIN_DIR}/threat-detect" # cp: cannot stat ...: No such file or directory - The step exits 1;
conclude_threat_detection.shlogsthreat-detect binary not found on PATH; continuing because GH_AW_DETECTION_CONTINUE_ON_ERROR != false, and safe outputs proceed without any analysis.
Reproduced outside Actions with the pinned script (sha256 a4064e12ac694a605d8a85eff737a2cf533548ea0fab88b49b3f3ab54c6c9301): create $RUNNER_TEMP/gh-aw/bin/threat-detect, set THREAT_DETECT_BINARY to that path and run stage → cp: cannot stat.
Suggested fix
Skip the copy when source and destination are the same file, e.g.
if [ ! "$detector" -ef "${BIN_DIR}/threat-detect" ]; then
rm -f "${BIN_DIR}/threat-detect"
cp "$detector" "${BIN_DIR}/threat-detect"
fi
chmod +x "${BIN_DIR}/threat-detect"
(or install the rootless detector to a directory other than BIN_DIR). With that change applied via a threat-detection.steps pre-step, detection runs and returns a structured verdict on the same runners.
It may also be worth surfacing an engine error more loudly than a warning banner when detection is enabled, since a silently skipped detection looks identical to a green one in the run list.
- Ngôn ngữ chính
- Go
- Star
- 5.7k
- Fork
- 635
- Merge trung bình
- 3 giờ 43 phút
- Pull request đã merge (30 ngày)
- 838
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 backlog:reports documentation
Độ khó 1/5 Dưới một 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
-
ai-inspected
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
github/gh-aw#80646 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-inspected
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated-analysis backlog:engineering-quality code-quality cookie refactoring
Độ 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
-
Bug: arc-dind generated Copilot CLI staging step fails when source and destination are the same fileĐang mởai-inspected arc awf backlog:runners-tools community
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/gh-aw#78972 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
unbound-force/replicator#193 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
A Gemini stream that fails partway completes the call with the partial textCó thể đã có người làm @bnaylor đã 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
go-steer/core-agent#1600 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug raised-by:reviewer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
medici-finance/assay#7655 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add /exit and /quit commandsĐang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Edwin-metcalf/MetCode#67 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày