SAST vs DAST: what each one sees, and what both miss in an app built with AI

SAST reads your source code without running it and points at risky lines. DAST sends requests to the running app from outside and reports how it answers. SAST misses what is not in the code, such as a database policy changed in a dashboard. DAST misses what sits behind a login it was not given. Neither knows which record belongs to which user unless a test uses two accounts.

The team behind Keybrum's attacksUpdated 10 min read

In short

  • SAST (static application security testing) reads code. OWASP lists its limits: access control issues are hard to find automatically, false positives are high, and configuration issues are often missed because they are not in the code.
  • DAST (dynamic application security testing) tests the running app from outside. It sees real answers, but a scanner that does not sign in only tests the pages a visitor sees.
  • On Supabase and Firebase, the access rules live in the backend, not in your repository. A policy edited in the dashboard changes what strangers can read, and no code scanner sees the change.
  • Broken access control is first in the OWASP Top 10:2025. Finding it takes two accounts: one creates a record, the other tries to read it.
  • Use both when you can: SAST on every commit, a dynamic test on every deploy. If you can only do one check today, test the live app with two accounts.
On this page

SAST vs DAST in plain words

SAST stands for static application security testing. A SAST tool reads your source code without running it, the way a strict reviewer would, and flags lines that match a risky pattern: a query built from user input, a secret written in a file, a dangerous function. OWASP files these tools under source code analysis tools.

DAST stands for dynamic application security testing. A DAST tool knows nothing about your code. OWASP describes these scanners as automated tools that scan web applications, normally from the outside, to look for vulnerabilities such as cross-site scripting, SQL injection, command injection, path traversal and insecure server configuration. It sends requests to the running app and judges the answers.

SASTDAST
What it looks atSource code, at restThe running app, over HTTP
When it runsOn every commit or pull requestAgainst a deployed build: staging, a preview or production
What it needsAccess to the repositoryThe app's address, and accounts if it is to test behind the login
What a finding looks likeA file, a line and a rule nameA request and the answer that came back
Typical strengthsInjection patterns, hardcoded secrets, unsafe functions, found before anything shipsMissing headers, exposed files, injection that really fires, server misconfiguration
Typical weaknessCannot tell whether the flagged line is reachable or exploitableOnly tests what it can reach and what it knows how to ask
Example tools named by OWASPSemgrep, SonarQube, BrakemanZAP, Burp Suite, Nuclei

OWASP is direct about the limits of the static side. Its page on source code analysis lists these weaknesses, among others:

  • It is difficult to automate searches for many types of flaws, and the list names authentication problems and access control issues.
  • "High numbers of false positives."
  • "Frequently unable to find configuration issues, since they are not represented in the code."
  • "Difficult to 'prove' that an identified security issue is an actual vulnerability."

Keep those four lines in mind. In an app built with Lovable, Cursor or Claude Code on Supabase or Firebase, they describe exactly where the leaks are.

What SAST sees and misses in an app built with AI

A generated app has little server code. The browser talks to Supabase or Firebase directly, and the rules that decide who reads what live in the backend: row level security policies in Postgres, security rules in Firebase. Your repository holds, at best, the migration files that created them.

SAST does useful work here. It catches a service role key or an OpenAI key written in a frontend file, a migration that creates a table without enabling row level security, an edge function that never reads the caller's token, a query assembled from a request parameter. Lovable's own Deep scan is a static review of this kind, and the Lovable security scan guide covers what it reads.

What it cannot see is everything that changed outside the code:

  • A policy edited in the dashboard. Someone opens the Supabase dashboard to debug, replaces a policy with one that lets everyone through, and forgets. The repository did not change. The scan stays green. The table is now public.
  • A table created in the SQL editor or by a chat prompt that never went through a migration file.
  • Firebase rules published from the console that differ from the firestore.rules file in the repository.
  • The build that is live. The scanner read today's code. The published app may be last week's build, with an environment variable that puts a server key in the bundle.
  • Whether a policy that exists is right. A policy that checks the wrong column is valid SQL. A linter reads it as a real condition.

