Lune

S&P2025顶会

Hey, Your Secrets Leaked! Detecting and Characterizing Secret Leakage in the Wild

Jiawei Zhou, Zidong Zhang, Lingyun Ying, Huajun Chai, Jiuxin Cao, Haixin Duan

摘要

Secrets, whether structured like API keys or unstructured like passwords, are essential for securing applications and services. However, the growing use of open-source projects and rapid development cycles has amplified the risk of secret leakage. Current detection tools suffer from high false positive rates and low recall due to simplistic methods like regular expressions and entropy checks, often missing unstructured secrets or mislabeling non-sensitive data.

In this paper, we introduce KEYSENTINEL, an advanced automated secret detection tool that addresses these limitations through machine learning, semantic analysis, and prefix matching. To evaluate KEYSENTINEL, we created the first crossplatform benchmark with 11,826 labeled secrets in 1,806,530 files across GitHub, PyPI, and WeChat. We compare KEY-SENTINEL with six currently available tools. The results show KEYSENTINEL achieves state-of-the-art performance, with precision (91.18%), recall (81.71%), and an F1 score (0.86), surpassing industry-standard tools and significantly reducing false positives. It also outperforms large language models like GPT-4 and o1 in accuracy and cost-effectiveness.

Besides, we conduct a large-scale measurement study, analyzing 80,330,098 files from GitHub, PyPI, and WeChat. We found that up to 30% of projects are at risk of secret leaks. Furthermore, we also scan the codebase of an IT company to assess real-world secret leakage risks. Our findings underscore the pervasive nature of secret leaks and highlight the urgent need for enhanced secret management practices across platforms.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Don't Leak Your Keys: Understanding, Measuring, and Exploiting the AppSecret Leaks in Mini-Programs 引用了 Why Does Your Data Leak? Uncovering the Data Leakage in Cloud from Mobile Apps
  • Don't Leak Your Keys: Understanding, Measuring, and Exploiting the AppSecret Leaks in Mini-Programs 引用了 How Bad Can It Git? Characterizing Secret Leakage in Public GitHub Repositories
  • Don't Leak Your Keys: Understanding, Measuring, and Exploiting the AppSecret Leaks in Mini-Programs 引用了 Automated Detection of Password Leakage from Public GitHub Repositories
  • Hidden Secrets in the arXiv: Discovering, Analyzing, and Preventing Unintentional Information Disclosure in Source Files of Scientific Preprints 引用了 How Bad Can It Git? Characterizing Secret Leakage in Public GitHub Repositories
  • Hidden Secrets in the arXiv: Discovering, Analyzing, and Preventing Unintentional Information Disclosure in Source Files of Scientific Preprints 引用了 Automated Detection of Password Leakage from Public GitHub Repositories
  • Automated Detection of Password Leakage from Public GitHub Repositories 引用了 How Bad Can It Git? Characterizing Secret Leakage in Public GitHub Repositories
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Hidden Secrets in the arXiv: Discovering, Analyzing, and Preventing Unintentional Information Disclosure in Source Files of Scientific PreprintsJan Pennekamp, Johannes Lohmöller, David Schütte, Joscha Loos 等S&P 2026 · 1 次引用

它引用的 Paper7

  1. zxcvbn: Low-Budget Password Strength EstimationDaniel Lowe WheelerUSENIX Security 2016 · 243 次引用
  2. How Bad Can It Git? Characterizing Secret Leakage in Public GitHub RepositoriesMichael Meli, Matthew R. McNiece, Bradley ReavesNDSS 2019 · 130 次引用
  3. Why Does Your Data Leak? Uncovering the Data Leakage in Cloud from Mobile AppsChaoshun Zuo, Zhiqiang Lin, Yinqian ZhangS&P 2019 · 123 次引用
  4. Automated Detection of Password Leakage from Public GitHub RepositoriesRunhan Feng, Ziyang Yan, Shiyan Peng, Yuanyuan ZhangICSE 2022 · 36 次引用
  5. Don't Leak Your Keys: Understanding, Measuring, and Exploiting the AppSecret Leaks in Mini-ProgramsYue Zhang, Yuqing Yang, Zhiqiang LinCCS 2023 · 14 次引用

相关 Paper

  1. Secrets Unlocked: Evaluating LLMs for Secrets Detection in Android AppsMarco Alecci, Jordan Samhi, Tegawendé F. Bissyandé, Jacques KleinISSTA 2026
  2. A Large-Scale Empirical Study of Secret Key Leakage in Hugging Face SpacesShaoxuan Yun, Yuchao Zhang, Zhikun Shi, Liu Wang 等ICSE 2026
  3. AssetHarvester: A Static Analysis Tool for Detecting Secret-Asset Pairs in Software ArtifactsSetu Kumar Basak, K. Virgil English, Ken Ogura, Vitesh Kambara 等ICSE 2025 · 1 次引用
  4. Checked-In Secret Detection: Strings Are All You NeedZhengdong Huang, Kevin Li, Jinqiu Yang, Yepang Liu 等ISSTA 2026
  5. Pushed by Accident: A Mixed-Methods Study on Strategies of Handling Secret Information in Source Code RepositoriesAlexander Krause, Jan H. Klemmer, Nicolas Huaman, Dominik Wermke 等USENIX Security 2023
黄昏的海面,两侧是细线勾勒的悬崖