Subscribe to the Non-Human & AI Identity Journal

Runner Memory Exposure

Runner memory exposure is the risk that secrets loaded during CI or build execution can be read from process memory, logs, or temporary state. It becomes especially dangerous when attackers can execute code inside trusted workflows and recover short-lived tokens before they expire.

Expanded Definition

Runner memory exposure describes a class of CI and build-time secret leakage where credentials, tokens, and certificates are resident in memory or transient state long enough for another process, malicious step, or injected command to read them. In NHI operations, the concern is not only where a secret is stored, but whether it is ever materialised inside an execution environment that can be observed, scraped, or dumped.

This term sits adjacent to secret sprawl, build isolation, and ephemeral credential handling, but it is narrower than general secret management because the exposure point is the runner itself. Definitions vary across vendors, especially around whether logs, core dumps, workspace files, and environment variables are all counted as memory exposure, so practitioners should treat the term as an execution-time risk rather than a storage-only issue. Guidance in the NHI domain increasingly aligns with the need to limit secret residency during automation, as reflected in Ultimate Guide to NHIs — Why NHI Security Matters Now and the CISA guidance on hardened automation environments.

The most common misapplication is assuming a short-lived token is safe by default, which occurs when the runner allows debug output, shared process space, or post-step access before expiration.

Examples and Use Cases

Implementing runner memory protections rigorously often introduces build complexity and performance overhead, requiring organisations to weigh developer speed against tighter isolation and reduced secret residency.

  • A CI job injects a cloud API key into environment variables, then a later step prints the process environment during failure handling, exposing the token to logs and troubleshooting tools.
  • A self-hosted runner executes untrusted pull request code, and the payload reads in-memory credentials from a sibling process before the workflow tears down.
  • A build script writes a temporary authentication file for package retrieval, but the file persists in the workspace long enough for an attacker-controlled step to copy it.
  • A containerised runner shares memory and filesystem state between jobs, allowing one pipeline to recover material left behind by another pipeline under the same host context.
  • Threat researchers describing AI-driven intrusion chains, including the Anthropic report on AI-orchestrated cyber espionage, show how execution authority can be abused once a workflow boundary is crossed.

NHIMG analysis of secrets exposure patterns, including the 52 NHI Breaches Analysis, shows how quickly compromised automation becomes a broader identity problem when secrets are not isolated from execution paths.

Why It Matters in NHI Security

Runner memory exposure is dangerous because it turns automation from a control plane into an attack surface. Once a token, key, or certificate is readable inside a runner, compromise can spread beyond the original job into cloud APIs, package registries, source control, and downstream deployment systems. That is why NHI governance treats build-time credentials as high-value assets, not disposable plumbing.

The scale of the problem is not theoretical. NHI Mgmt Group reports that 79% of organisations have experienced secrets leaks, and 77% of those incidents resulted in tangible damage. When secrets are loaded into runners without strict teardown, isolation, and redaction controls, even short-lived credentials can be harvested before expiry. The challenge is amplified in organisations that still store secrets in vulnerable execution tools, a pattern discussed in the Guide to the Secret Sprawl Challenge and the broader Ultimate Guide to NHIs.

Organisations typically encounter runner memory exposure only after a build compromise, at which point secret rotation, workflow forensics, and pipeline hardening become operationally unavoidable to address.

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 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-02 Covers improper secret handling and exposure paths in NHI workflows.
NIST CSF 2.0 PR.AC-4 Least-privilege access limits what compromised runners can read or reuse.
NIST Zero Trust (SP 800-207) Zero trust requires strong workload isolation and continuous verification of execution contexts.

Treat runners as untrusted execution zones and verify every job before granting secret access.