Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Securing Your Rails App

PromptWorks
October 12, 2013

Securing Your Rails App

Watch it online: http://confreaks.com/videos/2733-wickedgoodruby-securing-your-rails-app

How can you know if your Rails app is safe? With potential vulnerabilities lurking in your app’s code, in gems you depend on, in services you use, and in the Rails source itself, attackers have myriad vectors to gain access to your data, interrupt your service, and damage your reputation.

I’ll cover the basics of securing your Rails app, evaluating and mitigating the risk inherent in live web applications, and strategies for keeping your app secure as new threats emerge.

Presented by Mike Nicholaides at Wicked Good Ruby Conf. https://www.promptworks.com

PromptWorks

October 12, 2013
Tweet

More Decks by PromptWorks

Other Decks in Programming

Transcript

  1. • params • cookies • request headers • url path

    • incoming emails • uploaded files • input from other services • scraped from the web Don’t trust user input
  2. Whitelisting class User property :admin, Boolean property :name, String property

    :address, String ! attr_accessible :name, :address end
  3. Sanitization <%= sanitize(@user.bio) %> <h1>About Me</h1> <p>I'm a resourceful developer</p>

    <h1>About Me</h1> <script>performXSS();</script> <p>I'm a resourceful developer</p>
  4. bundle outdated Outdated gems included in the bundle: * awesome_print

    (1.2.0 > 1.1.0) * axiom-types (0.0.5 > 0.0.4) * builder (3.2.2 > 3.1.4) * cliver (0.3.1 > 0.2.2) * coderay (1.1.0 > 1.0.9) * database_cleaner (1.2.0 > 1.0.1) * descendants_tracker (0.0.3 > 0.0.1) * guard (2.0.3 > 1.8.3) * guard-rubocop (1.0.0 > 0.2.2) * haml_coffee_assets (1.14.1 > 1.14.0) ...
  5. bundler-audit Name: actionpack Version: 3.2.10 Advisory: OSVDB-91452 Criticality: Medium URL:

    http://www.osvdb.org/show/osvdb/91452 Title: XSS vulnerability in sanitize_css in Action Pack Solution: upgrade to ~> 2.3.18, ~> 3.1.12, >= 3.2.13 ! Name: actionpack Version: 3.2.10 Advisory: OSVDB-91454 Criticality: Medium URL: http://osvdb.org/show/osvdb/91454 Title: XSS Vulnerability in the `sanitize` helper of Ruby on Rails Solution: upgrade to ~> 2.3.18, ~> 3.1.12, >= 3.2.13