Antra
How it worksStar1Get Started
Star1
Antra
How it worksStar1Get Started
Star1
Documentation
  • Introduction
  • Installation
  • Quick start
  • Configuration basics
  • Monorepos
  • Trust boundaries
  • Findings and severity
  • Schema providers
  • Suppressions and baselines
  • antra init
  • antra scan
  • antra sync
  • antra doctor
  • antra baseline
  • antra trace
  • antra watch
  • antra fix
  • antra query
  • antra studio
  • Studio
  • Launching Studio
  • Reading the graph
  • Configuration reference
  • BG-001: Server-to-client leak
  • BG-002: Unvalidated input
  • BG-003: Opaque object pass
  • BG-004: Secret in markup
  • GitHub Actions
  • Introduction
  • Installation
  • Quick start
  • Configuration basics
  • Monorepos
  • Trust boundaries
  • Findings and severity
  • Schema providers
  • Suppressions and baselines
  • antra init
  • antra scan
  • antra sync
  • antra doctor
  • antra baseline
  • antra trace
  • antra watch
  • antra fix
  • antra query
  • antra studio
  • Studio
  • Launching Studio
  • Reading the graph
  • Configuration reference
  • BG-001: Server-to-client leak
  • BG-002: Unvalidated input
  • BG-003: Opaque object pass
  • BG-004: Secret in markup
  • GitHub Actions

Schema providers

How the analysis learns which fields are sensitive.

The rules need to know which values must not cross a boundary. That answer lives in your data layer, and it is different for every project. Antra reads it from a provider instead of asking you to write it out by hand.

How it works

A provider detects the shape of your data layer and extracts the field names that are sensitive. antra init writes that extraction to a static snapshot, and every later scan reads the snapshot rather than your database.

That is why init and sync are separate from scan: the schema is read once, and the analysis stays a purely local operation with no connection to your database at scan time.

Providers

ProvideridReads
PrismaprismaYour Prisma schema
ZodzodZod schemas, where field names and intent are declared in code
SupabasesupabaseSupabase table definitions
OpenAPIopenapiAn OpenAPI document describing your API's fields
DrizzledrizzleYour Drizzle table definitions
Zero-schemazero-schemaNothing. The fallback for projects with no schema to read

Providers are declared under providers in antra.config.json, each entry carrying its id from the table above.

Refreshing the snapshot

Run antra sync after anything that changes which fields exist or which are sensitive:

antra sync

A stale snapshot is the quiet failure mode of schema-aware analysis. It does not produce an error. It produces a scan that is confident about an outdated picture of your data, missing fields that were added and flagging ones that were renamed away.

When the provider can't see it

Some sensitive names live outside any schema: a field assembled in a helper, a value computed at runtime. For those, list them under sensitiveFields in the config. That is the escape hatch, and it is deliberately explicit. A name the analysis was told to treat as sensitive, rather than one it inferred.

When there is no schema at all

A project with no schema to introspect (a backend-for-frontend, or anything that fetches from an API you do not own) still gets analyzed. The zero-schema provider reads nothing, and the analysis falls back to heuristics on names and on the shape of the code. That is the mode BG-003 is built for: it needs no schema, because it fires on the pattern of an unprojected result being handed to a client rather than on the knowledge of which fields are sensitive.

A scan run with no antra.config.json at all reports this state explicitly: zero taint sources, heuristics only.

Previous
Findings and severity
Next
Suppressions and baselines
On this page
  • How it works
  • Providers
  • Refreshing the snapshot
  • When the provider can't see it
  • When there is no schema at all