SecurityLearning library

Defensive security foundations

Build safer applications by understanding trust boundaries, identity, and common failure patterns.

Beginner20 chapters14 practice questions6 references
Start coursePractise questions

Get an in-app notice when new lessons or practice are added.

20 chapters across 6 modules

Course chapters

Explore all 20 chapters in any order. Each chapter has learning goals, a practice prompt, and a primary reference; expanded reading pages are linked from their chapter titles.

01 · Security thinking4 chapters
  1. Assets and threat modeling

    • Identify what needs protection and who can act across boundaries

    Practice: Draw a small data-flow diagram and list meaningful threats.

    Read the primary referenceLesson guide · Ready
  2. Authentication and authorization

    • Separate identity proof from permission decisions

    Practice: Explain why a signed-in user still needs resource-level checks.

    Read the primary referenceLesson guide · Ready
  3. Least privilege

    • Limit access according to required operations and scope

    Practice: Design a database role for one application database.

    Read the primary referenceLesson guide · Ready
  4. Secrets and configuration

    • Distinguish public identifiers from private credentials

    Practice: Describe secure secret storage and a credential-rotation response.

    Read the primary referenceLesson guide · Ready
02 · Application defenses4 chapters
  1. Input validation and output encoding

    • Separate data validation from contextual output encoding

    Practice: Review a comment form for validation and rendering boundaries.

    Read the primary referenceLesson guide · Ready
  2. Injection prevention

    • Use parameterized operations instead of constructing executable syntax

    Practice: Rewrite an unsafe database query conceptually.

    Read the primary referenceLesson guide · Ready
  3. Sessions and cookies

    • Explain expiration, secure transport, and browser storage tradeoffs

    Practice: Design a sign-out flow and session invalidation policy.

    Read the primary referenceLesson guide · Ready
  4. Passwords and recovery

    • Use purpose-built password hashing and expiring one-use recovery tokens

    Practice: Map a recovery flow without revealing account existence unnecessarily.

    Read the primary referenceLesson guide · Ready
03 · Data and infrastructure4 chapters
  1. Transport security

    • Explain TLS validation and the limits of encryption in transit

    Practice: Trace a browser-to-API connection and its trust decisions.

    Read the primary referenceLesson guide · Ready
  2. Dependency security

    • Track dependencies and respond to a relevant advisory

    Practice: Review an update for compatibility and exposure.

    Read the primary referenceLesson guide · Ready
  3. Logging and privacy

    • Log useful security events without secrets or unnecessary personal data

    Practice: Design an authentication-failure event schema.

    Read the primary referenceLesson guide · Ready
  4. Backups and incident response

    • Plan containment, recovery, and lessons learned

    Practice: Write a response outline for an exposed application credential.

    Read the primary referenceLesson guide · Ready
04 · Defensive verification4 chapters
  1. Secure code review

    • Check authorization and input boundaries with concrete cases

    Practice: Review a fictional file-download endpoint.

    Read the primary referenceLesson guide · Ready
  2. Testing in authorized environments

    • Define scope and use a local lab for verification

    Practice: Write a safe test plan for an application you own.

    Read the primary referenceLesson guide · Ready
  3. Security checklists and tradeoffs

    • Turn a checklist item into a verified behavior

    Practice: Prioritize fixes by exposure and consequence.

    Read the primary referenceLesson guide · Ready
  4. Mini project: security review

    • Combine threat modeling, controls, and validation evidence

    Practice: Produce a defensive review of a small learning application.

    Read the primary referenceLesson guide · Ready
05 · Security operations practice3 chapters
  1. Authorization test cases

    • Check ownership and role boundaries with negative cases

    Practice: Test that one learner cannot read another learner’s progress in an authorized local lab.

    Read the primary referenceLesson guide · Ready
  2. Content security and browser isolation

    • Explain browser-enforced policies as defense layers

    Practice: Review a policy for a static learning site with an external API.

    Read the primary referenceLesson guide · Ready
  3. Responsible vulnerability reporting

    • Prepare reproducible evidence within an authorized scope

    Practice: Write a private report that avoids exposing secrets or unnecessary personal data.

    Read the primary referenceLesson guide · Ready
06 · Further foundations and worked reasoning1 chapter
  1. Trust boundaries in a web request

    Protect a progress API by separating identity, permission, and untrusted input.

    • Identify which inputs cross a boundary and where authorization must occur

    Practice: Map a progress-update request and test that one synthetic user cannot change another user’s record.

    Read the primary referenceExpanded reading · Ready

Learn it. Check it. Try again.

14 original questions with worked explanations and source references. Filter by difficulty, revisit mistakes, and save your attempt as you go.

Open Defensive security foundations practice

Books & references

Free reading at the publisher or author’s site. External materials keep their own licenses.