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.
翻译:作为代码( IaC) 的基础设施, 是用可编程配置文件( 也称为 IaC 脚本) 管理信息技术基础设施的过程。 与其他软件工艺品一样, IaC 脚本可能含有安全气味, 正在编码导致安全缺陷。 有自动分析工具来检测IaC 脚本中的安全气味, 但是它们侧重于木偶、 Aansibil 或主厨等特定技术。 这意味着当在一个工具中检测到新气味时, 它不能立即用于其他工具支持的技术 -- -- 唯一的选择是重复这项努力。 本文展示了一种方法, 能够使不同IaC 技术的安全气味得到一致的安全气味检测。 我们展示了所有数据集中所有类型的安全气味, 我们发现了一些可能影响许多IaC 项目的气味。 为了进行这项研究, 我们开发了GLITT, 一个新的技术- 度框架, 能够使自动的 超精度精确度检测不同ILI 的脚本检测结果能够通过 GLIC 定义的安全气味检测不同 GLI 。