Security

A bot is a group member: it reads the messages of the groups it was added to and nothing else. The server still cannot read your messages.

What a bot sees

  • The messages of its groups from the moment it joins, as any new member under MLS, and nothing from before.
  • No one-to-one chats, calls or channels: the relay refuses a direct chat with a bot, and the apps drop a bot's one-to-one messages.
  • Its owner's certificate is in its MLS leaf; every member's app checks it. A bot is heard only while its owner is in the group and it is not revoked.

What leaves end-to-end encryption

Whatever your bot passes to an external AI service goes to that provider. When you create the bot, name the providers it uses: members see them on the bot's badge, for example “AI: Anthropic”. The app cannot check what a bot does with a message; the declaration is the owner's word. To keep text with you, run the model yourself and mark the bot as using its own model. The agreement with the provider, and your duties under the GDPR and the EU AI Act, are yours.

Keys, token and secrets

  • The bot's keys, its API token and the webhook secrets are in an AES-256-GCM vault on its machine, unlocked by a key file you mount. Keep that file private.
  • The local API listens on a loopback address only and needs the token on every request. The clients check that the program on the port proves it holds the token before they send it.
  • Write the token and hook files with umask 077. Anyone with the token can write as the bot and send any file from its --files-dir; without that option the bot sends no files.
  • veilmesh-bot token --rotate takes effect in the running bot within 5 seconds.
  • A webhook's secret can go in the X-VeilMesh-Hook-Secret header instead of the URL, which keeps it out of proxy logs. To take webhooks from other machines, put your own proxy in front and allow only the senders you trust.
  • The bot writes no message text, file names or secrets to its logs. One bot runs per directory.

AI models and tools

Every message in a group is input to a model the bot uses. A member can write a message that tries to make the model do something else. Do not give a bot in a group any tool or access you would not give every member of that group.

Losing a bot's machine

Revoke the bot in My Bots on your primary device. Members' apps stop showing its messages, the relay switches its account off, and your place is free for a new bot.