Skip to content
← Audit for AI-built apps

Sample report

What an audit report looks like

The full report from one audit, in the seven sections every report has: summary, ranked fixes, findings by area, what was not checked, and a fix plan.

About this sample. This is an anonymised report from a real audit of an app owned by Appience, carried out in November 2026 with the same process and the same read-only access we use for clients. Names and details have been changed: the app name, domains, project identifiers, vendor names, table and file names. Structure, severities and finding types are unchanged. Nothing here describes a client's app.

26 findings by severity:

  • 3 Critical
  • 6 High
  • 10 Medium
  • 7 Low
Report date
November 2026
App
Consumer app for a paid physical service: iOS app + Next.js web/API + Supabase, with an external fulfilment provider, a payment provider, an invoicing service and a third-party AI provider
Code reviewed
Monorepo, branch main, one commit (hash withheld). An older prototype repo was excluded.
Method
Read-only review of code, migrations and build output; one request to the public homepage; tests and a Release simulator build run locally. No request was sent to any API endpoint.
Database
Not inspected live. Database findings are based on migrations; section 6 has the query that confirms them.
Sign-off
Prepared and signed by Appience.

Severity scale

  • CRITICAL - an outsider can get money, data or account access now or at launch.
  • HIGH - likely App Store rejection, legal exposure, or a paying customer left without service unnoticed.
  • MEDIUM - real but situational, or a slow cost.
  • LOW - hygiene.

1. Summary for the owner

Context. The owner's own notes say production runs on test (sandbox) payment and provider keys, but those notes are five months old. If that is still true, the three CRITICAL items are launch blockers, not an ongoing loss.

What is at risk

  1. Three tables have no row level security, including the one holding the OAuth tokens for the fulfilment provider account and a log with every customer's name, address and phone. Anyone with the app's public key can most likely read them. (C1, one query confirms it.)
  2. A signed-in user can create an order directly in the database with any price and status, skipping the server's price check - and get the order fulfilled at the operator's cost for 0.01 or for nothing. (C2)
  3. Every invoice link handed to a customer contains the operator's invoicing-service API key. (C3)
  4. App Store: no account deletion, no privacy manifest, no way for the reviewer to sign in, photos sent to a third-party AI without disclosure. (H1, H2, H3, H6)
  5. Terms of service are a placeholder while payments are taken; a paid order whose fulfilment fails gets no alert, retry or refund. (H4, H5)

What to do first

What to do first
StepWhoEffort
1. Run the section 6 query and send us the resultyou2 minutes
2. Apply the C1 SQL; reconnect the provider to issue new tokensdeveloper30 minutes
3. Remove the API key from invoice links and rotate it (C3)developer2-3 hours
4. Block direct order inserts from the app (C2)developerhalf a day
5. Account deletion, privacy manifest, reviewer sign-in, AI disclosuredeveloper2-3 days
6. Real terms of service; fulfilment-failure alert and refund pathyou + lawyer, developer1-2 days

What is in good shape

No secret keys in the repo or its history; the service role key is server-only; payment webhook signature and amount checks are correct; the provider webhook fails closed; the file bucket is private; JWTs are verified server-side; all tests pass; the iOS Release build succeeds; no in-app purchase is needed for a physical service.

2. Ranked list of fixes

  1. C1Critical (conditional)Security - 30 min

    3 tables without RLS, incl. provider OAuth tokens and logs with personal data

  2. C2CriticalSecurity - 0.5 day

    Order insert policy lets the client set price and status

  3. C3CriticalSecurity - 2-3 h

    Invoicing-service API key embedded in invoice URLs shown to customers

  4. H1HighApp Store - 1-1.5 days

    No account deletion; deletion would fail on a foreign key or wipe payment records

  5. H2HighApp Store - 2-4 h

    Reviewer cannot sign in (magic link + Sign in with Apple only, Apple provider not configured)

  6. H3HighApp Store - 10 min

    No privacy manifest while UserDefaults is used

  7. H4HighProduction - 1 day

    Paid order whose fulfilment fails: no alert, retry or refund path

  8. H5High (legal)Production - lawyer + 1 h

    Terms of service are a placeholder

  9. H6HighApp Store - 2-3 h

    Photos sent to a third-party AI without naming it or consent

  10. M1MediumSecurity - 2 h

    Provider API log stores full personal data, no retention

  11. M2MediumSecurity - 1 h

    Deleting own profile cascades into own payment history

  12. M3MediumProduction - 2 h

    Race condition can fulfil an order twice

  13. M4MediumSecurity - 1 h

    Rate limits resettable by anon, fail open on DB errors

  14. M5MediumProduction - 2 h

    No global or daily budget on AI calls

  15. M6MediumProduction - 2 h

    No error monitoring; analytics blocked by own CSP

  16. M7MediumProduction - 0.5 day

    One database for testing and production

  17. M8MediumApp Store - 15 min

    Dead button in the core wizard

  18. M9MediumApp Store - 1-2 h

    Photo feature returns 401 for guests on some devices

  19. M10Medium (legal)App Store - 1 h + lawyer

    Privacy policy: controller without address/registry number, recipients not named

  20. L1LowSecurity - 30 min

    Owner can read internal cost and margin columns

  21. L2LowSecurity - 15 min

    Open redirect in the auth callback

  22. L3LowSecurity - 15 min

    AI log accepts another user's order id

  23. L4LowSecurity - 30 min

    Webhook secret in the query string

  24. L5LowProduction - 30 min

    Stored signed file links expire after 7 days

  25. L6LowProduction - 30 min

    Lockfile not enforced in production installs; duplicate migration folders

  26. L7LowProduction - 30 min

    Missing indexes, auth.uid() RLS lint (appendix)

