Skip to content

Commit 7695c19

Browse files
committed
C#: mass enable diff-informed data flow
An auto-generated patch that enables diff-informed data flow in the obvious cases. Builds on github#18344 and github/codeql-patch#88
1 parent 8fe2699 commit 7695c19

26 files changed

+52
-0
lines changed

csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ private module SymmetricKeyConfig implements DataFlow::ConfigSig {
7070

7171
/** Holds if the node is a key sanitizer. */
7272
predicate isBarrier(DataFlow::Node sanitizer) { sanitizer instanceof KeySanitizer }
73+
74+
predicate observeDiffInformedIncrementalMode() { any() }
7375
}
7476

7577
/**

csharp/ql/lib/semmle/code/csharp/security/cryptography/HardcodedSymmetricEncryptionKey.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ module HardcodedSymmetricEncryptionKey {
8282
succ.asExpr() = mc
8383
)
8484
}
85+
86+
predicate observeDiffInformedIncrementalMode() { any() }
8587
}
8688

8789
/**

csharp/ql/lib/semmle/code/csharp/security/dataflow/CleartextStorageQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ private module ClearTextStorageConfig implements DataFlow::ConfigSig {
3232
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
3333

3434
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
35+
36+
predicate observeDiffInformedIncrementalMode() { any() }
3537
}
3638

3739
/**

csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig {
3333
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
3434

3535
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
36+
37+
predicate observeDiffInformedIncrementalMode() { any() }
3638
}
3739

3840
/**

csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ module CommandInjectionConfig implements DataFlow::ConfigSig {
4242
* `node` from the data flow graph.
4343
*/
4444
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
45+
46+
predicate observeDiffInformedIncrementalMode() { any() }
4547
}
4648

4749
/**

csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ private module ExposureOfPrivateInformationConfig implements DataFlow::ConfigSig
3232
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
3333

3434
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
35+
36+
predicate observeDiffInformedIncrementalMode() { any() }
3537
}
3638

3739
/**

csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ module LdapInjectionConfig implements DataFlow::ConfigSig {
4545
* `node` from the data flow graph.
4646
*/
4747
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
48+
49+
predicate observeDiffInformedIncrementalMode() { any() }
4850
}
4951

5052
/**

csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ private module LogForgingConfig implements DataFlow::ConfigSig {
3535
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
3636

3737
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
38+
39+
predicate observeDiffInformedIncrementalMode() { any() }
3840
}
3941

4042
/**

csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ private module MissingXmlValidationConfig implements DataFlow::ConfigSig {
3939
predicate isSink(DataFlow::Node sink) { exists(sink.(Sink).getReason()) }
4040

4141
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
42+
43+
predicate observeDiffInformedIncrementalMode() { any() }
4244
}
4345

4446
/**

csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ private module ReDoSConfig implements DataFlow::ConfigSig {
3333
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
3434

3535
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
36+
37+
predicate observeDiffInformedIncrementalMode() { any() }
3638
}
3739

3840
/**

0 commit comments

Comments
 (0)