New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literal hash in mass assignment with without_protection = true triggers warning #769

jjconti opened this Issue Nov 25, 2015 · 1 comment


None yet
2 participants
Copy link

jjconti commented Nov 25, 2015

In I comment that Brakeman in triggering a false positive warning when I have this in the code:{username: "jjconti", admin: false})

which is a mistake from when I tried to simplify the code for the post. I review Brakeman output and all the warn examples includes the

:without_protection => true

parameter, which is documented to trigger a warning.

Now, I've introduced this code to my codebase:{username: "jjconti", admin: false}, :without_protection => true)

and it's triggered as a warning. Is this the desire behavior?


This comment has been minimized.

Copy link

presidentbeef commented Nov 25, 2015

Thanks for filing an issue.

If it's a literal hash with no user input then it should be easy to avoid warning. Right now, you are correct it will warn about any mass arraignment with without_protection: true.

presidentbeef added a commit that referenced this issue Nov 27, 2015

Repository owner locked and limited conversation to collaborators Mar 15, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.