ArXiv TLDR

Towards Personalizing Secure Programming Education with LLM-Injected Vulnerabilities

🐦 Tweet
2604.13955

Matthew Frazier, Kostadin Damevski

cs.CRcs.CYcs.SE

TLDR

This paper explores using LLMs to inject security vulnerabilities into students' own code for personalized secure programming education.

Key contributions

  • Introduces an LLM-based method to inject specific CWEs into students' own assignment code.
  • Presents an agentic AI framework for orchestrating vulnerability injection, evaluation, and ranking.
  • Deployed the system in two undergraduate courses (N=71) for student review and feedback.
  • Students qualitatively found personalized examples more relevant and engaging than generic ones.

Why it matters

Personalized secure programming education can significantly boost student engagement and understanding. This paper introduces an LLM-based method to inject vulnerabilities into student code, showing qualitative benefits but limited quantitative significance, needing refinement.

Original Abstract

According to constructivist theory, students learn software security more effectively when examples are grounded in their own code. Generic examples often fail to connect with students' prior work, limiting engagement and understanding. Advances in LLMs are now making it possible to automatically generate personalized examples by embedding security vulnerabilities directly into student-authored code. This paper introduces a method that uses LLMs to inject instances of specific Common Weakness Enumerations (CWEs) into students' own assignment code, creating individualized instructional materials. We present an agentic AI framework, using autonomous LLM-based agents equipped with task-specific tools to orchestrate injection, evaluation, ranking, and learning outcome generation. We report the experience of deploying this system in two undergraduate computer science courses (N=71), where students reviewed code samples containing LLM-injected vulnerabilities and completed a post-project survey. We compared responses with a baseline using a widely adopted set of generic security instructional materials. Students qualitatively reported finding CWE injections into their own code more relevant, clearer, and more engaging than the textbook-style examples. However, our quantitative findings revealed limited statistically significant differences, suggesting that while students valued the personalization, further studies and refinement of the approach are needed to establish stronger empirical support.

📬 Weekly AI Paper Digest

Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.