SaaS security checklist: seven layers for a team of one to ten, tenant isolation first

SaaS security for a small team comes down to seven layers, in this order: tenant isolation, authentication, secrets, dependencies, backups, logging and vendors. Tenant isolation comes first because a SaaS keeps every customer in the same database, and one missing filter shows customer A's data to customer B. Check each layer on the live app: two accounts in two tenants, the deployed JavaScript, a real restore.

The team behind Keybrum's attacksUpdated 11 min read

In short

  • A SaaS is multi-tenant by nature: all customers share one database. The first question is always whether tenant B can read or change tenant A's data.
  • Broken access control is the first category of the OWASP Top 10:2025. In a SaaS, its most damaging form is a query, a file path or a cache entry that is not scoped to the tenant.
  • Derive the tenant from the session on the server. OWASP's multi-tenant cheat sheet says to treat tenant identifiers sent by the client "as selectors only".
  • Row level security does not constrain every role. PostgreSQL's documentation says superusers and roles with BYPASSRLS always bypass it, and table owners normally do too.
  • Each layer has a check you can run today on the live app: two tenants and one request, a search of the bundle, a restore into an empty project.
On this page

What SaaS security means for a small team

SaaS security is the work of making sure each customer of your software can reach their own data and nothing else, and that nobody outside can reach any of it. Large vendors answer with a security team and audits. A team of one to ten answers with a short list, checked often.

This checklist is ordered by what hurts most when it fails. It starts with the one risk that is specific to SaaS: many customers in one database. If you built your product with an AI tool and want the general pre-launch list, read the vibe coding security checklist first. This page takes the multi-tenant angle and goes on to the layers a paying customer will ask about.

LayerThe questionHow to verify on the live app
1. Tenant isolationCan tenant B read or change tenant A's data?Two accounts in two tenants, request A's record as B
2. AuthenticationCan someone get a session they should not have?Sign-up, reset and sign-in flows tried from a private window
3. SecretsIs any secret in what the browser receives?Search the deployed JavaScript
4. DependenciesDoes the deployed version have a known flaw?npm audit on the lockfile, and the version the site serves
5. BackupsCan you get yesterday's data back?A real restore into an empty project
6. LoggingWould you know who read what, and when?Find one of your own test requests in the logs
7. VendorsWho else holds your customers' data?The list of tools with production access, and the scope of each token

1. Tenant isolation: the first thing to test

In a multi-tenant app, every customer's rows sit in the same tables, separated by a column such as org_id. Isolation holds only if every read and every write is filtered by that column, using a tenant the server worked out by itself. OWASP's Multi-Tenant Application Security Cheat Sheet puts the rule in one line: "Treat client-supplied tenant identifiers as selectors only." The tenant in the URL or the request body says which workspace the user wants. Whether they belong to it is checked on the server, against their membership.

The usual places it breaks:

  • A table with no tenant filter. One new table added by a migration, with no policy. On Supabase, see Supabase RLS.
  • An id in the URL. /api/invoices/871 returns the invoice without checking that it belongs to the caller's tenant. This is the IDOR family.
  • Files. OWASP warns that "object naming or prefixes alone are not authorization boundaries". A bucket where each tenant has a folder still needs a rule on each read. See Supabase storage security.
  • Caches. A shared cache that stores one tenant's page and serves it to the next. OWASP: "Include the tenant identifier in every cache key whose value or authorization varies by tenant."
  • Background work. Exports, emails, search indexes and admin scripts often run with a role that bypasses every rule. They need the filter in their own code.
  • Changing tenant. A user who edits their own profile row and sets org_id or role to something else.

The fix on Postgres and Supabase

Put the filter in the database, so that a forgotten check in one route does not open the table. With row level security, the policy ties each row to the caller's memberships.

sql
alter table invoices enable row level security;

create policy "members read their org's invoices"
on invoices for select
to authenticated
using (
  org_id in (
    select org_id from memberships
    where user_id = auth.uid()
  )
);
A tenant policy on one table. Repeat for insert, update and delete, and for every table that has an org_id.

