Files
2026-08-14 20:32:47 -07:00
..
2026-08-14 20:32:47 -07:00
2026-08-04 17:01:23 -07:00
2026-07-08 22:29:39 -07:00
2026-08-14 15:38:45 -07:00
2026-07-28 15:02:41 -07:00
2026-08-11 00:54:55 -07:00
2026-06-12 00:40:15 -07:00
2026-08-07 23:22:10 -07:00
2026-08-13 09:56:43 -07:00
2026-08-07 21:20:25 -07:00
2026-08-07 21:20:25 -07:00
fix
2026-08-14 07:57:12 -07:00

Backend Tests

Organized by concern. All tests run with uv run pytest tests/backend/.

tests/backend/
  auth/          ← identity, providers, vault, session config
  routes/        ← Flask endpoint tests (tables, agents, sessions, credentials)
  data/          ← loaders, connectors, workspace, parquet, table names
                   includes test_workspace_path_safety.py (FINDING-4)
  agents/        ← AI agents, model registry, prompts
                   includes test_tool_path_safety.py (FINDING-2)
  security/      ← code signing, sanitization, URL allowlist, sandbox,
                   scratch_serve path safety (FINDING-1),
                   local_folder deployment restriction (FINDING-3),
                   startup safety checks (FINDING-5)
  fixtures/      ← shared test data (CSV, JSON, parquet)

Security audit test files (added per design-docs/issues/002-arbitrary-file-read-audit.md):

File FINDING What it tests
security/test_scratch_serve.py #1 scratch_serve path traversal, send_file usage
agents/test_tool_path_safety.py #2 Agent tool path confinement (_tool_read_file, etc.)
security/test_local_folder_deployment.py #3 local_folder disabled in multi-user mode
data/test_workspace_path_safety.py #4 Workspace.__init__ sanitizes identity paths and uses ConfinedDir
security/test_startup_safety.py #5 Startup warning for unsafe sandbox config

Docker-gated database tests live separately in tests/database-dockers/ and are not auto-discovered by pytest.