From Instructions to Exploits: Applying Program Analysis to Malicious Agent Skills Across Natural Language and Code
Shiwu Zhao, Baizhu Wang, Guoqiang Zheng, Tingyu Gao, Yuheng Xie, Rujie Chen, Xingchen Chen, Xuezhang Liu,
Key points
From the paper's conclusion- We present the Supply-Chain Scanner for Agent Skills (SCS), a static analysis framework that unifies instructions and code for security analysis.
Abstract
LLM-powered agents increasingly rely on third-party skills that combine natural-language instructions with executable code, creating supply-chain risks that may span both artifacts. Existing skill scanners often rely on rule matching or direct LLM judgments and provide limited support for tracing such cross-domain behavior. We present the Supply-Chain Scanner for Agent Skills (SCS), a static analysis framework that unifies instructions and code for security analysis. SCS compiles natural-language instructions into a constrained Python-style intermediate representation using a limited set of security-oriented APIs. It then constructs program dependence graphs for instructions and bundled code and connects them into a cross-domain graph (xPDG). A Trust-Sensitivity-Capability (TSC) model propagates security properties over the graph to support structured, largely deterministic risk detection. On a manually verified benchmark of 117 malicious and 117 benign skills, SCS achieves the highest average accuracy (85.6%), recall (95.2%), and F1-score (86.9%) among evaluated methods across five LLMs, with 80.2% precision and average token consumption of 13.7 million. Its NL-to-IR compiler achieves 92.5%-94.5% step-level correctness on 400 human-annotated instruction steps. Finally, analyzing 66,157 real-world ClawHub skills yields 2,473 candidates, of which 627 are confirmed malicious through auxiliary dynamic validation and manual review.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Detecting Insecure Compositions of Clean Agent Skills via Capability-Flow Graph AnalysisarXiv · 2026
- The Devil Wears Markdown: Detecting Malicious Intent Hidden in AI Agent Skill Instructions through Hybrid Static, Dynamic, and Agentic AnalysisarXiv · 2026
- Carried-Over and Agent-Native Threats in the Supply Chain of LLM Agent SkillsarXiv · 2026
- Can Agents Trust Their Skills? Uncovering Unsafe Chains of Trust in Skill-Based LLM AgentsarXiv · 2026
- Pretext: Defeating Malicious Skill Detection Frameworks for AI AgentsarXiv · 2026
- Understanding and Mitigating Cross-Session Attacks via Persistent Artifacts in Agent Skill CompositionarXiv · 2026