arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1907.07159cs.CRcs.SE
收藏

Ansible和Chef的安全气味:复制研究

Security Smells in Ansible and Chef Scripts: A Replication Study

Akond Rahman, Md. Rayhanur Rahman, Chris Parnin, Laurie Williams

摘要:

上下文:安全气味是重复出现的编码模式,表明存在安全漏洞,需要进一步检查。由于基础设施即代码(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)代码审查和(ii)静态分析工具严格检查Ansible和Chef脚本中已识别的安全气味的存在。

英文摘要:

Context: Security smells are recurring coding patterns that are indicative of security weakness, and require further inspection. As infrastructure as code (IaC) scripts, such as Ansible and Chef scripts, are used to provision cloud-based servers and systems at scale, security smells in IaC scripts could be used to enable malicious users to exploit vulnerabilities in the provisioned systems. Goal: The goal of this paper is to help practitioners avoid insecure coding practices while developing infrastructure as code scripts through an empirical study of security smells in Ansible and Chef scripts. Methodology: We conduct a replication study where we apply qualitative analysis with 1,956 IaC scripts to identify security smells for IaC scripts written in two languages: Ansible and Chef. We construct a static analysis tool called Security Linter for Ansible and Chef scripts (SLAC) to automatically identify security smells in 50,323 scripts collected from 813 open source software repositories. We also submit bug reports for 1,000 randomly-selected smell occurrences. Results: We identify two security smells not reported in prior work: missing default in case statement and no integrity check. By applying SLAC we identify 46,600 occurrences of security smells that include 7,849 hard-coded passwords. We observe agreement for 65 of the responded 94 bug reports, which suggests the relevance of security smells for Ansible and Chef scripts amongst practitioners. Conclusion: We observe security smells to be prevalent in Ansible and Chef scripts, similar to that of the Puppet scripts. We recommend practitioners to rigorously inspect the presence of the identified security smells in Ansible and Chef scripts using (i) code review, and (ii) static analysis tools.

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

↑