Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · Security · Think Like an Attacker · with code: Python + Go + TypeScript · about 19 min to read

Play it as a journeyTutor comes with a plan

Review the fix (secure code review)

The Security Mindset
The Security Mindset · Open board

An ordinary system diagram redrawn with every door marked. A code review is that drawing done at the scale of one change: find the door the change touches, and follow what comes through it.

Before you start. The Security Mindset gave you the trust boundary: the line a request crosses when it comes from someone you do not control. Lessons Authentication to Application Hardening, and Whose page is this? (the browser security model), each taught one defence at one door (a salted slow hash, an ownership check, a bound parameter, an escaped character, an allowlist, the origin rule). This lesson puts them together as twelve short pieces of real code, already fixed, and asks you to read each one the way a reviewer does.

Lesson 20 of 39 in Security

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 4 March 2012: a key on a project that was not his
  • 1 March 2012: the question was already on the table
  • The review: walk one value from the door to the room
  • Reading a fix: is the guard on every path?
  • The test named for the promise
  • Card 1: the invoice page (JavaScript)
  • Card 2: the order search (Python)
  • Card 3: the comment list (JavaScript)
  • Card 4: the ping button (Python)
  • Card 5: the download link (Go)
  • Card 6: the API key check (Go)
  • Card 7: signup (Python)
  • Card 8: the admin routes (Go)
  • Card 9: the token check (Python)
  • Card 10: back to where you were (JavaScript)
  • Card 11: the link preview (Python)
  • Card 12: the login log line (Go)

Terms it explains: strong parameters, secure code review, source, sink, guard, regression test, assume breach, attack surface, authenticity, CIA triad, complete mediation, defense in depth, fail secure, least privilege, no security through obscurity (Kerckhoffs), non-repudiation, security mindset, stride, threat model, trust boundary.

Related paper

Review Security