Databricks' npm scanner pushed budget models to 67 of 70, but precision still matters

By
CTOL Staff Reporter
1 min read

Evidence from a rule engine lifted seven budget models from 35 to 67 correct detections in 70 tests. Databricks' advisory test set produced 0.77 precision, but that figure falls quickly as malicious packages become rarer.

A rule engine's evidence in the prompt turned a missed malware package into a caught one. Qwen3 Next, an open-weight model with 80 billion parameters, saw an obfuscated stealer hidden in a native Node.js addon, a compiled code module. It first returned a benign verdict at 0.98 confidence and recommended allowing the package.

Databricks added a summary of about 1,800 tokens to the prompt, listing what its scanner had found. On byte-identical input, the same model called the package malicious at 0.98 and recommended blocking it.

That example sits at the centre of a Databricks Threat Research post published on 16 October. The result is narrower than the headline numbers suggest. The gain comes from the evidence block, a rule engine's output pasted into the prompt, rather than from better model reasoning.

The approach is useful and cheap. It shifts the buying question from which model to choose to who writes and validates the rules. Precision will also fall as the share of malicious packages in a feed falls. Precision is the share of alerts that are real.

The controlled test is much smaller than the 11,413 package versions described in the post. Databricks scanned those versions and corroborated them against OSV npm malware advisories. Of the versions, 432, or 3.8%, bundle a binary.

The experiment used ten payloads that Databricks built from five types of native addon. Nine models scanned each payload once per condition at temperature zero, a setting that makes output as repeatable as possible. Each result is a single run, not an average.

On that set, the seven budget models failed 35 of 70 tests without profiles, a 50% rate. A profile is the rule engine's summary of what a binary can do. With profiles, 32 of those 35 failures became detections, leaving 3 of 70, or 4%.

The 70 counts model-payload pairs, not packages. The 4% applies only at the looser bar of "highly suspicious or above." At the strict "malicious" bar, failures fell from 73% to 34%, leaving about a third of tests below a blocking verdict.

The models started from very different places. Without profiles, GPT 5.4 nano detected none of the ten payloads, Qwen3 Next detected one, Llama 3.1 8B four, and Claude Haiku 4.5 six. Three of the seven budget models therefore missed most payloads, while Gemma 3 12B missed half.

The failures shared a pattern. All 35 leaned on at least two benign signals, and 24 leaned on four at once. An install script for native addons and the packaging of the addon itself were each called standard in every one of the 35.

Obfuscation also lowered severity. Haiku rated a plain version malicious at 0.98, but rated the XOR-encoded version, which scrambles bytes with a simple operation, merely suspicious. A majority vote across the nine models would not have helped. Only three said malicious.

With profiles, the models converge. Six of the seven budget models score ten of ten, from the 8-billion-parameter Llama to Gemini 3.5 Flash. None returns a benign verdict. The prompt, context and binary analysis were identical in both runs, leaving the evidence block as the one changed input.

The post lets the model override a firing profile entirely, yet different models land in the same place. In production, binary capability profiles drive 74% of detections. The post reports no run of the rules without a model, so it does not measure the split between engine and model.

The production numbers show the scanner on real packages. Databricks matched 425 versions confirmed malicious in public advisories from the OpenSSF malicious packages database against 2,449 versions from 287 popular packages. All 287 have over a million monthly downloads, and none is in the database.

The scanner catches 345 of the 425, a recall of 0.81. Recall is the share of malicious versions it finds.

It also flags 104 versions in the benign set, a false-positive rate of 4.25%. Precision is 0.77, meaning roughly three in four alerts are real on this set.

Some malicious versions still slip past. Another 60 fall to suspicious, and 20 are cleared as benign. Those 20 are the hard misses, a rate of 4.7%.

Precision depends on a mix that a registry does not control. In the study set, 14.8% of versions are malicious. At 5% malicious, the same recall and false positive rate give precision of about 0.50, so half the alerts would be false.

At 1% malicious, precision falls to about 0.16, so roughly five in six alerts would be false. These two mixes are our calculation, not Databricks figures. Popular packages may also score differently from new, obscure ones.

The false positives are not spread evenly. All 104 sit in 6 of the 287 benign packages. The static rules, fixed checks that run without a model, also fired on every one.

A registry mirror can allowlist those six after review. Repeated versions of a package cleared once do not need clearing again, removing all 104 false positives on this set. The post calls the rate low enough for an analyst to clear by hand.

An allowlist cannot fix a first sighting of a new package. A feed with few malicious packages still sends each new false alarm to an analyst.

The cost argument is the strongest case for the result. Sonnet 4.6 and Kimi K3 detected every payload without profiles at roughly three times the per scan cost of the budget tier. Most budget models with profiles now match them.

The saving is real, but production recall belongs to the whole scanner, which combines rules and a model. The labels also mark an entire package malicious without isolating the responsible file, a limitation the authors state.

A proxy that blocks only at "malicious" would still pass about a third of crafted binary payloads at the budget tier. Blocking at "highly suspicious" catches 96%. The cost shifts from a model three times the price to writing and validating profiles, and that work is harder to buy.

Buyers should budget for a rules owner, not simply a bigger model. By the end of January, an outside team running these payloads through the rules alone, without a model, will show how much of the move from 35 to 67 detections came from the model.

You May Also Like

This article is submitted by our user under the News Submission Rules and Guidelines. The cover photo is computer generated art for illustrative purposes only; not indicative of factual content. If you believe this article infringes upon copyright rights, please do not hesitate to report it by sending an email to us. Your vigilance and cooperation are invaluable in helping us maintain a respectful and legally compliant community.

Subscribe to our Newsletter

Get the latest in enterprise business and tech with exclusive peeks at our new offerings

We use cookies on our website to enable certain functions, to provide more relevant information to you and to optimize your experience on our website. Further information can be found in our Privacy Policy and our Terms of Service . Mandatory information can be found in the legal notice