kth.sePublications KTH
2728293031323330 of 273
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Retrieval-Augmented Generation for Vulnerability Classification: Mapping GitHub Issues to CWE
KTH, School of Electrical Engineering and Computer Science (EECS).
2025 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Retrieval-Augmented Generation för Sårbarhetsklassificering : Koppling av GitHub Issues till CWE (Swedish)
Abstract [en]

As technology advances, pivotal services and infrastructure become increasingly dependent on various software, as well as network and computer systems. With the apparent benefits of these modern solutions come the looming threat of exploitation, requiring timely and accurate vulnerability analysis and correction. To this end, Cipollone leverages transformer-based models to ”automate the identification of software vulnerabilities through the analysis of GitHub issues”. Though Cipollone’s pipeline was successful in providing accurate classification alongside detailed vulnerability descriptions, it lacked any form of formal vulnerability categorization, which is often present in a proper vulnerability analysis. This thesis aims to extend Cipollone’s pipeline to include automated vulnerability categorization using the widely recognized list of common software and hardware weaknesses, the Common Weakness Enumeration (CWE). There have been various prior attempts at general automation of CWE labeling. However, they all suffer from the abundance of available labels, contrasted with the scarcity of real-world examples demonstrating their use. This leads to insufficient training or fine-tuning data, limiting achievable precision or class coverage in the final labeling. To circumvent this, we leverage the already available, comprehensive CWE documentation using Retrieval-Augmented Generation without relying on training or fine- tuning. The precision and computational efficiency of this approach demonstrate the viability of knowledge retrieval in supporting and automating vulnerability categorization. In addition to completing the loop of Cipollone’s pipeline, this serves to significantly narrow the window of exploitation between vulnerability discovery and correction. Thus, this research provides an efficient, scalable, and powerful framework for ensuring the security of software and computer systems. Finally, the reduced reliance on training or fine-tuning in automated CWE labeling broadens avenues for future work and solutions in the field.

Abstract [sv]

I takt med teknologisk utveckling blir centrala tjänster och infrastruktur alltmer beroende av olika programvaror samt nätverks- och datorsystem. I samband med de uppenbara fördelarna av dessa moderna lösningar följer det överhängande hotet av exploatering vilket kräver snabb och noggrann sårbarhetsanalys och korrigering. För detta ändamål utnyttjar Cipollone transformatorbaserade modeller för att ”automatisera identifieringen av programvarusårbarheter genom analys av GitHub-problem” (min översättning). Medan Cipollones lösning lyckades ge träffsäker klassificering tillsammans med detaljerade sårbarhetsbeskrivningar saknade den formel sårbarhetskategorisering som ofta finns i en ordentlig sårbarhetsanalys. Denna avhandling syftar till att utvidga Cipollones lösning för att inkludera automatiserad sårbarhetskategorisering med användning av den allmänt erkända Common Weakness Enumeration (CWE). Diverse tidigare försök av generell automatisering av CWE-klassificering har genomförts. Dock, har samtliga en mångfald av tillgängliga klasser men lider brist på verkliga exempel av deras användning. Detta leder till otillräcklig tränings- eller finjusteringsdata vilket begränsar den uppnåeliga precisionen eller klasstäckning av den slutliga klassificeringen. För att undvika detta utnyttjar vi den tillgängliga, omfattande CWE-dokumentationen med hjälp av Retrieval-Augmented Generation utan att förlita oss på träning eller finjustering av modellen. Precisionen och beräkningseffektiviteten av våra resultat visar på användbarheten av informationssökning i att stötta och automatisera sårbarhetsklassificering. Utöver att fullständiggöra Cipollones lösning leder detta till att i betydande omfattning minska avståndet mellan upptäckten av sårbarheter och deras korrigering. följaktligen, tillhandahåller ett effektivt, skalbart och kraftfullt ramverk för att säkerställa säkerheten av programvara och datorsystem. Slutligen vidgar det minskade beroendet av träning och finjustering möjligheterna för framtida arbete och lösningar inom automatiserad CWE-klassificering.

Place, publisher, year, edition, pages
2025. , p. 66
Series
TRITA-EECS-EX ; 2025:956
Keywords [en]
Vulnerability classification, Vulnerability detection, Machine learning, Large language models (LLM), Retrieval-augmented generation (RAG), Information retrieval, GitHub issues, Common weakness enumeration (CWE)
Keywords [sv]
Sårbarhetsklassificering, Sårbarhetsdetektering, Maskininlärning, Stora språkmodeller (LLM), Retrieval-augmented generation (RAG), Informationssökning, GitHub Issues, Common Weakness Enumeration (CWE)
National Category
Computer Sciences
Identifiers
URN: urn:nbn:se:kth:diva-377089OAI: oai:DiVA.org:kth-377089DiVA, id: diva2:2040821
External cooperation
Red Hat
Subject / course
Computer Science
Educational program
Master of Science - Computer Science
Supervisors
Examiners
Available from: 2026-03-03 Created: 2026-02-23 Last updated: 2026-03-03Bibliographically approved

Open Access in DiVA

fulltext(1768 kB)14 downloads
File information
File name FULLTEXT02.pdfFile size 1768 kBChecksum SHA-512
14b8dbcfb9f93abf2010be4a950c9dbe7ea1a0d89f4fbae7be369ffe045523542298022478a4cbaa79c1d401bca1d758a229f49db854ee27d548a2c63a931c3f
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 14 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 58 hits
2728293031323330 of 273
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf