How to Secure Your Apps
A hands-on series that takes one real app from threat model to live detection to fixed code. Watch each episode, then follow the full written tutorial below it — every command, every step.
The episodes
Follow them in order — each builds on the last.
EP 16 min1. Threat-model your login
Before you write a single detection, find every way in — a free, local audit of your authentication, grounded in your real code.
- What a threat model is, in plain words
- Run one on your own app with a single command
- Read the two reports it produces — code findings + runtime detections
- Why the whole audit is local and free
EP 213 min2. Plug SecureNow in
Your app is blind — it can't see the attacks in its own traffic. In a few minutes we give it traces, logs, and a firewall, then hand that visibility to your AI agent.
- Install and connect SecureNow with no code changes
- See every request — method, path, body, status — as traces
- Turn on the firewall and watch it answer bad traffic
- Add the optional bridge for auth-aware detection and session revocation
EP 314 min3. Make it fire
The report already wrote the detections. Create them, keep them in test mode, then run a real attack and watch SecureNow catch every move — safely.
- Create a detection rule from the report's SQL
- Use test mode so nothing blocks while you tune
- Validate a rule against real + synthetic traffic
- Run a bounded attack and read the evidence in the dashboard
EP 413 min4. Fix the code
Detections catch an attacker; they don't fix the hole. Here your coding agent closes five real bugs — one commit, one test, one proof at a time.
- Why a detection is containment, not a fix
- Turn each threat-model finding into a prompt for your agent
- Close five real auth bugs with a test for each
- Prove every fix live against the running app
EP 511 min5. Authorization
Broken access control is the #1 risk on the web, and you can't test every endpoint × every role. So instead, we watch the decisions in production — and catch the ones that don't belong.
- Why authorization is impossible to test exhaustively
- Catch IDOR enumeration and sudden escalation from traffic alone
- Add one event for the precise detections traffic can't see
- Fix the code: export decisions, and close a role-change race
EP 65 min6. Catching IDOR
IDOR is the #1 API risk and the quietest bug there is — a single request looks like a normal 200. You can't catch one request, so you catch the shape of an attacker hunting for it.
- Why a single IDOR request is undetectable
- Catch scan, walk, and dump from the traffic alone
- Confirm the real breach with one event
- Fix it in one line — scope the read to the owner
EP 78 min7. Logs, errors and crashes, fixed by your agent
See every log, error and crash from every app and environment in one place, then let your coding agent read them over MCP, fix the code and push. Every hour, if you like.
- Capture console logs, errors and crashes with one preload (crash capture is new in 8.13)
- Tag each deployment with its environment and query one or all of them
- Ask your agent for the last six hours of errors and let it fix, test, commit and push
- Run the same loop every hour, with one pull request per new root cause
EP 87 min8. Block attackers in seconds, outside your code
Stop a signup flood and a scraper without a deploy: scoped blocks by address or range, route, method, app, environment and time, added from the dashboard, the CLI, or your coding agent over MCP.
- How SecureNow enforces blocks inside your app while the rules live outside your code
- Scope a block to one address or a CIDR range, one route and method, one environment, for a set time
- Let your coding agent investigate an attack read-only, then apply the blocks you approve
- Verify a block with test-ip and see what it actually stopped with firewall hits
EP 97 min9. Rate limits outside your code: per IP, per session, per API key
Limit what you can't block: rate limits by route, method, app and environment, counted per IP, globally, per API key or per session, shared across servers, and added in plain English or by your agent.
- How a SecureNow rate limit works: route, method, limit, window, and a 429 your route never sees
- Count per IP, globally, per header value (API key) or per cookie value (session)
- Why per-IP limits fail against rotating addresses, and how the agent fixed it with a per-session limit
- Write limits in plain English, stack them, and share one counter across servers with Redis
EP 107 min10. Investigate an attack by asking questions
Find out exactly what happened in an account takeover by asking questions in plain English. The forensics chat finds each answer in your events, requests or logs, reads the rows back, remembers every answer, and carries one investigation from the dashboard to the terminal to your coding agent.
- Where an account takeover leaves its evidence: requests, your app's log lines, errors and security events
- How the forensics chat picks the source, writes one read-only query, runs it and reads the rows back
- Follow-ups that build on earlier answers, continued from the dashboard, the CLI and a coding agent over MCP
- Why you check the findings against the rows, and what a password reset alone would have missed
11. Turn any attack into an alert, in plain English
Write alert rules the way you'd describe the attack: SecureNow picks an instant or a periodic rule, writes it from your app's real data and checks it against that data before you save. Seven rules from one request to a baseline, each attacked live, and one written by a coding agent.
- Instant rules (every request, as it arrives) versus periodic rules (a query on a schedule), and how to choose
- How a rule drafted from English is checked against your data before you save it, and why every new rule starts in test mode
- Seven detections from one request to a baseline: threshold, distinct count, ratio, sequence and baseline, each attacked live
- How a coding agent turns a hypothesis into a rule over MCP, and checks its own drafts
12. Requires Human and Alert Review: what SecureNow won't decide alone
SecureNow blocks most attacks on its own. When a block would rest on the AI's opinion, or a rule fires far too wide, it asks. What the two queues ask you, what you can answer, and how to hand both to your own coding agent, on a schedule.
- What runs without you, and the rule that creates the queues: when it's only the AI's opinion, SecureNow asks
- Alert Review ("is this rule right?"): how a run gets there and the three answers
- Requires Human ("what do we do about this IP or plan?"): why rows wait, the four answers, and the one trap
- How to hand both queues to Claude Code over MCP: read-only first, one app next, then everything, on a schedule
Run it on your own app
Everything in this series works on your project today. Start the threat model, then plug SecureNow in.