Show simple item record

dc.contributor.advisorMelling, Tor Ivar
dc.contributor.authorBamrud, Hallvard Torsvik
dc.contributor.authorClementz, Martin
dc.contributor.authorLervåg, Henrik Werner
dc.contributor.authorStadskleiv, Oscar Stentun
dc.date.accessioned2024-07-13T17:23:40Z
dc.date.available2024-07-13T17:23:40Z
dc.date.issued2024
dc.identifierno.ntnu:inspera:187443388:234867866
dc.identifier.urihttps://hdl.handle.net/11250/3141184
dc.description.abstractInfrastruktur som kode-verktøy (IaC-verktøy) som Terraform er kraftige verktøy som kan hjelpe driftere med å opprette og vedlikeholde sin digitale infrastruktur. Bruken av disse verktøyene tillater drifterne å konfigurere infrastrukturen i henhold til deres spesifikke behov. Likevel, vil ikke disse verktøyene garantere en sikker infrastruktur, og feilkonfigureringer kan bli oversett. Ved å ta i bruk statisk kodeanalyse-verktøy (SAST-verktøy) kan drifterne identifisere potensielle feilkonfigureringer og svakheter før infrastrukturen rulles ut. I dette studiet, er hovedfokuset å sammenligne tre av de mest populære SAST verktøyene for Terraform konfigurasjoner som bruker Azure Resource Manager (AzureRM); Checkov, Terrascan og tfsec. Til dette formålet har vi laget et rammeverk for datainnsamling og testing, som samlet inn “vedlikeholdte” prosjekter. Vi identifiserte 800 kodebaser som passet til våre kriterier. Disse kodebasene brukte vi for å evaluere og sammenligne de tre SAST verktøyene. For å evaluere verktøyene har vi evaluert antall kodebaser hvor verktøyene klarte å identifisere minst én sikkerhetsrisiko. Her så vi på faktorer som regeldekning, brukervennlighet og hvor mange sikkerhetsrisikoer de var i stand til å finne. Vi brukte en datasentrisk tilnærming i evalueringsprosessen. Basert på våre funn, er Checkov det beste verktøyet, med totalt 28 787 funn av sikkerhetsrisikoer i 639 av kodebasene. Terrascan identifiserte 4 484 i 581 kodebaser, og tfsec identifiserte 4 660 i 334 av kodebasene. Checkov identifiserte konsekvent flere sikkerhetsrisikoer i alle kategorier, bortsett fra i kategorien “secrets” hvor den presterte på nivå med tfsec. Terrascan og tfsec presterte nokså likt i forhold til antall sikkerhetsrisikoer de klarte å identifisere. Tfsec hadde imidlertid et høyere gjennomsnittlig antall funn i kodebaser hvor den fant minst en sikkerhetsrisiko. I tillegg til å ha flest antall regler, høyest dekningsgrad og flest identifiserte sikkerhetsrisikoer, var Checkov også det mest stabile verktøyet vi testet. Basert på resultatene våre, fant vi ut at Checkov var det nyttigste verktøyet. Vi anbefaler infrastrukturdriftere å bruke en kombinasjon av Checkov og Terrascan, da dette gir en dekningsgrad på 99.7%, som rettferdiggjør den ekstra ytelseskostnaden.
dc.description.abstractInfrastructure as Code (IaC) tools such as Terraform, are powerful tools that could help infrastructure provisioners create and manage digital infrastructure. The use of these tools enables the provisioner to configure their infrastructure for their specific purpose. However, these tools do not guarantee a secure infrastructure, as misconfigurations could be overlooked. The use of Static Application Security Testing (SAST) tools can help identify misconfigurations and vulnerabilities before the infrastructure is deployed. In this thesis, our forcus is on evaluating three of the most popular SAST tools for Terraform configurations which use the Azure Resource Manager (AzureRM); Checkov, Terrascan and tfsec. For this purpose, we created a data collection and testing framework to collect “maintained” projects. We identified 800 repositories that fit our criteria and used these to evaluate and compare the three SAST tools. To evaluate the tools we consider factors such as their rule coverage, ease of use, and their abilities to find security concerns in a variety of different repositories. We used a data-centric approach for this evaluation. Based on our findings, Checkov was the strongest of the tools, finding a total of 28 787 security concerns in 639 of the repositories. Terrascan identified 4 484 in 581 repositories, and tfsec identified 4 660 in 334 repositories. Checkov consistently identified more security concerns for all categories, except the secrets category where it performed equal to tfsec. Terrascan and tfsec were quite close in regard to the amount of security concerns found. However, tfsec had on average a higher amount found in the repositories where it identified at least one security concern. In addition to having the highest amount of rules, highest coverage and most security concern detections, Checkov was also the most stable of the tools tested. After reviewing our results, we found that Checkov was the most useful of the tools. We suggest that infrastructure provisioners use a combination of Checkov and Terrascan, as this gives a 99.7% coverage rate, which justifies the added performance cost.
dc.languageeng
dc.publisherNTNU
dc.titleAn Empirical Analysis of the Differences Between Terraform Security Scanners
dc.typeBachelor thesis


Files in this item

Thumbnail

This item appears in the following Collection(s)

Show simple item record