Source or deployment

How can I tell whether a login or permission bug is in the source code or only in the deployed app?

Run the exact commit that is deployed as a production build on your own machine, pointed at a test backend, and repeat the failing request: if the bug appears there too it is in the code, and if it appears only on the deployed app it comes from configuration, data or infrastructure that the repository does not contain. For a database-backed app, also compare the access rules the live database actually has with the ones in your migrations, because the two can differ without any code change.

Sources last checked . Links go to each tool's own site or documentation.

Step 1: confirm what is deployed

Find the commit or build ID your host is serving and check out that commit. A fix that was merged but never deployed, or an older build still being served, looks exactly like a bug that exists only in production.

Step 2: reproduce with a production build

Use your framework's production build and start commands, not the development server, and send the same request that fails. Keep the code constant and change only the environment. A bug that follows the code is in the source or the build. A bug that follows the environment is in the deployment.

Step 3: compare what the repository cannot see

Things outside the repository that cause login and permission bugs
Lives outside the repoHow it causes the bugHow to check
Environment variablesA value is missing or different in production, or a secret key sits where a public key belongs.Compare names and values, and which ones reach the browser. Next.js bundles variables prefixed NEXT_PUBLIC_ and Vite exposes those prefixed VITE_.
Auth provider settingsRedirect or callback URLs do not match the deployed domain.Compare the allowed URLs in the provider's dashboard with the deployed origin.
CookiesSecure, SameSite or domain settings behave differently behind HTTPS or a proxy.Read the Set-Cookie header on the deployed response in the browser's network tab.
Database grants and policiesThe live database has a grant, policy or RLS setting that differs from the migrations.On Supabase, run the advisor against the live project with supabase db advisors --remote and compare it with a local run.
Data and rolesThe affected user has a role, membership or record state your test accounts lack.Reproduce with an account that matches the affected user's role and tenant.

Step 4: read the response

A 401 means the request was not authenticated. A 403 means it was authenticated but not allowed. On Supabase the database gives a further hint: the API keys guide says a missing grant returns a permission error, while a policy that matches no rows returns an empty result. An empty list where you expected data points at a policy. A permission error points at a grant.

Reading the result

What each observation says about where the bug lives
What you seeWhere the bug most likely lives
Fails in a local production build and on the deployed appSource code or the build.
Works locally and fails on the deployed app, same commitConfiguration, secrets, URLs, database state or infrastructure.
Fails only for some users or rolesData, role or membership setup, or an authorization check that depends on them.
The deployed commit is not the one you were readingThe deployment process.

The permission bugs nobody reports

A login that fails gets reported. A permission check that is missing does not, because everything works for the legitimate user. So test the other direction on the deployed app as well: sign in as one test user and request another user's record. OWASP's testing guide describes this test.

Scanning each side separately

Vibe App Scanner has a separate scan for each side of this question. A code scan of a GitHub repository or ZIP points to places in the source that need review, such as a write with no visible ownership check. A URL scan reports what the deployed app exposes to an outside requester. If the code report is clean and the URL report is not, look at configuration and database state. If both show the problem, start with the code.

Neither report proves the other. A URL scan observes behavior it can reach, for example that a read returned rows. It cannot prove how a policy is defined, whether writes are blocked, or that tenants are isolated. A code scan reviews a snapshot of the source and cannot prove what is deployed.

Plans are Go at $29 a month and Pro at $49 a month. New accounts start with a 7-day trial that requires a card and includes 3 scans in total across deployed URLs and repositories. The plan you picked starts when the trial ends unless you cancel first. See pricing. Both report types have a fictional example you can read without an account: a website report and a code report.

Related questions

Why does login work locally but fail in production?
Often because something outside the repository differs: an environment variable, an allowed redirect URL at the auth provider, cookie settings behind HTTPS, or the database's rules. Reproduce with a production build of the deployed commit to rule the code in or out.
Can a code scan tell me what is deployed?
No. A code scan reviews a snapshot of the repository. It cannot see which commit is live, the environment variables or the database's current policies.
Can a scan of the live URL tell me which file to fix?
No. It reports observed behavior, such as a response that returned private data. Finding the responsible file needs the source.

Sources checked

Each claim about another product on this page was read on the page linked here on . Plans and features change, so confirm on the source before you rely on them.