Skip to content

Commit

Permalink
Ruby: Reduce alerts produced by MassAssignment.ql
Browse files Browse the repository at this point in the history
  • Loading branch information
hvitved committed Apr 3, 2024
1 parent 3c96bf6 commit c2d771b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ruby/ql/lib/codeql/ruby/security/MassAssignmentQuery.qll
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ private module Config implements DataFlow::StateConfigSig {
state instanceof FlowState::Permitted
}

predicate isBarrierIn(DataFlow::Node node, FlowState state) {
node instanceof MassAssignment::Source and
state instanceof FlowState::Unpermitted
}

predicate isBarrier(DataFlow::Node node) { node instanceof MassAssignment::Sanitizer }

predicate isAdditionalFlowStep(
Expand Down

0 comments on commit c2d771b

Please sign in to comment.