A Comparative Study of Rule-Based and LLM-Based IaC Security Misconfiguration Detection in DevOps

dc.contributor.authorBari, Belal
dc.contributor.departmentfi=Tietotekniikan laitos|en=Department of Computing|
dc.contributor.facultyfi=Teknillinen tiedekunta|en=Faculty of Technology|
dc.contributor.studysubjectfi=Tietotekniikka|en=Information and Communication Technology|
dc.date.accessioned2026-06-16T19:31:37Z
dc.date.issued2026-06-04
dc.description.abstractCloud-native environments increasingly rely on IaC tools for provisioning infrastruc ture through DevOps pipelines. Even though this improves agility, it introduces risks that comes from automation at scale, code reuse and insufficient security validation. Existing rule-based security scanners are limited by context-insensitive rules, which can lead to false positives and reduced adaptability in complex and evolving cloud environments. This thesis aims to test rule-based tools against multiple LLM’s, including Devstral 2, o4 Mini, GPT 5.1 and Sonnet 4.6, for better detection of security misconfig urations in Terraform configurations. The proposed approach involves collecting real-world Infrastructure-as-Code (IaC) configurations, extracting security-relevant information and leveraging Large Language Models (LLMs) to identify common misconfiguration patterns. The solution is evaluated using various LLM’s, with zero-shot and few-shot prompting and comparing its detection accuracy and false positive rates against existing rule-based tools. The results have shown that LLMs can match or outperform static rule-based tools in identifying misconfigurations. Sonnet 4.6 has achieved higher true-positive count (82) compared to Tfsec (79), while other models showed notable improvements in recall when augmented with retrieval-based context. Although few-shot prompting occasionally increased false positives in certain cases, LLMs consistently exhibited a stronger ability to detect semantically complex and context-dependent security issues. The study concludes that LLMs are a proper potential replacement for tackling dynamic and expanding cloud environments with adaptability to be integrated into DevOps pipelines for secure misconfiguration scanning.
dc.format.extent101
dc.identifier.urihttps://www.utupub.fi/handle/11111/62097
dc.identifier.urnURN:NBN:fi-fe2026061671648
dc.language.isoeng
dc.rightsfi=Julkaisu on tekijänoikeussäännösten alainen. Teosta voi lukea ja tulostaa henkilökohtaista käyttöä varten. Käyttö kaupallisiin tarkoituksiin on kielletty.|en=This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.|
dc.rights.accessrightsavoin
dc.subjectDevOps
dc.subjectDevSecOps
dc.subjectSecuritySmell
dc.subjectMachine Learning
dc.subjectML
dc.subjectNLP
dc.subjectLLM
dc.subjectLarge Language Model
dc.subjectIaC
dc.subjectInfrastructure as Code
dc.subjectStatic Analysis
dc.subjectSecurity Testing
dc.titleA Comparative Study of Rule-Based and LLM-Based IaC Security Misconfiguration Detection in DevOps
dc.type.ontasotfi=Diplomityö|en=Master's thesis|

Tiedostot

Näytetään 1 - 1 / 1
Ladataan...
Name:
A_Comparative_Study_of_Rule_Based_and_LLM_Based_IaC_Security_Misconfiguration_Detection_in_DevOps.pdf
Size:
3 MB
Format:
Adobe Portable Document Format