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

秘密检测工具对软件秘密报告的比较研究

A Comparative Study of Software Secrets Reporting by Secret Detection Tools

Setu Kumar Basak, Jamison Cox, Bradley Reaves, Laurie Williams

AI总结:

本研究评估了五个开源和四个专有秘密检测工具,发现基于精确度和召回率的最佳工具分别为 GitHub Secret Scanner 和 Gitleaks,并建议开发人员根据项目秘密类型选择工具,供应商应定期更新规则并改进验证机制。

摘要:

背景:根据 GitGuardian 对公共 GitHub 仓库的监控,与 2021 年相比,2022 年秘密泄露继续加速,增长了 67%,暴露了超过 1000 万个秘密(API 密钥和其他凭证)。尽管有许多开源和专有的秘密检测工具可用,但这些工具输出许多误报,使开发人员难以采取行动,团队也难以从众多工具中选择一个。据我们所知,秘密检测工具尚未被比较和评估。目标:我们的研究目标是通过实证调查现有的秘密检测工具,帮助开发人员选择秘密检测工具以减少秘密的暴露。方法:我们针对基准数据集评估了五个开源工具和四个专有工具。结果:基于精确度排名前三的工具是:GitHub Secret Scanner(75%)、Gitleaks(46%)和 Commercial X(25%),基于召回率排名前三的是:Gitleaks(88%)、SpectralOps(67%)和 TruffleHog(52%)。我们对报告的秘密进行的手动分析表明,误报是由于使用了通用正则表达式和无效的熵计算。相反,漏报是由于错误的正则表达式、跳过特定文件类型和规则集不足。结论:我们建议开发人员根据项目中存在的秘密类型选择工具,以防止遗漏秘密。此外,我们建议工具供应商定期更新检测规则,并通过与 API 供应商合作正确使用秘密验证机制,以提高准确性。

英文摘要:

Background: According to GitGuardian's monitoring of public GitHub repositories, secrets sprawl continued accelerating in 2022 by 67% compared to 2021, exposing over 10 million secrets (API keys and other credentials). Though many open-source and proprietary secret detection tools are available, these tools output many false positives, making it difficult for developers to take action and teams to choose one tool out of many. To our knowledge, the secret detection tools are not yet compared and evaluated. Aims: The goal of our study is to aid developers in choosing a secret detection tool to reduce the exposure of secrets through an empirical investigation of existing secret detection tools. Method: We present an evaluation of five open-source and four proprietary tools against a benchmark dataset. Results: The top three tools based on precision are: GitHub Secret Scanner (75%), Gitleaks (46%), and Commercial X (25%), and based on recall are: Gitleaks (88%), SpectralOps (67%) and TruffleHog (52%). Our manual analysis of reported secrets reveals that false positives are due to employing generic regular expressions and ineffective entropy calculation. In contrast, false negatives are due to faulty regular expressions, skipping specific file types, and insufficient rulesets. Conclusions: We recommend developers choose tools based on secret types present in their projects to prevent missing secrets. In addition, we recommend tool vendors update detection rules periodically and correctly employ secret verification mechanisms by collaborating with API vendors to improve accuracy.

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

↑