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

antra query

Query the local SQLite analysis database.

Read-only SQL over the findings database that scans record into.

Usage

antra query [sql] [path]

Omit sql and the command prints the database schema and a few example queries. That is the fastest way to learn the shape of the data.

antra query
antra query "select ruleId, count(*) from findings group by ruleId"
antra query "select * from findings limit 20" --format csv

Flags

FlagDefaultWhat it does
--format <type>tabletable, json, or csv.

What is in there

.antra/antra-findings.sqlite holds the findings that antra scan recorded. A scan is stored unless you pass --no-store, so the database is a history of what the analysis has seen, not just its latest state.

antra query is the escape hatch for questions the other commands do not answer: which rules fire most, whether a file is getting better or worse across recent scans, what the largest trace is.

Note

The statement is read-only by intent. Reach for the SQLite file directly if you need to inspect or reset it. query is for reading.

Previous
antra fix
Next
antra studio
On this page
  • Usage
  • Flags
  • What is in there