arXiv · 2612.03700
Secure-Miner: Improving Secure Code Generation for LLMs by Mining Secure Coding Practices
Abstract
Most existing research on secure code generation for Large Language Models (LLMs) heavily relies on disclosed vulnerability reports or synthetic datasets for fine-tuning. This approach frequently overlooks the diverse, secure coding practices that emerge naturally during real-world software development. This paper bridges this gap by proposing a novel framework to automatically extract and leverage secure practices observed in the wild to enhance secure code generation, with a particular focus on low-resource Common Weakness Enumerations (CWEs). Our methodology utilizes a multi-agent system consisting of: (1) a RegEx Agent that dynamically formulates security-related patterns based on CWE descriptions, optimized through an iterative feedback loop; (2) a Verification Agent that precisely identifies genuine secure functions from open-source repositories; and (3) a Refinement Agent that isolates core secure patterns by simplifying external dependencies to compile a high-quality dataset.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Junjie Li, Jinqiu Yang. 2026-12-02. Secure-Miner: Improving Secure Code Generation for LLMs by Mining Secure Coding Practices. https://searcharxiv.org/abs/2612.03700
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.