[论文解读] Exploring Security Practices in Infrastructure as Code: An Empirical Study
本实证研究通过使用 Checkov 进行静态分析,调查了 812 个使用 Terraform 配置 AWS、Azure 和 Google Cloud 的开源 GitHub 仓库中基础设施即代码(IaC)安全最佳实践的采用情况。研究发现,访问策略被最广泛采用,而静态加密则最被忽视,并且发现仓库受欢迎程度(星标数)与安全实践采用之间存在强烈正相关关系。
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.
研究动机与目标
- 了解开发人员在主要云服务提供商中如何实施基础设施即代码(IaC)安全最佳实践。
- 识别并分类适用于 AWS、Azure 和 Google Cloud 的广泛认可的 IaC 安全策略。
- 实证评估这些策略在真实世界开源 IaC 项目中的采纳水平。
- 检验 GitHub 元数据(如星标数、分支数、贡献者数)是否与安全 IaC 配置实践存在相关性。
- 基于实证发现,提供可操作的建议以提升 IaC 安全性。
提出的方法
- 将 287 项业界公认的 Terraform 安全策略按常见安全控制领域分类为八个类别。
- 收集了 812 个使用 Terraform 配置 AWS、Azure 和 Google Cloud 的活跃开源 GitHub 仓库的数据集。
- 使用 Checkov(一种静态分析工具)扫描每个项目的配置文件,以检测策略的实施情况。
- 筛选出非生产环境或教学性质的项目,确保仅分析实际部署项目。
- 收集 GitHub 元数据(星标数、分支数、贡献者数),以评估其与安全配置采纳之间的相关性。
- 在 Checkov 中使用基于图的扫描技术,实现在多个资源间上下文感知的安全检查。
实验结果
研究问题
- RQ1RQ1:哪些安全指南具有对应的 Terraform 实施策略,这些策略如何分类?
- RQ2RQ2:在真实世界的开源 IaC 项目中,这些分类后的安全策略在 AWS、Azure 和 Google Cloud 上的采纳程度如何?
- RQ3RQ3:哪些 GitHub 元数据指标(如星标数、分支数、贡献者数)与安全 IaC 实践的采纳相关?
主要发现
- 访问策略在所有三个云服务提供商中均被最广泛采纳,表明在身份和访问控制方面有较强的遵循度。
- 静态加密是最少被采纳的策略,其实施率显著低于其他类别,尤其在 AWS 和 Azure 上更为明显。
- AWS 和 Azure 在日志记录/监控以及过时功能策略上的采纳率相似且偏低,而 GCP 在传输中加密和硬编码密钥强制策略方面表现出独特的缺口。
- 发现星标数与安全 IaC 实践采纳之间存在强烈正相关关系,表明受欢迎的项目更有可能实施安全策略。
- 尽管存在 Checkov 等静态分析工具,许多开源项目仍未能实施关键安全策略,表明工具采纳率和意识方面存在差距。
- 本研究证实,IaC 安全在不同云服务提供商和实践类别之间仍不一致,凸显了在 CI/CD 流水线中加强教育和工具集成的必要性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。