This manual describes common security problems in web applications and how to avoid them with Rails. Secure coding checklist : Ruby on Rails : Attack Vector/Vulnerability Solution input/output validation white-list filtering as early as possible use safeERB , XSSshield , etc. use .find(params[:id]) only with additional parameters or @user.order.find(id) SQL injections use bind variables and an array for SQL queries using .find use sanitize_sql() or prepared statement for remote SQL queries use protect_from_forgery (CSRF) use escape methods for Shell LDAP ... Mass Assignment use attr_accessible don't pass user-data to .new or .create take care with redirect_to session handling use SSL use strong passwords only 6 characters numbers and letters verify with cracklib-ruby use password salt use key derivation ...
Technology loop holes