Black Hat USA 2025 | More Flows, More Bugs: Empowering SAST with LLMs and Customized DFA
Why It Matters
By integrating LLMs with custom DFA enhancements, SAST becomes more automated and comprehensive, enabling faster detection of critical bugs that traditional static analysis often misses.
Key Takeaways
- •LLM agents automate source and sink identification in frameworks.
- •Customized DFA patches improve cross‑thread, reflection, and pass‑by‑value analysis.
- •Expert rule filtering reduces false positives from LLM‑generated functions.
- •Scanning 5,000 projects increased detected data flows by over 15%.
- •New sink detection uncovered a critical SQL injection in Apache Traffic Control.
Summary
The Black Hat USA 2025 talk, presented by Yuan of Tencent Security Winding Lab, detailed a novel approach to strengthening static application security testing (SAST) by marrying large language models (LLMs) with a customized data‑flow analysis (DFA) engine. The session outlined the limitations of existing tools such as CodeQL—namely incomplete source‑sink coverage and language‑feature gaps—and introduced a three‑agent LLM workflow (discover, judge, validation) to automatically surface source and sink functions from open‑source frameworks.
Key insights included prompting LLMs with precise function characteristics, filtering results via confidence thresholds, and applying expert‑derived rules (public accessibility, non‑boolean returns, etc.) to prune false positives. On the DFA side, the team added “jump” steps and an additional‑value interface to bridge gaps in cross‑thread propagation, reflection handling, and Java’s pass‑by‑value semantics, enabling full source‑to‑sink path reconstruction where default analyses failed.
Concrete examples demonstrated the methodology: a missing flow in a Runnable demo was recovered by a jump from the constructor to the run method; reflection calls were resolved by tracking method instances and duplicating the data‑flow engine; and a pass‑by‑value scenario was fixed by mapping non‑post‑update and post‑update nodes. The research uncovered roughly 190 new source/sink definitions across 18 Go frameworks, and scanning over 5,000 open‑source projects yielded a 15% increase in detected data flows, including a previously hidden SQL‑injection vulnerability in Apache Traffic Control.
The implications are significant for DevSecOps pipelines: LLM‑augmented SAST dramatically reduces manual rule authoring, expands coverage of modern language features, and can be continuously validated against real‑world codebases. As static analysis tools adopt similar AI‑driven techniques, organizations can expect faster vulnerability discovery, lower false‑negative rates, and stronger overall security postures.
Comments
Want to join the conversation?
Loading comments...