arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1810.09605cs.SE
收藏

缺陷基础设施作为代码流的Source Code属性

Source Code Properties of Defective Infrastructure as Code Scripts

Akond Rahman, Laurie Williams

摘要:

背景:在持续部署中,软件和服务使用自动化部署管道快速部署到最终用户。基础架构即代码(IaC)脚本中的缺陷可能会阻碍自动化部署管道的可靠性。我们假设IaC源代码的某些属性,如代码行和用作配置值的硬编码字符串,与有缺陷的IaC脚本相关。目的:本文的目的是帮助从业人员在提高质量的基础设施作为代码(IaC)脚本通过实证研究,确定有缺陷的IaC脚本的源代码属性。方法学:我们对从开源软件库中挖掘的缺陷相关提交进行定性分析,以识别与有缺陷的IaC脚本相关的源代码属性。接下来,我们调查从业者,以评估从业者的协议水平与确定的属性。我们还使用从四个数据集收集的2,439个脚本的识别属性构建缺陷预测模型。结果:我们确定了10个与有缺陷的IaC脚本相关的源代码属性。在确定的10个属性中,我们观察到代码行和硬编码字符串与有缺陷的IaC脚本的相关性最强。硬编码字符串是将配置值指定为硬编码字符串的属性。根据我们的调查分析,大多数从业者对两个属性表示同意:包括,执行外部模块或脚本的属性,以及硬编码字符串。利用所识别的属性,我们构建的缺陷预测模型的准确率为0.70~0.78,召回率为0.54~0.67。

英文摘要:

Context: In continuous deployment, software and services are rapidly deployed to end-users using an automated deployment pipeline. Defects in infrastructure as code (IaC) scripts can hinder the reliability of the automated deployment pipeline. We hypothesize that certain properties of IaC source code such as lines of code and hard-coded strings used as configuration values, show correlation with defective IaC scripts. Objective: The objective of this paper is to help practitioners in increasing the quality of infrastructure as code (IaC) scripts through an empirical study that identifies source code properties of defective IaC scripts. Methodology: We apply qualitative analysis on defect-related commits mined from open source software repositories to identify source code properties that correlate with defective IaC scripts. Next, we survey practitioners to assess the practitioner's agreement level with the identified properties. We also construct defect prediction models using the identified properties for 2,439 scripts collected from four datasets. Results: We identify 10 source code properties that correlate with defective IaC scripts. Of the identified 10 properties we observe lines of code and hard-coded string to show the strongest correlation with defective IaC scripts. Hard-coded string is the property of specifying configuration value as hard-coded string. According to our survey analysis, majority of the practitioners show agreement for two properties: include, the property of executing external modules or scripts, and hard-coded string. Using the identified properties, our constructed defect prediction models show a precision of 0.70~0.78, and a recall of 0.54~0.67.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