-
Notifications
You must be signed in to change notification settings - Fork 742
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
Expand skip_before_filter check #199
Comments
The |
Yes. Sorry I wasn't clear. I'm proposing looking for |
That sounds fine to me. |
Great. Seems like next step is to survey popular authentication/authorization gems for the names of filter methods that enforce controls. I'll take a stab at that. |
According to https://www.ruby-toolbox.com/categories/rails_authentication |
restful_authentication uses |
Expanded! And omniauth also uses |
Right now
CheckSkipBeforeFilter
only looks for skipping theverify_authenticity_token
method.Although Rails does not have a controller-level authentication solution baked in, most users seem to use one of a small handful of authentication gems. Therefore, most Rails apps use guessable names for their authentication filter method, most commonly
#login_required
.My proposal is that CheckSkipBeforeFilter also looks for
login_required
and the other "this action requires authentication" methods that common gems (e.g. Devise, Authlogic, restful_authentication) use.Even though these aren't Rails methods, does this seem like it's in scope for Brakeman?
The text was updated successfully, but these errors were encountered: