Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

GitHub Engineering 8 min read Case study mediumAdept

How GitHub uses eBPF to improve deployment safety

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.

Related posts

  • Hardening eBPF for runtime security: Lessons from Datadog Workload Protection

    Datadog Engineering hardMaster

    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. They cover getting programs to load, attach and keep firing across kernels and distributions; capturing and enriching data correctly; auditing eBPF use to reduce attack surface; coexisting with other eBPF users on a host; controlling performance cost; and shipping changes safely. Concrete pitfalls include verifier differences between kernels, inlined or renamed hook points, missed 32-bit compat syscalls and per-syscall tracepoints, and gaps from io_uring, openat2 and unusual exec paths like binfmt_misc. Mitigations include a CI matrix of tested kernels, the shared open source ebpf-manager Go library that refuses to start without a minimal set of loaded programs, and wrappers that hide verifier quirks.

  • OpenAI and Cisco introduce Shirudo

    OpenAI easyNovice

    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. Operators can monitor a proposed shield's effect on legitimate traffic before enforcing it. Shields are cryptographically signed, checked by the eBPF verifier, and recorded via TPM-backed attestation. In a controlled test, a Codex-generated shield added an input check to Java's Base64 decoder in a live Elasticsearch process and blocked a Java4Shell exploit. The project is BSD 2-Clause licensed, with BPF programs dual-licensed BSD/GPL.

  • Scaling real-time file monitoring with eBPF: How we filtered billions of kernel events per minute

    Datadog Engineering mediumAdept

    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. Their infrastructure produces over 10 billion file events per minute at roughly 5 KB each. Agent-side rule matching cuts what reaches the backend to about one million events per minute. In-kernel prefiltering goes further: static approvers are derived from detection rules, and dynamic discarders are pushed at runtime into LRU eBPF maps. Together they drop up to 94% of events before they hit the ring buffer, which lowers CPU use and prevents dropped events.

  • Coding Agent Horror Stories: The 29 Million Secret Problem

    Docker mediumAdept

    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. GitGuardian counted 2,349 stolen secrets across 1,079 repos and also found AI-assisted code leaks secrets at about twice the GitHub baseline. Docker Sandboxes is pitched as the mitigation: agents run in microVMs that see only the project workspace, and credentials stay in the host keychain and are injected by a proxy at the network boundary, so the agent only ever holds a placeholder.

  • When an AI agent came knocking: Catching malicious contributions in Datadog’s open source repos

    Datadog Engineering mediumAdept

    An AI agent called hackerbot-claw targeted Datadog's public repositories in late February 2026. It opened PRs in datadog-iac-scanner that hid a base64-encoded curl|bash payload in filenames, exploiting a GitHub Actions workflow that interpolated changed-file names into a shell script. It also filed issues in datadog-agent carrying prompt injection payloads aimed at a claude-code-action triage workflow. Datadog's LLM-based BewAIre reviewer flagged the PRs within seconds, and org-wide rulesets, minimal token permissions and disabled Actions PR approval meant the attacker could only push a harmless branch, while the prompt injections failed. The incident shows why to avoid interpolating untrusted input in workflows and to enforce least-privilege CI controls.

The quest for software engineering knowledge.

Look:
Layout: