From 6f7e0d6bc8b363efa823007b5c34e69c92698cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Tue, 17 Jun 2025 15:48:11 +0200 Subject: [PATCH] Ruby: mass enable diff-informed data flow `none()` location overrides An auto-generated patch that enables diff-informed data flow in the obvious cases. Adds `getASelected{Source,Sink}Location() { none() }` override to queries that select a dataflow source or sink as a location, but not both. --- .../manually-check-http-verb/ManuallyCheckHttpVerb.ql | 2 ++ ruby/ql/src/experimental/weak-params/WeakParams.ql | 2 ++ ruby/ql/src/queries/meta/TaintedNodes.ql | 2 ++ 3 files changed, 6 insertions(+) diff --git a/ruby/ql/src/experimental/manually-check-http-verb/ManuallyCheckHttpVerb.ql b/ruby/ql/src/experimental/manually-check-http-verb/ManuallyCheckHttpVerb.ql index 4af2425b1a8..80113ee7823 100644 --- a/ruby/ql/src/experimental/manually-check-http-verb/ManuallyCheckHttpVerb.ql +++ b/ruby/ql/src/experimental/manually-check-http-verb/ManuallyCheckHttpVerb.ql @@ -88,6 +88,8 @@ private module HttpVerbConfig implements DataFlow::ConfigSig { } predicate observeDiffInformedIncrementalMode() { any() } + + Location getASelectedSourceLocation(DataFlow::Node source) { none() } } private module HttpVerbFlow = TaintTracking::Global; diff --git a/ruby/ql/src/experimental/weak-params/WeakParams.ql b/ruby/ql/src/experimental/weak-params/WeakParams.ql index faec728a2dd..2abc151a920 100644 --- a/ruby/ql/src/experimental/weak-params/WeakParams.ql +++ b/ruby/ql/src/experimental/weak-params/WeakParams.ql @@ -48,6 +48,8 @@ private module WeakParamsConfig implements DataFlow::ConfigSig { predicate isSink(DataFlow::Node node) { node = any(PersistentWriteAccess a).getValue() } predicate observeDiffInformedIncrementalMode() { any() } + + Location getASelectedSourceLocation(DataFlow::Node source) { none() } } private module WeakParamsFlow = TaintTracking::Global; diff --git a/ruby/ql/src/queries/meta/TaintedNodes.ql b/ruby/ql/src/queries/meta/TaintedNodes.ql index 8ddda63b359..2ee6e83e0de 100644 --- a/ruby/ql/src/queries/meta/TaintedNodes.ql +++ b/ruby/ql/src/queries/meta/TaintedNodes.ql @@ -21,6 +21,8 @@ private module BasicTaintConfig implements DataFlow::ConfigSig { } predicate observeDiffInformedIncrementalMode() { any() } + + Location getASelectedSourceLocation(DataFlow::Node source) { none() } } private module BasicTaintFlow = TaintTracking::Global;