From 91de43f9181a3361697f93ca7add248e3e5108e4 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Thu, 13 Jul 2023 11:38:35 +0200 Subject: [PATCH] C#/Java/Ruby: Remove superfluous module members. --- .../code/csharp/dataflow/internal/ContentDataFlow.qll | 2 -- .../src/utils/modelgenerator/internal/CaptureModels.qll | 2 -- .../code/java/security/ArbitraryApkInstallationQuery.qll | 4 ---- .../code/java/security/ImplicitPendingIntentsQuery.qll | 2 -- .../CWE-200/AndroidWebViewSettingsAllowsContentAccess.ql | 2 -- .../src/utils/modelgenerator/internal/CaptureModels.qll | 2 -- .../ql/lib/codeql/ruby/security/InsecureDownloadQuery.qll | 8 -------- 7 files changed, 22 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ContentDataFlow.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ContentDataFlow.qll index 9d483900aeb..fc937b88fa9 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ContentDataFlow.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ContentDataFlow.qll @@ -107,8 +107,6 @@ module Global { predicate isBarrier = ContentConfig::isBarrier/1; - predicate isBarrier(DataFlow::Node node, FlowState state) { none() } - DataFlow::FlowFeature getAFeature() { result = ContentConfig::getAFeature() } // needed to record reads/stores inside summarized callables diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll index e2a0e130ca4..9c19e5b9cbb 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -160,8 +160,6 @@ module ThroughFlowConfig implements DataFlow::StateConfigSig { exists(Type t | t = n.getType() and not isRelevantType(t)) } - predicate isBarrier(DataFlow::Node node, FlowState state) { none() } - DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureEqualSourceSinkCallContext } diff --git a/java/ql/lib/semmle/code/java/security/ArbitraryApkInstallationQuery.qll b/java/ql/lib/semmle/code/java/security/ArbitraryApkInstallationQuery.qll index 9df15067be9..fa3dbdb4474 100644 --- a/java/ql/lib/semmle/code/java/security/ArbitraryApkInstallationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ArbitraryApkInstallationQuery.qll @@ -68,8 +68,6 @@ private module InstallPackageActionConfig implements DataFlow::StateConfigSig { predicate isSink(DataFlow::Node node, FlowState state) { state instanceof HasInstallPackageAction and node.asExpr().getType() instanceof TypeIntent } - - predicate isBarrier(DataFlow::Node node, FlowState state) { none() } } private module InstallPackageActionFlow = @@ -113,8 +111,6 @@ private module PackageArchiveMimeTypeConfig implements DataFlow::StateConfigSig state instanceof HasPackageArchiveMimeType and node instanceof SetDataSink } - - predicate isBarrier(DataFlow::Node node, FlowState state) { none() } } private module PackageArchiveMimeTypeFlow = diff --git a/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll b/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll index c02abb4de81..9ef330459bf 100644 --- a/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll @@ -72,8 +72,6 @@ module ImplicitPendingIntentStartConfig implements DataFlow::StateConfigSig { predicate isBarrier(DataFlow::Node sanitizer) { sanitizer instanceof ExplicitIntentSanitizer } - predicate isBarrier(DataFlow::Node node, FlowState state) { none() } - predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { any(ImplicitPendingIntentAdditionalTaintStep c).step(node1, node2) } diff --git a/java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsAllowsContentAccess.ql b/java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsAllowsContentAccess.ql index c16b8577d73..6fd6da06a27 100644 --- a/java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsAllowsContentAccess.ql +++ b/java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsAllowsContentAccess.ql @@ -97,8 +97,6 @@ module WebViewDisallowContentAccessConfig implements DataFlow::StateConfigSig { state instanceof IsSettings and node instanceof WebSettingsDisallowContentAccessSink } - - predicate isBarrier(DataFlow::Node node, FlowState state) { none() } } module WebViewDisallowContentAccessFlow = diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll index e2a0e130ca4..9c19e5b9cbb 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -160,8 +160,6 @@ module ThroughFlowConfig implements DataFlow::StateConfigSig { exists(Type t | t = n.getType() and not isRelevantType(t)) } - predicate isBarrier(DataFlow::Node node, FlowState state) { none() } - DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureEqualSourceSinkCallContext } diff --git a/ruby/ql/lib/codeql/ruby/security/InsecureDownloadQuery.qll b/ruby/ql/lib/codeql/ruby/security/InsecureDownloadQuery.qll index 0b4c63f4392..128babcebcc 100644 --- a/ruby/ql/lib/codeql/ruby/security/InsecureDownloadQuery.qll +++ b/ruby/ql/lib/codeql/ruby/security/InsecureDownloadQuery.qll @@ -45,14 +45,6 @@ module Config implements DataFlow::StateConfigSig { } predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } - - predicate isBarrier(DataFlow::Node node, FlowState state) { none() } - - predicate isAdditionalFlowStep( - DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2 - ) { - none() - } } module Flow = DataFlow::GlobalWithState;