Join our Newsletter — 33% off our NHI Course
Home› Glossary› NHI Lifecycle Management› Runner Memory
NHI Lifecycle Management

Runner Memory

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: NHI Lifecycle Management

Runner Memory is the working memory of a CI/CD runner while it executes a job. Secrets injected into the job, such as tokens and keys, reside there in usable form, so malicious or compromised build steps can try to read them. Defenders use short-lived credentials, least-privilege job tokens, ephemeral runners and tight control over third-party build steps.

What Runner Memory Means in a CI/CD Job

Runner memory is the transient working space a CI/CD runner uses while a job is executing. It is not a storage vault, but while secrets are injected into the job they may exist there in usable form, which is why the execution environment matters as much as the pipeline definition.

That makes runner memory part of the trust boundary for build and deployment automation. Any step that runs in the same process, container, or host context can potentially observe data that the pipeline intended to hand only to the job itself.

Why Runner Memory Matters for Secret Exposure

The key issue is not the concept of memory itself, but what lives in it during execution. Tokens, API keys, and other secret material can be present long enough for a malicious step, compromised dependency, or hostile build script to read and reuse them before the job finishes.

This is one reason pipeline secrets should be treated as time-bounded and context-bounded. If a credential is only needed for a single step, the exposure window should be as short as the pipeline can make it, because any extra duration increases the chance of interception, logging, or in-memory theft.

tj-actions/changed-files compromise 2025 is a concrete example of how CI/CD secret exposure can cascade from one poisoned build step into broader pipeline compromise.

How Organisations Reduce Exposure in the Runner

The safest pattern is to minimise what a runner can ever see. Ephemeral runners, short-lived credentials, and least-privilege job tokens reduce the value of any single job execution, because the compromise of one step does not automatically grant durable access to the rest of the environment.

Control of third-party build steps is equally important. Reusable actions, plugins, and scripts expand the trusted code surface inside the runner, so the pipeline should only execute them when their provenance, integrity, and update path are tightly governed.

TeamPCP Threat Actor Profile Guide explains the supply-chain and CI/CD secret-theft patterns that make runner exposure dangerous in practice.

OWASP Non-Human Identity Top 10 is useful here because runner tokens, service credentials, and other automation secrets need the same lifecycle discipline as other machine-access material.

Detection and After-Action Review for Runner Memory Abuse

Detection is difficult because memory exposure often happens inside otherwise legitimate job execution. That means defenders usually look for indirect indicators, such as unusual secret access patterns, unexpected outbound connections from build steps, or pipeline behaviour that changes after a new dependency or action is introduced.

After any suspected compromise, the post-job review should assume that anything injected into the runner may have been observed. That is why rotation and invalidation of exposed tokens, keys, and session material should follow the incident review, not wait for proof of misuse.

T1003 OS Credential Dumping is relevant because the defensive problem is similar: once sensitive material is resident in memory, attackers try to extract it before the environment can tear down the process.

MITRE ATT&CK Enterprise Matrix helps defenders map in-memory credential access and related post-compromise behaviour to known adversary techniques.

Risk and Threat Considerations

Runner memory is risky because it temporarily concentrates high-value secrets inside code execution paths that may include untrusted or externally sourced steps. If an attacker can influence a job step, they may be able to read secrets before the runner is torn down or before logs and artifacts are scrubbed.

Failure mechanism: A malicious build step, compromised dependency, or poisoned automation action runs inside the trusted job context and reads injected secrets while they are present in memory.

Impact: The exposed material can enable repository takeover, package publishing abuse, environment compromise, or wider lateral movement across delivery systems and cloud services.

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 SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageRunner memory can expose injected secrets during job execution.
NHI-07 — Long-Lived SecretsThe term centers on secrets that should not persist beyond the job window.
Recommendation — Limit secret residency in runners and rotate any exposed credentials promptly. Replace durable pipeline secrets with short-lived credentials wherever possible.
CIS Controls v8CIS-5 — Account ManagementCI/CD runner access depends on tightly governed privileged and service accounts.
Recommendation — Restrict and review accounts that can inject or use pipeline secrets.
MITRE ATT&CKT1003 — OS Credential DumpingThe threat model includes in-memory extraction of credentials from execution environments.
Recommendation — Monitor jobs and hosts for credential-dumping behaviour and investigate anomalies.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementRunner secrets need lifecycle control, rotation, and revocation discipline.
Recommendation — Enforce rotation, expiration, and revocation for pipeline credentials.

Practitioner Guidance

What to watch for: Treat runner memory as a short-lived exposure zone and design jobs so that only the minimum necessary secrets are injected for the minimum necessary time. If a workflow needs broad credentials for convenience, that is usually a sign the pipeline should be restructured.

Governance implication: Ownership of runner trust, secret injection, and third-party action approval should sit with the delivery security model, not with individual developers running ad hoc jobs. The control objective is to reduce the blast radius of any single pipeline execution.

Practitioner takeaway: If a pipeline can finish with ephemeral credentials, it is usually safer than one that depends on long-lived secrets surviving multiple steps.

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 November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org