Security teams should treat runtime immutability as a control boundary, not just a configuration preference. The strongest approach is to allow only executables that were present when the workload started, then block or alert on anything created later. That reduces attack surface, limits post-exploitation tooling, and keeps enforcement lightweight because the decision can be based on file and process timestamps.
Immutability as a runtime boundary, not a build-time slogan
For containers and Linux VMs, immutability is most useful when security teams treat the running workload as something that should not grow new executable capability after launch. That mindset narrows the attack surface, because post-compromise tools, dropped binaries, and unexpected script execution become visible deviations rather than normal behaviour. It also supports DevOps velocity because the control can be enforced at runtime without requiring every deployment to become a manual approval event.
When teams rely only on image scanning or golden-image discipline, they often miss the real question: can the workload create or execute something that was never part of the expected runtime state? That distinction matters because an attacker who gains a foothold usually looks for the fastest way to add tooling, persist, or pivot. A runtime immutability control reduces that window without forcing slow, human-in-the-loop release gates. In practice, many security teams encounter the control gap only after a compromised workload has already dropped a helper binary or modified a writable layer, rather than through intentional enforcement design.
How runtime immutability works across containers and Linux VMs
The practical model is simple: define what counts as allowed at process start, then monitor for later file creation, modification, or execution that falls outside that baseline. In containers, this usually means treating the image filesystem as the trusted starting point and constraining writable locations, ephemeral mounts, and exec permissions. In Linux VMs, the same idea can apply through file integrity and execution controls that distinguish between approved system paths and newly introduced artefacts.
That design is attractive to DevOps because it can be enforced with low-friction signals instead of heavy change workflows. The control can watch for new executables in writable directories, unsigned or unexpected binaries, and suspicious process trees without demanding that every update be manually blessed at runtime. The key is to separate allowed change from allowed execution: teams can still deploy frequently, but once a workload is live, its ability to introduce new executable content is sharply constrained.
- Allow normal application writes only where they are operationally required, not across the whole filesystem.
- Treat newly created executable files as higher-risk than ordinary data writes.
- Use alerting for mature environments where visibility is the first goal, then tighten to blocking where false positives are understood.
- Keep the baseline tied to deployment start time so the control remains stable across redeployments and scaling events.
For teams that need formal guidance on workload trust boundaries, OWASP Non-Human Identity Top 10 is useful when containers or VMs depend on machine credentials, but the immutability decision itself should stay focused on executable state, not on identity policy. Where this guidance breaks down is in environments that require legitimate self-modifying software, runtime code generation, or frequent package installation inside the workload, because those patterns demand tighter exception handling and stronger monitoring.
Where immutability gets hard: writable paths, self-updating apps, and exception sprawl
Tighter immutability often increases operational friction, requiring organisations to balance deployment convenience against the reduction in post-exploitation freedom. The hardest cases are not standard stateless services but workloads that legitimately write to disk, unpack plugins, or update themselves during operation.
Those edge cases are where guidance becomes more debated. Consensus is strong that broad write-and-execute permissions defeat the point of immutability. There is less consensus on how aggressively to block application-managed updates inside the workload, because some teams prefer to move updates into the delivery pipeline while others accept narrowly scoped runtime mutation. The deciding factor is usually whether the runtime mutation is essential to service function or merely a convenience that can be moved earlier in the lifecycle.
Practitioners should also watch for exception sprawl. Once a team makes too many directories writable or whitelists too many post-start artefacts, immutability degrades into a symbolic control that still sounds strong but no longer constrains attacker behaviour in a meaningful way.
Risk and Threat Considerations
The main risk is not that a workload changes, but that it can be altered in ways defenders did not intend and may not observe quickly. In container and Linux VM environments, writable filesystems, permissive execution paths, and delayed detection create a straightforward opportunity for post-compromise tooling, persistence, and lateral movement preparation.
Failure mechanism: An attacker who gains execution inside the workload can drop a new binary, script, or helper into a writable location and then run it if the environment does not distinguish pre-existing trusted state from newly created artefacts. The same mechanism can be used by benign but unsafe automation that quietly expands the runtime attack surface over time.
Impact: The workload stops being predictable, incident response becomes harder, and the attacker gains room to stage tools, hide activity, or reuse the compromised host as a launch point for additional access.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
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.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | 2 — Inventory and Control of Software Assets | Runtime immutability depends on knowing what executable assets are permitted. |
| 4 — Secure Configuration of Enterprise Assets and Software | Immutability is enforced through restrictive filesystem and execution settings. | |
| 10 — Data Recovery | Immutable workloads reduce tampering and support recovery after compromise. | |
| Recommendation — Inventory approved runtime binaries and flag unexpected executable drift. Apply hardened execution settings that prevent new code from running by default. Preserve clean baselines so compromised workloads can be rebuilt quickly. | ||
| MITRE ATT&CK | T1059 — Command and Scripting Interpreter | Runtime immutability helps block post-compromise script execution. |
| T1105 — Ingress Tool Transfer | Attackers often add tooling after foothold to extend control over the workload. | |
| Recommendation — Monitor and restrict script interpreters that enable dropped tooling to execute. Detect unexpected file arrival that precedes post-exploitation activity. | ||
| NIST CSF 2.0 | PR.AC — Access Control | Immutability is a control boundary that limits what can execute after startup. |
| Recommendation — Restrict runtime execution paths so new artefacts cannot run unapproved. | ||
Practitioner Guidance
What to prioritise: Enforce the control where it most directly shrinks attacker options, which is execution of newly introduced files after workload start. That gives the strongest security return without forcing every ordinary write into a blocked event.
What to verify: Confirm that your policy can distinguish normal application data writes from new executable content, and that redeployments, scaling actions, and container restarts do not accidentally erase the baseline you rely on. If the baseline is unstable, teams will either tune the control away or ignore its alerts.
Common mistake: Treating immutability as a host hardening slogan instead of a runtime decision rule. The control only matters if it changes what can execute after launch, not if it merely documents that images should be “clean.”
Practitioner takeaway: The best immutability controls are narrow enough to preserve DevOps speed and strict enough to make post-start code creation or execution a deliberate exception, not an easy attacker path.
Related resources from NHI Mgmt Group
- How should security teams implement least privilege for powerful cloud permissions without slowing DevOps teams down?
- How should security teams enforce browser controls on sensitive data without slowing down normal work?
- How should security teams enforce cloud cost policies in CI/CD without slowing down delivery?
- How should security teams use semantic code analysis to enforce secure coding standards without slowing developers down?