diff --git a/sourcecode-parser/graph/callgraph/builder.go b/sourcecode-parser/graph/callgraph/builder.go index 178da275..ca83f73b 100644 --- a/sourcecode-parser/graph/callgraph/builder.go +++ b/sourcecode-parser/graph/callgraph/builder.go @@ -735,6 +735,14 @@ func resolveCallTarget(target string, importMap *ImportMap, registry *ModuleRegi return ormFQN, true, nil } + // PR #2: Last resort - check if target is a stdlib call (e.g., os.path.join) + // This handles cases where stdlib modules are imported directly (import os.path) + if typeEngine != nil && typeEngine.StdlibRegistry != nil { + if validateStdlibFQN(target, typeEngine.StdlibRegistry) { + return target, true, nil + } + } + // Can't resolve - return as-is return target, false, nil }