When we review a build pipeline, we want to know where a dependency can send data after it starts running. A lockfile can identify the package we intended to install. A scanner can identify a known vulnerability. Neither answer tells us whether an installation script can upload the workspace to an unrelated server.

CI/CD egress controls address that outbound path. They can make an unexpected connection fail and leave evidence of the attempt. Their usefulness depends on where they run, what they inspect, and whether the code being contained can change the rules.

We would compare Buildcage, Bullfrog, and GitHub’s native egress firewall by following the code from job startup through build execution and artifact publication. Each control needs a clear place in that sequence, including what runs before and after it.

This comparison reflects primary documentation checked on November 17, 2026. The examples are adoption patterns, not results from a head-to-head lab test. GitHub’s native firewall remains a technical preview, and the exact versions and inputs matter. We checked the current repositories because older indexed documentation describes different defaults and capabilities.

Start with the code and data you need to contain

Write down the job’s purpose before collecting domains. For a hypothetical service build, the answer might be:

  • Read an approved source revision and dependency lockfile.
  • Download packages through a reviewed registry or mirror.
  • Run compilation and tests without production credentials.
  • Produce a candidate image and assessment records.
  • Let a separate promotion job publish an accepted digest.

Now identify every place code can execute: action initialization, checkout hooks, dependency lifecycle scripts, compiler plugins, tests, Dockerfile instructions, report generators, and action cleanup. Include commands that run after the apparent main build has finished.

For each phase, record readable data, available identity, writable storage, and outbound destinations. If a build has no reason to read a deployment credential, remove it before considering how to block its transmission. If it needs a private dependency, give it narrowly scoped download access rather than the publisher’s identity.

Our DevSecOps guide for small teams covers assigning ownership to these controls. The egress owner needs authority to investigate a new destination and enough context to decide whether it belongs in the build.

Compare enforcement boundaries before comparing features

ControlBoundary to evaluateBest first question
Buildcage Docker actionDocker build RUN executionWhich build operations occur outside that execution boundary?
Buildcage isolated-runThe command wrapped by the actionWhat files or outputs can affect a later unwrapped step?
BullfrogRunner traffic after its setup stepCan later code regain the privilege needed to alter enforcement?
GitHub native firewallA boundary outside the runner VMWas the intended policy actually loaded for this run?
StepSecurity Harden-RunnerSupported runner monitoring and egress controlsWhich controls are active for this runner and subscription?
Managed private networkRunner subnet, routes, firewall, and resolversCan the job bypass the intended gateway or reach sensitive internal services?

The following sections explain the scope behind each question. An external boundary can resist changes from inside a runner while still enforcing a policy that the workflow author was allowed to weaken. Policy ownership and enforcement placement need separate review.

Buildcage: narrow the network available to build execution

The Buildcage Docker action sets up a builder for Docker builds on compatible Linux runners. Its current inspect engine terminates TLS to evaluate methods and URLs. The universal engine leaves TLS intact and uses destination rules with less application detail. Certificate-pinned clients and separate trust stores therefore need compatibility testing.

Keep the engine explicit in your workflow. An upgrade should not silently change which information your policy can inspect.

A small Buildcage example

This fragment assumes a reviewed repository has already been checked out on a compatible Linux runner with Docker. Its Dockerfile must be suitable for the two PyPI download paths shown; these rules are not a general Python-build allowlist. Other package sources, operating-system repositories, redirects, and tool downloads need their own reviewed rules.

- name: Constrain Docker build execution
  uses: buildcage/docker@1a8142a6fe143c76982405411cf41652cb247d54 # v4.4.3
  with:
    proxy-mode: restrict
    proxy-engine: inspect
    allowed-url-rules: |
      GET https://pypi.org/simple/**
      GET https://files.pythonhosted.org/packages/**

- name: Connect Buildx to the constrained builder
  uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
  with:
    driver: remote
    endpoint: docker-container://buildcage

- name: Build a candidate without publishing it
  run: docker buildx build --progress=plain --load --tag candidate:egress-review .

