By NHI Mgmt Group Editorial TeamBased on StepSecurity: “Bake Harden-Runner Into GitHub's Custom Runner Images for Organization-Wide CI/CD Security” (December 16, 2025)

TL;DR: Runtime protection can start with the VM instead of being added workflow by workflow when organisations bake Harden-Runner into GitHub-hosted runners using GitHub’s custom runner images, according to StepSecurity. That shifts CI/CD security toward platform-level enforcement, where policy consistency and runner lifecycle control matter more than developer memory.


At a glance

What this is: StepSecurity describes how GitHub custom runner images move CI/CD runtime protection from individual workflow files into the runner image itself, creating org-wide enforcement for GitHub-hosted runners.

Why it matters: This matters because CI/CD security teams can reduce missed controls, inconsistent rollout, and workflow sprawl while protecting sensitive build-time secrets and execution paths.


Context

GitHub Actions security often fails at the point where protection depends on humans remembering to add the right step to every workflow. That is a governance problem as much as a technical one, because the control surface is fragmented across repositories, teams, and release processes.

Custom runner images change the control model by moving runtime protection into the runner itself. For identity and access teams, that matters because CI/CD runners often handle cloud secrets, source code, and build-time credentials, so the runner becomes a high-value trust boundary rather than just compute capacity.


Key questions

Q: What breaks when CI/CD runtime protection depends on every workflow including the same step?

A: Governance consistency breaks first, followed by coverage drift. In large GitHub Actions estates, workflow-level controls depend on many teams making the same implementation choice every time, which is fragile. A missed step can leave a build path unprotected, and the gap becomes harder to spot as repositories and pipelines grow.

Q: Why do GitHub-hosted runners need stronger governance than ordinary build machines?

A: They often hold cloud secrets, source code, and release permissions, so a runner compromise can affect build integrity and downstream delivery. Because the runner executes untrusted code in a privileged context, controls must cover the execution environment itself, not only the workflow definition.

Q: What are the signs that CI/CD security controls are not working well enough?

A: Common warning signs include secrets appearing in code or adjacent collaboration tools, policy violations that remain unresolved, weak visibility across the pipeline, and scanners that miss misconfigurations until late. If teams rely on manual review, struggle to trace findings back to owners, or cannot prioritize issues by impact, the control set is probably too fragmented to be effective.

Q: How should organisations handle CI/CD security when they already have many workflows in production?

A: Use a migration path that preserves existing pipelines while shifting the control into the runner image. That lets teams keep delivery stable, avoid mass workflow rewrites, and steadily reduce dependence on per-file security steps as the image becomes the default enforcement layer.


Technical breakdown

Why embedding runtime protection in the runner image matters

A custom runner image is a prebuilt virtual machine image that already contains the tools, dependencies, and security controls a job will use at startup. When a runtime security agent is baked into that image, it activates as part of the VM boot process instead of being added later in a workflow step. That changes the enforcement model from opt-in per job to inherited-by-default across the runner fleet. The result is fewer missed deployments, less variation across repositories, and a tighter operational boundary around CI/CD execution. Practical implication: treat the runner image as the security control point and govern its build, versioning, and rollout like production infrastructure.

Practical implication: govern the runner image as the control point, not each workflow file.

How custom runner images reduce workflow drift and policy gaps

Workflow-level security depends on developers consistently including the right action in every job, which is brittle at scale. Image-level security removes that dependency because the agent starts before the workflow logic executes and remains present for all jobs using that image. Policy consistency also improves when enforcement is tied to the runner lifecycle rather than code changes in individual repositories. That is especially relevant in CI/CD environments where many teams operate independently but still access shared secrets, build systems, and deployment paths. Practical implication: centralise policy rollout through image lifecycle management so security does not depend on manual workflow edits.

Practical implication: roll out policy through image lifecycle management, not manual workflow edits.

Why CI/CD runners need the same runtime scrutiny as other high-trust systems

CI/CD runners sit inside a privileged execution layer because they process source code, fetch dependencies, handle credentials, and often touch production delivery paths. If a build runner is compromised, the blast radius can extend into secrets exposure, poisoned artifacts, or downstream deployment abuse. That makes runner monitoring and runtime policy enforcement a core part of identity and access governance, not just pipeline hygiene. The shift to baked-in protections reflects a broader move toward controlling trust at the infrastructure boundary rather than relying on application-by-application discipline. Practical implication: classify runners as sensitive infrastructure and apply the same lifecycle controls you would use for other privileged systems.

Practical implication: classify runners as sensitive infrastructure and apply privileged lifecycle controls.


Threat narrative

Attacker objective: The attacker aims to gain trusted access to CI/CD execution paths so they can steal secrets, tamper with builds, or pivot into downstream systems.

  1. Entry occurs when attackers target CI/CD execution environments that already have access to build credentials, source code, and delivery tooling.
  2. Credential exposure or workflow weakness then allows malicious activity to reach the runner process before protections are consistently present.
  3. Escalation happens when a compromised runner can observe, manipulate, or inherit sensitive pipeline context across builds and repositories.
  4. Impact is the theft or misuse of secrets, source code, or build outputs that can affect downstream software supply chains.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Runner images are becoming the real policy boundary for CI/CD security. When runtime protection depends on workflow authors remembering a step, governance will eventually fragment across repositories and teams. Moving the control into the image changes the enforcement point from developer behaviour to platform lifecycle management. That is a better fit for enterprise CI/CD, where consistency matters more than local convenience. Practitioners should treat runner images as governed security assets, not just build runtime plumbing.

