Securing the creative code: an investigation into the security aspects of AI-generated code

Abstract

AI-generated code has massive potential but this evolving technology also presents significant security concerns. This study investigates generative AI code and its security. It explores vulnerabilities inherent in AI-generated code and investigates methods to detect its vulnerability. This research analyzes the security implications of various Static Application Security Testing tools and generative AI models, identifies common vulnerabilities, and proposes practical solutions to audit and identify vulnerabilities. This study proposes an LLM that have been fine-tuned with a contextual dataset that is made up of SAST tool results. The proposed LLM is a 7B-Parameter fine-tuned Code Llama that has achieved a promising F1-Score of 0.42 and Recall of 0.72 in identifying vulnerabilities on unseen data. This study aims to contribute to the development of secure and creative coding practices in the era of AI-powered development.

Description

Cataloged from PDF version of thesis.
Includes bibliographical references (pages 80-83).
This thesis is submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science and Engineering, 2025.

Keywords

Large language models, Code generation, AI-generated code, Artificial intelligence, Vulnerability classification, Cyber security

Citation

Endorsement

Review

Supplemented By

Referenced By