Skip to content

Commit

Permalink
Don't warn about evaluating a safe value
Browse files Browse the repository at this point in the history
  • Loading branch information
presidentbeef committed Dec 30, 2024
1 parent 0203178 commit 1ed8dd3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/brakeman/checks/check_evaluation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def process_result result
elsif string_evaluation? result[:call].first_arg
confidence = :low
message = "Dynamic string evaluated as code"
elsif safe_literal? result[:call].first_arg
# don't warn
elsif result[:call].method == :eval
confidence = :low
message = "Dynamic code evaluation"
Expand Down

0 comments on commit 1ed8dd3

Please sign in to comment.