guest@websec ~ % man 01-introduction
01 · Introduction
Rails gives us safe defaults. But no framework can make an app secure on its own.
Why "secure framework" isn't enough
Modern frameworks escape HTML, add CSRF tokens and parameterize queries for you. That kills whole classes of bugs. It still isn't enough, for three reasons:
- People. One raw SQL string or one admin route without a check undoes everything. Rails can't guess which pages should be private.
- The whole stack. Server, database, proxy, CI, cloud account. If someone can read your
.env, nice templates won't save you. - Time. New attacks and new CVEs show up every month. Security is maintenance, not a one-off.
bundler-audit for gem CVEs.Where attacks actually land
Most real breaches don't crack encryption. They walk through ordinary bugs: a missing permission check, an unvalidated field, a cookie sent over HTTP.
Attackers take the easiest way in. You're only as strong as your weakest layer.
What the rest of this guide covers
The lessons come in five parts, ordered for a team that's new to security: injection first (02–04, starting with SQL injection, which has hit us before), then accounts and access control (05–09), the browser side (10–12), the server and its secrets (13–17), and operations (18–22). The quizzes are at the end. Go through them in order: later lessons build on earlier ones.