We witness an increasing usage of AI-assistants even for routine (classroom) programming tasks. However, the code generated on basis of a so called "prompt" by the programmer does not always meet accepted security standards. On the one hand, this may be due to lack of best-practice examples in the training data. On the other hand, the actual quality of the programmers prompt appears to influence whether generated code contains weaknesses or not. In this paper we analyse 4 major LLMs with respect to the security of generated code. We do this on basis of a case study for the Python and Javascript language, using the MITRE CWE catalogue as the guiding security definition. Our results show that using different prompting techniques, some LLMs initially generate 65% code which is deemed insecure by a trained security engineer. On the other hand almost all analysed LLMs will eventually generate code being close to 100% secure with increasing manual guidance of a skilled engineer.
Evaluating and Improving the Robustness of Security Attack Detectors Generated by LLMs
Samuele Pasini Universit\`a della Svizzera italiana, Switzerland Jinhan Kim Universit\`a della Svizzera italiana, Switzerland Tommaso Aiello SAP Labs France, France Rocio Cabrera Lozoya SAP Labs France, France Antonino Sabetta SAP Labs France, France Paolo Tonella Universit\`a della Svizzera italiana, Switzerland
From LLMs to Agents: A Comparative Evaluation of LLMs and LLM-based Agents in Security Patch Detection
School of Computer and Computing Science, Hangzhou City University(杭州城市大学计算机与计算科学学院);College of Computer Science and Technology, Huazhong University of Science and Technology(华中科技大学计算机科学与技术学院)
Unsaid, Unsafe? Implicit Security Obligations in LLM-Based RTL Code Generation
Zhejiang University(浙江大学);Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security(杭州高新区(滨江)区块链与数据安全研究所);School of Artificial Intelligence and Computer Science, Nantong University(南通大学人工智能与计算机学院)
Towards Secure Logging: Characterizing and Benchmarking Logging Code Security Issues with LLMs
York University(约克大学);The Hong Kong University of Science and Technology (Guangzhou)(香港科学与技术大学(广州));University of Waterloo(滑铁卢大学);University of Alberta(阿尔伯塔大学)
An Insight into Security Code Review with LLMs: Capabilities, Obstacles, and Influential Factors
School of Computer Science, Wuhan University, China(武汉大学计算机科学学院);School of Mathematical and Computational Sciences, Massey University(梅西大学数学与计算科学学院);School of Computing Technologies, RMIT University, Australia(皇家墨尔本理工学院计算技术学院)