Cross-Cutting Security Analysis of LLM-Generated Code via Metamorphic Testing and Association Rule Mining
Jul 15, 2026
Researchers present a framework that combines metamorphic testing and association rule mining to systematically detect and analyze security vulnerabilities in code generated by large language models (LLMs). Evaluating 3,700 code snippets from five open-source models, they found that 68.8% violated at least one security property, with frequent co-occurrence of vulnerabilities such as XSS, weak cryptography, and hard-coded credentials. The study also identifies prompt-level risk factors and structured patterns in how vulnerabilities cluster together.
Why it matters: This work demonstrates that security flaws in LLM-generated code are often interconnected and influenced by prompt context, highlighting the need for cluster-aware verification and improved safeguards in AI-assisted programming.
Full story at: arXiv Cryptography and Security ↗