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
77private import rust
88private import codeql.rust.dataflow.DataFlow
99private import codeql.rust.dataflow.FlowSink
10+ private import codeql.rust.Concepts
1011
1112/**
1213 * A data flow sink for cleartext transmission vulnerabilities. That is,
1314 * a `DataFlow::Node` of something that is transmitted over a network.
1415 */
15- abstract class CleartextTransmissionSink extends DataFlow:: Node { }
16+ abstract class CleartextTransmissionSink extends QuerySink:: Range {
17+ override string getSinkType ( ) { result = "CleartextTransmission" }
18+ }
1619
1720/**
1821 * A barrier for cleartext transmission vulnerabilities.
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ module TaintedPath {
2323 /**
2424 * A data flow sink for path injection vulnerabilities.
2525 */
26- abstract class Sink extends DataFlow:: Node { }
26+ abstract class Sink extends QuerySink:: Range {
27+ override string getSinkType ( ) { result = "TaintedPath" }
28+ }
2729
2830 /**
2931 * A barrier for path injection vulnerabilities.
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ module NormalHashFunction {
4444 * hashing. That is, a broken or weak hashing algorithm.
4545 */
4646 abstract class Sink extends QuerySink:: Range {
47+ override string getSinkType ( ) { result = "WeakSensitiveDataHashing" }
48+
4749 /**
4850 * Gets the name of the weak hashing algorithm.
4951 */
@@ -76,8 +78,6 @@ module NormalHashFunction {
7678 class WeakHashingOperationInputAsSink extends Sink {
7779 Cryptography:: HashingAlgorithm algorithm ;
7880
79- override string getSinkType ( ) { result = "WeakSensitiveDataHashing" }
80-
8181 WeakHashingOperationInputAsSink ( ) {
8282 exists ( Cryptography:: CryptographicOperation operation |
8383 algorithm .isWeak ( ) and
Original file line number Diff line number Diff line change @@ -15,10 +15,12 @@ private import codeql.rust.Diagnostics
1515private import codeql.rust.security.SensitiveData
1616private import TaintReach
1717// import all query extensions files, so that all extensions of `QuerySink` are found
18+ private import codeql.rust.security.regex.RegexInjectionExtensions
1819private import codeql.rust.security.CleartextLoggingExtensions
20+ private import codeql.rust.security.CleartextTransmissionExtensions
1921private import codeql.rust.security.SqlInjectionExtensions
22+ private import codeql.rust.security.TaintedPathExtensions
2023private import codeql.rust.security.WeakSensitiveDataHashingExtensions
21- private import codeql.rust.security.regex.RegexInjectionExtensions
2224
2325/**
2426 * 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