Architecture check

jackblatch/OneStopShop

mainRule-based: the same commit always gets the same result

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.

README badge

wyro architecture: checked[![wyro architecture](https://wyro.in/api/badge/jackblatch/OneStopShop)](https://wyro.in/scan/jackblatch/OneStopShop)

Live counts that update on every push, linking back to this report.

Share on X

Route → table map

21 routes · 6 tables reached · 7 with an error

error warning guarded
Server Action createPaymentIntent (server-actions/stripe/payment.ts) · 2 errors · 1 warning · no guardServer Action createPaymentIntent (se…no guardServer Action getCart (server-actions/get-cart-details.ts) · 1 error · 3 warnings · no guardServer Action getCart (server-actions…no guardServer Action getPaymentIntentDetails (server-actions/stripe/payment.ts) · 1 error · 2 warnings · no guardServer Action getPaymentIntentDetails…no guardServer Action addToCart (server-actions/add-to-cart.ts) · 1 error · 1 warning · no guardServer Action addToCart (server-actio…no guardServer Action updateCart (server-actions/update-cart.ts) · 1 error · 1 warning · no guardServer Action updateCart (server-acti…no guardServer Action getStripeAccountDetails (server-actions/stripe/account.ts) · 1 error · 1 warning · no guardServer Action getStripeAccountDetails…no guardServer Action deleteProduct (server-actions/products.ts) · 1 error · validServer Action deleteProduct (server-a…validServer Action getDetailsOfProductsOrdered (server-actions/orders.ts) · 2 warnings · no guardServer Action getDetailsOfProductsOrd…no guardServer Action getProductsBySearchTerm (server-actions/product-search.ts) · 2 warnings · no guardServer Action getProductsBySearchTerm…no guardServer Action getStoreSlug (server-actions/store-details.tsx) · 2 warnings · no guardServer Action getStoreSlug (server-ac…no guardPOST /api/stripe/webhook · authPOST /api/stripe/webhookauthPOST /api/product · authPOST /api/productauthServer Action createStore (server-actions/store.ts) · authServer Action createStore (server-act…authServer Action updateStore (server-actions/store.ts) · auth, validServer Action updateStore (server-act…authvalidServer Action createProduct (server-actions/products.ts) · auth, validServer Action createProduct (server-a…authvalidServer Action updateProduct (server-actions/products.ts) · auth, validServer Action updateProduct (server-a…authvalidServer Action hasConnectedStripeAccount (server-actions/stripe/account.ts) · auth, validServer Action hasConnectedStripeAccou…authvalidServer Action createAccountLink (server-actions/stripe/account.ts) · authServer Action createAccountLink (serv…authServer Action updateStripeAccountStatus (server-actions/stripe/account.ts) · authServer Action updateStripeAccountStat…authServer Action getPaymentIntents (server-actions/stripe/payment.ts) · authServer Action getPaymentIntents (serv…authServer Action getStoreId (server-actions/store-details.tsx) · authServer Action getStoreId (server-acti…authpaymentspaymentscartscartsstoresstoresproductsproductsaddressesaddressesordersorders

Findings

23

8 errors15 warningsDetails

Routes

21

10 with findingsGraph

Tables

6

Data models read

Rules run

20/20

160/160 source files read

Findings by route

10 of 21 routes flagged · 20/20 rules ran

  • Errors
  • Warnings
  • No findings
Each column is one route, in the order it is declaredRoute names unlock with a free account

23 findings

7 critical1 high9 medium6 low

  • Criticalmedium confidenceServer 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-baseline and commit the ledger. It stays visible and CI fails only on new findings.

    auth-before-data

  • Criticalmedium confidenceServer 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-baseline and commit the ledger. It stays visible and CI fails only on new findings.

    auth-before-data

  • Criticalmedium confidenceServer 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-baseline and 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.