> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# kysely-scope-unverified

> A Kysely read lacks the row scope required by the declared policy.

## What it flags

An executed Kysely select on a configured table needs an equality predicate using the scalar returned by the trusted helper. Dynamic table names, composed builders and predicates whose structure is unavailable produce contextual findings. Subqueries in predicates or projections that may read a configured table require review of their own row scope.

Contextual findings are excluded from the default security exit status. Use `--include-contextual` to include them in the report and apply the configured failure threshold.

## Configuration

```json theme={null}
{
  "performance": {
    "kyselyScopes": {
      "invoice": { "field": "organizationId", "from": "@app/auth", "export": "requireOrg" }
    }
  }
}
```

With this policy, `db.selectFrom('invoice').selectAll().where('organizationId', '=', requireOrg()).execute()` verifies the row scope when types are available and strict null checks are enabled.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.