一句话:提出静态分析工具 AssetHarvester,通过检测密钥与其所保护资产的配对,帮助开发者过滤误报并优先移除泄露密钥。
公开 GitHub 仓库中的密钥泄露激增,但现有密钥检测工具误报率高达 25%–99%,开发者往往忽略告警。每个密钥保护着通过资产标识符(DNS 名、公/私 IP 地址)访问的资产,而现有工具不提供资产信息,开发者只能凭密钥值判断或人工查找资产,难以过滤误报并排定修复优先级。为此,作者研究了密钥与资产的共置模式并总结出四种模式,综合采用模式匹配、数据流分析和快速近似启发式三种方法实现 AssetHarvester,以检测仓库中的密钥-资产对。作者从 188 个公开 GitHub 仓库构建了包含四种数据库类型的 1,791 个密钥-资产对基准进行评测。AssetHarvester 达到 97% 精确率、90% 召回率和 94% F1;其中数据流分析部分实现 0% 误报,并使数据库密钥检测的精确率相比现有工具提升 43%,有助于减少开发者的告警疲劳。
GitGuardian monitored secrets exposure in public GitHub repositories and reported that developers leaked over 12 million secrets (database and other credentials) in 2023, indicating a 113% surge from 2021. Despite the availability of secret detection tools, developers ignore the tools' reported warnings because of false positives ($\mathbf{2 5 \% - 9 9 \%}$). However, each secret protects assets of different values accessible through asset identifiers (a DNS name and a public or private IP address). The asset information for a secret can aid developers in filtering false positives and prioritizing secret removal from the source code. However, existing secret detection tools do not provide the asset information, thus presenting difficulty to developers in filtering secrets only by looking at the secret value or finding the assets manually for each reported secret. The goal of our study is to aid software practitioners in prioritizing secrets removal by providing the assets information protected by the secrets through our novel static analysis tool. We present AssetHarvester, a static analysis tool to detect secret-asset pairs in a repository. Since the location of the asset can be distant from where the secret is defined, we investigated secret-asset co-location patterns and found four patterns. To identify the secret-asset pairs of the four patterns, we utilized three approaches (pattern matching, data flow analysis, and fast-approximation heuristics). We curated a benchmark of 1,791 secret-asset pairs of four database types extracted from 188 public GitHub repositories to evaluate the performance of AssetHarvester. AssetHarvester demonstrates precision of (97%), recall (90 %), and F1-score (94 %) in detecting secret-asset pairs. Our findings indicate that data flow analysis employed in AssetHarvester detects secret-asset pairs with 0 % false positives and aids in improving the recall of secret detection tools. Additionally, AssetHarvester shows 43 % increase in precision for database secret detection compared to existing detection tools through the detection of assets, thus reducing developer's alert fatigue.
DOI 原文 ·
@inproceedings{paperbot8724,
title = {AssetHarvester: A Static Analysis Tool for Detecting Secret-Asset Pairs in Software Artifacts},
author = {Setu Kumar Basak and K. Virgil English and Ken Ogura and Vitesh Kambara and Bradley Reaves and Laurie Williams},
booktitle = {ICSE},
year = {2025},
doi = {10.1109/icse55347.2025.00067}
}