Two details decide whether that policy does anything. First, the role your backend connects with. PostgreSQL's documentation states that "superusers and roles with the BYPASSRLS attribute always bypass the row security system", and that table owners normally bypass it too unless the table has FORCE ROW LEVEL SECURITY. On Supabase, the documentation says the secret key bypasses RLS and must stay on the server. A backend that uses it for ordinary user requests gets no protection from its policies. Second, views: Supabase's documentation notes that views bypass RLS by default because they are usually created by the postgres user.

sql
select c.table_name
from information_schema.columns c
join pg_tables t
  on t.schemaname = c.table_schema and t.tablename = c.table_name
where c.table_schema = 'public'
  and c.column_name = 'org_id'
  and t.rowsecurity = false;

select rolname, rolsuper, rolbypassrls
from pg_roles
where rolbypassrls or rolsuper;
Two checks to run in the SQL editor: tables that carry a tenant column but have row level security off, and the roles that bypass it.

The test

  1. 1

    Create two tenants

    Sign up twice with two email addresses, so that each account has its own workspace. Add a record in each: an invoice, a project, a file.

  2. 2

    Collect A's identifiers

    As tenant A, note the ids that appear in URLs and API calls: the record id, the workspace id, a file path.

  3. 3

    Replay as B

    Signed in as tenant B, request A's record by its id. Then try to change it. Then request A's file. Do it through the API, since a hidden button proves nothing.

  4. 4

    Repeat for every kind of object

    OWASP's advice is to test cross-tenant denial for every tenant-owned table, and to build that list from the schema. A list kept by hand misses the table added last week.

2. Authentication: who gets a session

  • Email addresses are confirmed before an account can act, so nobody signs up as someone else's address.
  • Sign-in and password reset are rate limited, and answer the same way for a known and an unknown email.
  • The reset link expires quickly and never appears in an API response.
  • Session cookies carry Secure, HttpOnly and SameSite.
  • Invitations to a workspace are tied to one email address and expire.
  • Your own accounts on the host, the database and the domain registrar have multi-factor authentication. Supabase's production checklist asks for it on the Supabase account itself.
  • Admin pages check the role on the server. A redirect in the browser is decoration.

Verify: in a private window, register with an address you do not own and see what the account can do before confirmation. Request a reset for a known and an unknown email and compare the answers. Open the admin address signed in as an ordinary user. The Supabase Auth guide covers the settings behind each line.

3. Secrets: nothing in the browser, nothing in the repository

  • Secrets live in the host's environment settings or a vault. They are not in the code and not in a committed .env file.
  • No secret is stored under a name that starts with NEXT_PUBLIC_ or VITE_. Both prefixes copy the value into the JavaScript at build time.
  • The database's service role or secret key is used only in server code.
  • Production and development use different keys.
  • Secret scanning and push protection are on for the repository.
  • Every key has an owner and a rotation procedure that was tried once.

Verify: open the live app, list the scripts it loads and search them for sk_, service_role and -----BEGIN, or paste the JavaScript into the API key leak checker. The secrets management guide covers storage, prefixes and rotation in detail.

4. Dependencies: the version you actually serve

The OWASP Top 10:2025 has a category for this, A03 Software Supply Chain Failures. For a small SaaS it means two habits: know when a package you ship has a published flaw, and upgrade the framework quickly when the flaw is in it. npm audit asks the registry for known vulnerabilities in your dependency tree.

bash
npm audit --omit=dev --audit-level=high
Fail the build on high and critical advisories in production dependencies.

Verify: run the command on the lockfile of the deployed commit, then check which framework version the live site serves. A patched package.json that was never deployed fixes nothing. Paste your lockfile into the Next.js CVE checker to see every known CVE in your Next.js and React versions.

5. Backups: a restore you have done once

A backup nobody restored is a hope. Know what your plan includes. On Supabase, the documentation says Pro, Team and Enterprise projects are backed up daily, with 7, 14 and up to 30 days kept, and it tells Free plan projects to export their own data regularly. The same page notes a gap that surprises people: database backups do not include the files stored through the Storage API, only their metadata.

Verify: restore last night's backup into an empty project and open the app against it. Time it. Check that uploaded files are covered by something. Write down who can trigger a restore, and remember that an agent with production access can delete a database as fast as it can create one.