- name: Evaluate build network evidence
  if: ${{ !cancelled() }}
  uses: buildcage/docker/report@1a8142a6fe143c76982405411cf41652cb247d54 # v4.4.3
  with:
    fail-on-blocked: true

The input reference documents these rules and the reporting gate. Allow inputs are additive: adding a broad host or passthrough rule can reopen traffic that a narrow URL rule appears to exclude. known-blocked-rules changes treatment in the report without allowing the connection. Review it as an exception to the job’s failure policy.

The report uses a GitHub status condition to run after success or failure unless the job is cancelled. A cancelled or incomplete run must hold promotion even when no report is produced.

Use an audit run on synthetic or non-sensitive inputs to discover dependencies before enforcing. Inspect the proposed rules yourself. Observing a connection does not establish that the build should make it.

What the Docker action leaves outside its boundary

Buildcage’s security model excludes the workflow/Dockerfile author and BuildKit daemon fetches. Examples include base images, remote ADD sources, Git contexts, and frontend images. An untrusted sibling step with host or Docker access can also interfere with the builder or its evidence.

The same model identifies a reporting risk when a local build export overwrites a configuration file that the report reads again. Keep exports away from policy files and set critical report inputs explicitly in the trusted workflow.

Our resulting review would cover the Dockerfile, selected builder, image and frontend digests, remote inputs, and every host-side step around the build. Test a network request inside RUN separately from a daemon-side fetch. Keep both results in the review because they exercise different network paths.

The separate Buildcage isolated-run action wraps ordinary workflow commands. That is useful when the risky code runs in a shell step rather than a Docker build. Its scope still ends with the wrapped execution: persisted files and outputs can influence later steps. Review its filesystem modes, permitted writes, and cleanup behavior before treating it as a boundary for a whole job.

Bullfrog: runner-level filtering with a privilege dependency

Bullfrog offers audit and block modes, domain/IP allowlists, and job-summary reporting. Its documented support covers specified GitHub-hosted Ubuntu runners; a workflow using job-level container: is unsupported. Put its action before other executable steps and add it to each job that needs protection.

For an ordinary supported Ubuntu job, this is a starting fragment:

- name: Restrict outbound connections before other steps
  uses: bullfrogsec/bullfrog@7dee337d4575320b6d8cbe9a56d48d2fb765963a # v0.11.1
  with:
    egress-policy: block
    dns-policy: allowed-domains-only
    enable-sudo: false
    allowed-domains: |
      pypi.org
      files.pythonhosted.org

The selected domains are examples. Resolve the full needs of your workflow before adopting them. This configuration does not promise zero outbound traffic: the action has operational allowances, and an allowed service may accept more than the request you intended.

Bullfrog’s architecture guide describes nftables rules and an agent that evaluates DNS traffic and new connections. It learns addresses from DNS responses; it does not decrypt requests to inspect HTTP methods or paths. Containers started by a step and job-level container execution have different coverage.

That design makes two tests particularly useful. First, check a denied hostname and a direct address separately. Second, test the exact container/network arrangement your build uses. A host-side request is not evidence about every container path.

The documented bypass risks make root access central to the threat model. Root can alter host enforcement. Disabling sudo is part of using the control seriously, but we would also review Docker access, capabilities, privileged helpers, and anything that can create an execution environment outside the intended restrictions.

If a setup tool requires elevated privilege, do not quietly restore unrestricted sudo for the rest of the job. Evaluate a prepared runner image, a different installation path, or a separate trusted preparation phase. Document any execution that occurs before filtering starts.

GitHub native egress firewall: check that the policy loaded

GitHub’s current early-access guide describes Linux technical-preview support for log and file-based enforce modes. Enforcement sits outside the runner VM. Standard jobs opt in with ubuntu-24.04-firewall; larger-runner access follows a separate preview process.

The policy belongs at .github/egress-firewall.yaml, and the job needs contents: read. The guide warns that absent permission can leave the policy unenforced without a warning. It reads policy from the workflow’s ref. Default GitHub allowances also remain unless explicitly disabled.

# .github/egress-firewall.yaml
mode: enforce
allow:
  - pypi.org
  - files.pythonhosted.org