3. Data security findings

C1. Three tables without row level securityCRITICAL (conditional)

Evidence. provider_credentials (OAuth access and refresh tokens), provider_api_logs (every request and response body) and rate_limits are created without enable row level security in two of the repo's migrations. No migration contains grant or revoke. Supabase gave anon and authenticated full privileges on new public tables by default; this stopped for new projects from 2026-05-30 and for new tables on existing projects from 2026-10-30, and earlier tables keep their grants (Supabase changelog). These tables were created before 2026-05-30. The app itself relies on the default grants (it reads other tables with the user session and grants nothing). The publishable key ships in the iOS app, as designed.

Impact if confirmed. Anyone can read the provider tokens and act on the operator's provider account, and read every customer's name, address, phone and e-mail from the log.

Fix. enable row level security on the three tables, revoke all ... from anon, authenticated, revoke execute on the rate-limit function from public, anon, authenticated; rotate the provider tokens if the grants are confirmed. Server code uses the service role and keeps working.

C2. The app can insert orders with its own price and statusCRITICAL

Evidence. Insert policy: with check (auth.uid() = user_id) only. Nothing restricts status, price, external ids or file URLs. The price check exists only in POST /api/orders, which a direct Data API insert skips. Paths: insert status: 'paid' then call /api/orders/{id}/confirm (accepts any own paid row and calls the provider); or insert price: 0.01, pay 0.01, and the webhook compares the payment against that same value and fulfils the order. An invoice is issued as well, for any tax number typed in. Not executed; proven from code.

Fix. Dropping the policy alone would break order creation, because POST /api/orders inserts with the user session. Move that insert to the admin client, then drop the policy. Alternative: a before insert trigger forcing status = 'draft' and nulling server-owned columns.

C3. Invoicing-service API key inside every invoice linkCRITICAL

Evidence. The invoice client builds the PDF link with the account's API key as a query parameter; the webhook stores it in a column the row owner can read; the order page renders it as a link.

Impact. Every customer with an invoice holds the key to the operator's whole invoicing account.

Fix. Authenticated download route that streams the PDF server-side; rotate the key; clear the stored URLs.

M1. Personal data in the provider API log, kept foreverMEDIUM

Every request body (names, addresses, phones) is logged; nothing deletes old log or rate-limit rows; a migration comment promises pruning that does not exist. Fix: log only endpoint, status and an order reference; daily cleanup job.

M2. A user can wipe their own payment historyMEDIUM

Profile policy is for all (includes delete); deletion cascades into orders and payments; FK actions ignore RLS; the privacy policy promises to keep transaction records for several years. Fix: select/update-only policy; anonymise instead of cascading.

M4. Rate limits can be bypassedMEDIUM

The rate-limit function is executable by anon over RPC; the limiter lets requests through on DB errors. Fix: revoke execute; fail closed for expensive buckets.

L1. Cost and margin readable by the row ownerLOW

Cost and margin columns are readable by the row owner, against a code comment saying they must never be exposed.

L2. Open redirect in the auth callbackLOW

The auth callback concatenates ${origin}${next}; next=@evil.example redirects off-site. LOW, because it fires only after a successful PKCE exchange.

L3. AI log accepts another user's order idLOW

The AI route stores a client-supplied order id without an ownership check, which can block deletion of another user's order.

L4. Webhook secret in the query stringLOW

The provider webhook secret travels in the query string (the comparison is constant-time and fails closed otherwise).

Checked and fine: no secrets in the repo or history; service role key server-only; definer trigger with fixed search_path; private bucket with signed URLs; server-side JWT verification; payment webhook signature and amount checks.

4. Production readiness findings

H4. Paid order whose fulfilment fails is left aloneHIGH

On a provider error after payment, the webhook only logs to the console; the daily cron skips such orders; there is no refund code path at all and the provider's cancel function is never called. Fix: hourly retry job with alerting and a needs_attention state; documented manual refund until an API refund exists.

H5. Terms of service are a placeholderHIGH (legal)

The terms page shows "document in preparation" while payments are taken. Online services sold to consumers need published terms and pre-contract information. Needs a lawyer; legal text not reviewed.

M3. Double fulfilment raceMEDIUM

The confirm route and the webhook both do check-then-call-then-save with an unconditional update. Fix: atomically claim the row (update ... where status = 'paid' and external_id is null returning id) before calling the provider.

