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
- 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.)
- 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)
- Every invoice link handed to a customer contains the operator's invoicing-service API key. (C3)
- 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)
- 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
| Step | Who | Effort |
|---|---|---|
| 1. Run the section 6 query and send us the result | you | 2 minutes |
| 2. Apply the C1 SQL; reconnect the provider to issue new tokens | developer | 30 minutes |
| 3. Remove the API key from invoice links and rotate it (C3) | developer | 2-3 hours |
| 4. Block direct order inserts from the app (C2) | developer | half a day |
| 5. Account deletion, privacy manifest, reviewer sign-in, AI disclosure | developer | 2-3 days |
| 6. Real terms of service; fulfilment-failure alert and refund path | you + lawyer, developer | 1-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
3 tables without RLS, incl. provider OAuth tokens and logs with personal data
Order insert policy lets the client set price and status
Invoicing-service API key embedded in invoice URLs shown to customers
No account deletion; deletion would fail on a foreign key or wipe payment records
Reviewer cannot sign in (magic link + Sign in with Apple only, Apple provider not configured)
No privacy manifest while
UserDefaultsis usedPaid order whose fulfilment fails: no alert, retry or refund path
Terms of service are a placeholder
Photos sent to a third-party AI without naming it or consent
Provider API log stores full personal data, no retention
Deleting own profile cascades into own payment history
Race condition can fulfil an order twice
Rate limits resettable by
anon, fail open on DB errorsNo global or daily budget on AI calls
No error monitoring; analytics blocked by own CSP
One database for testing and production
Dead button in the core wizard
Photo feature returns 401 for guests on some devices
Privacy policy: controller without address/registry number, recipients not named
Owner can read internal cost and margin columns
Open redirect in the auth callback
AI log accepts another user's order id
Webhook secret in the query string
Stored signed file links expire after 7 days
Lockfile not enforced in production installs; duplicate migration folders
Missing indexes,
auth.uid()RLS lint (appendix)
| ID | Severity | Area | Finding | Effort |
|---|---|---|---|---|
| C1 | Critical (conditional) | Security | 3 tables without RLS, incl. provider OAuth tokens and logs with personal data | 30 min |
| C2 | Critical | Security | Order insert policy lets the client set price and status | 0.5 day |
| C3 | Critical | Security | Invoicing-service API key embedded in invoice URLs shown to customers | 2-3 h |
| H1 | High | App Store | No account deletion; deletion would fail on a foreign key or wipe payment records | 1-1.5 days |
| H2 | High | App Store | Reviewer cannot sign in (magic link + Sign in with Apple only, Apple provider not configured) | 2-4 h |
| H3 | High | App Store | No privacy manifest while UserDefaults is used | 10 min |
| H4 | High | Production | Paid order whose fulfilment fails: no alert, retry or refund path | 1 day |
| H5 | High (legal) | Production | Terms of service are a placeholder | lawyer + 1 h |
| H6 | High | App Store | Photos sent to a third-party AI without naming it or consent | 2-3 h |
| M1 | Medium | Security | Provider API log stores full personal data, no retention | 2 h |
| M2 | Medium | Security | Deleting own profile cascades into own payment history | 1 h |
| M3 | Medium | Production | Race condition can fulfil an order twice | 2 h |
| M4 | Medium | Security | Rate limits resettable by anon, fail open on DB errors | 1 h |
| M5 | Medium | Production | No global or daily budget on AI calls | 2 h |
| M6 | Medium | Production | No error monitoring; analytics blocked by own CSP | 2 h |
| M7 | Medium | Production | One database for testing and production | 0.5 day |
| M8 | Medium | App Store | Dead button in the core wizard | 15 min |
| M9 | Medium | App Store | Photo feature returns 401 for guests on some devices | 1-2 h |
| M10 | Medium (legal) | App Store | Privacy policy: controller without address/registry number, recipients not named | 1 h + lawyer |
| L1 | Low | Security | Owner can read internal cost and margin columns | 30 min |
| L2 | Low | Security | Open redirect in the auth callback | 15 min |
| L3 | Low | Security | AI log accepts another user's order id | 15 min |
| L4 | Low | Security | Webhook secret in the query string | 30 min |
| L5 | Low | Production | Stored signed file links expire after 7 days | 30 min |
| L6 | Low | Production | Lockfile not enforced in production installs; duplicate migration folders | 30 min |
| L7 | Low | Production | Missing indexes, auth.uid() RLS lint (appendix) | 30 min |
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).
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.
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).
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;- 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
Prompt 1 - C1 + M4 + L7
Create a new Supabase migration that enables row level security on
provider_credentials,provider_api_logsandrate_limits, revokes all privileges on them fromanonandauthenticated, revokes execute on the rate-limit function frompublic,anonandauthenticated, adds the missing FK indexes, and rewrites RLS policies to use(select auth.uid()). Do not change server code.Prompt 2 - H3
Add a
PrivacyInfo.xcprivacyto the iOS app target declaringNSPrivacyAccessedAPICategoryUserDefaultswith reasonCA92.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.