Docs / Start
Configuration
All settings load from environment variables via pydantic-settings. The .env.example documents every variable with REQUIRED / OPTIONAL / SECRET labels; the key ones are below.
Core
| Variable | Default | Description |
|---|
| LOG_LEVEL | INFO | DEBUG · INFO · WARNING · ERROR · CRITICAL |
| JSON_LOGS | true | Single-line JSON logs (recommended in production) |
| DEBUG | false | Verbose API errors — never true in production |
| HOST / PORT | 0.0.0.0 / 8000 | Uvicorn bind (Docker maps host :8001) |
Secrets & integration
| Variable | Description |
|---|
| GITHUB_TOKEN | Default PAT (scopes: repo, read:org). Overridable per scan request; leave blank to require per-request tokens. |
| GITHUB_API_BASE | Override for GitHub Enterprise Server (default api.github.com) |
| PERISCOPE_API_KEY | API key for /agent/* routes — required in production (startup fails without it) |
| PERISCOPE_SECRET_KEY | Fernet key(s) for encryption at rest; multiple keys enable MultiFernet rotation |
Database
| DATABASE_URL | sqlite:///scanner.db (dev) or postgresql+psycopg2://… (production) |
| FINDINGS_WRITE_MODE | immediate (crash-safe, default) or batch (faster) |
| DB_WRITE_TIMEOUT / DB_WRITE_MAX_RETRIES | 30 s per attempt · 3 retries with exponential backoff |
| FINDINGS_BATCH_FLUSH_SIZE | Findings per transaction chunk (default 50) |
Scanning defaults
| DEFAULT_SCAN_TYPE | shallow | deep |
| DEFAULT_SCAN_HEAD_FILES / _WORKFLOWS / _ALL_BRANCHES | Per-flag overrides, all true by default |
| DEFAULT_SCAN_ALL_COMMITS | false — enables deep history walking when true |
| DEFAULT_MAX_COMMITS / DEFAULT_MAX_BRANCHES | 500 commits · 50 branches per repo in deep scans |
| AUTO_TRIGGER_AGENT / ENABLE_SARIF_OUTPUT | Auto-run the agent loop after scans · write SARIF alongside text reports |
Source: backend/.env.example (379 lines, 40+ variables) · radar_scanner/core/config.py