Original title:
Vliv AI nástrojů na kvalitu a bezpečnost kódu
Translated title:
Impact of AI Tools on Code Quality and Security
Authors:
Vinarčík, Peter ; Holop, Patrik (referee) ; Malinka, Kamil (advisor) Document type: Master’s theses
Year:
2024
Language:
eng Publisher:
Vysoké učení technické v Brně. Fakulta informačních technologií Abstract:
[eng][cze]
Táto práca predstavuje novovytvorenú aplikáciu, ktorá je schopná vykonávať large scale výskum pre hodnotenie bezpečnosti a kvality kódu generovaného AI. Tiež bol predstavený nový spôsob vyhodnocovania bezpečnosti kódu generovaného AI, za využitia MITRE's metodológie v kombinácii so SAST toolmi vykonávajúcimi statickú analýzu nad kódom. Aplikácia je navyše rozšírená o vylepšeného AI chatbota, ktorého výstup je obohatený o výsledky statickej analýzy v čase generovania. Užívateľ vloží dataset promptov do aplikácie, a v prípade, že bol pre určitý prompt vygenerovaný kód so zraniteľnosťou, je táto zraniteľnosť ohodnotená zavedenou metodológiou a užívateľ dostáva informáciu nie len o tom, že kód je zraniteľný, ale ako veľmi. Súčasťou riešenia je aj oproti existujúcim výskumom veľké, pilotné testovanie popularných AI ako ChatGPT-4 či Gemini, nad datasetom promptov s využitím novej aplikácie. Výsledky ukázali dominanciu ChatGPT-4 bežiacom na modeli GPT-4, oproti ostatným testovaným AI.
This work presents a newly developed application that is able to perform fully automated large-scale research for evaluating the safety and quality of AI-generated code. Also, a new way of evaluating the safety of AI-generated code has been presented, utilizing MITRE's methodology in combination with SAST tools performing static analysis on the code. In addition, the application is enhanced with an improved AI chatbot whose output is enhanced with the results of static analysis at generation time. The user inputs a dataset of prompts into the application, and if code with a vulnerability has been generated for a particular prompt, that vulnerability is scored by the established methodology, and the user is informed not only that the code is vulnerable, but how vulnerable it is. As part of the solution, large-scale, pilot testing of popular AIs, such as ChatGPT-4 or Gemini, is performed over a dataset of prompts using the new application, in contrast to existing studies. The results showed the dominance of ChatGPT-4 running on the GPT-4 model, over the other AIs tested.
Keywords:
bandit; bezpečnosť; chatgpt; codeql; copilot; gemini; generatívna umelá inteligencia; gpt; kyberbezpečnosť; llm; sast; semgrep; statická analýza; bandit; chatgpt; codeql; copilot; cybersecurity; gemini; generative AI; gpt; llm; sast; security; semgrep; static analysis
Institution: Brno University of Technology
(web)
Document availability information: Fulltext is available in the Brno University of Technology Digital Library. Original record: https://hdl.handle.net/11012/248992