An end-to-end example of what a review report from OHMYVIBECODE LTD looks like.
Published with the client’s permission. Northgate Physio Ltd is a two-clinic physiotherapy practice; findings and remediation detail are reproduced here in full. Published by Joshua Thweny.
Engagement summary
Client
Northgate Physio Ltd — two-clinic physiotherapy practice
Target
Next.js 15 + Supabase + Stripe web app with an LLM intake-triage helper, built over three weekends with a coding assistant before launch
Authorisation
Signed scope and Rules of Engagement from the clinic director; read-only git archive at commit a4c91e2 plus an isolated staging project seeded with synthetic data
AI handling choice
Declined by client because patient health notes sit in the real schema — review performed 100% manually with local static tooling
Effort
3 days review, 0.5 day fix verification on commit f81b04d
Reviewer
Joshua Thweny, OHMYVIBECODE LTD
Findings overview
Six issues were identified before public launch: one critical, two high, two medium and one low. The critical and high issues would have exposed every patient’s intake notes and bookings to anyone visiting the site. All six were patched and verified before the app opened to patients.
The variable NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY was referenced from a shared helper imported by both a Server Action and a client component. Next.js inlined the full JWT into a public chunk under .next/static/chunks/, giving any visitor unrestricted read and write access to every table and storage bucket in the project, bypassing row-level security.
Remediation
Rotated the service-role secret in Supabase, renamed the variable without NEXT_PUBLIC_, marked app/lib/supabaseAdmin.ts with import "server-only" so any future client import fails the build, and moved the single browser caller onto the anon client.
Fix check
Built the production bundle cleanly and searched .next/static for both the new JWT prefix and service_role claims; zero matches. Confirmed the old key returns HTTP 401.
NPB-02 · intake_notes table created without row-level security enabled
An assistant-generated migration created public.intake_notes (holding patient injury notes and phone numbers) without ALTER TABLE ... ENABLE ROW LEVEL SECURITY. Because Supabase grants default table privileges on public to the anon and authenticated roles, any holder of the public anon key could query all rows through the REST endpoint.
Remediation
Enabled and forced row-level security on public.intake_notes, revoked anon privileges, and added SELECT and INSERT policies restricting access to clinicians assigned to the clinic that owns the appointment, plus the patient matching auth.uid().
Fix check
Queried pg_tables and pg_policies to confirm rowsecurity = true, then verified with two separate test accounts that user A receives zero rows when querying user B’s appointment notes.
NPB-03 · cancelAppointment Server Action trusts caller-supplied clinicId without checking session role
Severity
High — Fixed and verified
Location
app/dashboard/actions.ts (lines 42–67)
Observation
The dashboard hid the cancel button from non-staff users in JSX, but the underlying "use server" function accepted { appointmentId, clinicId } and ran an unscoped update using the admin client without reading the session or checking that the caller belonged to clinicId.
Remediation
Replaced the admin client call with a session-bound server client, resolved the caller’s clinic membership on the server, and required role IN ("owner", "clinician") on the appointment’s own clinic before updating.
Fix check
Added an integration test calling cancelAppointment as a patient of the same clinic and as a clinician of a second clinic; both now fail with an authorisation error and leave the row unchanged.
NPB-04 · Booking-triage assistant can email arbitrary recipients from untrusted intake text
Severity
Medium — Fixed and verified
Location
app/lib/triageAgent.ts (lines 88–131)
Observation
A staff-triggered assistant summarised free-text patient intake notes and had a sendFollowUpEmail({ to, subject, body }) tool backed by Resend. Because to was chosen by the model from the same context window as untrusted intake text, instructions inside an intake form could direct the tool to email clinic context to an external address.
Remediation
Removed the to parameter from the tool schema entirely: code now looks up the verified email address on the appointment record and queues a draft that a clinician approves in the UI before anything is sent.
Fix check
Confirmed the tool schema exposes only { body } and writes a pending draft row; no outbound Resend call occurs until the staff approval endpoint runs.
NPB-05 · Stripe deposit webhook parsed JSON before signature check and lacked replay tracking
Severity
Medium — Fixed and verified
Location
app/api/stripe/webhook/route.ts (lines 11–39)
Observation
During local testing the signature check had been commented out after request.json() broke raw-body verification, leaving the route accepting any POST with a plausible checkout.session.completed payload to mark a booking deposit paid.
Remediation
Read the raw body with request.text(), restored stripe.webhooks.constructEvent against STRIPE_WEBHOOK_SECRET, and recorded processed event.id values in a unique column before updating booking state.
Fix check
Unsigned requests and requests signed with a wrong secret return HTTP 400; replaying a valid captured test event leaves the booking unchanged on the second delivery.
NPB-06 · No Content-Security-Policy header and no per-user cap on /api/triage
Severity
Low — Fixed and verified
Location
next.config.mjs, app/api/triage/route.ts
Observation
The deployment served default framework headers with no CSP or framing policy, and the authenticated triage endpoint had no per-clinic daily call cap or max_tokens limit.
Remediation
Added a strict CSP, X-Frame-Options: DENY, Referrer-Policy and HSTS in edge configuration, set max_tokens: 600, capped input length, and added a per-clinic daily counter.
Fix check
Confirmed headers on staging responses and verified the 51st triage request in a day returns HTTP 429.
Scope limits
A time-boxed source and configuration review reduces the chance of shipping common high-impact flaws; it is not a guarantee that no other defects exist. Load testing, Stripe and Supabase platform internals, staff device security and clinical regulatory advice were outside scope.