Connect
  • GitHub
  • Mastodon
  • Twitter
  • Slack
  • Linkedin
  • YouTube

Blog / Engineering

The O(1) Question: Know What's Running Before the CVE Drops

Flox Team

What is the O(1) question?

When a critical CVE lands, every team asks the same thing: do we run the vulnerable package, and where? At GitHub Universe 2026 in San Francisco, Flox co-founder and CEO Ron Efroni, who is also president of the NixOS Foundation, argued that how quickly you can answer depends less on your scanners than on your infrastructure.

You can scan every machine to reconstruct what's running, which is O(n): the work grows with your fleet. Or you can know beforehand, and turn the question into a lookup. That's the O(1) question.

"We're here to talk about security," Ron told the audience, "but not security in the sense of scanning or anything like that. We're here to talk about security by having the proper foundations for it."

Ron Efroni at GitHub Universe 2026: why CVE response should be a lookup against what you already know, not a forensic investigation.

Why is CVE response getting harder?

Ron opened with three "scary slides," in the spirit of Halloween week.

The first is volume. Published CVE records rose from 28,816 in 2023 to 39,953 in 2024 and 48,151 in 2025. In 2026, 86,533 were published between January 1 and October 25 (NVD data, compiled by Brandefense). Not every finding is exploitable, but every one has to be triaged. And it isn't only that AI models have become good at finding vulnerabilities: finding them has become cheap. "We've always had a lot of these CVEs," Ron said, referring to undiscovered vulnerabilities in existing code. "No one just spent time to research them or find them."

The second is speed. Patching a critical vulnerability within seven days of a fix being available has long been the industry's gold standard. But in Rapid7's Q3 2026 threat update, exploitation followed disclosure by three days on average across the 43 newly exploited high- and critical-severity vulnerabilities it tracked, and 71% were exploited within seven days.

The PHP vulnerabilities from October 2026 show what that looks like. CVE-2026-109618 and CVE-2026-109619 were disclosed and patched on October 21. On October 26, CISA added both to its catalog of known exploited vulnerabilities, with a federal remediation deadline of October 29. Different clocks, same pressure: the time to respond is short.

Why is "where are we running it?" so hard to answer?

The third scary slide is the process most teams still follow after an alert. Scan registries, hosts and clusters. Pull SBOMs and reconcile them with base images and lockfiles. Map images to the workloads actually running them. Ask around about VMs, CI runners, laptops and everything else. Only then do you have an answer, and all of it starts after the alert.

As Ron put it: software inventory shouldn't be a forensic investigation.

What do you need to know before a CVE lands?

Two records, kept all the time rather than rebuilt during an incident:

  • A dependency record: every package and version in each environment, including transitive dependencies.
  • A deployment inventory: which machines and workloads run which environment.

A shared, immutable identity joins the two. Then a CVE leads straight to the environments that contain the package, and from there to the workloads that run them.

Ron was clear that this is a way of thinking, not a product pitch. "I'm not saying that you need to adopt Nix or Flox," he said. "It's a way of thinking that needs to change." The question is how to "maintain an inventory of our software that just is there all the time."

How does the build become the dependency record?

A partial dependency graph isn't enough. If your record stops at the packages you named, there are more dependencies underneath, and an attacker who wants to exploit one will find it.

This is where Nix differs from a Dockerfile. Nix builds are a recursive graph: every dependency, down to the C library, is part of the build and locked at the version used. In Flox, the manifest declares the packages a project needs. The lockfile records exactly what was resolved. And the Nix store records the full closure, including packages nobody declared directly. Each build is identified by a cryptographic hash of all its inputs, which becomes part of its store path.

So the dependency record isn't a separate document someone has to produce. It comes out of resolving and building the environment, and it exists before any CVE arrives.

What does a CVE lookup look like?

Take the PHP example. The CVE names PHP 8.4.26. Instead of scanning, you query the dependency records: which environment identities contain PHP 8.4.26? In the example on the slide, two do, one for Linux and one for macOS.

Then you join those identities to the deployment inventory: where do they run? Five workloads, including production services in two regions, a CI runner and a developer laptop. No machines scanned.

The lookup also tells you what you don't need to worry about. If no environment contains the vulnerable version, you're done. If one contains it but nothing runs it, the severity drops.

The environments, workloads and the CVE-to-workload lookup on this slide are illustrative. They show the architecture, not a shipped Flox feature, and a match means potential exposure, not proven exploitability.

How does the fix reach running workloads?

The demo showed the other half: once a corrected package is available, how does it get everywhere it needs to go?

  • Rebuild: Flox Factory rebuilds the changed package.
  • Publish: the catalog is updated with the new versions.
  • Update: FloxHub automatically publishes new generations of the environments that use it.
  • Adopt: machines that follow those environments pick up the new generation.

In the PHP example, generation 10 of the environment contains PHP 8.4.27 instead of 8.4.26, with a new identity. You verify the change by reviewing the lock diff and running your tests. Then promotion follows policy. Some workloads follow the environment and move to generation 10 right away. Others are pinned and wait for their owners' update window. "A certain app can wait a week, a certain app can be frozen," Ron said. "You can roll back, you can roll forward."

Publication is automatic. Promotion stays under your control.

Scan after, or know before?

Ron closed on the architectural choice. When the next CVE lands, do you scan every machine to reconstruct what's running, or query what you already know?

"O(1)" is shorthand, not a formal bound: an indexed lookup still has costs. What it replaces is repeated inspection of the whole fleet, every time. Scanners still matter for anything outside the Nix-managed closure. But for everything inside it, the record always already exists.

The automation Ron demoed is in early access. To learn more, see Secure software by construction. For a deeper look at how the Nix and Flox model changes package-CVE triage, read Achieving CVE Remediation in an Era of Escalating Vulnerabilities.

The O(1) question FAQ

What is the O(1) question in vulnerability response?

When a CVE lands, you can either scan every machine to reconstruct what is running, which is O(n) because the work grows with your fleet, or query records you already keep about what each environment contains and where it runs. Ron Efroni framed that choice at GitHub Universe 2026 as the O(1) question: reactively scan, or know beforehand.

What do you need to keep to answer "where are we running the affected package?"

Two records: a dependency record of every package and version in each environment, including transitive dependencies, and a deployment inventory of which machines and workloads run which environment. A shared, immutable identity joins them, so a CVE leads to the environments that contain the package and then to the workloads that run them.

Is a Flox dependency record just an SBOM?

No. An SBOM is a document someone produces after the fact. With Nix and Flox, the dependency record comes out of resolving and building the environment: the manifest declares packages, the lockfile records what was resolved, and the Nix store records the full closure, identified by a hash of all build inputs. Because it is produced by the build, it cannot drift from what was built.

Is the CVE lookup literally O(1)?

No. O(1) is shorthand: an indexed lookup still has costs. What it replaces is repeated inspection of the whole fleet every time a CVE is published. A match also means potential exposure, not proven exploitability.

Does this replace vulnerability scanners?

No. The dependency record covers what is inside the Nix-managed closure. Anything installed outside it, such as packages fetched imperatively at runtime, still needs scanning or separate tracking.

How does a patched package reach running workloads with Flox?

Once a corrected package is available, Flox Factory rebuilds it and the catalog is updated, FloxHub publishes new generations of the environments that use it, and machines that follow those environments pick up the new generation. Pinned workloads wait for their update window, so publication is automatic and promotion stays under your control.

Keep learning with Flox

Interviews, tips, guides, industry best practices, and news.

View all posts

Join 2,000+ subscribers

Stay in the loop with everything you need to know.