Skip to content

Commit 646395b

Browse files
committed
Ruby: use in SensitiveDataHashing
1 parent c417dc4 commit 646395b

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

ruby/ql/lib/codeql/ruby/security/WeakSensitiveDataHashingQuery.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ module ComputationallyExpensiveHashFunction {
6868
* `computationallyExpensiveHashFunctionFlowPath`.
6969
*/
7070
module WeakSensitiveDataHashingFlow =
71-
DataFlow::MergePathGraph<NormalHashFunction::Flow::PathNode,
72-
ComputationallyExpensiveHashFunction::Flow::PathNode, NormalHashFunction::Flow::PathGraph,
73-
ComputationallyExpensiveHashFunction::Flow::PathGraph>;
71+
DataFlow::MergeFlows<NormalHashFunction::Flow, ComputationallyExpensiveHashFunction::Flow>;
7472

7573
/** Holds if data can flow from `source` to `sink` with `NormalHashFunction::Flow`. */
7674
predicate normalHashFunctionFlowPath(

ruby/ql/src/queries/security/cwe-327/WeakSensitiveDataHashing.ql

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414

1515
import ruby
1616
import codeql.ruby.security.WeakSensitiveDataHashingQuery
17-
import WeakSensitiveDataHashingFlow::PathGraph
17+
import WeakSensitiveDataHashingFlow
1818

19-
from
20-
WeakSensitiveDataHashingFlow::PathNode source, WeakSensitiveDataHashingFlow::PathNode sink,
21-
string ending, string algorithmName, string classification
19+
from PathNode source, PathNode sink, string ending, string algorithmName, string classification
2220
where
2321
normalHashFunctionFlowPath(source, sink) and
2422
algorithmName = sink.getNode().(NormalHashFunction::Sink).getAlgorithmName() and

0 commit comments

Comments
 (0)