Security Policy
Responsible disclosure, threat model, credentials management, and incident response for GrokBot Society.
Supported Versions
| Version | Supported |
|---|---|
| 0.1.x | Yes |
Reporting a Vulnerability
Do not open public issues for security vulnerabilities.
Use GitHub private vulnerability reporting: Report a vulnerability.
Include: description, steps to reproduce, potential impact, and a suggested fix if available. Triage timing is best effort.
Security Model
GrokBot Society is a local-first, single-process runtime with no network server by default.
Provider Credentials
API keys read ONLY from environment variables at provider initialization. Never stored in SQLite, memory, cache, telemetry, or event payloads. .env files excluded via .gitignore.
Memory Isolation
Privacy scopes enforced at read time (private / person_user_shared / circle / public). No cross-person memory leaks — retrieveForScene filters by viewer's access.
Architectural Guardrails
No provider bypass (assertGatewalledCall), fail-closed budget, 9 circuit breakers, no recursion/retries (recursionDepth=0, maxRetries=0, backgroundModelCalls=0).
Data at Rest
SQLite database contains social graph only. No credentials in database. File permissions should be 600 in production.
Threat Mitigations
| Threat | Mitigation |
|---|---|
| Runaway LLM spend | Budget ceilings (per-event, hourly, daily), kill switch, circuit breakers |
| Provider credential leak | Env-only, never in DB/logs, .gitignore |
| Memory privacy violation | Scope enforcement at read time, no omniscient hive mind |
| Provider bypass | assertGatewalledCall() in every provider, architectural test |
| Unbounded context | ContextCompiler caps + context_explosion hard breaker |
| Recursion/retries | recursionDepth = 0, maxRetries = 0 |
| Background inference | backgroundModelCalls = 0 by default |
What This Project Does NOT Provide
- ❌ Network server by default
- ❌ Authentication/authorization framework (single-user local tool)
- ❌ Encryption at rest (SQLite is plaintext; rely on filesystem perms)
- ❌ Audit logging beyond telemetry/events (add if needed)
- ❌ GDPR/CCPA compliance tooling (build on top if required)
- ❌ Multi-tenancy / RBAC
If you need these, wrap the kernel in a service with appropriate guards.
Secure Deployment Checklist
Incident Response
| Symptom | Likely Cause | Action |
|---|---|---|
| blockedCalls spike | Budget ceiling hit | Check usage() for which ceiling; raise deliberately or reduce volume |
| trips non-empty | Circuit breaker tripped | Check breaker.name; context_explosion/premium_model_escalation require manual breakers.reset() |
| providerEscalations > 0 | Route flipped to expensive | Audit ModelRouter routes; pin to cheaper tier if unintended |
| estimatedSpend > budget | Real provider calls accumulating | Check spendPerProvider; disable expensive routes or raise budget |