This adds hosts to the defaults. It is not a disconnected job. Check the current guide before adopting no-default-urls or changing runner configuration.

HTTPS inspection terminates TLS, so test certificate pinning, mTLS, and the actual clients you use. The guide documents compatibility failures even in log mode. Treat preview behavior as something to test on a disposable workflow before introducing private data.

For adoption, we would require a policy-load check and a denied-request test as release prerequisites. Record the repository revision, workflow identity, policy revision, runner label, and returned decision together. Do not infer enforcement from a green job or from the presence of a YAML file.

Policy changes deserve the same scrutiny as workflow changes. Exercise the events you use: a pull request, a push, a manual dispatch, and a reusable workflow can create different trust assumptions. A policy edited on the default branch is not evidence that a different revision ran under those rules.

Other options worth evaluating

StepSecurity Harden-Runner combines egress controls with workflow-related monitoring. Its current documentation distinguishes Community and Enterprise capabilities and warns that an unlicensed self-hosted deployment can be a successful no-op. Check runner support, subscription, telemetry handling, and the policy features you actually need. Run a synthetic detection and denial test before counting the installed action as a control.

For a team already operating a private runner network, a separately administered firewall or proxy may be the appropriate outer boundary. GitHub also supports Azure private networking for eligible larger runners, allowing the network’s outbound policies to apply. That is a distinct deployment choice from the native firewall preview.

Private networking can expose internal systems as well as protect traffic from the public internet. Inventory reachable package mirrors, metadata services, management APIs, databases, and peered networks. Give the runner only the routes its job needs. If a proxy is intended to mediate every request, test that removing proxy variables does not restore a direct path.

Runner agents can interact through DNS, packet rules, Docker restrictions, certificate stores, and log collection. We would introduce them one at a time. Establish one working baseline, add another layer only for a specific uncovered path, and rerun the tests for both.

An allowed destination can still carry data out

Suppose the build needs a shared source-hosting service to download a dependency. A domain allowlist may permit that same service’s upload APIs. A credential can belong to an attacker, so restricting only your own token does not address every possible write.

Method and path controls can reduce this exposure, but they need a service-specific interpretation. A GET request can transmit data in its path, query, or headers. A read-only package mirror may record requested names in logs. Allowing one host does not mean every tenant, repository, bucket, or operation behind it is acceptable.

For each allowed destination, ask:

QuestionEvidence to collect
Who operates the destination and can receive submitted data?Service owner, tenancy model, relevant account/resource scope
Which operation does the build need?Method, path, protocol, and identity where the control can inspect them
Can arbitrary data be embedded in that operation?Harmless canary test and receiver-side observation
Can a redirect or secondary fetch reach another destination?Full request chain under the enforced policy
What happens when a passthrough exception is used?The narrower set of fields still inspected and its documented owner
Could a broad wildcard admit someone else’s resource?Explicit review of subdomain ownership and shared hosting

Keep confidentiality claims tied to the data, protocol, and recipient restrictions you have actually tested.

Logs, artifacts, and caches are output channels too

A job does not need a new internet connection to copy a readable file into standard output. The CI runner can deliver that output through its normal logging connection. The same applies to job summaries, test reports, cache entries, build layers, and uploaded artifacts.

We would keep a separate output policy: which files are collected, who may read them, how long they remain, and whether a less-trusted job can influence something a privileged job later consumes. Review archive paths, symlinks, sizes, and parsers before collecting arbitrary build output.

Do not place real secrets in test URLs or canaries. Inspection logs can themselves become sensitive records. Restrict their audience and retention, and test what the collector retains. A network control that records a suspicious request may preserve the data that made the request suspicious.

Our agent sandbox security guide covers related filesystem, credential, and lifecycle boundaries. The same reasoning applies to dependency scripts and compiler plugins: constrain what they can read and what later processes will do with their output.

Build an allowlist from reviewed behavior

Start with a non-sensitive representative workload. Include a cold dependency cache, a warm cache, release and test paths, supported platforms, and recovery behavior. A single successful cached build may exercise almost none of the network paths a clean runner needs.

