Anomaly detection at scale: hunting the Hugging Face incident

How do you catch an attacker who’s doing something nobody has ever seen before? 

The shape of agentic attacks is very different from human ones, and they show up in systems that nobody has previously thought to monitor. This means that industry now has to pay attention to far more data than it has been doing up til now. The only economical way to bring frontier-model intelligence to all of it is to let cheap, continuous anomaly detection decide which slices of logs deserve an LLM’s attention. 

‍The swarm was loud

By now, most of us know the story of the OpenAI–Hugging Face incident: roughly 1,200 OpenAI eval agents found and joined a message board inside an internal JFrog Artifactory instance, posting to it by creating directories through unauthenticated WebDAV MKCOL requests. About 700 of them then worked together to compromise Hugging Face. The sheer volume is hard to fathom: in about five days, agents posted more than 70,000 messages and files, adding up to roughly 1.2 million directory entries. Files were base64 encoded and split across directory names, hundreds or thousands of entries apiece; decoded, they included more than 3,600 compressed archives, 213 Python files and 189 JavaScript files (METR). 

This attack was very noisy: an earlier version of the board generated enough traffic to take Artifactory down on July 4. But the outage was handled as a vulnerability patch - the server was rebuilt and the board was wiped as a side effect - all the while without anyone realizing agents were working in collaboration. Within days, they were back on a different mechanism, and OpenAI has since acknowledged that signals existed roughly a week before it responded (CSA). 

Nobody had a signature for “AI agents using Artifactory as a chat room,” and nobody will have a signature for whatever comes next; the agents themselves switched techniques as soon as the first one was closed. Instead, what would have worked is an anomaly detector watching the Artifactory logs and asking, “why does this look different,” and an LLM to figure out why. 

‍Most attacks are obvious once you start to look

Any security engineer would know at a glance that a directory like zzHFPOSTRCE_WT8592N19_BEACON_datasets-server-worker-42_... doesn’t belong in a package cache. That one was created by agent code running on a compromised Hugging Face worker, checking in to OpenAI’s Artifactory to announce it was live (Swarm traces). Frontier LLMs are now good at the same gut check: hand one a sample of logs and it will tell you when something is wrong and explain why. So the bottleneck has shifted; the question is no longer whether intelligence can recognize an attack like this but whether it is given the opportunity to look. 

That gut check has a limit because an LLM can only look at a sample. When METR used AI agents to dig through the full incident dataset, they found the agents were often unreliable at that scale. LLMs are sharp on a small, well-chosen slice of logs and much weaker on a firehose. It’s hard to pick the slice that will reveal something concerning. 

If something is watching for change, the slice is easy to pick. One team we work with found that simple schema drift detection on their CRM environment would have caught an attack against it: new fields appeared in their data that had never been seen before. The swarm would have tripped the same kind of check as more than a million long zz-prefixed directory names appeared in Artifactory in under a week, nothing like the package paths it normally holds. Being able to identify this rapid and unusual change would not have required a signature or prior knowledge of the attack, only a check to notice that something was different. 

‍LLM Economics 101: You can’t feed your model every byte

As we shared in our post on agent swarms, if you tried to send 1 TB a day of raw logs to a frontier model, you would be spending more than $1M daily. Many organizations generate tens to hundreds of terabytes a day, so at 100 TB/day you’re looking at a bill of more than $100M each day or more than $3B each month. The math here is absurd.

Instead of just throwing raw logs to an LLM, we need to think about curation and selection. The goal is to find the right few GB or even MB per day, and send those over. At the MB scale, LLM costs round down to zero.

Five signals that would have caught the swarm

Anomaly detection doesn’t need to know what an attack looks like. It only needs to know what is normal for a given log source and to notice when the recent window drifts away from normal. The following table presents five generic signals that would have flagged the swarm, along with the other attacks each one catches.

Signal What it would have shown in the Hugging Face incident Also catches
Volume spikes and drops (events per source, action, or principal vs. a 30-day baseline) Directory-create (MKCOL) events surging in one cache namespace: more than a million zz-prefixed entries in under a week.

Earlier, overall agent traffic heavy enough to take Artifactory down on July 4
Spikes: exfiltration, brute force, crypto mining, runaway automation

Drops: disabled logging, agent tampering, broken pipelines
Entropy shifts in string fields (paths, names, user agents, command lines) Directory names full of base64-encoded file chunks (archives, Python, JavaScript), far more random than normal package paths Spikes: DGA domains, encoded PowerShell, C2 beacons, secrets in URLs

Drops: repetitive scripted activity replacing organic traffic
Field length drift Directory names often near 200 characters, versus short package paths Injection payloads, smuggled data
Schema drift (new fields, new values in low-cardinality fields, type changes) New top-level, zz-prefixed directories, then mailbox structures (zzMAILBOX_, zzINBOX_) nested beneath them The CRM attack from earlier; new API usage patterns
New entity or rare value (first appearance of a principal, IP, or method) Unauthenticated WebDAV MKCOL requests from eval infrastructure; compromised Hugging Face workers writing beacon directories back to Artifactory Lateral movement, new admin accounts, new service accounts

None of these signals encode anything about the Hugging Face attack. They encode what normal looks like, which is what makes them durable against novel, AI-driven attacks that won’t match historical signatures. The agents could swap mechanisms overnight, but they couldn’t make a million base64-filled directory names look like ordinary package paths.

On their own, these signals are noisy. A deploy, a new integration, or a data migration is able to trip any of them, and many teams gave up on anomaly detection because of this. With AI attackers, giving up is no longer an option, but we now have something those teams didn’t: a reviewer that is smart, fast, and cheap. 

