Using action as a keyword for one of the locals in the partial to be rendered appears to be making Brakeman think that the value of action is the thing being rendered. So when the value of the action local contains a parameter value I think that triggers a false positive without realizing there the first argument is a static string for the partial name. If I rename the local from action to something else like form_action, Brakeman doesn't give a warning.
Background
Brakeman version: 4.7.0 Rails version: 5.2.3 Ruby version: 2.5.3
False Positive
Full warning from Brakeman:
Relevant code:
Using
action
as a keyword for one of the locals in the partial to be rendered appears to be making Brakeman think that the value ofaction
is the thing being rendered. So when the value of theaction
local contains a parameter value I think that triggers a false positive without realizing there the first argument is a static string for the partial name. If I rename the local fromaction
to something else likeform_action
, Brakeman doesn't give a warning.