Skip to content

Security: tata1mg/mind1

SECURITY.md

Security

Reporting a vulnerability

Report security issues privately through GitHub security advisories rather than opening a public issue.

What mind1 does with your code

The deterministic core runs entirely on your machine. It reads source and config files, writes a SQLite database and a .context/ directory inside each indexed repository, and makes no network calls.

Two paths can send code off the machine, and both are opt-in:

  • mind1 enrich and mind1 index --fill-gaps with --provider openai or another remote endpoint. The default provider is Ollama, which runs locally.
  • Nothing else. The MCP server makes no outbound calls of its own, unless it is configured with a remote embedding provider for the semantic search tools.

The HTTP server

mind1 serve --http is the only part of mind1 that listens on a network, and it is built for a trusted network rather than for the open internet. Know these before you expose it:

  • No TLS. Requests and the bearer token travel in the clear. Put it behind a reverse proxy that terminates TLS, or keep it on a private network.
  • One shared token for the whole team. There is no per-user identity, so a request cannot be attributed to a person, and access cannot be revoked for one person without rotating the token for everyone.
  • Rotation needs a restart. The token is read once at startup.
  • Pinning changes state. POST /pins and DELETE /pins/<alias> create and remove snapshots of the index on the server's disk. They sit behind the same shared token, so anyone who can read can also pin and unpin, and a pin is a full copy of the index.
  • --insecure turns authentication off entirely, including for the pin endpoints. It is for a local socket, not a shared host. The server logs a warning when it is used.

Serving source

MIND1_EXPOSE_SOURCE=1 adds a get_source tool that returns the code behind an indexed symbol. It is off unless set, and is never offered over stdio.

Enabling it changes what a leaked token costs. Without it, an attacker learns the structure of your systems. With it, they can read the source of every repository in the index, through the same single shared token described above, over the same connection with no TLS.

The tool takes a symbol id rather than a path, so only spans that were indexed can be read. Files matching the patterns below, or a repository's .mind1ignore, are never indexed and therefore cannot be returned. That containment is structural rather than a filter: the span does not exist. It does not extend to a secret written inside an ordinary source file, which is readable to anyone who can clone the repository and is readable here too.

Source is read with git show at the commit the index was built from, so what comes back matches the span the index recorded rather than whatever the working copy holds now.

Config and secrets

mind1 reads configuration files to work out which services address which. That includes .env, because ORDERS_SERVICE_HOST=orders-svc is exactly the fact it is looking for.

Connection strings routinely carry a password in the middle of an address, so the credential is stripped before anything is stored: postgres://admin:hunter2@db.internal:5432/orders is kept as postgres://db.internal:5432/orders. The host and port survive, the secret does not. Values that are wholly opaque are stored as [redacted].

Some files are never read at all, whatever a repo's configuration says:

*.pem  *.key  *.p12  *.pfx  *.jks  *.keystore
id_rsa  id_dsa  id_ecdsa  id_ed25519
*secret*  *credential*  *password*
.npmrc  .pypirc  .netrc  .htpasswd

A repo can exclude more by listing patterns in .mind1ignore, one per line, gitignore style. That includes .env itself if you would rather mind1 did not read it, at the cost of the service addresses declared there. A repo can add to this set; it cannot remove anything from the list above.

Before sharing a fleet.db, be aware it contains service names, endpoint paths, queue names, config key paths, hostnames, ports and source file paths from the indexed repositories.

There aren't any published security advisories