RadarTrek
Home/Courses/Secure by Default
🛡️Beginner → Intermediate8 lessons · 3 free

Secure by Default

Security is not a feature you add at the end of a sprint. It is the set of defaults you apply from the first line of code. This course teaches the practical, non-exotic security measures that every production web application needs: HTTPS and TLS, environment variable management, Row Level Security in Supabase, rate limiting, JWT hardening, security headers, and what to do when something goes wrong. No pen-testing, no exotic exploits — just the defensive foundations that prevent 90% of attacks.

No prerequisites — pairs well with Web Security for Builders
Start free lessons
$49one-time · lifetime access

What you'll learn

The secure by default mindset — deny all, allow explicitly
HTTPS and TLS — enforcement with HSTS and redirect middleware
Environment variables — what to expose and what stays server-side
Row Level Security in Supabase — user data isolation at the DB layer
Rate limiting — protecting login, AI, and paid API endpoints
Auth hardening — JWT expiry, refresh tokens, and MFA
Security headers — CSP, HSTS, X-Frame-Options in Next.js
Logging and incident response — detecting and containing breaches

Course outline

Full course — $49 one-time

04

Row Level Security — Database Authorisation at the Data Layer

Supabase RLS: how to ensure users can only access their own data, enforced in the database

9 min
05

Rate Limiting — Brute Force Protection and API Abuse Prevention

How to protect login endpoints, AI calls, and any endpoint that can be abused at scale

8 min
06

Auth Hardening — JWTs, Sessions, and MFA

Making authentication robust: token expiry, rotation, and multi-factor authentication

9 min
07

Security Headers — Configuring the Browser as a Security Layer

CSP, HSTS, X-Frame-Options, and the 10-minute configuration that dramatically reduces attack surface

8 min
08

Logging and Incident Response

Security event logging, anomaly detection, and what to do when something goes wrong

8 min

Get the full course

8 lessons — from environment variable basics to production incident response.

8 lessons✓ HTTPS + RLS + rate limiting + auth✓ Certificate
$49one-time

Written by the RadarTrek editorial team · Reviewed June 2026

About this course

Building securely is not about memorising a checklist of vulnerabilities — it is about developing a set of default habits and mental models that make secure code the path of least resistance. This secure coding course covers the principles that make security a natural part of how you build rather than an afterthought bolted on at the end: defence in depth, least privilege, input validation at system boundaries, secrets management, dependency management, and row-level security in databases.

This course is for developers who have a working knowledge of web security vulnerabilities and want to establish secure coding habits across their full stack. After completing it you will be able to design systems using defence-in-depth principles, configure Supabase Row Level Security correctly, manage secrets and API keys without accidentally exposing them, audit your dependencies for known vulnerabilities, and set up basic security monitoring.

Frequently asked questions

What is defence in depth?

Defence in depth means layering multiple independent security controls so that an attacker who bypasses one layer still faces others. Applied to web applications: validate input at the API boundary, parameterise database queries regardless, enforce row-level security in the database itself, apply rate limiting at the infrastructure level, and set restrictive permissions on the file system. Each layer is independent — a bug in one does not expose the whole system.

What is the principle of least privilege?

Least privilege means every component should have access to only the minimum resources needed to do its job — and nothing more. Examples: your application's database user should only have SELECT/INSERT/UPDATE on specific tables, not CREATE TABLE or DROP; your API should not have admin access to your cloud provider; third-party integrations should only receive the scopes they need. Limiting access limits blast radius when a component is compromised.

How do I manage API keys and secrets securely?

Secrets (API keys, database connection strings, signing keys) must never be hardcoded in source code or committed to version control. Use environment variables for local development and your deployment platform's secrets manager (Vercel environment variables, AWS Secrets Manager) in production. Add `.env` and `.env.local` to `.gitignore` immediately when starting a project. Rotate any secret that has ever been accidentally committed.

What is Row Level Security and why does it matter?

Row Level Security (RLS) is a database feature that restricts which rows a user can read or modify based on database-level policies. In Supabase, RLS policies ensure that a user who queries the orders table only sees their own orders — not anyone else's. Without RLS, access control relies entirely on your application code, which can be bypassed. RLS provides defence in depth at the database layer.

How do I handle dependencies securely?

Dependencies introduce risk because they contain code you did not write and may have vulnerabilities. Best practices: run `npm audit` or equivalent regularly, use a dependency scanner like Snyk or GitHub Dependabot, keep dependencies updated (especially those in your security critical path like auth libraries), avoid dependencies with no maintenance activity, and minimise the number of dependencies for low-value use cases.

RadarTrek Intel — monthly score updates

We track 40+ tools so you don't have to. Score changes, new tools, and new guides — once a month, no spam.