Security¶
Security model¶
Galyarder Agent is secured by layered controls: channel allowlists, workspace-aware tool guards, approval policy, and separate runtime data directories for different trust levels.
1. Execution Sandbox & Trusted Roots¶
By default, terminal commands run through ExecTool in a spawn-per-call local environment.
- Restrict to workspace: When
tools.restrictToWorkspaceistrue, built-in filesystem tools andExecToolenforce best-effort path checks against the workspace plus configuredtools.allowedPaths. This is a guardrail for local operation, not a substitute for an OS sandbox. - Dangerous commands: The shell guard blocks common destructive patterns such as
rm -rf,mkfs, disk writes, power commands, and fork bombs before execution. - Optional isolation: Use a dedicated OS user, container, VM, or restricted service account for untrusted users or high-risk workflows.
2. Channel Allowlists¶
- Configure
allowFromfor every enabled network channel. - Telegram, WhatsApp, Discord, email, and Slack channel handlers reject senders that are not on their configured allowlist.
- Keep allowlists narrow for public bot accounts and shared workspaces.
3. Tool Approval Policy¶
tools.policy enables granular allow, ask, or deny decisions for individual tools, optionally scoped by channel and sender ID.
- Approval mode: Set
tools.approvalModetoconfirmto require explicit/approvebefore risky tools such asexec,send_email, andgmail_send. - Policy presets: Use
g-agent policy apply guest_readonlyto deny terminal and write-capable tools for guest scopes.
4. Secrets & Service Environment¶
- Never hardcode API keys in the SQLite database or JSONL session transcripts.
- Keep runtime secrets in
.env, environment variables, or the localconfig.json; do not commit them. - WhatsApp Bridge Authentication: Set
channels.whatsapp.bridgeTokenwhen running the WhatsApp bridge in production. If left empty, any process onlocalhostcan connect to the bridge and impersonate the agent. - Service Isolation: When running via
systemdorlaunchd, ensure the service user has nosudoprivileges.
5. Memory & Profile Separation¶
- The agent's identity and memory are tied to its active profile and data directory.
- To prevent guests from polluting the owner's personal memory or accessing the owner's Google Workspace context, configure a separate
G_AGENT_DATA_DIRor use a dedicated guest profile with restricted toolsets. - Review runtime activity with
/insightsand search past context with/historyor thesession_searchtool.
Minimum hardening baseline¶
- Use strict channel allowlists (
allowFrom) - Keep workspace restriction enabled (
restrictToWorkspace: true) - Separate guest profile from personal profile
- Scope API/OAuth permissions to least privilege
- Monitor runtime logs and rotate secrets on suspicion
- Set
channels.whatsapp.bridgeTokenfor the WhatsApp bridge in production
Dependency floor¶
The backend pins a security floor for python-dotenv at >=1.2.2. litellm
currently declares a narrower transitive pin, so backend/agent/pyproject.toml
uses tool.uv.override-dependencies to keep uv lock and uv run on the
patched dependency line instead of resolving back to 1.0.1.
After dependency changes, verify the resolved environment:
cd backend/agent
uv lock
uv run python -c 'from importlib.metadata import version; print(version("python-dotenv"))'
Vulnerability reporting¶
Use private GitHub advisories:
- https://github.com/galyarderlabs/galyarder-agent/security/advisories
Also review:
- Root policy:
SECURITY.md - Runtime details:
backend/agent/SECURITY.md