Your microVM is isolated. Your network might not be.
Why the isolation of a short-lived VM does not end at its kernel boundary, and what we changed after measuring it.
Our runner service runs every CI job in its own short-lived microVM. One job, one fresh VM, then it is gone. The guest has its own kernel. Nothing on its disk or in its memory is handed to the next job.
So we built a test that should have been boring. Two of our own throwaway VMs, one after the other, on the same network slot of the same host. The first VM sent a single HTTP request that carried a marker in a header, and the server was told to answer slowly. The first VM finished and was torn down before the answer came back. Then the second VM started on the same slot.
The second VM received the answer. One packet, 615 bytes, the marker in plain text.
Nothing broke inside a VM. The guest kernel did exactly what it should. The state that leaked was not in the VM at all. It was on the host.
WHERE THE BOUNDARY ACTUALLY IS
A microVM draws a boundary around CPU, memory and the guest kernel. Networking crosses that boundary on purpose. In a typical setup, and in ours, each VM gets a tap device on the host and an address. The host routes its traffic and translates it (NAT) on the way out.
To translate traffic, the host's kernel keeps a table of connections: connection tracking, or conntrack. Every flow that leaves a VM gets an entry, and the entry decides where reply packets go. For an established TCP connection without traffic, Linux keeps that entry for five days by default (432,000 seconds).
That table belongs to the host. It does not know that a VM has ended. If the next VM gets the same tap and the same address, an old entry still points at that address, and replies for the previous VM's connection are delivered to the new one.
A VM's network identity is a set of host-side objects: the tap device, the address, the connection entries, the firewall view of that address. The VM's lifecycle ends when its process ends. Those objects have their own lifecycle unless you end them yourself.
WHAT WE MEASURED
We ran each probe on a real runner host, with the real VM image and the kernel current at the time, using only our own VMs.
1. Inherited connections. The probe above: the first VM's idle connection survived the VM. The reply reached the next VM on the same slot.
The control run showed where the edge was. A connection that was actively streaming data died in the gap between the two VMs, and nothing arrived. The idle connection, waiting for an answer, carried over.
2. Borrowed sender addresses. In a second probe, two VMs ran at the same time. VM A sent packets using VM B's address as the sender. The host accepted them, and the replies went to B: 5 of 5 over UDP, 5 of 5 over TCP. The control without a forged sender produced nothing at B, and A's own connections worked normally.
The cause was a single kernel mechanism and how it was set up. Linux can check whether a packet's sender address plausibly belongs to the interface it arrived on: reverse path filtering. In strict mode, the address must route back through that same interface. In loose mode, it only has to be reachable through any interface, so a neighbour's address passes. On our VM interfaces, the check effectively let a neighbour's address through, and our firewall rules checked where packets were going, not where they claimed to come from.
What these measurements do not say. They show that the mechanism worked on that host with our own VMs. Whether data ever crossed between real jobs before the fix cannot be measured after the fact, and we don't claim either way.
WHAT WE CHANGED
Connection state is part of the VM. On teardown, and again before a VM starts, we delete every connection entry for the VM's address through the kernel interface. Then we check that none is left. If anything remains, or if we cannot measure it, the VM does not start. Failing closed costs a job start; failing open costs isolation.
Order matters more than the cleanup itself. Our first version cleared connections after removing the tap, when the slot was already free again, so a late cleanup could hit the next VM. A slot now belongs to the VM that creates its tap, and creating a tap is exclusive. On start we claim the slot, clear the connections, then bring the interface up. On teardown we clear connections first and remove the tap last, because as long as the tap exists, the slot is taken. With two VMs started on the same slot at once, the refused start tore down the running VM's interface: 0 of 6 runs ended with a working VM. With the new order, 8 of 8 runs produced exactly one working VM, and the other start was refused.
Sender addresses are checked at the host. A firewall rule drops any packet from a VM interface whose sender address would not route back through that same interface. Same probe, same two VMs: 5 of 5 replies before, 0 after, and the VM's own traffic unaffected.
Cleanup survives hard kills. When a VM is killed hard, its own teardown may never run, and a separate cleanup has to catch up. Ours had a shell pitfall: a strict-mode script aborted before it reached the tap devices whenever the last process in a list it was checking did not match or had just exited. In a stress series on a test slot with the old cleanup, 82 of 225 hard kills left a tap behind. With the fix, 100 hard kills within 200 cycles left nothing behind, and no start was refused.
PROVING IT EVERY DAY
A fix you checked once is a claim. We wanted a measurement that keeps running.
Several times a day, on a fixed schedule, a tenant probe starts throwaway VMs on the production path, kills some of them hard and reuses their slots. It checks separate promises, among them walls between VMs, sender addresses, slot change, data left in memory and on disk, and leftovers on the host. Every promise has its own control in the same run. If a control does not show what it must, the result is "not measurable". It never counts as green. Alerts fire when a promise is broken, when the probe stops measuring, or when it stops running.
Before the network fixes were rolled out, the probe was red exactly where it had to be. In the 24 hours after rollout, every run passed all checks with their controls, no probe alert fired, and no VM start was refused for leftover connections.
A separate internal review then found that some checks could stay green while the mechanism behind them was broken. We rebuilt those checks so that each one is shown to turn red when its mechanism is deliberately broken.
WHAT THIS DOES NOT COVER
The probe proves the promises it tests, on the hosts where it runs; it is not a general proof of isolation. Fair sharing of host resources between neighbours is a separate topic and not part of this article. Isolation is a property you keep proving, not one you prove once.
WHAT TO TAKE AWAY
If you run short-lived VMs or containers with their own network identity:
1. Treat host-side network state as part of the workload. Tap devices, addresses, connection entries and firewall state need an explicit end, not just the VM process.
2. Clear, then verify, then reuse. Do not hand an address to the next workload until the old state is provably gone. If you cannot verify it, do not start.
3. Order teardown so the slot stays taken until it is clean. Remove the interface last.
4. Validate sender addresses where traffic enters the host. Check the effective reverse-path setting, not just the one you set.
5. Test with controls, and keep testing. A probe that cannot fail is not a test.
Our boundary was never only the VM. It is the VM plus everything the host remembers about it.
Sources: Linux kernel docs (nf_conntrack sysctl, ip-sysctl rp_filter), RFC 3704, nftables wiki (fib), Firecracker network setup.
#DevOps #Linux #Security
🧐 A Cloudflare challenge got us thinking today.
What happens when AI agents become indistinguishable from humans?
The internet will need to move beyond behavioural detection towards verifiable identity, delegated authority and accountability.
Who controls that infrastructure?
If you run mutation tests in CI:
1. Measure each stage first.
2. Shard by time, not size.
3. Map tests to code.
4. Delta on PRs, full run on release.
5. Ratchet plus drift anchors.
Poll result from yesterday: a tie between “Full suite on every push” and “Agent PR volume”. Both point the same way: run less per change.
#GitHubActions
Mutation testing on every pull request, with a median of about one minute.
In August the median was 7 minutes, and the slowest 10% took over 47. Here is what changed. 🧵
Hidden cost: artifacts. Per-shard reports embed the source for every mutant. 192 of 194 MB were redundant, and our Actions storage was 98.9% full. We upload the merged report only.
What if AI wasn’t just another tool inside a company, but part of its architecture?
Agents come and go.
Intelligence remains in the system.
Company as Code.
The next form of the enterprise.
https://t.co/khuzno8u02
@buildwithpb Fair worry 😄 That's the idea behind putting it into the architecture: you decide what runs, where, and what it may cost. Not someone else's meter.
We build with coding agents. Our own CI, all repos:
Aug: 581 PRs, ~223,000 CI minutes
Nov: 769 PRs, ~46,000 CI minutes
More PRs, about 80% fewer minutes.
Where do your CI minutes go?
#GitHubActions#DevOps
Agents push all night. Every push runs CI, until the GitHub Actions budget is gone.
Our flat rate: a fixed monthly price, CI budget known in advance. Used up? The next job waits in the queue, no extra charge.
From €99 net/month.
https://t.co/j4z3Yp4cwa
#GitHubActions#DevOps