Skip to content

Security model ​

This page lists what Veritas protects, which inputs it treats as untrusted, and the control for each threat. The short version: repository content, web pages and model output are data, never instructions; network access is off by default; nothing changes project files without an explicit approval; and project code is trusted code, so analyse a repository you do not trust in an isolated environment (Untrusted repositories).

What is protected ​

The user's source tree and git state, credentials in the environment (API keys, GITHUB_TOKEN), CI secrets, and the integrity of Veritas's claims.

Inputs treated as untrusted ​

Repository content (code, docs, tests, configs), Issues and PRs, web pages, LLM output, mutation and solver output, and pull requests from forks.

Threats and controls ​

ThreatControl
Prompt injection in docs, Issues or web pagesCollected text is stored as data with trust: untrusted_data; it never selects tools, commands or policy. LLM prompts quote it as data.
LLM provider CLI acting on the machineclaude-code runs with no tools (--tools ""), no MCP servers, settings or sessions. codex runs in its read-only sandbox (no writes, no network for commands) without the user's config, rules, MCP servers, browser, apps or web search; Codex cannot turn off its read-only shell, so it could read local files: codex is used only when llm.allowCodexFileReads is set. Both run in an empty temporary directory, get no API keys, and never run with --offline. Whatever a model returns is kept only when grounded in the quoted statement (numbers and text must come from it), so file contents cannot reach artifacts or reports.
Path traversal and symlink escapeEvery path Veritas writes to is checked to stay inside the project: .., absolute paths outside it, NUL bytes and symbolic links that resolve outside it are rejected.
Executing project codeProject code is trusted code (ADR 0011): Veritas runs it with the same trust as the project's own test suite. Property tests and counterexample replay call project functions in a separate Node.js process under the permission model as defence in depth, not as a security boundary: read access to the project only, no writes, child processes, workers or code generation; network is blocked (Node.js 25+: the running one, VERITAS_SANDBOX_NODE or node on PATH). Without such a Node.js, project code is not run and the affected results stay inconclusive, unless sandbox.allowNetworkWithoutIsolation is set. Mutation testing and improve run the project's own Vitest suite, with the same trust as running pnpm test yourself: in an isolated copy for improve, with an allowlisted environment and an empty temporary home directory, but without file-read or network isolation (Node.js cannot confine a test runner that starts other processes). --offline means Veritas itself makes no network request; to deny network access to the tests too, run Veritas in an environment without network, such as a container started with --network none. In CI, fork code runs without secrets and with a read-only token. veritas test generate only writes test files under .veritas/generated-tests/ and never runs them; running them with Vitest is the same as running the project's own tests.
Argument and shell injectionChild processes are spawned without a shell, with argument arrays.
Secret leakageChild processes receive an allowlisted environment. Artifacts, logs and reports are redacted (token patterns and secret-named environment values). Full prompts are not stored by default.
Code execution through configurationveritas.config.{ts,mjs,js} is loaded only with --allow-code-config; JSON config is the default.
Unapproved writesinit refuses to overwrite without --force. improve is dry-run by default; applying needs approval and runs in an isolated copy with rollback. MCP write tools need an approval token. Each apply records the approval (approval-<n>.json: approver, time, entry point, token hash); the approver name comes from --actor, VERITAS_ACTOR, the git user or the MCP client and is not authenticated, so it records who the operator said approved, not a verified identity.
SSRF and uncontrolled network accessNetwork sources are off by default; the web collector uses a domain allowlist and page, depth, size and time budgets.
Resource exhaustionTimeouts and output caps on child processes and solvers; budgets on mutants, tokens and iterations.
Fork pull requests in CIThe Action runs read-only, does not expose secrets to fork code, and does not run PR code with elevated permissions.
Resource exhaustion by project code or a queryEvery child process has a timeout and is killed with its descendants. Processes started for project code (restricted calls of project code, property-based tests, the project's test runner and mutator) get a V8 heap limit of limits.memoryMb (default 2048 MiB), as does the Z3 solver process (never below 256 MiB). Running out of memory ends that call with an error, never a result. Lean (lake build) is not memory-limited because no portable mechanism exists; its run has a timeout.
Fabricated or overstated resultsSolver, mutation and test results come only from real runs, or from a mutation report you import yourself with --import; unknown, timeout and unsupported are never success. Results reused from .veritas/cache/ come from earlier real runs on identical inputs: each entry is authenticated with an HMAC key kept outside the project (in the user's cache directory, or VERITAS_CACHE_KEY_FILE), so entries copied in with a repository or archive are ignored, and a cache tracked by git is ignored entirely. The project's own tests, which mutation testing runs with the trust of pnpm test, could still reach that key; disable the cache (cache.enabled: false) for code you do not trust.

Out of scope ​

Malicious code in the analysed project. Every step that runs project code (property-based tests, counterexample replay, mutation runs, improve) is restricted as described above, but Veritas is not a security sandbox against hostile code: the Node.js permission model protects against accidents, not attacks (ADR 0011). Analyse untrusted repositories with Veritas inside an isolated environment such as a container without network access (see Untrusted repositories).

Reporting a vulnerability ​

See SECURITY.md in the repository.

Released under the Apache-2.0 License.