Join our Newsletter — 33% off our NHI Course

Why does overly broad egress access increase risk in CI/CD runners?

Overly broad egress access weakens one of the main controls that protects runners from abuse after compromise. If a build environment can reach many external destinations, an attacker has more options for data exfiltration, command retrieval, or stealthy callback traffic. Tight egress rules reduce the attacker’s freedom of movement and make suspicious traffic easier to spot and contain.

Why CI/CD Runners Become Easier to Abuse

CI/CD runners are already trusted to fetch code, contact package registries, upload artifacts, and talk to deployment targets. When egress is overly broad, that trust extends far beyond what the job actually needs. A compromised runner can then reach more external systems, making post-compromise activity much easier to sustain and harder to separate from normal build traffic.

That matters because the runner is often a high-value pivot point, not a low-risk throwaway host. If its outbound access is unrestricted, an attacker can use the same job context for command retrieval, data staging, and callback traffic without first defeating an outbound boundary.

How Broad Egress Expands the Attacker’s Options

Wide-open egress increases the number of places an attacker can send stolen data and the number of remote services they can use to coordinate abuse. Even when the original compromise is limited to the build environment, unrestricted outbound paths can turn that compromise into exfiltration, secret harvesting, dependency poisoning, or follow-on access to other systems.

In practice, the risk is not only volume, but flexibility. A runner that can reach many destinations can blend malicious traffic into ordinary developer activity, use public infrastructure for control, and avoid simple allowlist-based detection. Tight egress policy reduces those options and narrows the set of destinations that need monitoring.

One relevant pattern is exposed secrets and over-permissioned automation. NHIMG’s Ultimate Guide to NHIs notes that 97% of NHIs carry excessive privileges and that 96% of organisations store secrets outside secrets managers in vulnerable locations, including CI/CD tools. Those conditions make runner egress especially sensitive because compromise can quickly become credential theft and downstream access.

Risk and Threat Considerations

Overly broad egress turns a runner compromise from a contained build issue into a general-purpose outbound channel. The main risk is not just data theft, but the loss of control over where the job can communicate, which weakens containment, detection, and incident response.

Failure mechanism: Attackers abuse permitted outbound paths to retrieve payloads, exfiltrate secrets or build outputs, and route callback traffic through destinations that look routine to the environment. That is especially dangerous when the runner also has access to tokens, package registries, or deployment endpoints.

Impact: A single compromised runner can expose secrets, leak source code or artifacts, and become a stepping stone into broader supply-chain or deployment compromise. The wider the egress surface, the harder it is to distinguish normal build behaviour from malicious network activity.

Standards & Framework Alignment

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

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while CIS Controls v8, NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-01 — Secret Sprawl and Credential Exposure Runner egress becomes riskier when secrets can be exposed and reused.
NHI-03 — Overprivileged Non-Human Identities Broad egress magnifies the damage when automation has excessive access.
NHI-09 — Third-Party and Supply Chain Risk CI/CD runners often contact external services, making supply-chain abuse relevant.
Recommendation — Restrict runner network reach to reduce secret exfiltration opportunities. Apply least privilege to runner credentials and outbound destinations. Allowlist only trusted external endpoints used by the build pipeline.
CIS Controls v8 CIS-12 — Network Infrastructure Management Network boundary control is central to limiting outbound paths from runners.
CIS-16 — Application Software Security CI/CD runners are part of software delivery and need controlled execution paths.
Recommendation — Define and enforce outbound network restrictions for build infrastructure. Constrain build and deployment runners to approved services and destinations.
NIST CSF 2.0 PR.AC-4 — Access Permissions and Authorization Limiting egress is an access-control decision for what the runner may reach.
DE.CM-1 — Monitoring Assets and Events Broad egress makes monitoring necessary to spot suspicious outbound traffic.
Recommendation — Restrict runner connectivity to the minimum set of approved external services. Monitor runner outbound traffic for unusual destinations and callback patterns.
NIST Zero Trust (SP 800-207) SC-7 — Enforce Segmentation and Controlled Communications Zero Trust limits what network paths a compromised runner can use.
Recommendation — Segment runner traffic and enforce per-destination communication policy.
MITRE ATT&CK T1041 — Exfiltration Over C2 Channel Attackers often use allowed outbound traffic to move data out of a runner.
T1071 — Application Layer Protocol Broad egress lets attacker traffic blend into normal protocol use.
Recommendation — Hunt for exfiltration patterns that ride on permitted outbound channels. Inspect application-layer outbound traffic for anomalous command and callback use.

Practitioner Guidance

What to verify: Confirm that each runner job can reach only the external services it genuinely needs, such as source control, artifact storage, package mirrors, and any approved deployment target. If a runner can initiate arbitrary outbound connections, treat that as a containment gap rather than a convenience issue.

Decision rule: If a runner needs broad internet access for a specific build step, isolate that step, shorten the job’s lifetime, and make the exception explicit. If the egress need cannot be justified per pipeline stage, it should not be granted by default.

Practitioner takeaway: The key question is not whether runners need network access, but whether that access is narrowly scoped enough that a compromise remains observable, attributable, and containable.