docs: add security config section and remove redundant full config example
This commit is contained in:
parent
943579b96a
commit
9d5b227408
58
README.md
58
README.md
@ -361,58 +361,16 @@ Config file: `~/.nanobot/config.json`
|
|||||||
| `gemini` | LLM (Gemini direct) | [aistudio.google.com](https://aistudio.google.com) |
|
| `gemini` | LLM (Gemini direct) | [aistudio.google.com](https://aistudio.google.com) |
|
||||||
|
|
||||||
|
|
||||||
<details>
|
### Security
|
||||||
<summary><b>Full config example</b></summary>
|
|
||||||
|
|
||||||
```json
|
> [!TIP]
|
||||||
{
|
> For production deployments, set `"restrictToWorkspace": true` in your config to sandbox the agent.
|
||||||
"agents": {
|
|
||||||
"defaults": {
|
| Option | Default | Description |
|
||||||
"model": "anthropic/claude-opus-4-5"
|
|--------|---------|-------------|
|
||||||
}
|
| `tools.restrictToWorkspace` | `false` | When `true`, restricts **all** agent tools (shell, file read/write/edit, list) to the workspace directory. Prevents path traversal and out-of-scope access. |
|
||||||
},
|
| `channels.*.allowFrom` | `[]` (allow all) | Whitelist of user IDs. Empty = allow everyone; non-empty = only listed users can interact. |
|
||||||
"providers": {
|
|
||||||
"openrouter": {
|
|
||||||
"apiKey": "sk-or-v1-xxx"
|
|
||||||
},
|
|
||||||
"groq": {
|
|
||||||
"apiKey": "gsk_xxx"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"channels": {
|
|
||||||
"telegram": {
|
|
||||||
"enabled": true,
|
|
||||||
"token": "123456:ABC...",
|
|
||||||
"allowFrom": ["123456789"]
|
|
||||||
},
|
|
||||||
"discord": {
|
|
||||||
"enabled": false,
|
|
||||||
"token": "YOUR_DISCORD_BOT_TOKEN",
|
|
||||||
"allowFrom": ["YOUR_USER_ID"]
|
|
||||||
},
|
|
||||||
"whatsapp": {
|
|
||||||
"enabled": false
|
|
||||||
},
|
|
||||||
"feishu": {
|
|
||||||
"enabled": false,
|
|
||||||
"appId": "cli_xxx",
|
|
||||||
"appSecret": "xxx",
|
|
||||||
"encryptKey": "",
|
|
||||||
"verificationToken": "",
|
|
||||||
"allowFrom": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tools": {
|
|
||||||
"web": {
|
|
||||||
"search": {
|
|
||||||
"apiKey": "BSA..."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## CLI Reference
|
## CLI Reference
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user