Skip to content

Usage of --safe-methods to silence 'Dynamic Render Path' false positives #1791

Answered by presidentbeef
ddalcino asked this question in Q&A
Discussion options

You must be logged in to vote

It's a mis-use of the option, but that's because of poor naming and not your fault. --safe-methods is really only for use with cross-site scripting checks. There are also --sql-safe-methods and --url-safe-methods, but to stop a proliferation of these options, I have adopted the policy of "use the ignore file instead". Another option is to turn off that check, if it's not useful to you.

Some day, depending on how complicated allowed_partial is, Brakeman might be able to recognize it as an allow-listing method. But it's not there yet.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ddalcino
Comment options

Answer selected by ddalcino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants