Sandbox Escape Patterns: What Every Platform Engineer Should Stress-Test Quarterly
Five sandbox escape patterns appear in nearly every post-mortem: side-channel data leak, kernel exploit, network egress bypass, TOCTOU, and callback escalation. Test them on a schedule.
Continue the reading path
Topic hub
Runtime GovernanceThis page is routed through Armalo's metadata-defined runtime governance hub rather than a loose category bucket.
Turn this trust model into a scored agent.
Start with a 14-day Pro trial, register a starter agent, and get a measurable score before you wire a production endpoint.
TL;DR
Sandboxes are the foundation of every platform that runs untrusted code, including every platform that hosts autonomous agents. Sandboxes also fail, and they fail in patterns that have repeated across decades of escape research. Five patterns account for the overwhelming majority of real-world escapes: side-channel data leak between supposedly isolated workloads, kernel exploit that breaks the isolation primitive, network egress bypass through unanticipated paths, time-of-check to time-of-use confusion in shared resources, and callback escalation through mishandled host-side hooks. Each pattern has a known structure. Each can be stress-tested on a fixed schedule. Most platform teams do not test any of them. This essay walks through each pattern, the historical examples that shaped its understanding, the test methodology, and the remediations. The reader artifact is a Sandbox Escape Test Suite you can run quarterly against any sandbox technology you operate.
Introduction: The Escape That The Team Did Not Test For
A platform that hosted code-execution sandboxes for educational use ran microVMs as its isolation boundary. The team had selected microVMs specifically because they offered hardware-assisted isolation that was supposed to be stronger than container isolation. The platform had been operating for two years without an escape. The team felt good about the architecture. They had a pen-test report from a respected firm that listed the boundary as well-defended.
The escape happened on a Wednesday afternoon. A student submitted code that performed an unusual sequence of memory reads designed to measure cache timing. The sequence was a side-channel attack against the host's L3 cache. The attack succeeded in extracting bits of memory from the host kernel. Among the bits the attack extracted was the AES key that the host used to encrypt the platform's database backups. The student exfiltrated the key by encoding it into the timing of HTTP requests to an external server. The egress controls did not catch the exfiltration because the requests themselves looked normal; only the timing carried the data.
The team's post-mortem was thorough. The microVM boundary had not failed in the traditional sense; the student never gained code execution outside the VM. The kernel was not exploited. The hypervisor was not compromised. What failed was the assumption that the cache was a private resource. The cache was shared at the hardware level across all VMs on the host. The attack had been published in academic literature for several years. The pen-test firm had not tested for it because the test had not been on the firm's standard checklist.
The deeper finding was that the team had been testing for the escape patterns they could imagine, not for the patterns that escape research had documented. The team's threat model had assumed an attacker who would try to break the isolation primitive directly. The attacker had instead used the isolation primitive's normal operation to extract data through a side channel. The attacker had not broken the boundary. They had walked through a property of the boundary the team did not know was there.
The lesson generalizes. Most sandbox escape research falls into a small number of patterns. Each pattern has been studied for years, has known examples, and has tractable defenses. Platform teams that do not test for the patterns are not building defenses against them. The defenses are not free, but they are cheaper than the escape that draws the press attention.
The rest of this essay walks through the five patterns that account for most real-world escapes. For each pattern, the structure of the attack, the historical examples, the test methodology, and the remediations. The artifact at the end consolidates the test methodology into a quarterly stress-test playbook.
Pattern One: Side-Channel Data Leak Between Isolated Workloads
Side-channel data leak is the pattern in the introduction. The attacker does not break the isolation primitive. The attacker uses a property of the underlying hardware or system that is shared across the supposedly isolated workloads to extract information. The classic side channels are CPU caches, branch predictors, and memory bus contention. Newer side channels include speculative execution traces, DRAM row hammer effects, and power consumption patterns.
The historical examples are extensive. Spectre and Meltdown, published in 2018, demonstrated that the speculative execution path of modern CPUs leaked data across protection boundaries. Subsequent research extended the attack to numerous variants and to specific microarchitectural features. RowHammer, demonstrated as early as 2014, showed that repeated DRAM accesses could flip bits in adjacent rows, allowing attackers to corrupt memory they did not have permission to read or write. Cache timing attacks against AES were demonstrated in research as early as 2005.
The pattern is concerning for sandboxes because the side channel does not respect the sandbox boundary. The sandbox prevents the attacker from reading the host's memory directly. The side channel lets the attacker infer the host's memory contents through timing or through induced corruption. The inference is slow, often producing only a few bits per second of leaked data. The slowness is a defense against high-bandwidth exfiltration but is not a defense against extracting cryptographic keys, which are short and high-value.
The test methodology has three phases. The first phase deploys known side-channel attack tools inside the sandbox and measures whether they succeed. The tools are public, including Mastik for cache attacks and various Spectre proof-of-concept implementations. The second phase measures the bandwidth of any successful attacks. A side channel that leaks a few bits per hour is much less concerning than one that leaks a few kilobytes per second. The third phase identifies what data is reachable through the side channels: just the host kernel, neighboring sandboxes, the hypervisor, the platform's secrets store.
The remediations depend on the underlying hardware and the threat model. CPU vendors have added microarchitectural mitigations for the major published attacks. Linux kernel mitigations are enabled by default on most distributions, with performance penalties that range from negligible to substantial. Workload separation through CPU pinning can reduce the attack surface by ensuring that workloads with high trust differentials never share cores. Memory partitioning through cache allocation technology can limit which workloads can observe each other's cache footprint.
The most aggressive remediation is to use isolation primitives that do not share the relevant hardware. Bare-metal isolation, where each workload has its own CPU socket and its own DRAM, eliminates most side channels at the cost of dramatic over-provisioning. The pattern is appropriate only for the highest-trust differential workloads, like financial systems handling cryptographic keys. For typical platform workloads, the right answer is the published mitigations plus periodic testing to confirm they remain effective.
Pattern Two: Kernel Exploit That Breaks The Isolation Primitive
Kernel exploit is the most direct pattern. The attacker uses a vulnerability in the host kernel to execute code outside the sandbox. The kernel is the underlying enforcer of the sandbox boundary. A kernel compromise eliminates the boundary entirely. The attacker becomes root on the host with full access to every workload running on the host.
The historical examples include the Dirty COW vulnerability disclosed in 2016, which let unprivileged processes write to memory they should have only had read access to. The CVE-2022-0185 vulnerability in the kernel filesystem context API allowed container escape on systems that had not patched. The Linux kernel has a long history of similar vulnerabilities. New ones are disclosed monthly. Some are exploitable from within standard Linux containers; some require additional privileges that the container does not have by default.
The pattern is especially concerning for container-based isolation, because containers share the host kernel. A kernel exploit reachable from the container is a complete escape. Hypervisor-based isolation, including microVMs, mitigates this pattern by separating the guest kernel from the host kernel. A guest kernel exploit gives the attacker root in the guest, but the attacker still has to escape the hypervisor to reach the host. Hypervisor exploits exist but are much rarer than kernel exploits.
The test methodology involves running known kernel exploits inside the sandbox and measuring whether the host kernel is patched against them. The Linux Kernel Exploit Database catalogs the major exploits with proof-of-concept code. The test runs each exploit and observes the outcome: clean failure indicates the kernel is patched, successful exploitation indicates a vulnerability that needs immediate attention. The test should be run after every kernel update and on a quarterly schedule regardless of update activity.
The remediation is patching, plus structural defenses that limit the impact of kernel exploits even when they succeed. Seccomp filters that limit which syscalls the sandbox can issue prevent many kernel exploits from reaching their target syscalls. AppArmor or SELinux mandatory access controls restrict which kernel objects the sandbox can interact with. User namespaces map the sandbox's view of root to an unprivileged host user, limiting the impact even if the sandbox achieves apparent root.
The pattern argues for hypervisor-based isolation when the workload is genuinely untrusted. Containers are appropriate for workloads that are trusted but should be operationally isolated. MicroVMs add a strong boundary at modest performance cost. Full virtualization adds an even stronger boundary at higher performance cost. The choice depends on the trust differential between the workload and the platform.
Pattern Three: Network Egress Bypass Through Unanticipated Paths
Network egress bypass is the pattern where the attacker reaches the network through paths the egress controls did not anticipate. The egress controls are typically firewall rules that restrict which destinations the sandbox can connect to. The bypass works around the controls by using protocols, ports, or proxies the firewall did not consider.
The historical examples include DNS-based exfiltration, where the attacker encodes data into DNS query names and queries an attacker-controlled name server. Most egress controls allow DNS resolution because the sandbox needs to resolve names to function. The DNS query becomes a covert channel. ICMP-based exfiltration uses ping packets to carry data. HTTP CONNECT through a permitted proxy, when the proxy does not enforce destination restrictions, becomes a tunnel to anywhere. Cloud metadata services, which are reachable from inside the sandbox, can be queried for credentials that grant access to the broader cloud account.
The pattern reflects a broader principle: every protocol that the sandbox can use is a potential exfiltration channel. The team that designs the egress controls has to enumerate every protocol the sandbox might use and decide whether to allow, restrict, or proxy each one. The enumeration is exhausting and is rarely done completely. The patterns that escape attention become the bypass paths.
The test methodology runs a battery of egress attempts from inside the sandbox and observes which succeed. The attempts include direct TCP and UDP to a range of external destinations and ports, DNS queries to attacker-controlled name servers, ICMP to attacker-controlled hosts, HTTP CONNECT through any configured proxies, queries to cloud metadata services, queries to internal service discovery, and attempts to bind to localhost ports that the host has not explicitly mapped. Each successful attempt represents a potential exfiltration channel.
The remediations follow a deny-by-default principle. The sandbox should have no network access except to explicitly enumerated destinations. DNS resolution should go through a controlled resolver that logs queries and may proxy them. Cloud metadata services should be blocked at the network layer. Outbound proxies, where present, should enforce destination allowlists that match the sandbox's actual needs. The egress policy should be tested after every change to confirm it still rejects the bypass patterns.
The deny-by-default principle has implementation friction. The sandbox often needs to talk to legitimate destinations that the policy must enumerate. Adding new destinations becomes a flow that involves the security team. The flow has to be fast enough that developers do not bypass it. The right balance is for the platform to maintain a curated catalog of approved destinations that developers can opt into through a self-service interface, with security review for additions to the catalog rather than for individual usage.
Pattern Four: Time-Of-Check To Time-Of-Use Confusion
Time-of-check to time-of-use, often abbreviated TOCTOU, is the pattern where the attacker exploits the gap between when the system checks a property and when the system relies on the property. The check confirms the property holds. Between the check and the use, the attacker changes the underlying state. The use proceeds based on the check's result, which is no longer accurate.
The historical examples include the classic file-system race where a privileged process checks that a file is owned by the user, then opens the file. Between the check and the open, the attacker replaces the file with a symbolic link to a privileged file. The privileged process opens the privileged file thinking it is the user's file. The pattern has been exploited against many privilege boundaries since the 1990s.
The pattern is concerning for sandboxes because the sandbox often relies on host-side checks against shared resources. The host checks that a path the sandbox provided is within the sandbox's allowed area. Between the check and the access, the sandbox manipulates the path through symbolic links or mount-point changes. The access reaches a path outside the allowed area. The escape succeeds.
The test methodology involves race-condition attacks against the sandbox's resource access primitives. The tests run pairs of operations in rapid succession from inside the sandbox: one operation establishes a state the sandbox should be allowed to access, and one operation manipulates the state to point elsewhere just before the access. Many race-condition attacks are probabilistic; they succeed only if the timing is right. The test runs many iterations to estimate the success rate. A non-zero rate indicates a TOCTOU vulnerability.
The remediations involve doing the check and the use atomically. The standard pattern is to open the resource first, getting a stable handle, then check properties of the handle. The handle does not change even if the underlying name space does. Linux provides the openat family of syscalls that operate on handles, eliminating most file-system TOCTOU. Similar patterns apply to other resources: get the handle, then check, then use.
The remediation is straightforward in theory but requires that every resource access in the sandbox-host interface follow the pattern. Audits typically find at least a few resource accesses that do the check and the use as separate operations. The fix is mechanical but tedious. The audit should run after any change to the sandbox-host interface and on a quarterly schedule.
Pattern Five: Callback Escalation Through Mishandled Host-Side Hooks
Callback escalation is the most subtle of the five patterns. Many sandboxes provide callbacks that the host invokes when the sandbox does certain things: a hook that runs when the sandbox writes to a particular file, a handler that processes events the sandbox emits, a debugger interface that the sandbox can request. The callbacks run on the host with host privileges. If the callback can be influenced by the sandbox, the influence becomes a privilege escalation.
The historical examples include various container runtime vulnerabilities where the runtime invoked callbacks based on annotations the container could control. A sandbox that could write to a particular file caused the runtime to execute a script with elevated privileges. The script's contents were derived from a configuration the sandbox had influenced. The sandbox effectively achieved code execution on the host through the runtime's callback path.
The pattern generalizes to any host-side handler that processes data originating in the sandbox. Logging systems that parse sandbox-emitted log lines can be exploited if the parser has a vulnerability. Monitoring agents that deserialize sandbox-emitted metrics can be exploited if the deserializer has a vulnerability. Anything on the host that touches sandbox-derived data is a potential escalation path.
The test methodology involves emitting malformed or malicious data through every host-facing channel the sandbox has. Log lines with format string attacks. Metrics with overflowed numeric values. Files with crafted binary content. Each emission tests whether the host-side handler treats the data safely. A handler that crashes or executes attacker-controlled content represents a vulnerability.
The remediation is to treat every sandbox-emitted byte as untrusted input. Log handlers should parse defensively and never invoke shell on log content. Monitoring agents should validate metric values against expected ranges and reject anomalies. Anything that processes sandbox-emitted data should run with privileges no higher than necessary, ideally with its own sandboxing. The host-side handlers become a second layer of defense in depth.
The pattern also argues against rich callback interfaces. The fewer hooks the host provides, the smaller the escalation surface. The hooks that exist should be designed for the minimum necessary expressiveness. A hook that just records a fact is safer than a hook that executes arbitrary user-supplied logic.
Named Artifact: The Sandbox Escape Test Suite
The artifact below is a quarterly stress-test playbook that covers all five patterns. The playbook is designed to be runnable by a platform team without specialized security expertise. It uses public tools and produces structured outputs that the team can compare across runs to detect regressions.
For side-channel testing, the playbook deploys Mastik or an equivalent cache-attack tool inside a sandbox and measures whether the tool can extract data from a known target running in a neighboring sandbox. The pass condition is that the tool extracts no data within a one-hour run. The playbook also runs published Spectre proof-of-concept implementations and verifies that the host's microcode and kernel mitigations defeat them.
For kernel exploit testing, the playbook downloads the current Linux Kernel Exploit Database, runs each public exploit applicable to the kernel version, and records the outcome. The pass condition is that no exploit produces code execution outside the sandbox. The playbook should be run after every kernel update; failures indicate the update has not patched a known vulnerability.
For egress bypass testing, the playbook attempts every common bypass channel from inside the sandbox: TCP and UDP to a range of external destinations, DNS to a controlled name server, ICMP, HTTP CONNECT through configured proxies, cloud metadata service queries, and binding to localhost ports. The pass condition is that all attempts to non-allowlisted destinations fail. The playbook records each attempt's outcome for comparison across runs.
For TOCTOU testing, the playbook runs race-condition attacks against the sandbox's file-system, mount, and resource access interfaces. Each attack is run for a fixed number of iterations and the success rate is recorded. The pass condition is a zero success rate across at least one thousand iterations of each attack. The playbook should focus on resource accesses that involve check-then-use patterns in the sandbox-host interface.
For callback escalation testing, the playbook emits malformed data through every host-facing channel: log lines with format strings, metrics with overflowed values, files with binary content designed to confuse parsers. The pass condition is that the host-side handlers process the data without crashing or executing attacker-controlled content. The playbook should expand its test cases as new host-facing channels are added to the sandbox.
The playbook produces a single report per quarter that summarizes the results across all five patterns. The report identifies any tests that failed and any that regressed since the previous quarter. The report is reviewed by the platform team and the security team. Failed tests are remediated before the next quarterly run. The report is retained as evidence of the testing program for compliance purposes.
Operationalizing The Quarterly Cadence
The quarterly cadence is the right balance between currency and operational burden. Monthly testing is too frequent for the team to consume the results meaningfully. Annual testing is too infrequent to catch regressions that arise from the many platform changes that happen between annual reviews. Quarterly testing matches the cadence at which most platforms make major architectural changes and at which the team can dedicate a focused effort to the testing.
The testing should happen on a representative production-equivalent environment, not on production itself. The tests can be intrusive and may cause failures or instability that production cannot tolerate. The environment should match production in terms of kernel version, hypervisor version, hardware family, and configuration. Discrepancies between the test environment and production produce false-positive and false-negative results that erode the testing's value.
The testing should be automated. Manual testing produces inconsistent results across runs and depends on the tester's familiarity with each pattern. Automation produces consistent results that can be compared across quarters. Automation also enables continuous testing in addition to the quarterly deep run, which catches regressions sooner.
The team should track time-to-remediate for each failed test. A failed test that remains unremediated for a quarter indicates a process problem. The remediation should be assigned to a specific engineer with a deadline. The deadline should be aggressive: most failures should be remediated within a sprint of detection. The tracking produces a metric that the security team can report on, which creates pressure to maintain the cadence.
The team should publish the testing program externally where appropriate. Customers who care about security want to know that the platform is being tested. The publication does not need to include the specific test results, but it should describe the patterns being tested, the cadence, and the remediation process. The publication becomes part of the platform's security narrative and supports sales conversations with security-conscious buyers.
Tooling, Automation, And Test Result Hygiene
A quarterly testing program produces value only if the tooling supports the cadence and the results are managed with discipline. The tooling needs to run the tests reproducibly. The results need to be stored, compared, and acted on. Most teams underinvest in the tooling and the result hygiene, which causes the program to degrade over time as the tests become harder to run and the results become harder to interpret.
The tooling should be packaged as a runnable artifact that any team member can execute. The packaging includes the test scripts, the dependencies, the configuration for the target environment, and the output formatting. A common pattern is a container image that contains everything needed, with environment variables that point at the target sandbox infrastructure. The image is versioned and stored in the team's container registry. Quarterly runs use the latest version. The image is updated when new tests are added or when existing tests need adjustment.
The execution environment should match production as closely as possible. Differences between the test environment and production produce false results. The kernel version, the hypervisor version, the container runtime, the host operating system, and the hardware family should all match. For platforms that run on multiple host types, the test should run against each type. The combinatorial explosion is real but bounded; most platforms run on three or four distinct host configurations.
The results should be stored in a structured format that supports comparison across runs. JSON output with a stable schema is a common choice. Each test produces a record with the test identifier, the parameters, the outcome, and any diagnostic information. The records are stored in an append-only log organized by quarter. Comparison tools query the log to identify regressions, new failures, and persistent issues.
The regression detection is the highest-value output. A test that passed last quarter and fails this quarter is much more interesting than a test that has always failed. The regression indicates a recent change introduced an exposure. The investigation can focus on what changed since the previous test, which narrows the search space dramatically. Without regression detection, every failure looks the same, and the team treats them all with the same priority.
The failures need a clear remediation workflow. Each failure becomes a tracked issue with an owner, a deadline, and a remediation plan. The deadline is aggressive: most failures should be remediated within a single sprint. The owner is the engineer responsible for the affected component. The remediation plan describes what change will close the failure and how the closure will be verified. The next quarterly run confirms the closure.
The results should be visible to leadership. A summary report each quarter with the pass-fail rate, the regression count, the open remediation count, and the time-to-close metric. Leadership visibility creates accountability for keeping the program healthy. Without visibility, the program tends to drift as competing priorities consume the time it would have taken.
The tooling and hygiene matter as much as the tests themselves. A well-designed test that runs once and is forgotten produces no value. A modest test that runs every quarter, with results compared and remediations tracked, produces continuous value. The investment in the operational layer is what converts the testing from an event into a program.
Counter-Argument: The Tests Cannot Find Novel Attacks
The natural objection is that testing for known patterns does not protect against novel patterns. The five patterns in this essay are the patterns that have been published. Attackers continuously develop new patterns. A platform that passes the quarterly tests has confirmed it is not vulnerable to known patterns. It has not confirmed it is invulnerable to all attacks.
The objection is correct in its narrow form and wrong in its implications. The narrow form is true: the tests do not find novel attacks. The implication that follows, that the tests are therefore not worth running, is wrong. The tests find regressions against known patterns, which is itself valuable. They find vulnerabilities that arise from platform changes that the team did not realize introduced exposure. They produce evidence of testing that supports compliance and customer assurance. They build the team's familiarity with the attack space, which makes the team better at recognizing novel attacks when they do appear.
The complementary defense against novel attacks is bug bounty programs and external research engagement. The bounty program incentivizes external researchers to find novel patterns and report them. The research engagement keeps the team current with the academic literature and the security community's evolving understanding. The two approaches reinforce each other: the quarterly testing maintains a known baseline, and the external engagement extends the coverage to patterns that the baseline does not include.
The testing program is also the substrate on which novel patterns get added. When a new escape pattern is published, the team adds it to the quarterly playbook. The playbook grows over time as the field's understanding grows. The growth keeps the platform current with the state of the art without requiring the team to anticipate everything in advance.
Cross-Pattern Defense In Depth
The five patterns in this essay are presented separately for clarity, but real attacks often combine multiple patterns. A successful escape might begin with a side-channel leak that reveals an exploitable kernel symbol address, then proceed to a kernel exploit that uses the address, then exfiltrate the captured data through a network egress bypass. Defense in depth means that each pattern's mitigation should be strong enough that the attacker cannot easily chain through.
The defense in depth principle has implementation consequences. The mitigations for each pattern should be independent, so that defeating one does not automatically defeat the others. The mitigations should be measurable, so the team knows the strength of each layer. The mitigations should be maintained, because mitigations that decay over time become invisible weaknesses.
Independence requires that the mitigations come from different parts of the system. Side-channel mitigations come from CPU microcode and kernel scheduling. Kernel exploit mitigations come from kernel patching and seccomp filtering. Egress bypass mitigations come from network policy. TOCTOU mitigations come from atomic resource access patterns. Callback escalation mitigations come from defensive parsing of sandbox-emitted data. The diverse origins make it harder for a single bug or configuration error to weaken multiple layers.
Measurability requires that the team has tests or monitors that confirm each mitigation is in effect. The quarterly stress tests provide this for the major patterns. Continuous monitors provide it for the network egress and the callback handlers. Patching dashboards provide it for the kernel mitigations. The combination produces a comprehensive picture of the platform's defense posture.
Maintenance requires that the team treats the mitigations as living configurations rather than one-time setups. Kernel patches need to be applied as they are released. Network policies need to be updated as new destinations are approved. Defensive parsers need to be updated as new sandbox-emitted data formats are introduced. The maintenance burden is real but bounded; teams that handle it consistently keep their defense posture strong.
The cross-pattern defense also benefits from observability. When an attack is in progress, the observability lets the team see how far the attacker has progressed across the patterns. The team can intervene at the point where the attacker has reached, contain the impact, and reconstruct the attack chain afterward. Without observability, the team learns about the attack only after it has succeeded.
The defense in depth narrative is sometimes dismissed as security theater. The dismissal is appropriate when the layers are illusory, like when a system has many checks that all reduce to the same underlying enforcement. The dismissal is wrong when the layers are genuinely independent, like the layers described above. The team should evaluate whether their defense in depth is real or illusory by asking whether defeating one layer requires defeating the others independently.
What Armalo Does
Armalo runs the quarterly stress test against its sandbox infrastructure as part of its security program. The infrastructure includes process-level isolation, container isolation, and microVM isolation, each of which is tested against the five patterns in this essay. The test results are recorded in the audit substrate and influence the security dimension of the composite score for agents that operate in the platform.
Armalo's egress controls follow the deny-by-default principle. Every outbound connection from a sandbox passes through a controlled proxy that enforces destination allowlists. The DNS resolver is internal to the platform and logs every query. Cloud metadata services are blocked at the network layer. The egress policy is tested as part of the quarterly stress test and after every change to the policy.
Armalo's host-side handlers are designed to treat sandbox-emitted data as untrusted input. The logging, monitoring, and event-processing systems run with privileges no higher than necessary and have their own isolation boundaries. Pact compliance for the platform itself includes the integrity of these handlers, audited through the quarterly callback escalation tests.
The choice of sandbox mode is exposed to agent operators through the registration interface. Agents can opt into stronger isolation modes when their threat model warrants it. The choice is reflected in the agent's pact and influences the trust score that the trust oracle reports to counterparties.
FAQ
How long does the quarterly stress test take to run? A first run typically takes one to two weeks of engineering time, including setup and analysis. Subsequent runs, with the automation in place, take two to three days of execution time and one to two days of analysis. The total quarterly investment is around one engineer-week.
Can the tests be run continuously rather than quarterly? Some tests can. The egress bypass tests are non-intrusive and can run continuously to catch regressions immediately. The kernel exploit tests should run after every kernel update. The side-channel and TOCTOU tests are more intrusive and benefit from a focused quarterly run with dedicated analysis.
What if the platform uses a managed service for the sandbox, rather than operating its own? The platform team should still run the egress and callback escalation tests, which apply regardless of who operates the underlying isolation. The side-channel and kernel exploit tests should be discussed with the managed service provider, who should provide evidence of their own testing program. A provider that cannot describe their testing program is a provider whose security posture is opaque.
How do you handle test results that indicate a vulnerability you cannot fix immediately? Compensating controls. If a side-channel attack succeeds against the platform, the immediate compensating control is to ensure no high-value secrets exist in memory addresses reachable through the side channel. The compensating control is documented and the underlying vulnerability is added to the remediation backlog with a deadline.
Do the tests work for serverless functions, where the team does not control the host? Partially. The egress and callback tests apply because the function controls its own outbound calls and emitted data. The side-channel and kernel exploit tests are the responsibility of the serverless provider. The team should request evidence of the provider's testing program and choose providers based on the evidence.
How do these tests interact with formal security audits? They complement each other. The formal audit is a deep periodic review that covers many areas the quarterly tests do not. The quarterly tests provide continuous assurance against the specific patterns that escape research has documented. Both are part of a mature security program.
What if an exploit is published between quarterly runs? Run the relevant test out of cycle. The quarterly cadence is a baseline, not a ceiling. New exploits should trigger an immediate test against the platform. The result determines whether the platform is vulnerable and whether immediate remediation is needed.
Bottom Line
The five sandbox escape patterns account for most real-world escapes, including the escape that draws the press attention. The patterns have been studied for years. Each has tractable defenses. Most platform teams do not test for them on a fixed cadence. The lack of testing is not a deliberate choice; it is the result of the testing not being on the team's standard checklist. Adding the testing to the quarterly cadence costs about one engineer-week per quarter. The cost is paid back in the absence of the escape that would have happened without the testing.
The quarterly stress test is the mechanism by which the platform maintains awareness of its own security posture against the known threat space. The test does not protect against novel attacks. The test does protect against regressions, against vulnerabilities that arise from platform changes, and against the gradual drift that produces exposure over time. The test produces evidence that supports compliance and customer assurance. The test builds the team's familiarity with the attack space, which makes them better defenders against everything else.
The right time to start the quarterly cadence is now, with the current platform configuration, before the next platform change introduces exposure that the cadence would have caught. The first run is the most expensive. Each subsequent run is cheaper. The cadence becomes part of how the team operates. The platform's security posture improves over time rather than degrading silently between annual audits.
The Trust Score Readiness Checklist
A 30-point checklist for getting an agent from prototype to a defensible trust score. No fluff.
- 12-dimension scoring readiness — what you need before evals run
- Common reasons agents score under 70 (and how to fix them)
- A reusable pact template you can fork
- Pre-launch audit sheet you can hand to your security team
Turn this trust model into a scored agent.
Start with a 14-day Pro trial, register a starter agent, and get a measurable score before you wire a production endpoint.
Put the trust layer to work
Explore the docs, register an agent, or start shaping a pact that turns these trust ideas into production evidence.
Comments
Loading comments…