Skip to content

Commit 8ee5d76

Browse files
committed
Fix some violations of ql/dataflow-module-naming-convention.
1 parent ff26a61 commit 8ee5d76

File tree

6 files changed

+39
-34
lines changed

6 files changed

+39
-34
lines changed

cpp/ql/lib/experimental/cryptography/modules/OpenSSL.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,14 +652,14 @@ module KeyGeneration {
652652
* Trace from EVP_PKEY_CTX* at algorithm sink to keygen,
653653
* users can then extrapolatae the matching algorithm from the alg sink to the keygen
654654
*/
655-
module EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSize implements DataFlow::ConfigSig {
655+
module EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSizeConfig implements DataFlow::ConfigSig {
656656
predicate isSource(DataFlow::Node source) { isEVP_PKEY_CTX_Source(source, _) }
657657

658658
predicate isSink(DataFlow::Node sink) { isKeyGen_EVP_PKEY_CTX_Sink(sink, _) }
659659
}
660660

661661
module EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSize_Flow =
662-
DataFlow::Global<EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSize>;
662+
DataFlow::Global<EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSizeConfig>;
663663

664664
/**
665665
* UNKNOWN key sizes to general purpose key generation functions (i.e., that take in no key size and assume

cpp/ql/lib/semmle/code/cpp/security/boostorg/asio/protocols.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,12 @@ module BoostorgAsio {
378378
* Constructs a standard data flow computation for protocol values to the first argument
379379
* of a context constructor.
380380
*/
381-
module SslContextCallGlobal<SslContextCallConfigSig Config> {
382-
private module C implements DataFlow::ConfigSig {
383-
import Config
381+
module SslContextCallGlobal<SslContextCallConfigSig SslConfig> {
382+
private module Config implements DataFlow::ConfigSig {
383+
import SslConfig
384384
}
385385

386-
import DataFlow::Global<C>
386+
import DataFlow::Global<Config>
387387
}
388388

389389
/**

javascript/ql/test/library-tests/FlowSummary/test.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DataFlow::CallNode getACall(string name) {
88
result.getCalleeNode().getALocalSource() = DataFlow::globalVarRef(name)
99
}
1010

11-
module ConfigArg implements DataFlow::ConfigSig {
11+
module FlowConfig implements DataFlow::ConfigSig {
1212
predicate isSource(DataFlow::Node node) { node = getACall("source") }
1313

1414
predicate isSink(DataFlow::Node node) { node = getACall("sink").getAnArgument() }
@@ -19,7 +19,7 @@ module ConfigArg implements DataFlow::ConfigSig {
1919
}
2020
}
2121

22-
module Configuration = DataFlow::Global<ConfigArg>;
22+
module Flow = DataFlow::Global<FlowConfig>;
2323

2424
class BasicBarrierGuard extends DataFlow::CallNode {
2525
BasicBarrierGuard() { this = getACall("isSafe") }
@@ -32,5 +32,5 @@ class BasicBarrierGuard extends DataFlow::CallNode {
3232
deprecated class ConsistencyConfig extends ConsistencyConfiguration {
3333
ConsistencyConfig() { this = "ConsistencyConfig" }
3434

35-
override DataFlow::Node getAnAlert() { Configuration::flow(_, result) }
35+
override DataFlow::Node getAnAlert() { Flow::flow(_, result) }
3636
}

python/ql/src/Security/CWE-327/FluentApiModel.qll

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import TlsLibraryModel
1515
* The state is represented as a bit vector, where each bit corresponds to a
1616
* protocol version. The bit is set if the protocol is allowed.
1717
*/
18-
module InsecureContextConfiguration implements DataFlow::StateConfigSig {
18+
module InsecureContextConfig implements DataFlow::StateConfigSig {
1919
private newtype TFlowState =
2020
TMkFlowState(TlsLibrary library, int bits) {
2121
bits in [0 .. max(any(ProtocolVersion v).getBit()) * 2 - 1]
@@ -116,7 +116,12 @@ module InsecureContextConfiguration implements DataFlow::StateConfigSig {
116116
}
117117
}
118118

119-
private module InsecureContextFlow = DataFlow::GlobalWithState<InsecureContextConfiguration>;
119+
/**
120+
* DEPRECATED: Will be removed in the future.
121+
*/
122+
deprecated module InsecureContextConfiguration = InsecureContextConfig;
123+
124+
private module InsecureContextFlow = DataFlow::GlobalWithState<InsecureContextConfig>;
120125

121126
/**
122127
* Holds if `conectionCreation` marks the creation of a connection based on the contex

shared/dataflow/codeql/dataflow/DataFlow.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ module DataFlowMake<LocationSig Location, InputSig<Location> Lang> {
695695
* Constructs a global data flow computation.
696696
*/
697697
module Global<ConfigSig Config> implements GlobalFlowSig {
698-
private module C implements FullStateConfigSig {
698+
private module StateConfig implements FullStateConfigSig {
699699
import DefaultState<Config>
700700
import Config
701701

@@ -706,11 +706,11 @@ module DataFlowMake<LocationSig Location, InputSig<Location> Lang> {
706706
}
707707
}
708708

709-
private module Stage1 = ImplStage1<C>;
709+
private module Stage1 = ImplStage1<StateConfig>;
710710

711711
import Stage1::PartialFlow
712712

713-
private module Flow = Impl<C, Stage1::Stage1NoState>;
713+
private module Flow = Impl<StateConfig, Stage1::Stage1NoState>;
714714

715715
import Flow
716716
}
@@ -719,7 +719,7 @@ module DataFlowMake<LocationSig Location, InputSig<Location> Lang> {
719719
* Constructs a global data flow computation using flow state.
720720
*/
721721
module GlobalWithState<StateConfigSig Config> implements GlobalFlowSig {
722-
private module C implements FullStateConfigSig {
722+
private module StateConfig implements FullStateConfigSig {
723723
import Config
724724

725725
predicate accessPathLimit = Config::accessPathLimit/0;
@@ -735,11 +735,11 @@ module DataFlowMake<LocationSig Location, InputSig<Location> Lang> {
735735
}
736736
}
737737

738-
private module Stage1 = ImplStage1<C>;
738+
private module Stage1 = ImplStage1<StateConfig>;
739739

740740
import Stage1::PartialFlow
741741

742-
private module Flow = Impl<C, Stage1::Stage1WithState>;
742+
private module Flow = Impl<StateConfig, Stage1::Stage1WithState>;
743743

744744
import Flow
745745
}

shared/dataflow/codeql/dataflow/TaintTracking.qll

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module TaintFlowMake<
5656
private import MakeImpl<Location, DataFlowLang> as DataFlowInternal
5757
private import MakeImplStage1<Location, DataFlowLang> as DataFlowInternalStage1
5858

59-
private module AddTaintDefaults<DataFlowInternal::FullStateConfigSig Config> implements
59+
private module MakeAddTaintDefaultsConfig<DataFlowInternal::FullStateConfigSig Config> implements
6060
DataFlowInternal::FullStateConfigSig
6161
{
6262
import Config
@@ -98,15 +98,15 @@ module TaintFlowMake<
9898
}
9999
}
100100

101-
private module C implements DataFlowInternal::FullStateConfigSig {
102-
import AddTaintDefaults<Config0>
101+
private module AddTaintDefaultsConfig implements DataFlowInternal::FullStateConfigSig {
102+
import MakeAddTaintDefaultsConfig<Config0>
103103
}
104104

105-
private module Stage1 = DataFlowInternalStage1::ImplStage1<C>;
105+
private module Stage1 = DataFlowInternalStage1::ImplStage1<AddTaintDefaultsConfig>;
106106

107107
import Stage1::PartialFlow
108108

109-
private module Flow = DataFlowInternal::Impl<C, Stage1::Stage1NoState>;
109+
private module Flow = DataFlowInternal::Impl<AddTaintDefaultsConfig, Stage1::Stage1NoState>;
110110

111111
import Flow
112112
}
@@ -132,15 +132,15 @@ module TaintFlowMake<
132132
}
133133
}
134134

135-
private module C implements DataFlowInternal::FullStateConfigSig {
136-
import AddTaintDefaults<Config0>
135+
private module AddTaintDefaultsConfig implements DataFlowInternal::FullStateConfigSig {
136+
import MakeAddTaintDefaultsConfig<Config0>
137137
}
138138

139-
private module Stage1 = DataFlowInternalStage1::ImplStage1<C>;
139+
private module Stage1 = DataFlowInternalStage1::ImplStage1<AddTaintDefaultsConfig>;
140140

141141
import Stage1::PartialFlow
142142

143-
private module Flow = DataFlowInternal::Impl<C, Stage1::Stage1WithState>;
143+
private module Flow = DataFlowInternal::Impl<AddTaintDefaultsConfig, Stage1::Stage1WithState>;
144144

145145
import Flow
146146
}
@@ -234,15 +234,15 @@ module TaintFlowMake<
234234
}
235235
}
236236

237-
private module C implements DataFlowInternal::FullStateConfigSig {
238-
import AddTaintDefaults<AddSpeculativeTaintSteps<Config0, speculationLimit/0>>
237+
private module AddTaintDefaultsConfig implements DataFlowInternal::FullStateConfigSig {
238+
import MakeAddTaintDefaultsConfig<AddSpeculativeTaintSteps<Config0, speculationLimit/0>>
239239
}
240240

241-
private module Stage1 = DataFlowInternalStage1::ImplStage1<C>;
241+
private module Stage1 = DataFlowInternalStage1::ImplStage1<AddTaintDefaultsConfig>;
242242

243243
import Stage1::PartialFlow
244244

245-
private module Flow = DataFlowInternal::Impl<C, Stage1::Stage1WithState>;
245+
private module Flow = DataFlowInternal::Impl<AddTaintDefaultsConfig, Stage1::Stage1WithState>;
246246

247247
import Flow
248248
}
@@ -272,15 +272,15 @@ module TaintFlowMake<
272272
}
273273
}
274274

275-
private module C implements DataFlowInternal::FullStateConfigSig {
276-
import AddTaintDefaults<AddSpeculativeTaintSteps<Config0, speculationLimit/0>>
275+
private module AddTaintDefaultsConfig implements DataFlowInternal::FullStateConfigSig {
276+
import MakeAddTaintDefaultsConfig<AddSpeculativeTaintSteps<Config0, speculationLimit/0>>
277277
}
278278

279-
private module Stage1 = DataFlowInternalStage1::ImplStage1<C>;
279+
private module Stage1 = DataFlowInternalStage1::ImplStage1<AddTaintDefaultsConfig>;
280280

281281
import Stage1::PartialFlow
282282

283-
private module Flow = DataFlowInternal::Impl<C, Stage1::Stage1WithState>;
283+
private module Flow = DataFlowInternal::Impl<AddTaintDefaultsConfig, Stage1::Stage1WithState>;
284284

285285
import Flow
286286
}

0 commit comments

Comments
 (0)