Threat detection never runs on arc-dind: stage step deletes the rootless-installed detector before copying it
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
Línea de trabajo
Empieza con stage_threat_detection_arc_dind.sh y sigue cómo trata THREAT_DETECT_BINARY y ${BIN_DIR}/threat-detect cuando ambas rutas apuntan al mismo archivo. Reproduce el escenario de instalación rootless reportado y luego revisa las pruebas o los puntos de llamada relacionados con el script de staging. El trabajo estará terminado cuando el staging se complete correctamente aunque el origen y el destino sean idénticos, y el detector siga disponible para el siguiente paso de ejecución.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 5.7k
- Forks
- 635
- Merge medio
- 3 h 43 min
- PR fusionados (30 d)
- 838
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/gh-aw
-
automation backlog:reports documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
ai-inspected
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
github/gh-aw#80646 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
ai-inspected
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
automated-analysis backlog:engineering-quality code-quality cookie refactoring
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Bug: arc-dind generated Copilot CLI staging step fails when source and destination are the same fileAbiertoai-inspected arc awf backlog:runners-tools community
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
github/gh-aw#78972 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de github/gh-aw
Issues similares
-
bug raised-by:reviewer
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
medici-finance/assay#7655 ·
Los mantenedores suelen responder en 1 día
-
helm chart: make DaemonSet pod affinity configurable via values.yamlPosiblemente ocupada @Young-Zen la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
flannel-io/flannel#2632 ·
Los mantenedores suelen responder en 6 días
-
go-vulnerability security-scan
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
teslashibe/agent-go#36 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
nwverse/persona#15194 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug flaky-test
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rosskukulinski/tailworks#411 ·
Los mantenedores suelen responder en 1 día