Join our Newsletter — 33% off our NHI Course
Home FAQ Cyber Security What breaks when runners keep Docker access after…
Cyber Security

What breaks when runners keep Docker access after sudo is disabled in GitHub Actions?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 10, 2026 Domain: Cyber Security

If a runner can still reach the Docker or containerd socket, the disable-sudo control can be bypassed. An attacker who already achieved code execution in the job can start a privileged container, mount the host filesystem, and regain root-level capabilities. The practical failure is that sudo removal alone does not block container-based privilege escalation on that runner.

Why Docker Socket Access Undercuts a Disabled-sudo Runner

Disabling sudo in a github actions runner reduces one route to host-level privilege, but it does not remove the more important question of what the job can still reach. If the runner can access the Docker or containerd socket, a process that already has code execution can often ask the container runtime to launch a privileged workload and interact with the host in ways that bypass the intended restriction. For teams that treat sudo hardening as the main boundary, that creates a false sense of containment. The practical issue is not the absence of a command, but the presence of a control channel that still carries equivalent authority. In practice, many security teams discover this only after reviewing how build jobs interact with the runtime, rather than through the original hardening change itself.

For a broader control perspective, NIST’s Security and Privacy Controls catalog is useful because it separates privilege restriction from platform boundary protection, which is exactly the distinction that matters here.

How the Privilege Boundary Fails in Practice

The weakness is structural. A container runtime socket is not just another local file or service endpoint; it is a high-trust interface to the host. When a job can talk to that socket, it may be able to create containers with elevated Linux capabilities, bind-mount host paths, or start workloads that inherit access the runner operator did not intend to expose. That means the security posture depends less on whether sudo is installed and more on whether the job can reach a mechanism that can request privileged actions from the host.

In an ephemeral runner, the impact can still be severe because the attacker does not need long-term persistence to cause harm. A single workflow execution may be enough to read cached secrets, tamper with build outputs, or inspect filesystem state outside the intended workspace. If the socket is mounted into the job environment, the trust boundary has effectively moved from the shell to the container runtime.

  • Disabling sudo only removes one elevation path.
  • Runtime socket access can preserve a separate path to host authority.
  • Privileged containers may bypass filesystem and capability assumptions.
  • Shared runners increase the blast radius if the host is not isolated cleanly.

This guidance breaks down when the runner is already designed as a trusted admin host, because in that case the security model is different and the exposure is intentional rather than accidental.

Where the Real Risk Sits, and What Teams Overlook

Tighter runner hardening often increases operational friction, requiring organisations to balance developer convenience against the need to remove host-management pathways. The common mistake is to treat “no sudo” as equivalent to “no privilege escalation,” when container runtime access is still sufficient to cross the boundary in many setups. The safer design question is whether the job environment can directly influence the host through Docker, containerd, or a similarly privileged interface.

There is also a governance issue: if the workflow can start privileged containers, then the runner owner must treat that capability as a deliberate exception and document why it exists. That becomes especially important on self-hosted runners, where the security assumptions are much weaker than on tightly managed ephemeral infrastructure. NHI-style identity concerns are not the primary issue here, but the control pattern is similar in one respect: access to a powerful runtime interface should be inventoryed, scoped, and removed when it is no longer required.

For teams comparing this with machine-access governance, the OWASP Non-Human Identity Top 10 is relevant because the failure mode is fundamentally about an over-privileged non-human execution path, even though the immediate problem is container runtime exposure rather than an ordinary account.

Risk and Threat Considerations

The material risk is host escape through a trusted local management channel that remains reachable after sudo is removed. Once a workflow job can talk to the container runtime, the attacker no longer needs shell-based elevation; the runtime itself becomes the privilege bridge.

Failure mechanism: The attacker first obtains code execution in the job, then uses Docker or containerd access to launch a privileged container, mount host paths, or invoke host-level actions that bypass the intended restriction on interactive privilege escalation.

Impact: The host boundary can collapse, allowing filesystem access, secret exposure, build tampering, or broader runner compromise even though sudo is disabled.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v84 — Secure Configuration of Enterprise Assets and SoftwareRuntime socket exposure is a misconfiguration that preserves host authority.
6 — Access Control ManagementThe runner still has an effective privilege path that must be controlled.
Recommendation — Remove Docker or containerd socket access from runners that do not explicitly require it. Restrict who and what can invoke privileged container operations on build runners.
MITRE ATT&CKT1611 — Escape to HostPrivileged container use can be used to break out from the job into the host.
T1610 — Deploy ContainerAttackers may spin up containers to leverage runtime access for escalation.
Recommendation — Hunt for host-escape conditions when jobs can reach the container runtime. Monitor for unexpected privileged container launches from CI jobs.
NIST CSF 2.0PR.AC-4 — Access Permissions and AuthorizationsThe control boundary is violated if a job can still invoke host-level authority.
Recommendation — Enforce least privilege by removing runner paths that can trigger privileged host actions.

Practitioner Guidance

What to verify: Confirm whether the job can reach any runtime socket, daemon endpoint, or mounted control plane that can create privileged containers. If that path exists, treat the runner as still capable of privilege escalation until proven otherwise.

What to prioritise: Remove or tightly broker runtime access before relying on sudo hardening as a meaningful control. On self-hosted runners, that usually matters more than shell restrictions because the runtime interface can reintroduce the same authority through a different path.

Decision rule: If a workflow needs Docker access for build operations, separate build authority from host authority and do not assume the same runner can safely host untrusted jobs. If the access is only for convenience, revoke it rather than compensating with additional shell restrictions.

Practitioner takeaway: Sudo removal is a partial hardening measure, not a containment boundary, when a job can still command the container runtime.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 10, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org