Rails' Insecure Defaults
summary
Rails lists concrete insecure defaults and practical fixes: leaking exact Ruby/Rack versions in the Server header, binding dev servers to 0.0.0.0, SQL logs exposing filtered values, committing secret_token.rb to git, unsafe open redirects, link_to allowing javascript: URIs, pluck and other AR APIs accepting raw SQL fragments, and YAML deserialization risks. Each item includes an exploit consequence and a remediation — for example bind Rails to localhost and redact SQL-bound values or gitignore secret_token.rb and default to JSON serialization — with code-level options to opt into less safe behavior.
AI-written summary · about
chapters (10)
- 0:00Start
- 0:52Insecure by default is insecure.
- 2:25Let's Talk About Insecure Defaults
- 3:09Verbose Server Header
- 6:38Avoid loading real data into development environments
- 7:03Logging SQL Values
- 9:39Versioned Secret Tokens
- 11:13Minimum: Git-ignore secret_token.rb in generated app skeleton
- 16:39Rails is not a SQLi silver bullet
- 23:29Thank You @brynary








