# From Instructions to Exploits: Applying Program Analysis to Malicious Agent Skills Across Natural Language and Code

DevFeed: [From Instructions to Exploits: Applying Program Analysis to Malicious Agent Skills Across Natural Language and Code](<https://devfeed.tech/articles/from-instructions-to-exploits-applying-program-analysis-to-malicious-agent-skills-across-natural-language-and-code-101399.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.33489>)

Author: Shiwu Zhao, Baizhu Wang, Guoqiang Zheng, Tingyu Gao, Yuheng Xie, Rujie Chen, Xingchen Chen, Xuezhang Liu, Qixu Liu

Published: 2026-10-27T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>), [AI software supply chain security](<https://devfeed.tech/topics/ai-software-supply-chain-security.md>), [Agent Skills](<https://devfeed.tech/topics/agent-skills.md>), [LLM security](<https://devfeed.tech/topics/llm-security.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [agent-skills](<https://devfeed.tech/tags/agent-skills.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [llm](<https://devfeed.tech/tags/llm.md>), [manual-review](<https://devfeed.tech/tags/manual-review.md>), [program-analysis](<https://devfeed.tech/tags/program-analysis.md>), [python](<https://devfeed.tech/tags/python.md>), [scanner](<https://devfeed.tech/tags/scanner.md>), [scanners](<https://devfeed.tech/tags/scanners.md>), [security](<https://devfeed.tech/tags/security.md>), [static-analysis](<https://devfeed.tech/tags/static-analysis.md>), [supply-chain](<https://devfeed.tech/tags/supply-chain.md>), [tracing](<https://devfeed.tech/tags/tracing.md>), [validation](<https://devfeed.tech/tags/validation.md>)

## AI overview

SCS analyzes malicious agent skills by translating natural-language instructions into a constrained Python-style representation, building dependence graphs for the instructions and bundled code, and joining them in a cross-domain graph. Its Trust-Sensitivity-Capability model propagates security properties to support largely deterministic risk detection. On a benchmark of 117 malicious and 117 benign skills, it reports 85.6% average accuracy, 95.2% recall, 86.9% F1, and 80.2% precision across five LLMs, with 13.7 million average tokens consumed. The instruction compiler reached 92.5-94.5% step-level correctness. In 66,157 ClawHub skills, SCS flagged 2,473 candidates; auxiliary dynamic validation and manual review confirmed 627 as malicious.

## Source excerpt

arXiv:2610.33489v1 Announce Type: new 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.