M5. No budget on AI callsMEDIUM

AI calls have a per-user hourly limit shared across the AI routes, but no daily or global cap; the recorded cost is never read.

M6. No error monitoring; analytics blockedMEDIUM

An error-monitoring DSN is set but no SDK is installed; analytics is initialised but blocked by the app's own CSP connect-src (confirmed on the live homepage).

M7. One database for testing and productionMEDIUM

The test build scheme and production share one database.

L5. Signed file links expireLOW

7-day signed file links are stored and never refreshed.

L6. Build hygieneLOW

Production installs ignore the lockfile; there are two identical migration folders.

L7. Performance lintLOW (appendix)

Unindexed FK columns used by RLS and queries; auth.uid() lint. Appendix-level at the current scale.

Checked and fine: all tests pass; migrations are in the repo; dev payment shortcuts are disabled in production builds (one dev route has no auth on non-production servers - never expose one publicly).

5. App Store readiness findings

H1. No in-app account deletionHIGH (5.1.1(v))

No UI or endpoint. A naive delete fails on FKs without on delete or wipes payments. Fix: server route that revokes the Sign in with Apple token (Apple auth/revoke), anonymises records that must be kept, deletes the auth user; confirmation screen.

H2. Reviewer cannot sign inHIGH (2.1)

Only Sign in with Apple (provider not configured on the backend) and an e-mail magic link. Fix: configure the provider; demo account with a fixed one-time code; review notes explaining test payments.

H3. No privacy manifestHIGH (upload rejection)

The built app has no PrivacyInfo.xcprivacy of its own; UserDefaults is used. Fix (10 min): add the manifest with NSPrivacyAccessedAPICategoryUserDefaults, reason CA92.1.

H6. Third-party AI without disclosureHIGH (5.1.2(i))

Photos go to an external AI provider; the app only says that AI is used; the privacy policy does not name the recipient. Fix: consent sheet before first use naming the provider; list it in the policy.

M8. Dead button in the wizardMEDIUM

A wizard button with an empty action and a tooltip promising a feature.

M9. Photo feature fails for guestsMEDIUM

The photo feature calls an authenticated endpoint in a guest-first flow, so on devices that use the fallback path it fails for signed-out users.

M10. Privacy policy gapsMEDIUM (legal)

The privacy policy names the controller without a registered address or registry number, lists no recipients, and its contact mailbox is on a parked domain (delivery not checked).

Checked and fine: physical service paid outside the app, so in-app purchase is not required (3.1.3(e), 3.1.5(a)); Sign in with Apple offered next to e-mail (4.8); required purpose string present; minimal entitlements; Release build succeeds.

6. What we did not check

The live database (RLS, grants, functions, buckets, Auth URL settings). Confirming query:

select c.relname, c.relrowsecurity as rls_on,
  has_table_privilege('anon', c.oid, 'select') as anon_select,
  has_table_privilege('anon', c.oid, 'insert') as anon_insert,
  has_table_privilege('anon', c.oid, 'delete') as anon_delete,
  has_table_privilege('authenticated', c.oid, 'select') as user_select
from pg_class c join pg_namespace n on n.oid = c.relnamespace
where n.nspname = 'public' and c.relkind in ('r','p','v','m')
order by c.relname;
Read-only. The owner runs it in the SQL Editor and sends back the output.
  • Backups and restore.
  • Production configuration: hosting environment variables, live vs test keys, whether invoicing is enabled.
  • Dynamic testing: no API requests; C2 and C3 proven from code.
  • Fulfilment provider billing: whether creating an order charges immediately or needs a separate step (official docs not found).
  • App Store Connect upload checks and App Privacy answers.
  • Legal review of terms and privacy policy.
  • Third-party account settings.
  • Penetration and load testing. This is a review, not a pen test or a certification.

7. Fix plan

Fix yourself with your AI tool

  1. Prompt 1 - C1 + M4 + L7

    Create a new Supabase migration that enables row level security on provider_credentials, provider_api_logs and rate_limits, revokes all privileges on them from anon and authenticated, revokes execute on the rate-limit function from public, anon and authenticated, adds the missing FK indexes, and rewrites RLS policies to use (select auth.uid()). Do not change server code.
  2. Prompt 2 - H3

    Add a PrivacyInfo.xcprivacy to the iOS app target declaring NSPrivacyAccessedAPICategoryUserDefaults with reason CA92.1. Do not change other files.

M8, L2, L5, L6, M6: one small prompt each.

Needs a developer

C3 (download route, key rotation) -> C2 (server-side insert) -> M3 + H4 (atomic claim, retry, alerts) -> H1 + M2 + L3 (account deletion) -> H2, H6, M9, M5, M7, M1.

Needs you

Terms of service with a lawyer (H5), privacy policy details (M10), test vs live keys for App Review (H2), the provider billing question (section 6).

Fixed-price audit

Want a report like this for your app?

See what the audit covers and how it works, or use the contact form and write “Audit” in the brief.