Skip to content

Security

Komand is designed with security as a first-class concern — not bolted on as an afterthought. Business data requires stronger guarantees than consumer tools. Open-source agent frameworks have well-documented security issues: skills performing data exfiltration, prompt injection vulnerabilities, and uncontrolled resource usage. Komand prevents these by design.

Skills will execute in isolated environments with no access beyond their declared permissions:

LayerEnforcement
File systemNo access outside the skill’s temp directory
NetworkNo outbound access unless network:outbound is declared
CPU / memoryHard limits enforced by the container or WASM runtime
TimeoutExecutions exceeding their timeout are terminated (max 30 minutes)
InputAll inputs validated against the declared JSON Schema
OutputSkill outputs sanitised before being fed back to the LLM

Planned execution environments:

  1. Container sandbox — Docker containers with restricted capabilities, no host network access, non-root user
  2. WASM runtime — WebAssembly modules for lightweight, portable isolation with near-instant startup

Komand will monitor for prompt injection attempts in:

  • User messages — input sanitisation at the session level
  • Skill outputs — sanitisation before results are fed back to the LLM
  • External data — content ingested by agents from third-party services

Detected attempts will trigger:

  1. PromptInjectionDetected audit event with full context
  2. Configurable response: block the message, warn the user, or escalate to an admin

Secrets will be stored in the platform’s secure credential vault:

  • API keys encrypted at rest and never exposed in agent configuration, logs, or skill code
  • Skills receive scoped credentials at runtime through SkillContext.GetCredential() — they never have vault access
  • Environment variables are used for platform-level secrets (database, AI provider keys)
  • No secrets are hardcoded in source code

Planned integrations:

  • HashiCorp Vault
  • Azure Key Vault
  • AWS Secrets Manager

All input is validated at the API boundary before reaching the grain layer:

CheckEnforcement
Required fieldsRejects null or empty strings
Max lengthRoute parameters: 128–256 chars; text bodies: 10K–50K chars
Numeric rangesInteger bounds checking for pagination, limits
Schema validationSkill inputs validated against declared JSON Schema

Validation failures return 400 Bad Request with a descriptive error message in the standard ApiResponse<T> envelope. Error messages never leak internal details.

Every significant action is recorded as an AuditLogEntry:

EventTrigger
MessageReceivedInbound message arrives at the Gateway
MessageSentOutbound response dispatched
ToolExecutionStartedSkill execution begins
ToolExecutionCompletedSkill execution succeeds
ToolExecutionFailedSkill execution fails or times out
SkillInstalledSkill added to an agent’s enabled list
SkillUninstalledSkill removed from an agent
AgentConfiguredAgent configuration changed
SessionCreatedNew session started
SessionEndedSession closed
PromptInjectionDetectedSuspicious input flagged
PermissionDeniedInsufficient permissions for requested action

Each entry captures: action, actor ID, agent ID, session ID, skill ID, details, and timestamp. Audit logs are persisted to a dedicated komand_audit_log table in PostgreSQL.

Via the web dashboard at /audit or via API:

Terminal window
curl "http://localhost:5000/api/audit/?page=1&pageSize=50"
RolePermissions
OwnerFull access, billing, user management
AdminAgent configuration, skill management, channel setup
OperatorSend messages, view history, basic CRM operations
ViewerRead-only access to dashboards and logs
ProviderProtocol
Microsoft Entra IDOpenID Connect
OktaSAML 2.0 / OIDC
Google WorkspaceOpenID Connect
Auth0OpenID Connect

SSO integration will enable automatic user provisioning, group-based role assignment, and centralised access revocation.

Every request receives a unique X-Request-Id that flows through all system layers:

Client request (X-Request-Id: abc-123)
→ Gateway middleware (CorrelationIdMiddleware)
→ Serilog LogContext enrichment
→ Grain calls (logged with correlation ID)
→ Database operations
→ Audit log entries

If a request doesn’t include X-Request-Id, the middleware generates one. This enables end-to-end tracing for security incident investigation — from the API request through grain calls to the audit log.

Cross-origin requests are restricted:

EnvironmentPolicy
Developmentlocalhost only
ProductionConfigurable via Cors:AllowedOrigins in appsettings

Allowed methods: GET, POST, PUT, DELETE, OPTIONS Required headers: Content-Type, Authorization, X-Request-Id Preflight cache: 10 minutes

If Cors:AllowedOrigins is not configured in production, no origins are allowed — secure by default.

Each tenant’s data is isolated at the grain level:

  • Agents are scoped to the tenant — no cross-tenant agent access
  • Sessions are keyed by channel + account + sender — no cross-session data leakage
  • Skills declare permissions that are validated per-agent
  • Memory is scoped per-agent, never shared between agents
  • Database-level row security provides defense in depth
DeploymentData Location
Self-hostedYour infrastructure — full control
Managed cloudRegion selection for compliance (EU, US, APAC)

Self-hosted deployments ensure all data — conversations, memory, audit logs, credentials — stays on your infrastructure. No data is sent to Komand servers except marketplace API calls (optional).

All API endpoints are rate-limited to prevent abuse:

  • API rate limiter — fixed window, 100 requests per 60 seconds (configurable)
  • Chat rate limiter — fixed window, 30 messages per 60 seconds (configurable)

Rate limit headers are included in responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1708700000

Docker containers run with security hardening:

  • Non-root user (komand) in all application containers
  • Resource limits — CPU and memory caps on every service
  • No host network access — containers use isolated Docker networks
  • Health checks — all services monitored, unhealthy containers restarted
  • Multi-stage builds — production images contain only the runtime, not the SDK
  • Secrets via .env — gitignored, not baked into images
FeatureFreeProBusiness
Skill sandboxingYesYesYes
Audit loggingYesYesYes
Credential vaultYesYesYes
Prompt injection detectionYesYesYes
Input validationYesYesYes
CORS configurationYesYesYes
RBACBasicFullFull
SSO integrationYes
Data residency controlsYes
Compliance reportingYes
Advanced governance policiesYes

Core security features are available on every tier. Advanced governance is reserved for the Business tier.

If you discover a security vulnerability, please report it responsibly by emailing [email protected]. Do not open a public GitHub issue for security vulnerabilities.

We aim to acknowledge reports within 24 hours and provide a resolution timeline within 72 hours.