Skip to content

Commit c2d771b

Browse files
committed
Ruby: Reduce alerts produced by MassAssignment.ql
1 parent 3c96bf6 commit c2d771b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ private module Config implements DataFlow::StateConfigSig {
4343
state instanceof FlowState::Permitted
4444
}
4545

46+
predicate isBarrierIn(DataFlow::Node node, FlowState state) {
47+
node instanceof MassAssignment::Source and
48+
state instanceof FlowState::Unpermitted
49+
}
50+
4651
predicate isBarrier(DataFlow::Node node) { node instanceof MassAssignment::Sanitizer }
4752

4853
predicate isAdditionalFlowStep(

0 commit comments

Comments
 (0)