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

Configuration basics

What the config file is for, and when you need to touch it.

antra init writes an antra.config.json at your project root. For many projects it never needs editing: the defaults are the analysis as designed, and the file exists so that the parts which depend on your project can be stated rather than guessed.

The three things you will actually change

Which fields are sensitive. The analysis needs to know what counts as a value that must not cross. Schema providers cover the common case by reading your data layer; sensitiveFields is the escape hatch for names that live outside it.

Which sanitizers you use. When a value has already been validated, the analysis should stay quiet. It recognizes sanitizers by name, so a helper of yours that it does not know about is a finding you will keep seeing until it is declared.

Which rules run. If a rule is wrong for your project, say so in config rather than suppressing findings one at a time.

Editing it safely

The file is JSON, validated on load. antra doctor reads it and tells you whether it parses, which is faster than discovering the problem from a scan that returns nothing useful.

antra doctor
antra doctor --format json

Field reference

The full field list (version, frameworkAdapter, providers, keywords, sensitiveFields, sanitizers, and rules) is in the configuration reference.

Warning

A config that fails to load is not the same as a project with no findings. If a scan comes back empty on code you expect to be flagged, run doctor before believing it.

Previous
Quick start
Next
Monorepos
On this page
  • The three things you will actually change
  • Editing it safely
  • Field reference