paperbot · PL 论文追踪

全部论文 待读 收藏

P1 A Large-Scale Empirical Study of Secret Key Leakage in Hugging Face Spaces

Hugging Face Spaces 中密钥泄露的大规模实证研究
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 6/10 · 该论文在 Hugging Face Spaces 这一 ML 应用平台上结合静态分析与 LLM 辅助检测密钥泄露,触及“PL→AI”和“AI→PL”的交叉点;但核心贡献是安全实证测量而非程序分析/验证方法本身,也未涉及 Agentic 程序、浮点或贝叶斯程序分析等更核心方向。引用 0 inbox
Shaoxuan Yun, Yuchao Zhang, Zhikun Shi, Liu Wang, Yi Wang, Yu Bai
crossref: 2026-09-12

AI 速览

一句话:首个大规模实证研究,结合静态分析与 LLM 检测,量化 Hugging Face Spaces 的密钥泄露规模与风险。

论文关注 Hugging Face Spaces(Spaces)平台上敏感信息(API token、数据库凭证等)被意外暴露的安全问题,指出学界对其范围与影响仍缺乏系统认识。作者构建了 2022 年 3 月至 2024 年 12 月间创建的 313,647 个公开 Spaces 仓库数据集,并提出 Secret Reviewer 框架,将静态分析与大语言模型(LLM)辅助检测相结合以识别泄露凭证。检测结果显示,9,149 个仓库存在密钥泄露漏洞,共涉及 11,557 个唯一密钥,其中 76% 来自 OpenAI、Groq 等主流 AI 服务商;30% 的泄露隐藏在提交历史中,另有 1,000 多个非代码文件包含敏感数据。进一步验证表明,30% 的检出密钥仍然有效,包括 140 个有效数据库凭证,以及 50% 具备写权限的访问令牌,凸显了严重安全风险,并呼吁加强平台生态的安全实践。

问题
Hugging Face Spaces 上密钥等敏感信息被意外暴露的问题日益突出,但社区仍缺乏对其泄露范围与实际影响的系统性认识。
方法
构建覆盖 2022 年 3 月至 2024 年 12 月的 313,647 个公开 Spaces 仓库数据集,并提出 Secret Reviewer 框架,结合静态分析与 LLM 辅助检测来发现泄露的凭证。
评估
在数据集上检出 9,149 个存在密钥泄露的仓库与 11,557 个唯一密钥,并统计其来源分布(含提交历史与非代码文件);随后对检出密钥进行有效性验证,考察仍可用的凭证比例与权限范围。
原文摘要(Abstract)

Hugging Face Spaces (Spaces) has become a leading platform for hosting AI applications, offering developers seamless integration of Git-based repositories and out-of-the-box web service deployment. However, as its adoption continues to expand, security concerns have come to light. Recent reports have pointed to the issue of accidental exposure of sensitive information, such as API tokens and database credentials, within Spaces-hosted code. Despite these concerns, the research community still lacks a comprehensive understanding of the scope and impact of these security risks. To bridge this gap, we present the first large-scale and systematic empirical study to quantify the extent of secret key leakage in Spaces. We begin by compiling a comprehensive dataset of 313,647 public Spaces repositories created between March 2022 and December 2024. To detect exposed secret keys, we introduce Secret Reviewer, an advanced framework that combines static analysis and Large Language Model (LLM)-assisted detection to identify leaked credentials. Applying Secret Reviewer, we identified 9,149 with secret keys leakage vulnerabilities and 11,557 unique keys—76% of which from leading AI service providers such as OpenAI and Groq. Our findings indicate that 30% of leaks were embedded in commit histories, and over 1,000 non-code files contained sensitive data. Further validation revealed that 30% of detected keys remained active, including 140 valid database credentials and 50% of access tokens with write permissions, underscoring significant security risks. Our study sheds light on critical security challenges in AI platform ecosystems and advocates for stronger security practices to mitigate these risks.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11570,
  title = {A Large-Scale Empirical Study of Secret Key Leakage in Hugging Face Spaces},
  author = {Shaoxuan Yun and Yuchao Zhang and Zhikun Shi and Liu Wang and Yi Wang and Yu Bai},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3773117}
}