Skip to content

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

Heroku Engineering 7 min read How-to mediumAdept

Using GitHub Actions with Heroku Flow for additional Security Control

Because GitHub Orgs can't allowlist Heroku IP ranges, Heroku offers a sample pattern: a self-hosted GitHub Actions runner deployed as a Docker app in a Heroku Private Space with static outbound IPs, plus a Heroku Flow Action. The action uses the Platform API's Source Endpoint to upload private repo code, deploy apps on push, dispatch or schedule events, and create, update or remove Review Apps on pull request events. A weekly scheduled workflow rebuilds and redeploys the runner to meet GitHub's 30-day update requirement. Tradeoffs include no repo link in the Review App UI, no automatic Heroku CI tests, no Fir support, and a custom runner image that other actions should be tested against.

Assumes: GitHub Actions workflowsHeroku Pipelines and Review AppsDocker basics

Related posts

  • How GitHub uses GitHub Actions and Actions larger runners to build and test GitHub.com

    GitHub Engineering mediumAdept

    GitHub moved CI for GitHub.com to GitHub Actions on larger runners, peaking at about 4,500 concurrent 32-core runners, 15,000 jobs per hour and 150,000 cores. Custom VM images that pre-bundle tools and a cached build of the project source, refreshed several times a day through an API, cut workflow time from about 50 to 12 minutes. Reusable workflows keep CI configuration and runner selection central across repositories, and reusing results when Git tree IDs match skips 300-500 runs a day. Isolated runners reach private VPC services through an OIDC-token-validating remote access gateway, whose scaffolding is open-sourced.

  • Migrating Your GitHub CI to Hugging Face Jobs

    Hugging Face mediumAdept

    GitHub Actions jobs can run on Hugging Face Jobs by using a dispatcher Space and a GitHub App that receive `workflow_job.queued` webhooks. For any `hf-jobs-*` runs-on label, the dispatcher mints a short-lived runner registration token and launches an ephemeral self-hosted runner on matching CPU or GPU hardware. Setup takes duplicating the dispatcher Space on cpu-upgrade (cpu-basic can sleep and leave jobs queued), creating the App, and a one-line runs-on change. For Trackio, a Playwright Docker image cut CPU CI from 1m40s to 1m10s, and a new T4 GPU suite runs in 45s for under a cent.

  • How we build containerized services at GitHub using GitHub

    GitHub Engineering easyNovice

    GitHub runs hundreds of internal and production services on a "paved path": a Kubernetes-based, multi-cluster, multi-region platform plus conventions and custom tooling layered on top. Services are onboarded via a Hubot ChatOps scaffold command and a GitHub App that opens a PR with deployment.yaml, Kubernetes Deployment/Service manifests, a Debian Dockerfile, and CI checks that build images on every push. Each app/environment gets its own namespace, secrets are injected per-environment from a central vault, and deployments render manifests with the latest image and secrets before applying them across clusters. Centralizing capacity planning, security scanning, base images and deploy tooling lets teams skip cluster management and focus on their applications.

  • Enabling branch deployments through IssueOps with GitHub Actions

    GitHub Engineering mediumAdept

    GitHub's branch-deploy Action brings the branch deploy model to any repository through IssueOps: comment commands like `.deploy` or `.deploy noop` on a pull request trigger a GitHub Actions workflow that deploys the branch before it is merged. Because changes are deployed and validated before merging, `main` stays stable and rollback means simply redeploying `main`. A sample workflow shows how the action's `continue`, `noop` and `ref` outputs gate deployment steps. The action also respects branch protection, supports deploy locks and configurable environments, and GitHub and npm use it internally, mainly for Terraform infrastructure repos where ChatOps isn't available.

  • MCP Horror Stories: The GitHub Prompt Injection Data Heist

    Docker mediumAdept

    A prompt injection planted in a public GitHub issue can hijack an AI agent using the official GitHub MCP server. When a developer asks it to "check the open issues," the agent uses a broad personal access token to read private repositories and leak salary and project data into a public pull request, as Invariant Labs demonstrated in May 2025. Docker's mitigation runs tools through the Docker MCP Gateway with interceptors, which are exec, container or HTTP hooks that inspect each tool call before and after it runs. A cross-repo-blocker script locks each session to the first repository accessed and blocks calls to any other repository. A Docker Compose setup with audit logging and repository-scoped OAuth is included as defense-in-depth against credential overreach.

The quest for software engineering knowledge.

Look:
Layout: