Throughout 2021, GitGuardian's monitoring of public GitHub repositories revealed a two-fold increase in the number of secrets (database credentials, API keys, and other credentials) exposed compared to 2020, accumulating more than six million secrets. To our knowledge, the challenges developers face to avoid checked-in secrets are not yet characterized. The goal of our paper is to aid researchers and tool developers in understanding and prioritizing opportunities for future research and tool automation for mitigating checked-in secrets through an empirical investigation of challenges and solutions related to checked-in secrets. We extract 779 questions related to checked-in secrets on Stack Exchange and apply qualitative analysis to determine the challenges and the solutions posed by others for each of the challenges. We identify 27 challenges and 13 solutions. The four most common challenges, in ranked order, are: (i) store/version of secrets during deployment; (ii) store/version of secrets in source code; (iii) ignore/hide of secrets in source code; and (iv) sanitize VCS history. The three most common solutions, in ranked order, are: (i) move secrets out of source code/version control and use template config file; (ii) secret management in deployment; and (iii) use local environment variables. Our findings indicate that the same solution has been mentioned to mitigate multiple challenges. However, our findings also identify an increasing trend in questions lacking accepted solutions substantiating the need for future research and tool automation on managing secrets.
背景:黑客松已经成为团队合作项目和开发软件原型的热门活动。大多数现有的研究集中在事件期间的活动,对黑客攻击期间带来或创建的代码的演变关注有限。目的:我们的目标是了解与黑客松相关的代码的演变,具体来说,黑客松团队在多大程度上依赖于预先存在的代码,或者他们在黑客松期间开发了多少新代码。此外,我们的目标是了解代码是否以及在何处被重用,以及哪些因素影响重用。方法:我们从DEVPOST(一个黑客数据库)中收集了22,183个黑客项目的信息,并从World of Code中获得了相关的代码(blob)、作者和项目特征。我们通过识别原始blob创建日期和作者,调查了hackblob项目中的代码blob是在事件之前、期间还是之后创建的,并检查了原始作者是否是hackblob项目成员。我们跟踪代码重用的方法是,首先确定所有包含事件期间创建的blob的提交,然后再确定所有包含这些提交的项目。测试结果:虽然只有大约9.14%的代码blob是在黑客马拉松期间创建的,但考虑到此类活动的时间和成员限制,这一数量仍然很大。这些代码blob中大约有三分之一在其他项目中得到重用。相关技术的数量和项目参与者的数量增加了重用概率。结论:我们的研究展示了在黑客攻击过程中,在多大程度上使用了预先存在的代码和创建了新代码,以及有多少代码在之后的其他地方被重用。我们的研究结果有助于更好地理解代码重用作为一种现象和黑客松在这方面…
Actionable Warning Is Not Enough: Recommending Valid Actionable Warnings with Weak Supervision
The State Key Laboratory of Blockchain and Data Security, Zhejiang University(浙江大学区块链与数据安全国家重点实验室);Shanghai Institute for Advanced Study, Zhejiang University(浙江大学上海高等研究院);Huawei(华为)
Identification and Assessment of Software Design Pattern Violations
为了在快速开发环境中保存、扩展和重用软件项目,设计模式实现的验证以识别模式违反已经成为重新工程过程的一部分。如果设计模式实现不符合它们的定义,则会被视为违规。软件老化和开发人员缺乏经验是设计模式违反的根源。根据一些预定义的特征来检查设计模式实现的正确性以检测和纠正违规,从而降低成本是很重要的。目前,已经开发了几种工具来检测设计模式实例,但在创建一个自动化工具来识别和验证设计模式违规方面所做的工作很少。在本文中,我们提出了一个设计模式违规识别和评估(DPVIA)工具,它有能力识别软件设计模式违规,并报告模式实例实现的一致性得分对一组预定义的特征,任何设计模式定义,无论是Gang of Four(GoF)设计模式由Gamma等人[1];或自定义模式由软件开发人员。此外,我们已经验证了所提出的工具的有效性,使用两个评估实验和结果进行手动检查。最后,为了评估所提出的工具的功能,它进行了评估与数据集包含5,679,964行代码中的28,669在15个开源项目,与大小的开源项目,广泛和系统地采用设计模式,以确定设计模式的违规行为,并建议重构解决方案,从而保持软件进化的成本。软件架构师可以使用这些结果在使用设计模式的同时开发最佳实践。