Search papers, labs, and topics across Lattice.
This paper introduces Locate-and-Judge, a two-stage detection system that identifies malicious skills in large language model (LLM) marketplaces, where third-party instructions can pose significant security risks. By employing a lightweight locator to score structural spans based on instruction-following attention, the system efficiently narrows down potential threats before a detailed examination by a judge. The approach achieves an order-of-magnitude cost reduction compared to direct LLM scanning while outperforming traditional keyword and regex methods, successfully flagging numerous malicious skills that other detectors missed.
Locate-and-Judge uncovers live malicious skills in LLM marketplaces, revealing a hidden threat landscape that existing detection tools fail to address.
LLM agents increasingly load skills, file-based packages of natural-language instructions written by third parties and distributed through marketplaces, that execute with the user's privileges. A single malicious skill can exfiltrate data, hijack the agent, or persist as a supply-chain foothold, which turns the skill marketplace into a new attack surface for agentic systems. Prompt-injection defenses do not carry over to this setting. They rely on a boundary between trusted instructions and untrusted data, whereas a skill is itself a body of instructions, so an injected command sits among many legitimate ones and inherits their authority. We present Locate-and-Judge, a two-stage detector designed for this regime. A lightweight locator scores the structural spans of a skill by the instruction-following attention each span draws and retains only the top-K. A judge then examines the retained spans in detail. Concentrating the costly judgment on a few high-attention spans lets the detector audit an entire marketplace instead of a sample. Compared to direct LLM-based scanning, this approach offers an order-of-magnitude cost reduction, dramatically increasing its scalability at a small cost to recall, and it dominates keyword and regex baselines at comparable expense. Deployed at marketplace scale and at negligible cost, Locate-and-Judge flags skills with high precision, the majority of which we manually confirmed as malicious, surfacing dozens of live malicious skills, including several disguised as benign functionality and many that SkillSpector and Cisco Skill Scanner fail to detect. We release the resulting labeled dataset.