6. Logging: could you answer "who read this?"

OWASP names this A09 Security Logging and Alerting Failures. When a customer asks whether their data was reached, you need three things: sign-ins and failures, reads and changes on sensitive objects with the user and the tenant, and admin actions. Keep them somewhere the app cannot delete, for as long as your contracts say.

Verify: do the cross-tenant test from layer 1, then find your own denied requests in the logs. If you cannot find them, you would not find an attacker's. Add one alert: a burst of denied requests from one account.

7. Vendors: who else holds the data

  • A list of every service that receives customer data: host, database, email, analytics, AI providers, support tools.
  • For each, the region, the data it gets and a link to its own trust center.
  • Tokens given to integrations and coding agents have the smallest scope that works, and are revoked when the tool is dropped.
  • Webhooks from payment and auth providers are verified by signature. See Stripe webhook security.
  • The list is public or ready to send. Buyers ask for it, and a trust center is where it lives.

What Keybrum tests on a SaaS, and what it does not

Keybrum is the automated attack test we build for apps made with AI tools. On a SaaS it covers the layers a stranger can reach. For isolation, it attacks as a visitor and as two accounts it creates: reading and changing another account's records through the API, reading Supabase tables, storage and live database changes with the public key, giving itself a role or a plan by editing its own row, setting privileged fields from the client, and checking whether a shared cache serves private data to a stranger. For authentication: sign-in throttling, email enumeration, reset tokens returned in a response, cookie flags and admin pages open to anyone. For secrets: provider keys in everything the app serves, each checked with a harmless call, plus served .env files and source maps. It also proves known Next.js and React CVEs by behaviour and checks for Stripe webhooks that accept unsigned events.

Each finding comes with the request that worked and a fix your coding agent reads through MCP. It closes when the same attack fails. A one-time report is €49. Plans start at €29 a month excluding VAT and attack every deploy. The Team plan, €99 a month for 25 apps, adds your brand on reports and trust pages. If you need a manual test for a contract, the pentest for startups guide says when and how to scope it.

Questions

What is SaaS security?

SaaS security is how a software-as-a-service company keeps each customer's data reachable only by that customer. It covers tenant isolation, authentication, secrets, dependencies, backups, logging and the vendors that hold data. For the customer of a SaaS, the term also means controlling how employees use those services.

What is the biggest security risk in a multi-tenant SaaS?

One tenant reading another tenant's data. All customers share the same tables, so a single query, file path or cache entry without the tenant filter exposes data across customers. Broken access control is the first category of the OWASP Top 10:2025 for that reason.

How do I test tenant isolation?

Create two accounts in two separate workspaces. As the first, note the ids of a record and a file. As the second, request and try to change them through the API. Repeat for every kind of object, and build the list from your database schema so that new tables are included.

Is row level security enough for tenant isolation?

It is a strong base when every table has a policy and the app connects with a role that is subject to it. It does nothing for requests made with a superuser, a BYPASSRLS role or Supabase's service role, and views bypass it by default. Files, caches and background jobs need their own tenant checks.

Does a small SaaS need SOC 2?

Only when customers require it. Most early buyers accept dated evidence: what was tested, when, and what is open, with a subprocessor list and a security contact. Our trust center guide shows what to publish before any certification.

How often should a SaaS be tested?

After every deploy for the checks that can be automated, because each change can add a table or a route. Run the full test weekly or monthly. Book a manual penetration test when a contract or an auditor asks for a signed report.

Sources

  1. 1.OWASP Top 10:2025, OWASP
  2. 2.Multi-Tenant Application Security Cheat Sheet, OWASP Cheat Sheet Series
  3. 3.Row Security Policies, PostgreSQL Documentation
  4. 4.Row Level Security, Supabase Docs
  5. 5.Production security checklist, Supabase Docs
  6. 6.Database backups, Supabase Docs
  7. 7.Security at Supabase, Supabase
  8. 8.npm audit, npm Docs

Your app is public. So are its mistakes.

Check what any attacker can already see in it, free, in ten seconds. The full attack, with proof and fixes: €49 once, or €29 a month on a plan.

or continue with Google or GitHub