File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,15 @@ private import codeql.util.Unit
7
7
private import rust
8
8
private import codeql.rust.dataflow.DataFlow
9
9
private import codeql.rust.dataflow.FlowSink
10
+ private import codeql.rust.Concepts
10
11
11
12
/**
12
13
* A data flow sink for cleartext transmission vulnerabilities. That is,
13
14
* a `DataFlow::Node` of something that is transmitted over a network.
14
15
*/
15
- abstract class CleartextTransmissionSink extends DataFlow:: Node { }
16
+ abstract class CleartextTransmissionSink extends QuerySink:: Range {
17
+ override string getSinkType ( ) { result = "CleartextTransmission" }
18
+ }
16
19
17
20
/**
18
21
* A barrier for cleartext transmission vulnerabilities.
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ module TaintedPath {
23
23
/**
24
24
* A data flow sink for path injection vulnerabilities.
25
25
*/
26
- abstract class Sink extends DataFlow:: Node { }
26
+ abstract class Sink extends QuerySink:: Range {
27
+ override string getSinkType ( ) { result = "TaintedPath" }
28
+ }
27
29
28
30
/**
29
31
* A barrier for path injection vulnerabilities.
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ module NormalHashFunction {
44
44
* hashing. That is, a broken or weak hashing algorithm.
45
45
*/
46
46
abstract class Sink extends QuerySink:: Range {
47
+ override string getSinkType ( ) { result = "WeakSensitiveDataHashing" }
48
+
47
49
/**
48
50
* Gets the name of the weak hashing algorithm.
49
51
*/
@@ -76,8 +78,6 @@ module NormalHashFunction {
76
78
class WeakHashingOperationInputAsSink extends Sink {
77
79
Cryptography:: HashingAlgorithm algorithm ;
78
80
79
- override string getSinkType ( ) { result = "WeakSensitiveDataHashing" }
80
-
81
81
WeakHashingOperationInputAsSink ( ) {
82
82
exists ( Cryptography:: CryptographicOperation operation |
83
83
algorithm .isWeak ( ) and
Original file line number Diff line number Diff line change @@ -15,10 +15,12 @@ private import codeql.rust.Diagnostics
15
15
private import codeql.rust.security.SensitiveData
16
16
private import TaintReach
17
17
// import all query extensions files, so that all extensions of `QuerySink` are found
18
+ private import codeql.rust.security.regex.RegexInjectionExtensions
18
19
private import codeql.rust.security.CleartextLoggingExtensions
20
+ private import codeql.rust.security.CleartextTransmissionExtensions
19
21
private import codeql.rust.security.SqlInjectionExtensions
22
+ private import codeql.rust.security.TaintedPathExtensions
20
23
private import codeql.rust.security.WeakSensitiveDataHashingExtensions
21
- private import codeql.rust.security.regex.RegexInjectionExtensions
22
24
23
25
/**
24
26
* Gets a count of the total number of lines of code in the database.
You can’t perform that action at this time.
0 commit comments