Zscaler Blog

Get the latest Zscaler blog updates in your inbox

Products & Solutions

The Hidden Threat in Your Software Development Lifecycle: Why Self-Hosted Runners Need Zero Trust

image

The modern software delivery pipeline is a marvel of speed and automation, but it is also one of the most attractive and vulnerable attack surfaces in the enterprise. Highlighting this risk, Sonatype’s State of the Software Supply Chain 2026 report tracked more than 454,600 new malicious packages introduced into open-source registries in a single year—representing a staggering 75% year-over-year surge

To gain speed, customize build environments, and access resources locked inside private environments, enterprises prefer self-hosted GitHub Runners over GitHub hosted Runners. By running these build nodes inside their own cloud or on-premise data centers, organizations believe they are reclaiming control. After all, the code stays within their security perimeter, and expensive build minutes are offloaded to domestic, highly optimized infrastructure.

But this shift introduces a dangerous paradox. While self-hosting keeps code-level assets localized, it creates a massive, often invisible outbound security risk. The minute a self-hosted runner spins up, it is placed in a highly privileged network position. If a runner is compromised—whether via a compromised third-party package (dependency confusion), a malicious pull request, or an exploited software vulnerability in a build tool—the entire internal network is exposed. 

For security teams, the hard truth is clear: self-hosted GitHub Runners have quietly become the largest blindspot.

 

Why Traditional Firewalls Fail to Secure Self-Hosted GitHub Runners & SDLC

Let us try to understand why it becomes so difficult to secure self-hosted runners and SDLC with traditional network security. During a standard code build execution, a runner needs to perform a dizzying array of outbound network operations. It must reach out to:

  • GitHub Cloud to poll for jobs and report status.
  • Public package registries (npm, PyPI, Maven, NuGet) to pull down dependencies.
  • SaaS communication platforms like Slack to post build updates.
  • Internal private repositories like JFrog Artifactory & Confluence.
  • ITSM tools like ServiceNow to initiate change requests

Faced with this highly dynamic behavior, traditional network security tools that rely on firewalls fall apart to secure the GitHub Runners exposing the software development life cycle workloads to attacks. Here are the top reasons:

1. Firewalls Stall Developer Velocity

Developers rely on security teams to modify firewall rules so that self-hosted runners can connect to the internet and internal private networks. However, because security teams operate under strict compliance frameworks, every firewall change requires risk assessments, approvals, and change management tickets that take days or weeks, choking developer velocity and slowing time-to-market.

2. The Lateral Movement Highway

If an attacker compromises a runner (for example, by submitting a malicious pull request that executes arbitrary shell commands inside the workflow), they inherit the runner's network permissions. Because the runner sits inside your private VPC and has wide-open egress, the attacker can scan the local subnet, move laterally to adjacent database segments, or query local metadata services to harvest highly privileged IAM role credentials.

3. Exploitation of Implicit Trust

With unrestricted outbound HTTPS access, an attacker who has compromised a runner can easily exfiltrate source code, proprietary build artifacts, or harvested secrets to an external command-and-control (C2) server. Because the traffic is encrypted and destined for port `443`, traditional perimeter-based security doesn’t flag it.

4. Exposure of secrets

CI/CD pipelines run on secrets—API keys, database passwords, and cloud access tokens. If a runner is over-privileged at the network layer, any script running within the pipeline can access these secrets and send them out to an arbitrary endpoint on the internet, completely bypassing data loss prevention mechanisms.

 

The Solution: Zero Trust for Self-Hosted GitHub Runners

To overcome these critical security flaws without sacrificing developer velocity, organizations must shift away from legacy, network-centric perimeters and adopt a zero trust architecture. Zscaler Zero Trust Cloud (ZTC) is a cloud-native platform built specifically on zero trust principles to revolutionize security across the software development life cycle (SDLC). 

Here is how Zscaler Zero Trust Cloud addresses the core limitations of traditional firewalls to secure self-hosted runners:

1. ZTC hides self-hosted GitHub Runners from the network, effectively shielding them from public discovery and preventing targeted exploits. 

2. Instead of placing the GitHub Runner on a shared private network where a compromise could expose adjacent systems, ZTC establishes secure, 1-to-1 connections. These connections are verified based on workload identity and context-aware policy rather than permissive network segments. 

3. ZTC eliminates implicit trust by providing cloud-scale TLS inspection for all outbound GitHub Runner traffic. Any encrypted outbound commands destined for an attacker’s command-and-control (C2) server are blocked in real time by URL filtering.

