File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ module NormalHashFunction {
4343 * data" vulnerabilities that applies to data that does not require computationally expensive
4444 * hashing. That is, a broken or weak hashing algorithm.
4545 */
46- abstract class Sink extends DataFlow :: Node {
46+ abstract class Sink extends QuerySink :: Range {
4747 /**
4848 * Gets the name of the weak hashing algorithm.
4949 */
@@ -76,6 +76,8 @@ module NormalHashFunction {
7676 class WeakHashingOperationInputAsSink extends Sink {
7777 Cryptography:: HashingAlgorithm algorithm ;
7878
79+ override string getSinkType ( ) { result = "WeakSensitiveDataHashing" }
80+
7981 WeakHashingOperationInputAsSink ( ) {
8082 exists ( Cryptography:: CryptographicOperation operation |
8183 algorithm .isWeak ( ) and
@@ -114,7 +116,9 @@ module ComputationallyExpensiveHashFunction {
114116 * hashing. That is, a broken or weak hashing algorithm or one that is not computationally
115117 * expensive enough for password hashing.
116118 */
117- abstract class Sink extends DataFlow:: Node {
119+ abstract class Sink extends QuerySink:: Range {
120+ override string getSinkType ( ) { result = "WeakSensitiveDataHashing" }
121+
118122 /**
119123 * Gets the name of the weak hashing algorithm.
120124 */
Original file line number Diff line number Diff line change @@ -11,8 +11,9 @@ private import codeql.rust.controlflow.internal.CfgConsistency as CfgConsistency
1111private import codeql.rust.dataflow.internal.DataFlowConsistency as DataFlowConsistency
1212private import codeql.rust.Concepts
1313// import all query extensions files, so that all extensions of `QuerySink` are found
14- private import codeql.rust.security.SqlInjectionExtensions
1514private import codeql.rust.security.CleartextLoggingExtensions
15+ private import codeql.rust.security.SqlInjectionExtensions
16+ private import codeql.rust.security.WeakSensitiveDataHashingExtensions
1617
1718/**
1819 * 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