guest@websec: ~/websec — zsh — 100×40 by SaKKo YouTube ENTH code:

guest@websec ~ % cat README

Developer Field Guide

Practical security, server hardening, and Rails API engineering for our team — organized into three hands-on tracks. Press / (or ⌘K) anytime to search every topic.

#1 · Web Security: how to read this guide

Each page covers one topic in 5–10 minutes. Going in order (1–2 topics per week for team sessions) works best because later chapters build on earlier ones.

★ TL;DR & ChecklistsEvery lesson starts with the single rule to remember and ends with quick self-check questions.
▶ Sequence FlowsStep through animated request/response diagrams (or click any numbered step) to trace an attack and its fix.
⚡ Interactive LabsPurple boxes run safe, real simulations in your browser — test payloads and flip defenses on and off.
Rails / Node CodeCode blocks default to Rails; click Node on any dual-language block (or in the top bar) to compare.

Every topic also shows where Rails stands so nobody assumes the framework is handling something it isn't:

Rails handles this out of the box. Know what not to bypass or undo.
Rails gives you safe building blocks, but you must enable, configure or finish the job.
Rails does nothing here. Protection comes entirely from our own code, architecture and process.
part 1 · start here: injectionWhen untrusted input gets interpreted as SQL, HTML, JS, or shell commands
part 2 · accounts and access controlProving who the user is (AuthN) and enforcing what they may touch (AuthZ)
part 3 · files, browsers and headersHardening redirects, file uploads, browser policies, TLS, and cookies
part 4 · server side and secretsOutbound fetches, unsafe parsers, secret keys, cryptography, and gem CVEs
part 5 · operations and designAdmin isolation, safe error handling, business-logic races, and incident response
part 6 · questionnairesPrivate self-assessments to check what stuck

OWASP Top 10:2025 at a glance

The OWASP Top 10 is the industry's list of the biggest web risks. Here's where each one lives in this guide, and how much Rails helps:

#riskRailspages
A01Broken Access Control
incl. IDOR, BFLA, CSRF, SSRF
partial
CSRF tokens and open-redirect protection on by default; authorization and object scoping are ours
07 08 09 13 18
A02Security Misconfiguration
debug modes, dashboards, defaults, headers
partial
good production defaults; mounted dashboards, hosts, CSP are ours
11 12 19
A03Software Supply Chain Failures
vulnerable gems, CDNs, CI
your job
Brakeman in CI for new apps; patching gems and pinning scripts is ours
12 17
A04Cryptographic Failures
TLS, storage, keys, randomness
partial
force_ssl, encrypted cookies, has_secure_password; field encryption is opt-in
05 12 15 16
A05Injection
SQL, XSS, command, header
partial
ERB escaping and AR parameterization by default; raw/html_safe/interpolation are ours
02 03 04
A06Insecure Design
business logic, races, threat modeling
your job
nothing built in
20
A07Authentication Failures
passwords, sessions, MFA, brute force
partial
auth generator, rate_limit, secure sessions; MFA and lockout are ours
05 06 08
A08Software or Data Integrity Failures
deserialization, SRI, unsigned data
partial
JSON cookies and safe YAML by default; Marshal and CDN scripts are ours
12 14
A09Security Logging & Alerting Failures
what to log, alerts, response
partial
request logs with filtered params; security events and alerts are ours
08 21
A10Mishandling of Exceptional Conditions
fail-open, errors, limits
partial
generic error pages, transactions roll back; fail-closed logic is ours
19

The threat model in one picture

Almost every attack in this guide targets one of these trust boundaries. Hover or tap a layer.

trust boundariestap a layer
Browser → Network → Server → Database. Pick a layer.

#2 · Ubuntu Server & SSL

Set up a fresh Ubuntu server, issue Let's Encrypt certificates (single-domain and wildcard), and understand how HTTPS works under the hood.

#3 · Ruby on Rails API Guide

How we build API-only Rails apps, based on our real code. Every lesson has terminals you can run, interactive simulators and short quizzes. Go in order: basics → models → controllers → routes and tests.

part 1 · basicsProject layout, daily CLI commands, and safe schema changes
part 2 · modelsData rules, ApplicationRecord defaults, and callback execution order
part 3 · controllers and servicesRequest filtering, base controllers, and clean layer boundaries
part 4 · routes and testsRESTful URL design, named helpers, and Minitest integration tests