Architecture check
jackblatch/OneStopShop
8 errors, 15 warnings
7 critical findings to fix first.
8 errors and 15 warnings in the paths between 21 routes and 6 tables.
Every file was read, but 1 place in them could not be parsed — listed under the findings.
Stop it getting worse on every pull request
Findings already on main never fail a pull request; only what a pull request adds can. Nothing new slips in while you fix these. One commit adds it. No token, no account.
Route → table map
21 routes · 6 tables reached · 7 with an error
Tables
6
Rules run
20/20
Findings by route
10 of 21 routes flagged · 20/20 rules ran
- Errors
- Warnings
- No findings
23 findings
7 critical1 high9 medium6 low
Server Action addToCart (server-actions/add-to-cart.ts) can reach carts without authenticating.
An unauthenticated caller can write to carts, which holds client_secret: rows there can be planted or changed to take over an account.
- Data reached
carts(write) · sensitive:client_secret- Missing
- Authentication before the handler reaches data, and a query scoped to the caller.
- Confidence
- middleware.ts exists. A Server Action is POSTed to the page that uses it, so if the matcher covers that page and rejects signed-out requests, this is a false positive.
- Path
- Server Action addToCart (server-actions/add-to-cart.ts) → carts
Prove it
# A Server Action is a public POST endpoint. Its id ships to the browser: # find it in your built client chunks next to "addToCart". curl -i -X POST 'https://YOUR_APP/' \ -H 'Next-Action: ACTION_ID' \ -H 'content-type: text/plain;charset=UTF-8' -d '[]' # No cookie is sent. A 200 that runs the action means anyone can call addToCart.Fix
"use server"; export async function addToCart(formData: FormData) { // The page's own session check does not run for an action: check here. const user = await getCurrentUser(); // e.g. (await supabase.auth.getUser()).data.user if (!user) throw new Error("Unauthorized"); // ...scope every query to user.id }Regression test
import { addToCart } from "@/server-actions/add-to-cart"; // Make your session lookup return no user for this test. vi.mock("@/lib/auth", () => ({ getCurrentUser: async () => null })); test("addToCart refuses a signed-out caller", async () => { await expect(addToCart(new FormData())).rejects.toThrow(); });Intended? This cannot be declared intentional: a public write is not a design choice the check will bless. Accept it as known debt: run
wyro-check --update-baselineand commit the ledger. It stays visible and CI fails only on new findings.auth-before-dataServer Action updateCart (server-actions/update-cart.ts) can reach carts without authenticating.
An unauthenticated caller can write to carts, which holds client_secret: rows there can be planted or changed to take over an account.
- Data reached
carts(write) · sensitive:client_secret- Missing
- Authentication before the handler reaches data, and a query scoped to the caller.
- Confidence
- middleware.ts exists. A Server Action is POSTed to the page that uses it, so if the matcher covers that page and rejects signed-out requests, this is a false positive.
- Path
- Server Action updateCart (server-actions/update-cart.ts) → carts
Prove it
# A Server Action is a public POST endpoint. Its id ships to the browser: # find it in your built client chunks next to "updateCart". curl -i -X POST 'https://YOUR_APP/' \ -H 'Next-Action: ACTION_ID' \ -H 'content-type: text/plain;charset=UTF-8' -d '[]' # No cookie is sent. A 200 that runs the action means anyone can call updateCart.Fix
"use server"; export async function updateCart(formData: FormData) { // The page's own session check does not run for an action: check here. const user = await getCurrentUser(); // e.g. (await supabase.auth.getUser()).data.user if (!user) throw new Error("Unauthorized"); // ...scope every query to user.id }Regression test
import { updateCart } from "@/server-actions/update-cart"; // Make your session lookup return no user for this test. vi.mock("@/lib/auth", () => ({ getCurrentUser: async () => null })); test("updateCart refuses a signed-out caller", async () => { await expect(updateCart(new FormData())).rejects.toThrow(); });Intended? This cannot be declared intentional: a public write is not a design choice the check will bless. Accept it as known debt: run
wyro-check --update-baselineand commit the ledger. It stays visible and CI fails only on new findings.auth-before-dataServer Action getStripeAccountDetails (server-actions/stripe/account.ts) can reach payments without authenticating.
Anyone, signed in or not, can read payments — a table that holds sensitive data.
- Data reached
payments(read) · sensitive table- Missing
- Authentication before the handler reaches data, and a query scoped to the caller.
- Confidence
- middleware.ts exists. A Server Action is POSTed to the page that uses it, so if the matcher covers that page and rejects signed-out requests, this is a false positive.
- Path
- Server Action getStripeAccountDetails (server-actions/stripe/account.ts) → payments
Prove it
# A Server Action is a public POST endpoint. Its id ships to the browser: # find it in your built client chunks next to "getStripeAccountDetails". curl -i -X POST 'https://YOUR_APP/' \ -H 'Next-Action: ACTION_ID' \ -H 'content-type: text/plain;charset=UTF-8' -d '[]' # No cookie is sent. A 200 that runs the action means anyone can call getStripeAccountDetails.Fix
"use server"; export async function getStripeAccountDetails(formData: FormData) { // The page's own session check does not run for an action: check here. const user = await getCurrentUser(); // e.g. (await supabase.auth.getUser()).data.user if (!user) throw new Error("Unauthorized"); // ...scope every query to user.id }Regression test
import { getStripeAccountDetails } from "@/server-actions/stripe/account"; // Make your session lookup return no user for this test. vi.mock("@/lib/auth", () => ({ getCurrentUser: async () => null })); test("getStripeAccountDetails refuses a signed-out caller", async () => { await expect(getStripeAccountDetails(new FormData())).rejects.toThrow(); });Intended? This cannot be declared intentional: public sensitive data is not a design choice the check will bless. Accept it as known debt: run
wyro-check --update-baselineand commit the ledger. It stays visible and CI fails only on new findings.auth-before-data
20 more findings, plus a one-click fix prompt for Cursor or Claude Code. Free with GitHub sign-in.
1 place could not be parsed, so any route or table declared there is missing from this report:
app/api/uploadthing/route.ts— Next route file exports no recognised method handler
What this is
Wyro reads the repository’s routes and data models and checks the paths between them: whether a route can reach a table without passing a guard, whether a datastore holding personal data is exposed to a public read, whether an endpoint that issues credentials requires the credentials it issues.
It is rule-based, not a model. The same commit produces the same result every time, and it does not guess at business rules it cannot see. A rule with nothing to look at is reported as not having run — never as a pass.
This check runs on public source through GitHub’s own API and needs no account. A free account adds the findings, the editable architecture canvas and a CI gate that is free on private repositories too. No card required.
Maintain this repository? You can have this report removed, and a real vulnerability is disclosed to you privately before it is published. How public reports are handled.