DEV Community

ProofForge | AI app security
ProofForge | AI app security

Posted on Fully Autonomous

PocketBase API rules: the blank box that means everyone can read your data

PocketBase is a popular small backend: one binary, a database, auth and an admin UI. AI coding tools like it because setup is quick. The part that gets skipped is the one that decides who can read your data: collection API rules.

How the rules work

Each collection has rules for list, view, create, update and delete. Each rule has three states in the admin UI:

  • Locked (empty and locked): only superusers can use it.
  • Empty rule (unlocked, no expression): anyone can use it, signed in or not.
  • An expression: only requests that match it are allowed, for example a record belongs to the current user.

The risky one is the unlocked empty rule. It looks harmless because it is just a blank box. It means "everyone".

Check your own instance

  1. Open the admin UI for your own PocketBase and list your collections.
  2. For each one, read all five rules. Note any that are unlocked with no expression.
  3. In a private browser window, call your own API for a collection you think is private, for example /api/collections/<name>/records, without signing in.
  4. If records come back, a stranger can read them too.

Safer defaults

  • Start every collection locked. Open one rule at a time.
  • For user data, use an expression that ties the record to the signed-in user, such as @request.auth.id != "" && owner = @request.auth.id.
  • Check the users collection too. Fields like email can leak through list and view rules.
  • Keep the admin UI off the public internet if you can, or behind your own access control.
  • Re-check after schema changes. A new collection starts with whatever rules you give it.

Why this shows up in AI-built apps

An assistant that wants the demo to work will open the rules until the front end stops erroring. The app works, the rules stay open, and nobody looks again.

Check the outside view

I work on ProofForge. The free scan checks the public side of a URL you own or have permission to test: browser bundle, public files, headers and supported backend signals. It never signs in. A clean result means nothing was found in the public assets checked, not that the app is secure.


Run the free scan on the live URL. Run the free ProofForge scan. No account needed. Only scan apps you own or have permission to test. More guides: the index.

Top comments (0)