4. ZTC delivers robust inline data protection by inspecting all outbound traffic directed from the runner to public SaaS apps like Jira, ServiceNow, or Slack. It blocks unauthorized data exfiltration, ensuring that highly privileged build secrets never leave the pipeline unauthorized.

 

Deep Dive: Securing the GitHub Runner’s Ecosystem

Securing a self-hosted runner requires a dual-pronged approach: safeguarding its communication with the public internet (SaaS and public registries) and controlling its access to internal, highly sensitive private resources. ZTC excels at both.

1. Public SaaS & Registry Access: Blocking Exfiltration

ZTC continuously monitors all outbound traffic whenever GitHub Runners interact with public applications like ServiceNow or Slack. The traffic is routed from a service endpoint to Zero Trust Exchange via Zero Trust Gateway. ZTC provides cloud-scale TLS inspection and inline data protection. It ensures that the GitHub workloads remain entirely hidden from the public internet.

Public SaaS & Registry Access: Blocking Exfiltration

2. Private Resource Access: Isolating the Crown Jewels

During the code review, testing and deployment phases, runners must inevitably connect to private internal resources, such as artifact repositories (like JFrog Artifactory or Confluence), or internal databases. 

Traditionally, this meant placing the runner in the same network segment as these sensitive assets, or configuring complex router ACLs and internal firewalls. If an attacker compromised the runner, they had an open pathway to probe your internal infrastructure.

ZTC enforces least-privilege access allowing only 1-to-1 interactions based on workload identity and security policies. There are 2 scenarios:

2.1. When the private apps are hosted in the same region: 

Under this scenario, the private application VPC is located within the same cloud region as the GitHub Runner VPC. Traffic originating from the GitHub Runner is directed to the Zero Trust Gateway via service endpoint / intercept, where local inspection is conducted before granting access to the private application.

Private Resource Access: Isolating the Crown Jewels (same region)

Figure: Secure connectivity to private apps when they are hosted in the same region

2.2. When the private apps are hosted in different regions, availability zones (AZ), or cloud:

In scenarios where the private application VPC and the GitHub Runner are distributed across distinct cloud providers, regions, or AZs, traffic travels from a service endpoint through the Zero Trust Gateway to the Zero Trust Exchange prior to private application access being authorized.

Private Resource Access: Isolating the Crown Jewels (cross region)

Figure: Secure connectivity to private applications when it is hosted in a different region

 

Key Benefits of implementing ZTC

By moving away from traditional network security, organizations unlock key advantages:

1. Protect software development from discovery and attacks

ZTC shields your critical development environments from discovery, preventing targeted exploits and pre-empting costly cyberattacks before they can begin. The self-hosted GitHub Runners are concealed from the open internet at every communication point.

2. Prevent and contain supply chain attacks by malicious code

Attackers upload malicious packages with identical names to internal ones but higher version numbers, tricking build runners into automatically installing the compromised versions. ZTC prevents GitHub runners from pulling such malicious packages. Should a GitHub runner become compromised, ZTC automatically intervenes to block any unauthorized attempts to connect to private applications.

3. Protect secrets, tokens & private keys

ZTC prevents unauthorized data extraction, ensuring that sensitive organizational information, API keys, and cloud credentials cannot be silently siphoned out, while simultaneously blocking unauthorized or unsanctioned external connections.

4. Empower developer velocity

ZTC eliminates operational bottlenecks associated with firewall configuration updates. It provides faster, secure connectivity between GitHub Runners and public or private applications, removing friction from software development pipelines.

 

Conclusion: Secure Your SDLC with ZTC

Self-hosted GitHub Runners are essential for modern engineering velocity, but leaving their network access wide open with traditional security architecture is a risk your enterprise cannot afford to take. Compromised pipelines are the ultimate backdoor into production environments.

By transitioning to Zscaler Zero Trust Cloud, you can eliminate the operational headache of firewall maintenance, protect your private VPC from lateral movement, and ensure that every outbound connection from your CI/CD environment is verified, secure, and authenticated. 

To learn more, visit Zscaler Zero Trust Cloud.

form submtited
Thank you for reading

Was this post useful?

Disclaimer: This blog post has been created by Zscaler for informational purposes only and is provided "as is" without any guarantees of accuracy, completeness or reliability. Zscaler assumes no responsibility for any errors or omissions or for any actions taken based on the information provided. Any third-party websites or resources linked in this blog post are provided for convenience only, and Zscaler is not responsible for their content or practices. All content is subject to change without notice. By accessing this blog, you agree to these terms and acknowledge your sole responsibility to verify and use the information as appropriate for your needs.

Get the latest Zscaler blog updates in your inbox

By submitting the form, you are agreeing to our privacy policy.