Security

Zentri runs coding agents and holds tokens for your repositories. This page sums up how it is built to contain them, and how to report a problem.

Zentri is pre-alpha. Its threat model is a draft that is reviewed at every milestone.

Self-hosted first

The coordinator, its Postgres database, and every agent session run on machines you control. There is no hosted Zentri service, and Zentri sends no usage data to its makers.

Every user brings their own agent credentials. Zentri never collects, proxies, stores, or resells model access or subscription tokens, and it holds no git credentials.

Data leaves your network only through integrations you turn on: Slack, GitHub, an LLM judge on a model you choose, or traces sent to the OTEL_EXPORTER_OTLP_ENDPOINT you set.

Threat model summary

The full model lists each threat, how it is handled, and the tests that check it. Here are eight of them.

T1A compromised agent reads or changes another session
A session token is bound to one session, and every route checks it. Peers in the same project see summaries, plus the plan and diff they need to coordinate. Another project is refused, and another organization sees nothing.
T2An agent approves its own high-risk decision
Session tokens cannot review a decision. A review needs a lead who did not propose it, and the authorization check, the update, and a database constraint each refuse a self-review.
T3An agent sends code or secrets out over the network
In an OpenShell sandbox, egress is denied by default and every rule is enforced. The agent can still send what it reads to its own model vendor, which it does by design.
T5An agent skips the git hook with --no-verify
The hook only warns. The merge check recomputes claims on the coordinator, and it is a gate once branch protection requires it.
T8A token leaks through logs, the process table, or shell history
Tokens are stored hashed, logs redact them, and no command prints one or takes one from a flag. Session tokens expire within 24 hours and are revoked when the session ends.
T13The coordinator itself is compromised
It holds no model or git credentials, so an attacker gets coordination state, not the power to push code. It runs as non-root with a read-only root filesystem and no Linux capabilities.
T14Someone with database access rewrites the audit log
Each audit row stores a SHA-256 hash of the previous row's hash and its own content. zentri-server audit verify walks the chain and finds a changed row.
T17Zentri collects subscription tokens
No API accepts a model or subscription credential, and a test fails if a field like one appears. Agents sign in through their own sign-in flow.

Read the full threat model

Sandboxing

Zentri starts each agent session through one of two launchers.

openshell

Runs the agent in an NVIDIA OpenShell sandbox as uid 1000. Egress is denied by default, and every network rule is set to enforce:

  • only the zentri binary reaches the coordinator;
  • only the agent and the commands it starts reach its vendor's hosts;
  • only git reaches the origin, and no package registry is allowed.

The agent kit sits in read-only config, so the agent cannot remove its hooks. The session token is a 0600 file, never an environment variable. The sandbox gets only the OpenShell providers you name. At zt done, the branch comes home as a git bundle that is checked and merged fast-forward only.

This launcher has been tested with a stub agent in a real sandbox, not yet with a real agent.

local-dev

Runs the agent directly on your machine with your user's permissions. It is not sandboxed and has no egress policy. It prints an INSECURE banner on every start, and the coordinator records which launcher each session used.

Data handling

  • User, session, admin, and integration tokens are stored hashed.
  • Raw task prompts are encrypted with a data key, using AES-256-GCM bound to the project and the task.
  • Notes, plans, diffs, questions, answers, and decisions pass a secret scanner before they are stored. A match is redacted, and an audit row records the kinds of secret found, never the text.
  • The audit log is hash-chained, so a change to a past row is detectable.
  • The CLI keeps your token in the OS keychain: the macOS Keychain, the Windows Credential Manager, or the Secret Service on Linux. Where none answers, as over SSH or in a container, it keeps it in a 0600 file and refuses a config that others can read.

Report a vulnerability

Do not open a public issue, discussion, or pull request for a security problem. Report it privately in one of two ways:

Include what you found, the affected version or commit, steps to reproduce, and the impact you expect. A proof of concept helps.

What happens next

  • We acknowledge your report within 3 business days.
  • We confirm or reject the issue, and agree on a severity with you, within 10 business days.
  • We aim to release a fix within 90 days of your report. If we need longer, we explain why and agree on a new date with you.
  • When the fix ships, we publish a GitHub security advisory, request a CVE when the issue warrants one, and credit you unless you ask us not to.

Please give us the 90 days before you disclose publicly. If the issue is being exploited, tell us, and we will move faster.

Supported versions

Zentri has no stable release yet. Until 1.0, only the latest release and the main branch receive security fixes.

Safe harbor

We will not take legal action against research done in good faith under this policy. Good faith means you avoid privacy violations, data destruction, and service disruption, you test only against installs you own, and you give us the time above to fix the issue.

SECURITY.md has the full policy, including what is in and out of scope. The same contact is in security.txt.