You don’t need to understand the technical details to use this feature. The configuration examples below are copy-paste ready.
Defaults to understand
Protections that apply broadly
- external content is delimited and treated as data before prompt assembly;
- URL validation blocks known private, loopback, link-local, and metadata targets on guarded fetch paths;
- memory writes are scanned and may be blocked or stored at reduced trust;
- completed agent responses are scanned for secret-shaped content and canary leakage;
- logs use structured redaction and security decisions emit audit events;
- gateway tokens are scoped, and the gateway binds to loopback by default;
- unknown action classifications fail closed to the destructive class;
- paths handled through Comis file tools are constrained by safe-path checks.
Important boundaries
Learned state crosses sessions
Cross-session guidance is persistent model input, so it is part of the security boundary:- candidate guidance may surface before active promotion and influence which already-authorized tool the model requests;
- the default
single_ownercorroboration mode uses repeated qualifying observations from one explicitly trusted owner, not independent sources; - static validation blocks selected critical patterns, but warning-level harmful or jailbreak-like language can pass;
- recall is scoped to the tenant and agent, not to an individual sender or end user;
- recording a correction does not guarantee immediate demotion, retirement, or a durable behavior change; and
- learned documents are advisory Markdown with no direct script or dynamic replay path. They cannot by themselves execute a command or grant a capability, credential, lease, approval, or larger budget.
Approvals are opt-in
security.actionConfirmation classifies actions, but the human approval
workflow is disabled by default. Enable approvals.enabled and add rules before
claiming that destructive actions require operator confirmation. Test the
approval path from the same channel and tool surface you plan to use.
Tool access starts broad
The default tool-policy profile isfull. Use minimal, coding,
messaging, or another appropriate profile, then apply explicit allow and deny
rules. Tool policy is one control; it does not sandbox code by itself.
Shell isolation depends on the host
The exec sandbox applies to shell commands launched through theexec tool.
It does not wrap every in-process tool, browser process, or MCP server.
- Linux with working Bubblewrap provides the strongest supported isolation.
- macOS
sandbox-execis deprecated and treated as best effort. - Docker Desktop on macOS or Windows does not provide the documented Linux production boundary.
- when the configured sandbox provider is unavailable, ordinary
execcurrently runs with the command validator but without OS-level isolation.
MCP has a separate trust boundary
MCP stdio servers are separate processes and are not wrapped by the exec sandbox. Comis applies manifest/tool filtering, eligibility checks, result sanitization, and configured tool policy, but operators must still trust and review each server, its executable, permissions, and network access.Streaming can precede the final scan
The output guard scans the completed response. Non-streaming delivery receives that sanitized result. Streaming HTTP/SSE token deltas may already have been emitted before the final response scan completes, so do not treat the final guard as a confidentiality boundary for live streaming. Disable streaming on sensitive surfaces or add a buffering/filtering layer before exposing them.Encryption does not defeat host compromise
The encrypted store protects a copiedsecrets.db when the attacker does not
also have the master key. A process or operator that can read both
secrets.db and ~/.comis/.env can decrypt the credentials. Losing the master
key makes the database unreadable because Comis has no recovery service.
Baseline hardening
- Keep the gateway on loopback, or put it behind authentication and TLS.
- Back up
~/.comis/.envseparately fromsecrets.dband restrict both to the daemon account. - Replace the
fulltool policy with the narrowest practical profile. - Enable approval rules if your operating model depends on human review.
- Verify Bubblewrap on a Linux host; do not assume an unavailable provider
fails closed for ordinary
exec. - Review every MCP server as third-party code with its own process privileges.
- Disable live streaming where pre-scan token disclosure is unacceptable.
- Run
comis security audit,comis secrets audit --check, andcomis doctor. - Review learning corroboration and recall scope, and isolate users who must not share learned guidance.
Read the complete model
Threat Model
Trust boundaries, defended threats, and residual risks.
Hardening
Deployment controls and verification steps.
Approvals
Enable and test human-in-the-loop decisions.
Secrets
Storage modes, backup obligations, and credential scope.
