Join our Newsletter — 33% off our NHI Course
Home› Glossary› Architecture & Implementation› Self-hosted runner
Architecture & Implementation

Self-hosted runner

← Back to Glossary
By NHI Mgmt Group Updated October 31, 2026 Domain: Architecture & Implementation

A CI/CD execution environment managed by the organisation rather than the platform vendor. It often has broad access to source, secrets, and deployment targets, which makes it a high-value persistence and exfiltration point if workflow controls are weak.

What a self-hosted runner changes in the CI/CD security model

A self-hosted runner is not just another execution slot, it is an organisation-controlled machine or environment that runs build and deployment jobs. That shifts trust, because the runner can sit much closer to source code, secrets, internal networks and release targets than a vendor-managed runner typically does.

The security implication is simple: the runner becomes part of the trusted execution boundary. If that boundary is weak, an attacker does not need to break the platform first, they may only need to influence a workflow, a dependency, an action or a job that executes on the runner.

Why self-hosted runners are high-value targets

Self-hosted runners often have broader network reach and longer-lived local state than ephemeral cloud runners. That makes them attractive for secret theft, lateral movement, persistence and release tampering, especially when build jobs inherit broad repository, deployment or cloud credentials.

They are also exposed to workflow abuse. A malicious pull request, injected script, compromised third-party action, or poisoned pipeline can turn the runner into an execution foothold. NHIMG’s OWASP CI/CD Top 10 CICD-SEC-4 Poisoned Pipeline Execution Guide is useful here because poisoned pipeline execution is one of the most direct ways an attacker can convert normal CI activity into hostile code execution.

Because the runner is organisation-managed, compromise can persist beyond a single job if the host is reused, poorly isolated, or allowed to retain credentials, caches, artifacts or workspace state between runs.

Exposure, isolation and access boundaries

The main design question is what the runner can reach, not just what it can execute. A runner with access to production networks, cloud metadata, signing keys, secret stores or privileged deployment channels has a very different risk profile from one constrained to a narrow build sandbox.

That is why runner hardening is inseparable from identity and access control. The runner should only be able to use the minimum credentials and network paths needed for the specific workflow. NHIMG’s OWASP CI/CD Top 10 CICD-SEC-5 Insufficient PBAC Guide aligns closely with this problem because pipeline-based privilege, scoped secrets and runner isolation are central controls for reducing overexposure.

Configuration drift is another common weakness. A runner that is not inventoried, patched and baselined can accumulate risky settings, extra tooling, stale tokens or permissive file permissions over time. NHIMG’s OWASP CI/CD Top 10 CICD-SEC-7 Insecure System Configuration Guide is relevant because the runner is only as safe as the host configuration underneath it.

Credential, secret and artifact handling on runners

Self-hosted runners matter because they often touch the most sensitive material in the delivery pipeline. That includes source credentials, repository tokens, signing material, deployment secrets, temporary cloud credentials and build outputs that may later be promoted into production.

When those assets are cached, echoed, logged, reused or left on disk after a job completes, the runner becomes an exfiltration point. Even without a direct compromise, weak workflow design can leak secret material through logs, artifacts, environment variables or third-party tooling.

NHIMG’s CI/CD Pipeline Identity Security Guide is useful for understanding why trusted publishing, token scope, OIDC federation and signing controls matter so much in this environment, because runner compromise is often really credential compromise.

Operational controls and recovery expectations

In practice, the runner should be treated as disposable infrastructure whenever possible. Ephemeral runners reduce persistence, while workload isolation, tight egress control and separate trust zones reduce the blast radius if a workflow is abused.

If a runner is suspected of compromise, the response should include host rebuild, secret rotation, workflow review and verification that no tainted artifacts or release credentials remain in circulation. NHIMG’s CI/CD Pipeline Compromise Playbook is directly relevant because runner compromise is often one symptom of a broader pipeline incident, not an isolated endpoint event.

Standards & Framework Alignment

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

CIS Controls v8, NIST SP 800-53 Rev 5, SLSA and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareSelf-hosted runners rely on hardened, inventoried host configuration and patch discipline.
CIS-6 — Access Control ManagementRunner jobs and hosts must have tightly scoped access to secrets, repos and deployment targets.
CIS-16 — Application Software SecurityWorkflow execution and build logic are application delivery surfaces that need abuse-resistant controls.
Recommendation — Harden and inventory runner hosts so build execution cannot drift into an unsafe baseline. Restrict runner access paths to the minimum credentials and systems each workflow needs. Validate build and workflow behavior so pipeline code cannot execute with unsafe assumptions.
NIST SP 800-53 Rev 5CM-2 — Baseline ConfigurationRunner hosts need a known-good configuration baseline before they run trusted jobs.
AC-6 — Least PrivilegeRunners should only access the secrets, systems and operations required for the job.
SI-3 — Malicious Code ProtectionRunner workloads can execute untrusted code from workflows, dependencies or injected steps.
Recommendation — Establish and maintain a secure baseline for every runner host and image. Apply least privilege to runner accounts, tokens and network access paths. Inspect and contain untrusted build inputs before they execute on runner infrastructure.
SLSASupply-chain Levels for Software ArtifactsRunner trust is central to artifact provenance and build integrity.
Recommendation — Use provenance and build isolation practices that preserve artifact integrity on self-hosted runners.
OWASP ASVSV16 — Security Logging and Error HandlingPipeline and runner activity needs traceability for misuse and compromise review.
Recommendation — Log runner actions and job failures so compromise indicators are available for review.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org