From 13bdd9c0c687dac6bfc86688e43a5354b31106ad Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Tue, 7 Mar 2023 19:16:10 +0100 Subject: [PATCH] C++: Fix query compliation Apparently some queries we skipped in the testing I did locally. --- cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll | 2 +- cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll b/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll index a38802978dd..6d6f17daf0e 100644 --- a/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll +++ b/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll @@ -13,7 +13,7 @@ class UntrustedExternalApiDataNode extends ExternalApiDataNode { UntrustedExternalApiDataNode() { UntrustedDataToExternalApiFlow::hasFlow(_, this) } /** Gets a source of untrusted data which is passed to this external API data node. */ - DataFlow::Node getAnUntrustedSource() { UntrustedDataToExternalApiConfig::hasFlow(result, this) } + DataFlow::Node getAnUntrustedSource() { UntrustedDataToExternalApiFlow::hasFlow(result, this) } } /** DEPRECATED: Alias for UntrustedExternalApiDataNode */ diff --git a/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll b/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll index 97d07a3b9b2..36ca9b6909b 100644 --- a/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll +++ b/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll @@ -58,9 +58,9 @@ deprecated class UntrustedDataToExternalAPIConfig = UntrustedDataToExternalApiCo /** A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */ module UntrustedDataToExternalApiConfig implements DataFlow::ConfigSig { - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } + predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } } module UntrustedDataToExternalApiFlow = TaintTracking::Make;