Reference·Safety and trustIndex

Safety and trust

What protects the machine, and what Nodecode does not protect.

.mdllms.txt

Nodecode has no sandbox. Read the limits before you connect a channel or run unattended.

Protections

ProtectionWhat it does
Loopback gatewayThe gateway, the local server shells attach to, listens on 127.0.0.1.
Host checkA request whose Host is not 127.0.0.1 or localhost gets 403.
Origin checkA socket opened by a page of another origin gets 403.
Operator tokenEvery /api/gateway/ route needs Authorization: Bearer TOKEN. /healthz needs none.
File modesSecrets are readable by you alone. See the table below.
Kernel lockThe kernel, the locked core, refuses redefinition of its names.
Secret redactionconfig-get shows a secret as [set]. config-set refuses to write [set] back.
Channel allowlistsA Discord or Telegram bot refuses to start without an allowlist.
Channel tokensA bot token is named by a *_env or *_file key. Inline tokens are not read.
Token sourceOrder
NODECODE_GATEWAY_OPERATOR_TOKEN, then NODECODE_OPERATOR_TOKEN1
~/.nodecode/operator-token: 32 random bytes as hex, made on first boot2
gateway.operator_token in the config3

nodecode web prints a link that carries the token after #. A browser never sends that part to a server. Keep the link to yourself.

PathMode
~/.nodecode/0700, set when the store opens
operator-token, auth.json, files in secrets/, link/state.json0600
backups/0700. Each archive: 0600.
config.jsoncNo mode is forced. A write keeps the mode the file has.

The model can lower the kernel lock itself with lower-floor. The store records who asked and why.

Not protected

FactConsequence
Eval has full host authority.The model can read, write and run anything your user can.
A new process isolates a crash only.It does not stop file or network damage.
Cell folders are full-authority code.A folder under ~/.nodecode/cells/ loads in every Nodecode process. Nothing asks first.
The guard is not a sandbox.It refuses known spellings. Any other spelling runs.
Built-in guard rules are gated.A file edit that mentions rm -rf is not refused.
Channel messages run with full host authority.Anyone on an allowlist can drive eval on this machine.
Writes outside the session's folder are not snapshotted./undo cannot restore them.

For unattended work, supply containment outside Nodecode: a container or a host policy.

Safe baseline

  1. Run Nodecode on a machine you trust. Leave the gateway on loopback.
  2. Keep the nodecode web link and the operator-token file private.
  3. Give every channel an allowlist of users, channels or chats.
  4. Keep require_mention on in channels.
  5. Name channel tokens with *_env or *_file.
  6. Install the guard cell. Read its refusals before you work around them.
  7. Install cells only from sources you trust. Read the code first.
  8. Use nodecode --ephemeral for trials. It isolates the store only.
  9. Run inside a container before you let Nodecode change things unattended.
Esc

    Loading the index…

    ↑↓ moveEnter openEsc close