What DAST sees and misses

DAST starts from the right place: the app as a stranger meets it. If a table answers a signed-out request, a dynamic test can see the rows come back. If a .env file is served, it downloads it. It does not matter how the hole got there, by code, by dashboard or by a default.

Its limits come from what it can reach and what it knows to ask:

  • The login wall. A scanner pointed at an address tests what a visitor sees. The ZAP documentation says that if your app uses authentication, you will need to configure ZAP to handle it, and that web app authentication is very complicated. A scan that was never given a login stops at the sign-in page.
  • One account is not enough. Even signed in, a scanner with one session sees its own data and has no way to know that order 1042 belongs to someone else. Access between users needs a second account that tries to read what the first one created.
  • It crawls pages, and your API is elsewhere. In a Supabase app there is no page for each table. The tables, database functions and storage buckets are reached through the backend's own API, which a page crawler does not explore.
  • Generic payloads. A classic scanner looks for injection and misconfiguration. It has no test for "a stranger can call your AI endpoint and spend your credits" or "your Stripe webhook accepts an unsigned event".

This is why broken access control stays at the top. The OWASP Top 10:2025 keeps it at number one and reports that 100% of the applications tested had some form of it. OWASP's advice is that developers and QA staff include functional access control in their unit and integration tests. In other words: write the test where user B asks for user A's record.

The same five flaws, seen by each kind of test

Flaw in the live appSAST on the repositoryDAST with no loginDynamic test with two accounts
Table with row level security off, created by a migration in the repositoryCan flag the migrationSees rows only if it knows to ask the Supabase APIReads the rows and keeps the request
Policy loosened in the dashboard last weekInvisibleSame as aboveReads the rows
Policy lets any signed-in user read every user's rowsReads as a valid policyInvisible, it never signs inAccount B reads account A's record
Server key in the published JavaScript, injected at build timeInvisible if the key is not in the repositoryVisible if the tool inspects the bundle for keysFound in the bundle, then checked against the provider
Edge function that calls an AI model without checking the callerCan flag the missing checkVisible only with a test written for itA short prompt is sent with no account and a model answers
A simplified view. Real tools vary: some SAST products connect to the database, and some DAST products can be given accounts.

Three checks to run on your own app today

You can see the gap between your code and your live backend without buying anything. On a Supabase project, run this in the SQL editor. It reads the policies as they are now, which is what counts:

sql
-- The policies your live database enforces right now
select tablename, policyname, cmd, roles, qual, with_check
from pg_policies
where schemaname = 'public'
order by tablename;

-- Tables with row level security off
select tablename
from pg_tables
where schemaname = 'public' and not rowsecurity;
Compare the first result with the migration files in your repository. Any difference is something a code scanner cannot see.

Then ask your own backend the question a stranger would, signed out, with the public key your app already ships:

bash
# Your own project and your own public key only.
curl "https://YOUR-PROJECT.supabase.co/rest/v1/YOUR_TABLE?select=*&limit=1" \
  -H "apikey: YOUR_PUBLISHABLE_KEY"
An empty list or an error: the table refuses strangers. A row: it does not.
  1. 1

    Compare live policies with the repository

    Run the first query. If a policy in the database is not in your migrations, write it down and decide which one is right. The Supabase RLS guide shows what a correct owner policy looks like.

  2. 2

    Ask as a stranger

    Run the curl on each table that holds user data. A row coming back means anyone with your app's address can read it. On Firebase, the Firebase rules checker reviews the rules you paste.

  3. 3

    Ask as the wrong user

    Create two accounts on your own app. With the first, create a record. With the second, request it by id. If it comes back, you have an IDOR, and neither a code scan nor an unauthenticated scan would have told you.

DAST tools and SAST tools: what to run when

