Original title:
Komunikující agenti pro bezpečnost kódu
Translated title:
Communicative agents for code security
Authors:
Brnák, Jakub ; Malinka, Kamil (referee) ; Reš, Jakub (advisor) Document type: Bachelor's theses
Year:
2025
Language:
eng Publisher:
Vysoké učení technické v Brně. Fakulta informačních technologií Abstract:
[eng][cze]
Táto práca skúma potenciál využitia veľkých jazykových modelov (LLMs) v multiagentných architektúrach pre zlepšenie bezpečnosti kódu generovaného pomocou umelej inteligencie. V rámci multiagentných systémov vystupujú agenti ako autonómne entity so špecificky definovanými úlohami, ktoré spoločne riešia komplexné problémy prostredníctvom koordinovanej spolupráce a komunikácie. Keďže sa LLMs vďaka svojej schopnosti generovať kód stávajú čoraz rozšírenejšími v oblasti vývoja softvéru, prinášajú so sebou aj riziko zavádzania bezpečnostných zraniteľností. Boli navrhnuté dva rôzne multi-agentné systémy, ktoré majú za cieľ tieto zraniteľnosti eliminovať. Prvý systém typu Coder-Analyst využíva dvojagentnú architektúru, v ktorej jeden bezpečnostne orientovaný analytický agent poskytuje priamu spätnú väzbu agentovi, ktorý generuje kód. Druhý, detailnejší prístup je inšpirovaný taxonómiou 7 Pernicious Kingdoms a pozostáva zo siedmich špecializovaných agentov, z ktorých sa každý venuje konkrétnej kategórii zraniteľností. Tieto systémy boli porovnané so samostatnými LLM modelmi s využitím nástrojov na statickú analýzu v kombinácii s metodikou hodnotenia závažnosti zraniteľností. Výsledky ukazujú, že oba multi-agentné systémy generovali menej zraniteľností a dosiahli nižšie priemerné skóre závažnosti v porovnaní so samostatnými modelmi. Podrobná analýza jednotlivých prípadov však odhalila určité nekonzistentnosti a občasné regresie.
This thesis investigates the potential of using Large Language Models (LLMs) in multi-agent architectures to enhance the security of AI-generated code. In multi-agent systems, agents are autonomous entities, each assigned a specific role, working together to solve complex tasks through coordination and communication. As LLMs become increasingly used in software development due to their code generation capabilities, they also bring risks of introducing security vulnerabilities. Two distinct multi-agent systems were proposed to mitigate these vulnerabilities. The first Coder-Analyst system employs a simplified setup with a single security-focused analysis agent providing direct feedback to a coding agent. The second, more granular approach is inspired by the 7 Pernicious Kingdoms taxonomy, involving seven specialized agents, each dedicated to a specific vulnerability category. The systems were evaluated against standalone LLM models using static analysis tools coupled with severity scoring methodology. Results indicate that both multi-agent systems consistently generated fewer vulnerabilities and achieved lower severity scores compared to standalone models. However, detailed case-by-case analyses uncovered inconsistencies and occasional regressions.
Keywords:
generovanie bezpečného kódu; multiagentné systémy; prompt inžiniering; statická analýza; veľké jazykové modely; large language models; multi-agent systems; prompt engineering; secure code generation; static analysis
Institution: Brno University of Technology
(web)
Document availability information: Fulltext is available in the Brno University of Technology Digital Library. Original record: http://hdl.handle.net/11012/254338