Skip to content

Security: Esquetta/Kam

Security

SECURITY.md

Security Policy

Kam is a local desktop automation agent. It can inspect files, run bounded shell commands, read desktop context, interact with application state, and call model providers. Security work therefore focuses on two principles:

  1. never expose secrets in logs, diagnostics, traces, or support reports;
  2. never let model output bypass the deterministic tool permission rules, validation, and confirmation.

Supported Versions

Kam is pre-1.0 software. Security fixes are applied to the master branch and ship in the next release.

Reporting A Vulnerability

Do not open a public issue for security vulnerabilities.

Email: security@esquetta.com

Include:

  • affected version or commit hash;
  • operating system;
  • reproduction steps;
  • expected impact;
  • sanitized logs, screenshots, or readiness reports.

Remove API keys, bearer tokens, passwords, private endpoints, and local private paths before sharing evidence.

Security Model

Secrets

  • API keys belong in the Settings UI, user secrets, or environment variables.
  • API keys must not be committed to appsettings.json, docs, screenshots, issue reports, traces, or execution history.
  • Diagnostics and Copy Report flows must redact API keys, bearer tokens, passwords, and provider credentials.

Tool Execution

Kam runs a tool-calling agent loop:

  • the model can only call tools the agent offers: built-in skills (exposed through SkillToolProvider), tools from MCP servers and plugins, Agent Skills, and the task tool for subagents;
  • every tool call passes IToolPermissionService before it runs: the permission mode (Ask, Auto-edit, Full auto), allow and deny rules (deny rules win), and the tool's risk level;
  • arguments are validated before execution, and tools from plugin MCP servers always ask;
  • calls that delegate to another agent (such as the Codex CLI) always ask and cannot be set to "Always allow";
  • results and execution history are recorded.

The model's tool-calling output is not a safety boundary. Safety decisions are deterministic and made in Kam's code, not by asking the model.

File And Workspace Access

  • File operations validate paths before access.
  • Workspace operations are bounded by configured roots and request limits.
  • Dangerous file writes should be previewable before execution.
  • Recursive delete or broad mutation flows require explicit confirmation and policy approval.

Shell Execution

  • Shell tools are bounded by timeout, output length, working directory, and blocked-pattern policy.
  • Destructive command patterns are blocked by deterministic checks (ShellCommandGuard).
  • High-risk shell operations must not be replayable without a fresh confirmation path.

Desktop Context

  • Window, accessibility, and screen-context tools are read-oriented unless an explicit action tool is invoked.
  • Desktop automation must keep user-visible evidence in Diagnostics or the execution history.
  • Future browser-control integrations must follow the same tool permission rules.

Network And Provider Access

  • OpenAI-compatible provider endpoints are configured by the user.
  • Endpoint and key values are not shown in normal UI status text.
  • Web fetch refuses addresses that resolve or redirect to the local network.

Developer Checklist

  • Validate all tool arguments before execution.
  • Add negative tests for blocked or unsafe inputs.
  • Do not log API keys, bearer tokens, passwords, auth headers, or private endpoints.
  • Keep safety decisions deterministic; do not ask the model whether an action is safe.
  • Give a new tool the right risk level; a tool that must not run beside others needs a risk other than Read or Network.
  • Add or update smoke coverage for new built-in skills.
  • Run dotnet test Kam.sln --configuration Release.
  • For release-facing changes, run .\scripts\local-production-smoke.ps1 -Configuration Release -Runtime win-x64 -RequireAiConfig.

Useful Files

  • src/SmartVoiceAgent.Infrastructure/Security/SecurityUtilities.cs
  • src/SmartVoiceAgent.Infrastructure/Agent/Runtime/ToolPermissionService.cs
  • src/SmartVoiceAgent.Infrastructure/Agent/Runtime/ToolPermissionRule.cs
  • src/SmartVoiceAgent.Infrastructure/Agent/Runtime/SkillToolProvider.cs
  • src/SmartVoiceAgent.Infrastructure/Skills/Execution/SkillExecutionPipeline.cs
  • src/SmartVoiceAgent.Infrastructure/Skills/Execution/SkillArgumentValidator.cs
  • src/SmartVoiceAgent.Infrastructure/Skills/Policy/SkillRuntimePolicyOptions.cs
  • src/SmartVoiceAgent.Infrastructure/Skills/Actions/SkillActionPermissionPolicy.cs
  • src/SmartVoiceAgent.Infrastructure/Skills/BuiltIn/AgentTools/ShellSkillExecutor.cs
  • src/SmartVoiceAgent.Infrastructure/Skills/BuiltIn/AgentTools/ShellCommandGuard.cs
  • src/SmartVoiceAgent.Infrastructure/Skills/BuiltIn/AgentTools/FileSkillExecutor.cs
  • docs/production-live-readiness.md
  • docs/local-production-smoke.md

Current Release Security Focus

  • Redaction across logs, traces, execution history, and readiness reports.
  • Smoke coverage for required built-in skills.
  • Deterministic permission rules and argument validation.
  • Clear Diagnostics evidence for model, tools, MCP servers, and skill-health readiness.

There aren't any published security advisories