论文标题

小故障:基础架构中的自动多圈安全气味检测作为代码

GLITCH: Automated Polyglot Security Smell Detection in Infrastructure as Code

论文作者

Saavedra, Nuno, Ferreira, João F.

论文摘要

基础架构作为代码(IAC)是通过可编程配置文件(也称为IAC脚本)管理IT基础架构的过程。像其他软件工件一样,IAC脚本可能包含安全气味,这些脚本是可以导致安全弱点的编码模式。存在自动分析工具以检测IAC脚本中的安全气味,但它们专注于诸如木偶,Ansible或Chef之类的特定技术。这意味着,当其中一种工具中实现了新气味时,它无法立即用于其他工具支持的技术 - 唯一的选择是复制工作。 本文提出了一种方法,该方法可以在不同的IAC技术之间进行一致的安全气味检测。我们进行了一项大规模的实证研究,该研究分析了包含196,755个IAC脚本和12,281,251 LOC的三个大型数据集上的安全气味。我们表明,所有数据集中都识别出所有类别的安全气味,我们发现一些可能影响许多IAC项目的气味。为了进行这项研究,我们开发了Glitch,这是一种新的技术不合时宜的框架,通过将IAC脚本转换为中间表示,可以在该框架上将不同的安全气味检测器转换为中间表示。当前,小故障支持用Ansible,Chef或Puppet编写的脚本中的九种不同的安全气味检测。我们将故障与最先进的安全气味探测器进行比较。获得的结果不仅表明,小故障可以减少为多种IAC技术编写安全气味分析的努力,而且比当前的最新工具具有更高的精度和回忆。

Infrastructure as Code (IaC) is the process of managing IT infrastructure via programmable configuration files (also called IaC scripts). Like other software artifacts, IaC scripts may contain security smells, which are coding patterns that can result in security weaknesses. Automated analysis tools to detect security smells in IaC scripts exist, but they focus on specific technologies such as Puppet, Ansible, or Chef. This means that when the detection of a new smell is implemented in one of the tools, it is not immediately available for the technologies supported by the other tools -- the only option is to duplicate the effort. This paper presents an approach that enables consistent security smell detection across different IaC technologies. We conduct a large-scale empirical study that analyzes security smells on three large datasets containing 196,755 IaC scripts and 12,281,251 LOC. We show that all categories of security smells are identified across all datasets and we identify some smells that might affect many IaC projects. To conduct this study, we developed GLITCH, a new technology-agnostic framework that enables automated polyglot smell detection by transforming IaC scripts into an intermediate representation, on which different security smell detectors can be defined. GLITCH currently supports the detection of nine different security smells in scripts written in Ansible, Chef, or Puppet. We compare GLITCH with state-of-the-art security smell detectors. The results obtained not only show that GLITCH can reduce the effort of writing security smell analyses for multiple IaC technologies, but also that it has higher precision and recall than the current state-of-the-art tools.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源