Can LLM prompts replace static analysis in vulnerability detectionCan LLM Prompting Serve as a Proxy for Static Analysis in Vulnerability Detection
AI summary
Multiple security-aware prompt strategies combining vulnerability natural language instructions with contrastive chain of thought all surpass the static analysis vulnerability detection baseline on reasoning models such as DeepSeek-R1. The strategy is enhanced with contrastive samples from a synthetic dataset, targeting the high false negative rate of manual static analysis rules in some code scenarios. The best strategy improves accuracy by up to 31.6%, F1 by 71.7%, and pairwise accuracy by 60.4%, and reduces the false negative rate by up to 37.6%.