Threat detection never runs on arc-dind: stage step deletes the rootless-installed detector before copying it
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
調査の方向性
stage_threat_detection_arc_dind.shから始め、THREAT_DETECT_BINARYと${BIN_DIR}/threat-detectの両方のパスが同じファイルを指す場合の処理を追ってください。報告されたrootlessインストールのシナリオを再現し、その後、ステージングスクリプトに関連するテストや呼び出し元を確認してください。ステージングが成功し、コピー元とコピー先が同一でも、後続の実行ステップでdetectorを引き続き利用できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 5.7k
- フォーク
- 635
- 平均マージ
- 3時間 43分
- マージ済み PR(30日)
- 838
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/gh-aw のほかの issue
-
automation backlog:reports documentation
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
ai-inspected
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
github/gh-aw#80646 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ai-inspected
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
automated-analysis backlog:engineering-quality code-quality cookie refactoring
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Bug: arc-dind generated Copilot CLI staging step fails when source and destination are the same fileオープンai-inspected arc awf backlog:runners-tools community
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github/gh-aw#78972 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug raised-by:reviewer
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
medici-finance/assay#7655 ·
メンテナーはふだん 1 日以内に返信
-
helm chart: make DaemonSet pod affinity configurable via values.yaml対応中かも @Young-Zen が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
flannel-io/flannel#2632 ·
メンテナーはふだん 6 日以内に返信
-
go-vulnerability security-scan
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
teslashibe/agent-go#36 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nwverse/persona#15194 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug flaky-test
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rosskukulinski/tailworks#411 ·
メンテナーはふだん 1 日以内に返信