Persistent Human Feedback, LLMs, and Static Analyzers for Secure Code Generation and Vulnerability Detection
Not on the map. Why?
Abstract (arXiv)
Existing literature heavily relies on static analysis tools to evaluate LLMs for secure code generation and vulnerability detection. We reviewed 1,080 LLM-generated code samples, built a human-validated ground-truth, and compared the outputs of two widely used static security tools, CodeQL and Semgrep, against this corpus. While 61% of the samples were genuinely secure, Semgrep and CodeQL classified 60% and 80% as secure, respectively. Despite the apparent agreement in aggregate statistics, per-sample analysis reveals substantial discrepancies: only 65% of Semgrep's and 61% of CodeQL's reports correctly matched the ground truth. These results question the reliability of static analysis tools as sole evaluators of code security and underscore the need for expert feedback. Building on this insight, we propose a conceptual framework that persistently stores human feedback in a dynamic retrieval-augmented generation pipeline, enabling LLMs to reuse past feedback for secure code generation and vulnerability detection.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). First posted on arXiv 5 Feb 2026.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2026: 3.
3 papers.
- 2026Revelio: Cost-Efficient Agentic Memory Safety Vulnerability Detection For Repository-Scale Codebasescited by 1
- 2026Activating Latent Security Knowledge through LLM-Guided Risk Analysis for Secure Code Generationcited by 0
- 2026Large Language Models at the Intersection of Software Engineering and Software Security:An Evidence-Centered Structured Survey and Research Agendacited by 0
- 2026Large Language Models at the Intersection of Software Engineering and Software Security:An Evidence-Centered Structured Survey and Research Agenda21 Aug 2026
- 2026Revelio: Cost-Efficient Agentic Memory Safety Vulnerability Detection For Repository-Scale Codebases20 Jun 2026
- 2026Activating Latent Security Knowledge through LLM-Guided Risk Analysis for Secure Code Generation15 Jun 2026
Similar, not cited
Close in wording, no citation either way
- 2025Rethinking the Evaluation of Secure Code Generation
- 2026Improving LLM-Assisted Secure Code Generation through Retrieval-Augmented-Generation and Multi-Tool Feedback
- 2025SecureReviewer: Enhancing Large Language Models for Secure Code Review through Secure-aware Fine-tuning
- 2025SOSecure: Safer Code Generation with RAG and StackOverflow Discussions
- 2026RealSec-bench: A Benchmark for Evaluating Secure Code Generation in Real-World Repositories
- 2026Revisiting Vul-RAG: Reproducibility and Replicability of RAG-based Vulnerability Detection with Open-Weight Models
- 2026Inference-Time Safety For Code LLMs Via Retrieval-Augmented Revision
- 2026Beyond Static Guarantees: Measuring the Static-Pass Dynamic-Fail Gap in Security-Sensitive and LLM-Generated Python Code