For every observed destination, record the initiating command and a reason. Challenge telemetry, convenience downloads, fallback registries, and endpoints nobody can explain. Check package manifests and tool configuration against the trace. An already-compromised dependency can generate a plausible-looking baseline.

Prefer an exact host and required port. Where application inspection exists, narrow the operation further. Keep exceptions individually reviewable. Avoid fixing a failed build by allowing an entire cloud-provider domain or arbitrary DNS resolution.

Test audit and enforcement separately. Audit helps discover behavior; enforcement needs a controlled denial and evidence from the component that made the decision. Preserve the last working policy and a recovery path that uses synthetic data, rather than switching a sensitive production build to unrestricted networking during an incident.

Acceptance tests we would run before enabling private inputs

Use a disposable repository and endpoints you control. The expected outcomes below are requirements to test, not observed results for the products above.

TestAcceptance condition
Required dependency downloadIt succeeds with the intended client and credentials
Unlisted HTTPS destinationThe request is denied, with policy evidence and no receipt at the controlled endpoint
Direct IPv4 and IPv6 pathsEach supported address family follows the declared rule; absence of IPv6 is recorded as absence
DNS and alternate resolverUnapproved names cannot leave through an overlooked resolver path
UDP or QUICBehavior matches the declared protocol coverage, including fallback
Allowed host, disallowed operationA method/path restriction denies the synthetic write where that feature is in use
Shared-service destinationThe test checks resource/tenant scope, not only the parent hostname
Proxy variables removedCode cannot bypass a required network enforcement point
Docker build pathsHost steps, RUN, daemon fetches, service containers, and cleanup are assessed separately
Missing or changed policyThe release gate detects missing enforcement instead of accepting a successful build
Privilege attemptThe workload cannot obtain authority to replace or disable its enforcement component
TLS compatibilityThe real SDK, package manager, and authentication flow work without disabling certificate checking
Logging and artifactsSynthetic canary data appears only in the intended restricted outputs
Cancellation and timeoutExecution stops and no reusable worker, credential, or unexpected background process remains

Keep an allowed positive control for every denied-path test. A dead endpoint, broken certificate, missing utility, or unrelated route failure can make a weak policy look effective. A timeout alone is inconclusive.

For a controlled HTTP probe, this small Bash fragment records the client result without claiming it proves the firewall worked. Set PROBE_URL to a harmless endpoint you own; put no credentials in it. Run it from the exact execution context being evaluated.

set -euo pipefail
: "${PROBE_URL:?Set a harmless controlled HTTPS endpoint}"

case "$PROBE_URL" in
  https://*) ;;
  *) printf '%s\n' 'Use an HTTPS test endpoint' >&2; exit 2 ;;
esac

probe_status=0
curl --silent --show-error --fail \
  --connect-timeout 5 --max-time 10 \
  --output /dev/null "$PROBE_URL" || probe_status=$?

printf 'probe_exit=%s\n' "$probe_status"
exit "$probe_status"

For a denied case, expect a nonzero client result and corroborating firewall and receiver-side evidence. A proxy-generated response and a destination-generated error are different observations. This probe tests one HTTP request; keep DNS, raw addressing, other protocols, and output collection as separate cases.

Connect the evidence to promotion

A network block and a failed pipeline are separate events. Code can catch a connection error and return success. A reporting step can be skipped, configured to tolerate findings, or produce incomplete output. Decide what each state means before the build gets credentials for promotion.

We would hold the candidate when enforcement did not initialize, required evidence is absent, a prohibited request occurred outside an approved test, or the policy revision is unexpected. Required checks should protect that decision from changes in the same less-trusted workflow.

The decision record should identify the source revision, runner and tool versions, policy, observed exceptions, candidate digest, test results, and reviewer or automated policy decision. A later deployment must use the assessed candidate. If a rebuild changes its digest, reassess it.

For everyday adoption, choose the smallest scope that addresses the risky execution, then account for the paths it leaves outside. Use an independently administered outer boundary when the workload must not control network policy. Keep build, signing, and deployment identities separate. Revisit the allowlist when dependencies or runner images change, and retain a test that demonstrates an unapproved connection is actually denied.

DevSecOps services from Libre Labs View all posts