From 97d369cf4e20f9cff7ee6cfb92ba8ea33f7efb95 Mon Sep 17 00:00:00 2001 From: Asger F Date: Mon, 24 Nov 2025 14:35:53 +0100 Subject: [PATCH] JS: Make API::Node overlay[local?] We want the type itself to be local but nearly all its member predicates are global. --- javascript/ql/lib/semmle/javascript/ApiGraphs.qll | 3 +++ 1 file changed, 3 insertions(+) diff --git a/javascript/ql/lib/semmle/javascript/ApiGraphs.qll b/javascript/ql/lib/semmle/javascript/ApiGraphs.qll index cc6f92ba256..aee6a0c7219 100644 --- a/javascript/ql/lib/semmle/javascript/ApiGraphs.qll +++ b/javascript/ql/lib/semmle/javascript/ApiGraphs.qll @@ -122,6 +122,7 @@ module API { * Although one may think of API graphs as a tool to find certain program elements in the codebase, * it can lead to some situations where intuition does not match what works best in practice. */ + overlay[local?] class Node extends Impl::TApiNode { /** * Get a data-flow node where this value may flow after entering the current codebase. @@ -1576,9 +1577,11 @@ module API { } private module Stage1Input implements StageInputSig { + overlay[caller] pragma[inline] predicate isAdditionalUseRoot(Node node) { none() } + overlay[caller] pragma[inline] predicate isAdditionalDefRoot(Node node) { none() }