Architecture check

fastapi/full-stack-fastapi-template/backend

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

1 error, 7 warnings

1 critical finding to fix first.

1 error and 7 warnings in the paths between 23 routes and 2 tables.

Stop it getting worse on every pull request

Findings already on master 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/fastapi/full-stack-fastapi-template?path=backend)](https://wyro.in/scan/fastapi/full-stack-fastapi-template?path=backend)

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

Share on X

Route → table map

23 routes · 2 tables reached · 1 with an error

error warning guarded
POST /private/users · 1 error · validPOST /private/usersvalidPOST /login/access-token · 2 warnings · no guardPOST /login/access-tokenno guardPOST /password-recovery/{email} · 2 warnings · no guardPOST /password-recovery/{email}no guardPOST /reset-password · 1 warning · validPOST /reset-passwordvalidPOST /users/signup · 1 warning · validPOST /users/signupvalidGET /utils/health-check · 1 warning · no guardGET /utils/health-checkDELETE /users/{user_id} · authDELETE /users/{user_id}authGET /items · authGET /itemsauthGET /items/{id} · authGET /items/{id}authPOST /items · auth, validPOST /itemsauthvalidPUT /items/{id} · auth, validPUT /items/{id}authvalidDELETE /items/{id} · authDELETE /items/{id}authPOST /password-recovery-html-content/{email} · authPOST /password-recovery-html-content/…authGET /users · authGET /usersauthPOST /users · auth, validPOST /usersauthvalidPATCH /users/me · auth, validPATCH /users/meauthvalidGET /users/{user_id} · authGET /users/{user_id}authPATCH /users/{user_id} · auth, validPATCH /users/{user_id}authvalidPOST /login/test-token · authPOST /login/test-tokenauthPATCH /users/me/password · auth, validPATCH /users/me/passwordauthvalidGET /users/me · authGET /users/meauthDELETE /users/me · authDELETE /users/meauthPOST /utils/test-email · authPOST /utils/test-emailauthuseruseritemitem

Findings

8

1 error7 warningsDetails

Routes

23

6 with findingsGraph

Tables

2

Data models read

Rules run

20/20

19/19 source files read

Findings by route

6 of 23 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

8 findings

1 critical2 medium5 low

  • Criticalhigh confidencePOST /private/users can reach user without authenticating.

    An unauthenticated caller can write to user, which holds hashed_password: rows there can be planted or changed to take over an account.

    Data reached
    user (write) · sensitive: email, hashed_password
    Missing
    Authentication before the handler reaches data, and a query scoped to the caller.
    Confidence
    No middleware, guard or wrapper is applied to this route anywhere in backend/app/api/routes/private.py.
    Path
    POST /private/users → user

    Prove it

    # No cookie, no Authorization header.
    curl -i -X POST 'https://YOUR_API/private/users' \
      -H 'content-type: application/json' -d '{}'
    # Expect 401. A 2xx means anyone on the internet can do this.

    Fix

    @app.post("/private/users")
    def handler(user: User = Depends(get_current_user)):
        # get_current_user raises HTTPException(401) when the token is missing
        ...

    Regression test

    def test_post_requires_auth(client):
        res = client.post("/private/users")
        assert res.status_code == 401

    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

  • Mediumlow confidencePOST /login/access-token has no validator or rate limiter attached.

    POST /login/access-token accepts any body at any rate. Malformed input reaches your handler, and nothing stops a script calling it in a loop.

    Missing
    Schema validation of the request body, and a rate limit.
    Confidence
    Inline validation (zod.parse, pydantic models) and platform rate limits are not always visible to the parser. Check before acting.

    Prove it

    curl -i -X POST 'https://YOUR_API/login/access-token' \
      -H 'content-type: application/json' -d '{"unexpected": {"nested": [1,2,3]}}'
    # Expect 422. A 2xx or 500 means the body is not validated.

    Fix

    class Body(BaseModel):
        name: constr(max_length=200)
    
    @app.post("/login/access-token")
    def handler(body: Body): ...

    Regression test

    def test_post_rejects_unexpected_body(client):
        res = client.post("/login/access-token", json={"unexpected": True})
        assert res.status_code == 422

    Intended? If validation and rate limiting happen upstream (an API gateway, Vercel Firewall), turn the rule off for the repo: { "policy": { "rules": { "public-entry-guarded": "off" } } } in wyro.json.

    public-entry-guarded

  • Mediumlow confidencePOST /password-recovery/{email} has no validator or rate limiter attached.

    POST /password-recovery/{email} accepts any body at any rate. Malformed input reaches your handler, and nothing stops a script calling it in a loop.

    Missing
    Schema validation of the request body, and a rate limit.
    Confidence
    Inline validation (zod.parse, pydantic models) and platform rate limits are not always visible to the parser. Check before acting.

    Prove it

    curl -i -X POST 'https://YOUR_API/password-recovery/1' \
      -H 'content-type: application/json' -d '{"unexpected": {"nested": [1,2,3]}}'
    # Expect 422. A 2xx or 500 means the body is not validated.

    Fix

    class Body(BaseModel):
        name: constr(max_length=200)
    
    @app.post("/password-recovery/{email}")
    def handler(body: Body): ...

    Regression test

    def test_post_rejects_unexpected_body(client):
        res = client.post("/password-recovery/1", json={"unexpected": True})
        assert res.status_code == 422

    Intended? If validation and rate limiting happen upstream (an API gateway, Vercel Firewall), turn the rule off for the repo: { "policy": { "rules": { "public-entry-guarded": "off" } } } in wyro.json.

    public-entry-guarded

5 more findings, plus a one-click fix prompt for Cursor or Claude Code. Free with GitHub sign-in.

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.