def check_for_action_globs
return if allow_all_actions?
Brakeman.debug "Checking each controller for default routes"
tracker.routes.each do |name, actions|
if actions.is_a? Array and actions[0] == :allow_all_actions
@actions_allowed_on_controller = true
if actions[1].is_a? Hash and actions[1][:allow_verb]
verb = actions[1][:allow_verb]
else
verb = "any"
end
warn :controller => name,
:warning_type => "Default Routes",
:warning_code => :controller_default_routes,
:message => msg("Any public method in ", msg_code(name), " can be used as an action for ", msg_code(verb), " requests."),
:line => actions[2],
:confidence => :medium,
:file => "#{tracker.app_path}/config/routes.rb"
end
end
end