---
title: "How GitHub uses eBPF to improve deployment safety"
description: "GitHub prevents deployment scripts from introducing circular dependencies on github.com or internal services by running them in a dedicated cgroup with eBPF programs attached."
url: "https://swe.quest/articles/how-github-uses-ebpf-to-improve-deployment-safety-e56d5b65b00aac89"
canonical: "https://github.blog/engineering/infrastructure/how-github-uses-ebpf-to-improve-deployment-safety/"
source: "GitHub Engineering"
published: "2026-04-16"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["linux","deployment","go","networking","dns"]
---

# How GitHub uses eBPF to improve deployment safety

A post on [GitHub Engineering](https://swe.quest/sources/github.md), published 2026-04-16, 8 min read, Case study. Original: [https://github.blog/engineering/infrastructure/how-github-uses-ebpf-to-improve-deployment-safety/](https://github.blog/engineering/infrastructure/how-github-uses-ebpf-to-improve-deployment-safety/)

## Summary

GitHub prevents deployment scripts from introducing circular dependencies on github.com or internal services by running them in a dedicated cgroup with eBPF programs attached. A BPF\_PROG\_TYPE\_CGROUP\_SOCK\_ADDR hook rewrites DNS connect4 calls to a userspace DNS proxy that checks domains against a blocklist. The proxy then signals a CGROUP\_SKB egress program via eBPF maps to allow or deny traffic, and maps DNS transaction IDs to PIDs so blocked requests can be logged with the originating command line. The system, built in Go with cilium/ebpf, went live after a six-month rollout. It also audits contacted domains and enforces CPU and memory limits on deploy scripts.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Go](https://swe.quest/tags/go.md) (Languages)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [DNS](https://swe.quest/tags/dns.md) (Infrastructure)

## Prerequisites

- Linux cgroups ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- DNS basics ([easy posts on DNS](https://swe.quest/tags/dns.md?difficulty=easy))
- eBPF basics ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- Go ([easy posts on Go](https://swe.quest/tags/go.md?difficulty=easy))

## Keywords

eBPF, cilium/ebpf, BPF\_PROG\_TYPE\_CGROUP\_SKB, BPF\_PROG\_TYPE\_CGROUP\_SOCK\_ADDR, cgroups, bpf2go

## Related posts

- [Hardening eBPF for runtime security: Lessons from Datadog Workload Protection](https://swe.quest/articles/hardening-ebpf-for-runtime-security-lessons-from-datadog-workload-protection-d7f876ff0025b179.md): Datadog Engineering · 2026-01-07 · Hard · 34 min read · Linux, Threat detection, Security, Operating systems, Performance engineering
  Five years of running Datadog Workload Protection, an eBPF-based runtime security agent supporting kernels from 4.15 to 6.18, distilled into six production lessons.
- [OpenAI and Cisco introduce Shirudo](https://swe.quest/articles/openai-and-cisco-introduce-shirudo-b1360eae5b5122c5.md): OpenAI · 2026-11-23 · Easy · 4 min read · Linux, Security, AI agents, Open source
  Shirudo is an open-source runtime from OpenAI and Cisco that uses eBPF "shields" to block vulnerable code paths on running Linux systems while patches are prepared, without restarts.
- [Scaling real-time file monitoring with eBPF: How we filtered billions of kernel events per minute](https://swe.quest/articles/scaling-real-time-file-monitoring-with-ebpf-how-we-filtered-billions-of-kernel-2f88f92ad0613fab.md): Datadog Engineering · 2025-11-18 · Medium · 9 min read · Linux, Threat detection, Performance engineering, Scaling
  Datadog built file integrity monitoring on eBPF to capture file changes with process and container context, which periodic scans, inotify and auditd could not provide at scale.
- [Coding Agent Horror Stories: The 29 Million Secret Problem](https://swe.quest/articles/coding-agent-horror-stories-the-29-million-secret-problem-7f5056c95d2769e4.md): Docker · 2026-07-28 · Medium · 12 min read · Supply chain security, AI for coding, Sandboxing & isolation, JavaScript, AI agents
  The s1ngularity supply-chain attack on the Nx npm package used a post-install script to find installed AI coding CLIs (Claude Code, Gemini CLI, Amazon Q) and invoke them with permission-bypass flags like --dangerously-skip-permissions, prompting the agent to inventory secrets across the home directory before exfiltrating them to public repos under the victim's GitHub account.
- [When an AI agent came knocking: Catching malicious contributions in Datadog’s open source repos](https://swe.quest/articles/when-an-ai-agent-came-knocking-catching-malicious-contributions-in-datadog-s-efd5d1e84be0c443.md): Datadog Engineering · 2026-03-09 · Medium · 16 min read · Supply chain security, CI/CD, Threat detection, AI agents, Open source
  An AI agent called hackerbot-claw targeted Datadog's public repositories in late February 2026.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
