Code audit

Public API access safety

Enji Guard checks whether your public API lets callers read, change or do what they shouldn't.

  • Repository and branch
  • Read-only

What did the latest API access audit find?

Worked 4 s · Enji Guard via MCP  ›

Score 36/100 — critical. 3 findings, the two most serious:

  • CriticalAny buyer can see every shop's orders
  • CriticalAny API key can refund orders in any shop

Fix the two critical ones.

Worked 57 s  ›

Done. Both critical ones fixed:

  • Buyers see only their own orders in their shop
  • Refunds need refund permission in that shop

Access tests pass. Ready for your review.

What the audit checks

Six areas, from allowed operations to admin calls.

  • Allowed operations

    Role and scope checks in handlers and alternate entry points.

  • Object access

    Which objects a request can read or change, one at a time or in bulk.

  • Access boundaries

    Isolation between users, projects or workspaces across service calls.

  • Fields that affect permissions

    How the API handles roles, owners and scope IDs supplied by clients.

  • Data in responses

    Data visible to the caller in responses, exports and subscriptions.

  • Privileged operations

    Who can call administrative and service operations exposed by the API.

How the API enforces access

What a report can find at each step

  1. External request

    Which operations are reachable by anonymous and signed-in clients.

  2. Caller

    How the API identifies the caller and sources trusted context.

  3. Permissions and scope

    Where roles and scope are enforced and which input can affect them.

  4. Data access and changes

    Which objects services and storage actually select or change.

  5. Response

    Which data the caller receives in responses and linked outputs.

What's in the report

  • A 0–100 score
  • Access findings with code references and recommendations
  • Scope — what was checked and what wasn't

What the audit is not

  • Does not send test requests to live services
  • Does not audit internal APIs or service calls on their own
  • Does not flag route names on their own

Connect a repository

GitHub or GitLab. The audit doesn't change your code.