The OWASP DevSecOps Guideline lists open source and commercial tools for both. For static analysis it names Semgrep, SonarQube and Brakeman among others. For dynamic testing it names ZAP as the open source option, and commercial scanners such as Burp Suite and Acunetix. All of them are worth their place in a pipeline.

  • On every commit: SAST and a secret scanner. They are fast and they stop the mistake before it ships. See TruffleHog vs Gitleaks for the secret side.
  • On every deploy: a dynamic test of the build that is live, signed out and signed in.
  • Before a customer or an auditor asks: a human test, which reasons about your business logic. The pentest vs vulnerability scan guide explains the difference in what you get.

If you ship with an AI builder and have no pipeline at all, start from the dynamic side. It needs only the app's address, and it tests the thing your users reach.

Where Keybrum sits: dynamic, with two accounts and proof

Keybrum is a dynamic test built for apps made with AI tools. It attacks the published app from outside, like DAST, with two differences that answer the limits above.

  • It signs in, twice. Keybrum creates two accounts on your app. It reads, inserts and updates rows in your Supabase tables as a stranger and as each account, calls database functions, lists storage buckets and subscribes to realtime channels. On an app with its own backend it tries one account's records from the other.
  • It knows the stack. It talks to Supabase and Firebase through their own APIs, looks for server keys in the JavaScript bundle and checks each one with a read-only call to the provider, sends a short prompt to AI endpoints with no account, and posts an unsigned event to Stripe webhooks.
  • Every finding is proven. A finding carries the request that worked and a redacted piece of what came back. No request, no finding. It closes when the same attack fails after your fix.

What Keybrum is not: a SAST product. It does not analyze code across languages or follow data through your functions, and its injection tests cover fewer cases than a full scanner that fuzzes every input. It has a code audit that your coding agent runs with rules chosen for these apps, and each record it flags is then tried on the live app. Keep a real SAST tool if you have a codebase and a pipeline. Keybrum only attacks apps whose owner proved ownership, and it never tests delete access.

A one-time report costs €49: one app attacked once, with proof, the fix for your coding agent and retests for 7 days. Plans start at €29 a month excluding VAT and attack every deploy.

Questions

What is the difference between SAST and DAST?

SAST reads source code without running it and flags risky lines. DAST sends requests to the running application from outside and reports how it answers. SAST works before deployment and needs the repository. DAST works on a deployed build and needs only its address, plus accounts to test behind the login.

Is DAST better than SAST?

Neither replaces the other. SAST finds mistakes early and points at the line. DAST shows what a real request gets from the real app, including holes that are not in the code. For an app whose access rules live in Supabase or Firebase, the dynamic side finds more of what matters.

What are common DAST tools?

The OWASP DevSecOps Guideline lists ZAP as the open source option and commercial tools such as Burp Suite, Acunetix and Veracode Dynamic Analysis. OWASP keeps a longer community list of vulnerability scanning tools. Most need to be configured with a login to test anything behind it.

Can SAST find broken access control?

Rarely on its own. OWASP lists access control issues among the flaws that are difficult to find automatically in code. Whether user B may read user A's record depends on your data model, and in a Supabase app on policies that live in the database.

Do I need SAST and DAST for a Lovable or Bolt app?

Start with what you have: the builder's own scan reads the code and the database rules. Then test the published app from outside, signed out and with two accounts. That pair covers both sides for a small app.

Sources

  1. 1.Source Code Analysis Tools, OWASP
  2. 2.Vulnerability Scanning Tools, OWASP
  3. 3.A01:2025 Broken Access Control, OWASP
  4. 4.DevSecOps Guideline: Static Application Security Testing, OWASP
  5. 5.DevSecOps Guideline: Dynamic Application Security Testing, OWASP
  6. 6.Authentication, ZAP
  7. 7.Row Level Security, Supabase
  8. 8.CVE-2025-48757, NIST National Vulnerability Database

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