You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is unsafe. Currently Brakeman checks for unescaped regex construction like /#{params[:regex]}/, but does not check for string coercion by match or match?.
Describe the solution you'd like
I'd like Brakeman to add a check for match and match? called with unsafe string input.
Thank you 🙏
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Ruby's
#match
and#match?
methods will coerce string inputs to regular expressions (docs):Example:
This is unsafe. Currently Brakeman checks for unescaped regex construction like
/#{params[:regex]}/
, but does not check for string coercion bymatch
ormatch?
.Describe the solution you'd like
I'd like Brakeman to add a check for
match
andmatch?
called with unsafe string input.Thank you 🙏
The text was updated successfully, but these errors were encountered: