[Paper Review] Exploring Security Practices in Infrastructure as Code: An Empirical Study
This empirical study investigates the adoption of Infrastructure as Code (IaC) security best practices across 812 open-source GitHub repositories using Terraform configurations for AWS, Azure, and Google Cloud. By applying static analysis via Checkov, the study identifies that access policies are most widely adopted, while encryption at rest is the most neglected, and finds a strong positive correlation between repository popularity (stars) and secure practice adoption.
Cloud computing has become popular thanks to the widespread use of Infrastructure as Code (IaC) tools, allowing the community to conveniently manage and configure cloud infrastructure using scripts. However, the scripting process itself does not automatically prevent practitioners from introducing misconfigurations, vulnerabilities, or privacy risks. As a result, ensuring security relies on practitioners understanding and the adoption of explicit policies, guidelines, or best practices. In order to understand how practitioners deal with this problem, in this work, we perform an empirical study analyzing the adoption of IaC scripted security best practices. First, we select and categorize widely recognized Terraform security practices promulgated in the industry for popular cloud providers such as AWS, Azure, and Google Cloud. Next, we assess the adoption of these practices by each cloud provider, analyzing a sample of 812 open-source projects hosted on GitHub. For that, we scan each project configuration files, looking for policy implementation through static analysis (checkov). Additionally, we investigate GitHub measures that might be correlated with adopting these best practices. The category Access policy emerges as the most widely adopted in all providers, while Encryption in rest are the most neglected policies. Regarding GitHub measures correlated with best practice adoption, we observe a positive, strong correlation between a repository number of stars and adopting practices in its cloud infrastructure. Based on our findings, we provide guidelines for cloud practitioners to limit infrastructure vulnerability and discuss further aspects associated with policies that have yet to be extensively embraced within the industry.
Motivation & Objective
- To understand how practitioners implement security best practices in Infrastructure as Code (IaC) across major cloud providers.
- To identify and categorize widely recognized IaC security policies for AWS, Azure, and Google Cloud.
- To empirically assess the adoption level of these policies in real-world open-source IaC projects.
- To examine whether GitHub metadata (e.g., stars, forks, contributors) correlates with secure IaC configuration practices.
- To provide actionable guidelines for improving IaC security based on empirical findings.
Proposed method
- Selected and categorized 287 industry-recognized Terraform security policies into eight categories based on common security control domains.
- Collected a dataset of 812 active open-source GitHub repositories using Terraform for AWS, Azure, and Google Cloud.
- Applied Checkov, a static analysis tool, to scan each project’s configuration files for policy implementation.
- Filtered repositories to exclude non-production or tutorial-like projects, ensuring only real deployments were analyzed.
- Collected GitHub metadata (stars, forks, contributors) to assess correlations with secure configuration adoption.
- Used graph-based scanning in Checkov to enable context-aware security checks across multiple resources.
Experimental results
Research questions
- RQ1RQ1: Which security guidelines have matching Terraform implementation policies, and how can they be categorized?
- RQ2RQ2: To what extent are these categorized security policies adopted across AWS, Azure, and Google Cloud in real-world open-source projects?
- RQ3RQ3: Which GitHub metadata metrics (e.g., stars, forks, contributors) are correlated with the adoption of secure IaC practices?
Key findings
- Access policy was the most widely adopted security practice across all three cloud providers, indicating strong adherence to identity and access control.
- Encryption at rest was the least adopted policy, with significantly lower implementation rates compared to other categories, especially on AWS and Azure.
- AWS and Azure showed similar low adoption for Logging/Monitoring and Outdated Feature policies, while GCP exhibited distinct gaps in Encryption in transit and Hard-coded secret enforcement.
- A strong positive correlation was found between the number of GitHub stars and the adoption of secure IaC practices, suggesting that popular projects are more likely to implement security policies.
- Despite the availability of static analysis tools like Checkov, many open-source projects still fail to implement critical security policies, indicating a gap in tool adoption and awareness.
- The study confirms that IaC security remains inconsistent across cloud providers and practice categories, highlighting the need for better education and tool integration in CI/CD pipelines.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.