Aug 2026· Proceedings of the ACM on Software Engineering· Vol 3, pp. 2660 - 2683· 0 citations· 79 references
Computer Science
TL;DR
It is observed that strings serve as a critical information source for code semantics, offering superior contextual density, obfuscation robustness, and language independence, and a context-aware secret detection tool, Secretron, is designed, based on StringGroup methods and Transformer model.
Abstract
Hardcoded secrets in source code pose critical security vulnerabilities which can be easily exploited by malicious adversaries. Existing regex-based detection approaches suffer from fundamental limitations, as secrets often lack identifiable patterns, resulting in poor precision and recall. Recent studies have explored context-aware detection methods, as surrounding code can reveal the purpose of candidate strings. However, these methods confront three key challenges: (1) obfuscation robustness where models over-rely on easily obfuscated identifiers, (2) cross-language generalization difficulties due to uneven training data distribution, and (3) lengthy and noisy context that introduces excessive irrelevant tokens and slows inference. We observe that strings serve as a critical information source for code semantics, offering superior contextual density, obfuscation robustness, and language independence. Based on this insight, we propose StringGroup, a novel context extraction algorithm that mines strings surrounding potential secrets. By introducing a relatively simple modification to existing patterns that narrows the analysis specifically to string literals, the method achieves significant gains. With only 33.2% of the original context, it preserves over 80% of semantic information and significantly improves the signal-to-noise ratio for secret detection. We further design a context-aware secret detection tool, Secretron, based on StringGroup methods and Transformer model. Evaluation on the SecretBench dataset demonstrates high accuracy with 98.74% F1-score and strong robustness under obfuscation and cross-language scenarios, outperforming state-of-the-art LLM-based baselines. We deploy our tool in real-world environments and successfully detect 48 previously unknown secret keys from 26 applications, demonstrating the practical effectiveness of our approach.
Large language models (LLMs) increasingly power autonomous coding agents such as Codex and Claude Code, yet their training corpora may contain confidential credentials exposed in public repositories or collected from private development artifacts, creating risks of memorization and subsequent leakage. Existing extracti...
Shi-Qian Zhao, Si-Wei Jiang, Xin-Feng Li et al.· 0 citations
Malicious npm package detection tools now leverage LLMs'semantic understanding of source code to detect malicious intent at scale. This capability has proven invaluable in identifying packages involved in recent supply-chain attacks such as Shai-Hulud. However, threat actors exploit the limited context windows of LLMs...
Jean-Charles Noirot Ferrand, David Adei, Anders Møller et al.· 0 citations
Mobile apps frequently embed sensitive secrets, such as API keys, access tokens, client secrets, and private keys that support internal functionality or enable integration with external systems and third-party services. Developers frequently embed these secrets into Android apps, which allows attackers to extract them...
Marco Alecci, Jordan Samhi, Tegawendé F. Bissyandé et al.· Proceedings of the ACM on So...· 0 citations
ALIBI is presented, a semantic cover story attack against frontier LLM-based malware analyzers that adds a small, non-executed read-only section to a compiled binary, containing a coherent but false security product narrative, without altering imports or executable behavior.
H. Choi, Wonyoung Jung, Haehoon Seo et al.· 0 citations
Open-weight large language models (LLMs) can be copied, modified, and redeployed behind black-box APIs, making post-release ownership verification difficult. Existing black-box fingerprints often rely on secret query-key pairs that reproduce predefined responses, and can therefore be easily disrupted by fine-tuning, pr...
Jia-Xin Hong, Yu-Xin Peng, Hong-Yao Yu et al.· 0 citations
Open-weight language models can be downloaded, modified, and deployed beyond their developers'control, limiting the effectiveness of centrally enforced safeguards. Recent work has therefore proposed \emph{trigger-tag} mechanisms that produce a detectable signal when a model is used under a target condition, such as gen...
Toluwani Aremu, Manit Baser, M. Gurusamy et al.· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.