A function call graph is a directed graph showing which functions call which other functions. It is used in software analysis, debugging and security review to trace execution paths, understand dependencies and identify unreachable, recursive or unexpected code paths.
What a function call graph shows
A function call graph is a structural view of program execution: it maps which functions invoke other functions, and in what direction. That makes it useful for understanding control flow at a glance, especially in large codebases where direct reading of source is too slow to reveal how execution is actually connected.
Because the graph is directional, it can show entry points, fan-out, and the shape of execution paths. Practitioners use it to reason about dependency chains, where one change may ripple into others, and where a function is central to many paths rather than isolated.
Why function call graphs matter in software analysis
Call graphs reduce complexity by turning code relationships into a navigable model. In debugging, they help trace how a request or event moves through a system. In code review, they expose hidden dependencies that are easy to miss when functions are scattered across modules or generated dynamically.
They are also valuable for impact analysis. If one function changes, the graph helps identify callers that may be affected. If a function appears in the graph but is never reached, that can indicate dead code, stale implementation, or a missed integration path. Where path reachability is important, the graph supports broader reachability analysis, which is the basis for deciding whether a vulnerable function is actually on an executable path.
For deeper treatment of that adjacent problem, see Reachability Analysis Guide.
Security uses of function call graphs
In security review, the main value of a call graph is visibility into execution paths that may enable misuse, exploitation, or unintended access to sensitive operations. It can show whether security-sensitive functions are isolated behind expected checks, or whether they are reachable from less trusted parts of the codebase.
That matters because many software weaknesses are not just about the presence of a risky function, but about whether an attacker-controlled or lower-trust path can reach it. A call graph can therefore help reviewers ask better questions about authorization boundaries, dangerous utility functions, unsafe deserialization paths, and code that should not be exposed to untrusted input.
Call graphs are also useful when reviewing whether a patch or mitigation truly removes exposure. If a vulnerable function still appears in an executable path, the risk remains even if the code was refactored elsewhere.
Limitations and practical interpretation
A call graph is only as accurate as the analysis behind it. Static graphs can miss dynamically dispatched calls, reflection, function pointers, code generation, event-driven indirection, or plugin mechanisms. That means a graph may understate or overstate real runtime behaviour depending on language features and analysis depth.
For that reason, function call graphs are best treated as an analysis aid, not proof of actual execution. A node that looks unreachable in a static graph may still be reachable at runtime through dynamic binding, configuration, or indirect invocation. Equally, a graph that appears complete may still omit call relationships hidden by framework behaviour.
Used well, the graph is a map for investigation, not a final verdict. It helps practitioners focus code review, confirm assumptions about reachability, and separate likely execution paths from merely possible ones.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST SP 800-53 Rev 5, OWASP ASVS and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | SA-11 — Developer Testing and Evaluation | Call graphs support code-path review and validation of software behavior. |
| Recommendation — Use SA-11 to verify execution paths and confirm security-relevant code behaves as intended. | ||
| OWASP ASVS | V15 — Secure Coding and Architecture | Call graphs help review architecture and control flow for unsafe execution paths. |
| Recommendation — Use V15 to examine control flow and identify security-sensitive paths that need redesign or hardening. | ||
| NIST CSF 2.0 | ID.AM-03 — Hardware, software, data, and external services are inventoried | Call graphs contribute to understanding software dependencies and execution relationships. |
| Recommendation — Map software execution relationships to improve inventory awareness of critical components and dependencies. | ||
Related resources from NHI Mgmt Group
- Why do traditional source-sink and call-graph approaches miss so many application security issues in modern codebases?
- What is the difference between tool call policy and access graph enforcement in agent authorization?
- Why does call graph analysis matter when assessing library risk in Java applications?
- Remote Function Call (RFC)
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 9, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org