Security π‘ BETA
Secure a General Bots deployment by verifying the controls the code enforces, then recording the evidence.
Overview
Security is a set of code contracts plus operator procedures, not a single switch. The repository AGENTS.md fixes the rules that cannot be improvised: no panics in production, SafeCommand for process execution, log_and_sanitize for error responses, sql_guard for identifiers, CSRF on state-changing endpoints and a fixed set of response headers. Rate-limit defaults are 100 req/s general, 10 req/s auth and 50 req/s API per token, implemented with governor.
| Contract | Authority | Operator check |
|---|---|---|
| Headers on every response | repository AGENTS.md (IMP-09) |
curl -sI http://localhost:8080/health |
| CSRF on POST/PUT/DELETE/PATCH | repository AGENTS.md (IMP-08) |
Bearer-token API endpoints are exempt |
| Rate limits | repository AGENTS.md (IMP-07) |
100 / 10 / 50 req/s |
| Tenant scoping | multi-tenant isolation | no cross-tenant read |
| Secrets in Vault | secrets management | no secret in .env |
| Dependency audit | cargo audit (IMP-10) |
no unpatched critical advisory |
In This Chapter
| Runbook | Use when |
|---|---|
| Initial setup | creating the first administrator |
| User auth | verifying login, tokens and TOTP |
| Password security | confirming the directory service owns passwords |
| API endpoints | checking auth and exposure of routes |
| Bot authentication | checking bot identity and data isolation |
| Security features | reviewing the implemented feature flags |
| Browser policy | reviewing browser task budgets |
| Input guardrails | checking SSRF, DLP, injection and file guards |
| Security policy | recording organisational policy |
| Incident response | handling and authorising publication |
| RBAC overview | choosing a role model |
| Permissions matrix | reading the effective permission set |
| RBAC configuration | applying roles and groups |
| Organizations | managing tenants and members |
| KB permissions | scoping knowledge-base folders |
| Multi-tenant isolation | proving tenant separation |
| Security matrix | reading the code-level control map |
| System limits | reading enforced resource limits |
The advisory-programme pages in this chapter (immutable bulletin mirrors, offline bundle, advisory feeds, subscriptions, CVE strategy, production verification and the pentest results) record publication authority and dated evidence. Treat a dated result as evidence for that date, not as a permanent guarantee.
Quick Links
Start with security features for what exists, security matrix for where checks happen, and production verification for how to reproduce the checks. Change nothing until secrets management and the operations runbooks have been read.
Best Practices
- Verify against the running service and the source; do not infer a control from a page title.
- Keep credentials in Vault and token or unseal key files under
/tmp; the.envfile holds onlyVAULT_*variables. - Use hostnames and environment variables, never internal IP addresses.
- Re-run the verification table after every change and record the evidence with incident response.
- Share, revoke, transfer, comment and version events are appended to the collaboration ledger. Document permission changes are owner-only: revoke and ownership transfer are owner-only operations. The transfer route updates the ACL and the audit row but is metadata-only today β document bytes and sidecar comments/versions stay in the previous owner's namespace.