‍How to set up AI to handle the noise

The solution for noisy anomaly detection isn’t fewer detectors but a better first reviewer. Here’s what a pipeline looks like, using the first night of the swarm’s message board as a test case.

  1. Detect. A statistical check runs continuously against Artifactory’s request logs. On the evening of July 8, it fires. Directory-create (MKCOL) requests in the github-remote-cache namespace are far above their 30-day baseline, and the entropy of the new directory names is well beyond anything that namespace usually sees. Within three hours of the first message, 53 agents had posted nearly 1,200 messages to the board (METR), so a check running every few minutes would have caught it early.
  2. Sample. The system pulls the small slice of logs behind the alert, the last 15 minutes of MKCOL requests, plus a baseline sample of normal traffic from the same namespace for contrast. That’s a few hundred KB rather than an expensive terabyte of all the logs. 
  3. Triage. An LLM agent reads both and answers one question: is this a benign change (like a deploy, a new integration, or a migration), or is something wrong? Next to ordinary paths, the agent sees directory names like zzHELP_PHASEONE_ARV010841_NO_CONSUMER_SEEK_IDEA. It flags that these aren’t packages but messages, posted by multiple sandboxed eval agents to a shared cache over unauthenticated requests, and it lays out the evidence. 
  4. Escalate. A human on the security team gets one alert with an explanation attached, instead of a thousand log lines or nothing at all. 
  5. Tune. Over time, the detector also fires on seeming anomalies that turn out to be fine. This may be a nightly CI job that rebuilds part of the cache and trips the volume check each night. A coding agent reads that false-positive history, proposes a change (excluding that service account during its scheduled window, for example) and backtests it against past logs to confirm the rule still would have caught July 8. A human approves the pull request, and the detector works more effectively over time. 

Steps 1 through 4 handle the noise of anomaly detection one alert at a time, and Step 5 shrinks the noise at the source. Tuning used to be the reason teams abandoned anomaly detection, because nobody had time to babysit the thresholds. AI agents are why there’s so much more to watch, but they’re also why, for the first time, we have the bandwidth to look at everything that changes. 

‍Why anomaly detection has been hard to run at scale

If this pipeline is so effective, why isn’t everyone running it already? The answer is less about AI and more about how detection queries have traditionally worked.

In most SIEMs and data lakes, a detection rule is a scheduled query that rescans its full time window every time it runs. That’s fine for a rule that looks at the last five minutes, but it falls apart for anomaly detection where the whole point is to compare recent activity against a long baseline. A rule that checks the last 15 minutes against 30 days of history, every minute, has to reread those 30 days every single minute. For a log source producing 1 TB a day, that's roughly 43,000 TB scanned per day for just one rule on just one source. 

Faced with that bill, teams are forced to make compromises. They end up checking rarely and leave long gaps where an attack can run unnoticed. The baseline gets shortened so that “normal” means the last few hours and anything that is slow-moving ends up slipping through. Or they only cover the handful of sources that justify the cost; Artifactory logs rarely make that cut. 

This all assumes the logs are being collected in the first place, but as we covered in our post on federated indexing, most organizations can’t afford to watch only 10% of the security telemetry. You can’t baseline logs you don’t ingest, and the long-tail sources an AI swarm is most likely to exploit are the first ones cut. 

‍Stop rereading the past

Scanner’s streaming detection engine flips the traditional model. Instead of rescanning logs every time a rule runs, it runs every detection query against logs once, as they are indexed. Each query is executed up to its first aggregation, and the partial results (counts, sums, group-by counts) are stored in a rollup tree: a time-based segment tree with nodes ranging from one minute up to 24 hours. 

Checking a rule then means reading only the handful of nodes that cover the time range, not the raw logs. Checks typically complete in under 100 milliseconds, even over 24-hour windows, and the rollup storage is a small fraction of the original log size. In one example from our docs, 500 rules checked every minute against 10 TB of logs a day query about 3.6 TB daily, compared with roughly 7.2 PB for traditional rescans. That’s about 2,000x less. 

This matters for anomaly detection because counts, sums, and group-by counts are exactly what baselines are made of. Comparing “the last 15 minutes” with “normal” becomes a cheap read of cached partials rather than a full scan. 

We’re building on that foundation to make anomaly detection a standard part of the pipeline: 

  • Long baselines, up to 30 days, compared continuously against recent windows
  • Volume, entropy, field length detectors applied across any source
  • Anomalies handed to AI agents for triage, with the relevant log slice and a baseline sample attached

Combined with federated indexing, this runs on all of your logs, in your own storage, not just the 10% you could afford to send to a SIEM. 

‍Watch everything: the next swarm won’t be this loud

The Hugging Face swarm shows what happens when an old problem - not being able to monitor all your logs - meets a new kind of attacker. There was no need for a clever detection; all the information was sitting in Artifactory’s logs but it was not being watched by anything that understood what normal looked like. Detecting the swarm would have been straightforward if anyone had been watching Artifactory’s logs. 

Attacks are going to become noisier and stranger across more systems than any team can anticipate. Signatures won’t keep up, and humans won’t be able to read and parse all of the resulting alerts. Attackers will go wherever the logs aren’t watched, exploiting the places you least expect. Defenders are no longer in a position to choose which logs are worth monitoring, because any system can turn out to be the one under attack. Broad, cheap, continuous detection of what changed - paired with AI that can look at each anomaly and explain it - is proving to be the solution for the teams we are working with. As our customers have put it, no cyberattack should succeed because of unmonitored logs. 

If anomaly detection could help your team, let us know you would like it in your environment. Find out what it means to watch all of your logs and detect anomalies at scale.