Join our Newsletter — 33% off our NHI Course
Home Glossary Cyber Security Cached Action
Cyber Security

Cached Action

← Back to Glossary
By NHI Mgmt Group Updated September 20, 2026 Domain: Cyber Security

A cached action is a previously stored copy of automation code that a runner can reuse instead of fetching a fresh version. Caches improve speed, but they can also extend exposure after a compromise, because the unsafe code may keep executing until the cache is purged or refreshed.

What Cached Action Means in Practice

Cached action refers to a stored copy of automation code that a runner can reuse without fetching a fresh version. The value is speed and reliability, but the security meaning is that execution can lag behind the current source state.

That delay matters because a cached artifact may continue to run after a repository, workflow, or upstream dependency has changed. In other words, the cache is not just a performance layer, it is also part of the trust boundary around what code actually executes.

Why Cached Actions Create Security Exposure

The main security issue is stale execution. If an action is compromised, swapped, or modified maliciously, a runner may keep using the previously cached code until the cache is invalidated, which can extend the window of exposure and slow remediation.

This is especially important in CI/CD environments where automation often has access to repositories, secrets, build outputs, and release pathways. Cached code can therefore preserve an unsafe behavior even after the original source has been fixed, unless cache refresh and purge behavior are tightly controlled.

Common Failure Modes

Cached actions become risky when teams assume that a repository update automatically changes what every runner executes. That assumption breaks when runners resolve from cache, when version pinning is weak, or when an attacker can influence the cached artifact or the reference used to fetch it.

Another failure mode is poor cache hygiene. If the cache is shared too broadly, retained too long, or not purged after compromise, the same stale or malicious code can continue to execute across multiple workflows and jobs.

  • Stale code remains active after an upstream compromise or rollback.
  • Unsafe behavior persists because cache invalidation is delayed or incomplete.
  • Blind trust in “latest” or mutable references hides what is actually executing.

How Teams Should Think About It

Why practitioners should care: cached actions are a convenience feature with operational security consequences, so they should be treated as part of change control, not just build acceleration. The question is not only whether the code is fast to run, but whether the runner can be made to execute the right version at the right time.

What to watch for: repeated execution of the same action version after a suspected compromise, unexpected divergence between source and runtime behavior, or cache behavior that outlives the intended update cycle. In practice, this is where teams discover that their pipeline is still trusting code they thought had already been replaced.

Risk and Threat Considerations

Cached actions can prolong exposure after compromise because they preserve a previously approved execution path even when the upstream source has become unsafe. That makes them attractive in supply-chain attacks and other workflow compromise scenarios, especially when the cached artifact has privileged access to build, deploy, or secret-handling steps.

Failure mechanism: an attacker compromises the action source, the cached copy remains trusted, and the runner continues to execute the stale code until the cache is purged, refreshed, or the reference is repointed.

Impact: malicious automation can keep running inside trusted pipelines, extending secret exposure, build tampering, or unauthorized release activity beyond the initial compromise window.

Standards & Framework Alignment

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

CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS 2 — Inventory and Control of Software AssetsCached actions are software artifacts whose presence and version need inventory and control.
CIS 16 — Application Software SecurityThe term concerns trusted automation code that can be compromised and reused in pipelines.
CIS 4 — Secure Configuration of Enterprise Assets and SoftwareCache retention and refresh behavior are configuration choices that affect exposure.
Recommendation — Inventory cached actions and remove or refresh unauthorized versions promptly. Validate action sources and pin trusted versions before execution. Configure cache lifetimes and purge behavior to limit stale code reuse.
NIST CSF 2.0PR.AC — Identity Management, Authentication and Access ControlCached actions can preserve access paths that keep executing with trusted pipeline authority.
PR.IP — Information Protection Processes and ProceduresThe subject hinges on operational procedures for refresh, purge, and change handling.
Recommendation — Restrict cached action execution to approved, least-privilege pipeline contexts. Define cache refresh and purge procedures for compromised or updated actions.

Practitioner Guidance

Common misunderstanding: teams often treat caching as purely a performance optimization and overlook that it can also delay revocation. For cached actions, the operational decision is whether the cache should be version-locked, time-bounded, and explicitly purged when the upstream action is changed or suspected compromised.

Practitioner takeaway: if the cached artifact can outlive the trust state of the source, you need a deliberate refresh and invalidation strategy, not just a faster runner.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

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