Sha256: 982e5d6cd5e7b5aaa1989c32ce652d9d5d89858a7ddd671ecbd6c8289529d89c
Contents?: true
Size: 863 Bytes
Versions: 99
Compression:
Stored size: 863 Bytes
Contents
class Brakeman::CheckForceSSL < Brakeman::BaseCheck Brakeman::Checks.add_optional self @description = "Check that force_ssl setting is enabled in production" def run_check return if tracker.config.rails.empty? or tracker.config.rails_version.nil? return if tracker.config.rails_version < "3.1.0" force_ssl = tracker.config.rails[:force_ssl] if false? force_ssl or force_ssl.nil? line = if sexp? force_ssl force_ssl.line else 1 end warn :warning_type => "Missing Encryption", :warning_code => :force_ssl_disabled, :message => msg("The application does not force use of HTTPS: ", msg_code("config.force_ssl"), " is not enabled"), :confidence => :high, :file => "config/environments/production.rb", :line => line end end end
Version data entries
99 entries across 85 versions & 4 rubygems