Inter-procedural Vulnerability Detection in Large Codebases

You are reading version 1 of this direction, frozen 2026-10-04. The latest version is version 2.

Version 1 of 2238 papers331 conceptsfrozen 2026-10-04

Most automated security tools suffer from a form of "tunnel vision." They analyze software one function at a time, treating code as a collection of isolated snippets rather than a complex, interconnected system. While this approach is computationally efficient, it creates a massive blind spot: the inter-procedural vulnerability.

In modern software, a security flaw is rarely contained within a single block of code. Instead, vulnerabilities often emerge from the way data flows across function boundaries, through multiple files, and across architectural layers. To catch these "deep" bugs, research is shifting from local syntax checking toward global, repository-level reasoning.

The Function Level Trap

The traditional unit of analysis for both Static Application Security Testing (SAST) and early machine learning models has been the individual function. As Jacob A. Harer noted in Automated software vulnerability detection with machine learning, restricting analysis to this level prevents the detection of memory management errors and logic flaws that only become apparent when examining data flow across multiple boundaries.

When a model only sees a single function, it lacks the "calling context." For example, a function might appear to have a SQL injection vulnerability because it doesn't sanitize its input. However, if every parent function that calls it has already performed rigorous sanitization, the "vulnerability" is actually a false positive. Wei Le found in a study of professional engineers using DeepVulGuard that over half of the security alerts were false positives precisely because the tool lacked this architectural visibility.

Bridging the Gap with Semantic Abstractions

To move beyond simple pattern matching, researchers are developing ways to represent the "meaning" of code across long distances. Zhen Li 0027 pioneered this with SySeVR, which represents code as "Semantics-based Vulnerability Candidates" (SeVCs). Instead of just looking at text, SeVCs capture the control and data dependencies that define how a program actually executes.

However, even semantic graphs can become too large for modern models to process. To solve this "state explosion," Yixin Yang introduced PacVD, which uses "Primitive API Abstractions." By summarizing how critical resources (like files or network sockets) are handled within functions and passing these summaries up the call stack, the model can maintain inter-procedural context without being overwhelmed by the "noise" of an entire repository.

The Rise of Repository Level Reasoning

The advent of Large Language Models (LLMs) has provided a new tool for this challenge: the ability to reason about natural language and code logic simultaneously. Unlike traditional tools that rely on rigid rules, LLMs can potentially "understand" the intent behind a sequence of calls.

In Comparison of Static Application Security Testing Tools and Large Language Models for Repo-level Vulnerability Detection, Xin Zhou demonstrated that LLMs can catch nearly 100% of the vulnerabilities that traditional SAST tools miss. The catch is that LLMs are often limited by their "context window"—the amount of code they can "read" at once. Fangzhou Wu observed in Exploring the Limits of ChatGPT in Software Security Applications that while models like GPT-4 excel at local reasoning, their performance drops significantly when a bug is distributed across multiple files or complex dependency chains.

Hybrid Strategies and Collaborative Feedback

The current frontier involves "staged" or "collaborative" approaches that combine the best of both worlds. Bhargava Shastry proposed Mélange, which uses fast local analysis to find potential "hotspots" and then triggers a deep, global analysis only where needed.

Similarly, Ge Li developed M2CVD, a multi-model framework where specialized code models identify potential flaws and LLMs provide the high-level reasoning to confirm them. By using a feedback loop—where the LLM describes the vulnerability in natural language and the code model verifies that description against the codebase—these systems can bridge the gap between deep local inspection and broad architectural visibility.

As Peng Liang 0001 notes in Security Code Review by LLMs, the goal is to mimic a human reviewer: someone who can look at a single line of code, remember a configuration setting from a different file, and realize that the interaction between the two creates a critical security hole.

Papers in this version

Showing 60 of 238 papers.

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 205 papers
  2. Version 1 · 2026-10-04 · 238 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_intra_procedural_analysis_limitation_5dca3180,
  title = {intra-procedural analysis limitation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/intra-procedural-analysis-limitation/rdr_5dca31806f2149beb7b23a725fe9914f},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-20},
}

This exact version (version 1, frozen text):

@misc{lacuna_inter_procedural_vulnerability_detection_5dca3180_v1,
  title = {Inter-procedural Vulnerability Detection in Large Codebases},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/inter-procedural-vulnerability-detection-in-large-codebases/rdr_5dca31806f2149beb7b23a725fe9914f/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-20},
}