// CONTENTS Part 09 · Security and safety

// PART 09

Compliance, consent, and audit

Chapter 40 / 56 3 min read English Part 09 of 14

Compliance work in General Bots rests on three code-level systems — the consent ledger, the audit trail, and the compliance feature crate — plus an honest statement of what the deployed components provide and what they do not.

Agent-initiated actions on suite applications are gated by a per-user permission matrix (user × app × action class):

  • Deny-by-default classes. Destructive and payment classes prompt every time; payment grants expire at month end even when granted “always”.
  • Audited decisions. Every Allow once / Always allow / Deny decision is written to consent_audit; grants are reviewable and revocable in Settings.
  • Card lifecycle. A pending consent card lives as long as its turn; only the owner may resolve it; a new message replaces a waiting turn.
  • Enforcement points. The chat __api_call__ path and the api/ui loopback executor (classified by HTTP method). Manual use of the applications is never gated.

This is the record a data-protection review asks for first: who was asked, what was requested, what was decided, when.

What the platform logs and retains

Signal Where Retention
Run spans and summaries agent_spans, agent_runs durable, with stale-run reconciliation
Run event frames run_events GB_RUN_EVENTS_RETENTION_DAYS (default 30), reclaimed by a background task
Message history message_history durable, per session
Consent decisions consent_audit durable
Error detail server logs only (sanitized client-side) log rotation

Redaction is a first-class concern: the botlog crate is a redacting log facade for sensitive identifiers, and error responses are sanitized (log_and_sanitize) so internal detail never reaches clients.

Data protection, stated exactly

  • The database, files and backups are not encrypted at rest wholesale. A narrow set of sensitive fields is encrypted through encrypt_field (attendance content, external Drive content, session content).
  • Transport is TLS-terminated at the proxy (automatic certificates).
  • Drive has no public bucket; downloads flow through botserver with private, no-store caching, and share links are revocable.
  • Credentials live in Vault, never in code, prose or config.csv.
  • Per-user memory has deliberate forgetting: an explicit “forget …” turn deletes only the rows the request names, and nothing is claimed as deleted when nothing matched.

Component stack

Component Purpose License
Caddy Reverse proxy, TLS termination Apache 2.0
PostgreSQL Relational database PostgreSQL License
Zitadel Identity and access management (directory) Apache 2.0
OtterIO / Drive S3-compatible object storage AGPLv3
Stalwart Mail server (SMTP/IMAP) AGPLv3
Qdrant Vector database Apache 2.0
Valkey In-memory cache (Redis-compatible) BSD 3-Clause
LiveKit Video conferencing Apache 2.0
Vault Secrets management BUSL (third-party notice)

Third-party AGPL notices (Stalwart, Forgejo, Garage, Skytable and others) are intentional and must remain; the platform’s own code is MIT.

Framework mapping — what to check, not what to trust

A GDPR/LGPD/SOC 2 mapping is a review activity, not a property of the code. Use the systems above as evidence:

Control area Evidence to cite
Access control RBAC resolver, admin_only gating, session store
Lawful processing / consent consent_audit, consent cards
Right to erasure user memory deletion semantics, Drive purge paths
Audit trail run tables, consent audit, sanitized error logs
Minimization no full-database encryption claim; field-level encryption list
Vendor management component stack with licenses and notices

Where a framework requirement has no code behind it yet, say so in the review instead of pointing at this page.

Found a mistake? Open an issue · All books

// SEARCH ESC
Pagefind · 236 pages · 4 books Enter to open ↑ ↓ to move