Infrastructure as Code (IaC) has become integral to modern software development, enabling automated and consistent configuration of computing environments. The rapid proliferation of IaC scripts has highlighted the need for better code quality assessment methods. This paper proposes a new IaC code quality framework specifically showcased for Ansible repositories as a foundation. By analyzing a comprehensive dataset of repositories from Ansible Galaxy, we applied our framework to evaluate code quality across multiple attributes. The analysis of our code quality metrics applied to Ansible Galaxy repositories reveal trends over time indicating improvements in areas such as metadata and error handling, while highlighting declines in others such as sophistication and automation. The framework offers practitioners a systematic tool for assessing and enhancing IaC scripts, fostering standardization and facilitating continuous improvement. It also provides a standardized foundation for further work into IaC code quality.
Security Smells in Ansible and Chef Scripts: A Replication Study
上下文:安全气味是重复出现的编码模式,表明存在安全漏洞,需要进一步检查。由于基础设施即代码(IaC)脚本(如Ansible和Chef脚本)用于大规模配置基于云的服务器和系统,IaC脚本中的安全气味可用于使恶意用户能够利用所配置系统中的漏洞。目标:本文的目标是通过对Ansible和Chef脚本中的安全气味进行实证研究,帮助从业者在将基础设施开发为代码脚本时避免不安全的编码实践。方法学:我们进行了一项复制研究,我们对1,956个IaC脚本进行了定性分析,以确定用两种语言编写的IaC脚本的安全气味:Ansible和Chef。我们构建了一个名为Security Linter for Ansible and Chef scripts(SLAC)的静态分析工具,用于自动识别从813个开源软件库中收集的50,323个脚本中的安全气味。我们还提交了1,000个随机选择的气味事件的错误报告。结果:我们发现了两个在以前的工作中没有报道的安全气味:在case语句中缺少默认值和没有完整性检查。通过应用SLAC,我们识别出46,600次安全气味,其中包括7,849个硬编码密码。我们观察到94个bug报告中有65个是一致的,这表明Ansible和Chef脚本的安全气味与从业者之间的相关性。结论:我们观察到安全气味在Ansible和Chef脚本中普遍存在,类似于Puppet脚本。我们建议从业者使用(i)代码审查…
The Software Infrastructure Attitude Scale (SIAS): A Questionnaire Instrument for Measuring Professionals' Attitudes Toward Technical and Sociotechnical Infrastructure
Dalhousie University(达尔豪斯大学);University of Helsinki(赫尔辛基大学);Northwestern University(西北大学);University of Calgary(卡尔加里大学);Mahidol University(玛希隆大学);New York Institute of Technology(纽约理工学院);King Saud University(沙特国王大学);NADI, University of Namur(纳穆尔大学 NADI);Shinshu University(信州大学);Heidelberg University(海德堡大学);University of Bayreuth(拜罗伊特大学);Bilkent University(比尔肯特大学)