Vibe Coder · Unit 13: Testing and Security · Lesson 7 of 11

Try to break login

Attack your own sign-in and access rules the way a curious stranger would, before one does.

Read the short notes and pictures.Do everything inside a blue frame.

Thinking like an intruder

Most break-ins on small apps are simple: a page that forgot to check who is asking, or a database rule that is too generous. You can find these in an hour by trying them.

A 3D scene of coloured blocks and cards. Signed out: open a private page, change the id in the address, it should never show data.
Change the id in the address while signed out.

The attempts

  1. Signed out

    Every private page and address should send you to sign in.

  2. Wrong user

    Use two accounts. Swap ids in addresses.

  3. Around the interface

    Have Claude Code query the database with the public key as an anonymous user and as the wrong user.

  4. Sign-up abuse

    Can someone create a thousand accounts? Add limits.

A 3D scene of coloured blocks and cards. As user A: open B’s item, change it, delete it.
As one user, try to open, change and delete another’s data.

If something gets through

Fix the rule, not the screen

Hiding a button is not security.

Add a test

So it cannot come back.

Check other tables

The same mistake is often repeated.

ActivityBuild stepA tested, locked-down app

Attack your own access rules

Run all four attempts with two accounts and with Claude Code querying the database directly. Fix every hole at the rule level and add each case to your test plan.

Done when

Repeat after any change to tables or sign-in.

Keep these

  • Try private pages signed out.
  • Try other users’ data with two accounts.
  • Fix at the rule level.