View on GitHub

field-cage

A lightweight eBPF agent that monitors and restricts outbound network connections on GitHub Actions runners.

field-cage

OpenSSF Scorecard

field-cage is a lightweight eBPF agent that monitors and restricts outbound network connections on GitHub Actions runners, designed to detect and prevent supply-chain attacks such as unauthorized data exfiltration or external code fetching during builds.

日本語ドキュメント

Overview

field-cage hooks into the Linux kernel via eBPF to observe every outbound connection attempt in real time. It maps raw IP addresses to domain names through DNS packet monitoring, then evaluates each connection against a YAML allowlist.

Features

Quick Start

Add the composite action to a workflow with an inline allowlist:

- uses: takihito/field-cage@v0.1.0
  with:
    version: v0.1.0
    mode: block
    allow: |
      github.com
      api.github.com
      objects.githubusercontent.com
      registry.npmjs.org

See Usage for the policy file format and standalone binary options, and GitHub Actions for composite action inputs, examples, and release verification.

Log output

verdict=ALLOW                pid=1234   tgid=1234   comm=curl             dst=api.github.com (140.82.121.5):443
verdict=DENY(not-in-policy)  pid=1235   tgid=1235   comm=python3          dst=suspicious.example.com (93.184.216.34):443
verdict=DENY(no-domain)      pid=1236   tgid=1236   comm=curl             dst=93.184.216.34:80
verdict meaning
ALLOW connection permitted by policy
DENY(not-in-policy) domain resolved but not in the allowlist
DENY(no-domain) domain unknown (IP direct, or DNS response not yet observed)
SKIP(dns) DNS traffic exempt from policy evaluation (trusted resolver or loopback; any port-53 destination when allow_all_dns is set or no policy is loaded)
SKIP(loopback) loopback destination (127.0.0.0/8, ::1), excluded from enforcement

Supply-Chain Security

See the GitHub repository for source, issues, and releases.