CI/CD control failure is often a lifecycle problem, not a detection problem. The issue here is not that organisations lack monitoring tools, but that their deployment model lets protection drift with every workflow change. A baked-in agent closes that drift window by making protection part of the inherited runtime. The named concept here is workflow drift exposure: the gap between intended pipeline policy and what actually runs. Teams should measure that gap explicitly rather than assuming repository standards are enforced everywhere.

GitHub-hosted runners increasingly behave like privileged non-human identities. They authenticate to repositories, access secrets, fetch dependencies, and execute release logic with broad delegated trust. That makes runner governance adjacent to NHI governance, especially when credentials and tokens are present during execution. The control question is not whether a workflow is well written, but whether the execution environment itself is governed as a trusted identity-bearing component. Practitioners should align runner lifecycle control with NHI oversight and privileged access review.

Centralised policy only helps if runner image governance is disciplined. Baking controls into images can improve consistency, but only if teams version, patch, and retire those images with the same seriousness they apply to production images. Otherwise, the organisation simply relocates drift from workflows into image sprawl. The next maturity step is to manage runner images as controlled artifacts with clear ownership, release cadence, and rollback rules. Practitioners should put image provenance and retirement under formal security governance.

This pattern validates platform-level enforcement over checklist security. CI/CD environments do not scale safely when every team must remember every control in every workflow. The market signal is that pipeline security is moving toward inherited runtime protection, where the runner environment carries the baseline policy and workflows consume it. That approach does not remove the need for least privilege or secret hygiene, but it does reduce dependence on human consistency. Practitioners should expect more security control to shift from pipeline code into the execution layer.

From our research library:

What this signals

Workflow drift exposure: CI/CD security fails when protection lives in repository files rather than the execution layer. Baked-in runner controls reduce that drift, but only if image governance is versioned and retired with the same discipline as production infrastructure.

For identity and access programmes, the important shift is that GitHub-hosted runners now look more like privileged non-human identities than disposable compute. That means lifecycle control, delegated trust, and execution-time policy need to sit inside the governance model, not outside it.

The broader signal is that pipeline security is moving toward inherited runtime enforcement, where the platform carries baseline controls and teams inherit them by default. That reduces manual error, but it also raises the bar for image provenance, patching, and rollback discipline.


For practitioners

  • Bake runtime protection into custom runner images Include the runtime security agent in the base image used by GitHub-hosted runners so every job inherits protection without per-workflow edits.
  • Govern runner images as security assets Track image ownership, versioning, patching, and retirement so the security posture of the runner fleet stays consistent across repositories.
  • Audit workflows for legacy per-job controls Find workflows that still rely on manually inserted security steps and use image-level deployment to retire that operational dependency.
  • Align CI/CD oversight with privileged access review Treat runner execution as a high-trust path that can access secrets and build outputs, then include it in privileged access governance reviews.

Key takeaways

  • CI/CD runtime protection becomes more reliable when it is embedded in the runner image rather than added separately to every workflow.
  • This model reduces governance gaps caused by workflow sprawl, but it also makes runner image lifecycle management a core security responsibility.
  • For identity teams, GitHub-hosted runners should be treated as privileged execution assets whose trust posture must be governed centrally.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHICI/CD runners act as high-trust non-human identities with broad build-time access.
NHI-06 — Insecure Cloud Deployment ConfigurationsCustom runner images shift control into deployment configuration for GitHub-hosted runners.
Recommendation — Review runner permissions as NHI-05 and remove any access not required for build execution. Harden runner image configuration under NHI-06 and treat it as governed infrastructure.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementCompromised CI/CD runners can expose secrets and enable movement into downstream systems.
Recommendation — Map CI/CD detections to TA0006 and TA0008 to spot credential theft and downstream movement.
CIS Controls v8CIS-5 — Account ManagementRunner lifecycle and access consistency depend on controlled account and token management.
Recommendation — Apply CIS-5 to govern accounts and tokens that CI/CD runners can use.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThe article is fundamentally about governing access scope inside privileged build runners.
Recommendation — Use PR.AA-05 to keep CI/CD runner entitlements consistent across repositories and workflows.

Key terms

  • Custom Runner Image: A custom runner image is a prebuilt virtual machine image used by GitHub-hosted runners. It bundles software, dependencies, and security controls so jobs start from a known baseline instead of assembling the runtime ad hoc inside each workflow.
  • Workflow Drift: Workflow drift happens when an access or provisioning process slowly diverges from its approved design. In AI-enabled environments, drift can occur when generated workflows omit edge cases, approvals, or exception logic, creating a gap between what the organisation thinks it enforces and what actually runs.
  • Runner Lifecycle Management: Runner lifecycle management is the control of how build runners are built, updated, versioned, retired, and replaced. It matters because any security agent embedded in the image is only as current and trustworthy as the image governance around it.
  • Inherited Runtime Protection: Inherited runtime protection means the security control is carried by the execution environment rather than added by each application or workflow. This reduces dependence on manual implementation and makes baseline enforcement more consistent across large estates.

Deepen your knowledge

NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, and secrets management. It is designed for practitioners who need to connect identity controls to real operational systems across the enterprise.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 19, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org