Security

How Marginal protects student data

Last updated: October 26, 2026

This is our written information security program, in one page. It says what is in place today and what is planned. It is not legal advice, and it is not an outside audit.

Short version

  • Students start as guests. We hold no real name or password for them, and no email address unless a student chooses to save their account with one.
  • The database checks who is asking on every table.
  • Direct access to the database is limited to the owner.
  • Report a problem at hello@yipbit.com.

In place today

  • Row-level security on every table. Every table in our database turns it on. A student can read their own rows, their classmates' scoreboard and town, and their teacher's nickname. A teacher can read the progress of students in their own classes. Through the app, nobody can read another person's saved game or the private roster, and nobody can read the usage events or the feedback.
  • Writes stay in your own rows. The app can add or change only rows that belong to the signed-in player. Anything that involves another person goes through a database function that checks the rules first: joining a class, making or answering an offer, changing a class, removing a student, sending a reaction, sending feedback, logging usage events and deleting an account.
  • Class codes are hard to guess. An account that types ten wrong codes in ten minutes has to wait before it can try again.
  • Roles cannot be self-assigned. A player can change their nickname and nothing else on their profile. The teacher role is set by a function that refuses guest accounts.
  • The rules are hidden from the web. The helper functions behind the access rules live in a private part of the database that the public interface does not expose.
  • No anonymous table access. The anonymous database role has no table privileges. Every request from the game carries a signed-in player's token, and guest players count as signed in.
  • Guests give no personal information. A guest account is a random ID. Nothing else is needed to play.
  • A bot check. Making a guest account or asking for an email code includes a Cloudflare Turnstile check, so scripts cannot mass-produce accounts. Supabase checks the one-time token the check returns.
  • Teachers sign in with Apple or an email code. We store no passwords. The email code is six digits, sent by Cloudflare's email service. Google sign-in is switched off until it is safe to use in a classroom.
  • Sessions live in the iOS keychain. The session is kept on that device only. A dropped connection does not sign a guest out.
  • Keys. The app carries only Supabase's publishable key, which is built to be public because the access rules decide what it can do. The privileged key stays inside Supabase. The AI tool that sorts feedback cannot read the database. It can only list new feedback and mark it sorted, through a Supabase function. It holds a shared secret, which the database checks against a hash, and never the privileged key. It gets no account IDs.
  • Security headers on the website. Our site sends a content security policy, strict transport security, frame protection and related headers.
  • Trades are checked. When a student sells a business to a classmate, the buyer's app validates what it receives before using it.
  • Review. We reviewed the whole code base for security in October 2026. We fixed most of what we found and wrote down the rest. Google sign-in is off, and that review noted a gap to close before it is turned on. We have not had an outside security audit.

Planned

  • Planned Daily backups. Our database is on a plan without backups today. We plan to move to Supabase Pro before classes start, which includes daily backups (issue 65). We will list how long backups are kept here once backups are on.

Who has access

Direct access to the database is limited to Marginal's owner. The website is published by an automated build that holds the website host's deploy key. Teachers can reach only their own classes through the app.

If something goes wrong

Send a report to hello@yipbit.com. Please tell us what you saw and, if you can, how to see it again. We do not ask you to include any student's details.

  1. We read every report. We will reply to say we have it.
  2. The owner checks whether student data was exposed or changed, and stops it.
  3. If it was, we tell the affected schools as soon as possible. We say what happened, which data was involved and what we are doing about it, as the student data agreement promises.
  4. We fix the cause and add a check so it does not happen again.

This steps list is our current plan.

More

What students see, what teachers see and what we store  ·  Student data agreement  ·  Privacy policy