Skip to content

Self-hosted: select rootless threat-detect installation independently of ARC/DinD topology #75440

Closed

Description

@lpcox

Summary

Track item 3 of github/gh-aw-firewall#11130: the compiler emits a sudo-dependent threat-detect installation for a native self-hosted runner that has no sudo, although the installer already supports --rootless.

Reported environment

  • gh-aw v1.0.1, default threat-detect v0.5.3 and AWF v0.29.0.
  • Native shared self-hosted Linux VM, runs-on: linux64-selfhosted; not ARC/DinD and no runner.topology.
  • No sudo; non-Debian image; runner cannot write /usr/local/bin; Docker available.

Release-source evidence

buildInstallThreatDetectStep adds --rootless only when isArcDindTopology(data) is true.

install_threat_detect_binary.sh otherwise targets /usr/local/bin and executes installation commands via sudo. With --rootless, it uses ${HOME}/.local/bin, verifies writability and updates GITHUB_PATH.

The script and compiler selection are owned by gh-aw. Updating the threat-detect binary repository or AWF alone will not change this generated command.

Current workaround

Insert --rootless into the compiled installer command. A custom safe-outputs.threat-detection.steps entry that installs another copy does not replace or remove this generated command.

Requested outcome

  • Support unprivileged threat-detect installation on native Linux self-hosted runners without pretending their topology is ARC/DinD.
  • Select installation privilege independently of split-filesystem topology, preferably through a shared policy also used by the Copilot installer. The precise public configuration/default is a maintainer design decision, not an existing supported field.
  • Preserve compiler-pinned release/digest checks, HTTPS validation, platform checks and PATH propagation.
  • Ensure the detection invocation resolves the installed rootless binary.
  • Add generated-command and installer regressions for a no-sudo, non-ARC runner with unwritable /usr/local/bin, as well as existing ARC and supported privileged behavior.
  • Document the supported setting or default so no lock-file postprocessing is needed.

This diagnosis is based on the v1.0.1 source and reporter's environment; no failing run logs were provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions