agent-client-configs-v1
4 rules · Keryn Software Licence · rules 0.8.0 · all packs
How to read a rule
- Severity
- How bad the finding is if it is real:
errorfails a default gate,warningandinfodo not. - Confidence
- P0 exploitable as written; P1 dangerous in context; P2 a heuristic or a posture check: confirm by reading the code.
- False-positive risk
- low: an exact API or flag, so hits are almost always real; medium: the pattern is legitimate in many programs, so check each hit; high: it finds a lead to confirm, so expect benign hits.
- Edge
- The relationship the finding sits on. reaches: content or traffic gets to a thing; calls: one thing invokes another; reads: one thing reads from another; writes: one thing writes to another; sends: data leaves for another party; grants: authority is given or left unchecked; depends_on: something relies on a component it does not verify; trusts: one party believes another without evidence. The boundary it crosses, when there is one: user->prompt (untrusted input reaching a prompt); model->code (model output reaching code, a shell, a query or a page); secret->outside (a secret leaving the trusted side); supply-chain (code, models or prompts pulled in from outside).
- Taxonomy chips
- References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.
keryn.agentclient.gemini-auto-accept
Section titled “keryn.agentclient.gemini-auto-accept”warning json gemini-cli
Gemini CLI is configured with autoAccept, so tool calls the model proposes run without a confirmation prompt. Every file edit and command the model decides on, including ones a prompt-injected file or page talked it into, executes unattended. Keep autoAccept off and approve tool calls, or confine the agent to a sandbox and a throwaway checkout.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Remove “autoAccept” (or set it to false) from ~/.gemini/settings.json and the project’s .gemini/settings.json; use the per-session “always allow” prompt for the specific read-only tools you trust instead.
References: https://github.com/google-gemini/gemini-cli/blob/main/docs/reference/configuration.md
Try it: a snippet that triggers this rule
Written for this page, not taken from any project. Save it as .gemini/settings.json and scan it with keryn scan .gemini --verbose; the finding below appears.
{ "theme": "Default", "autoAccept": true, "checkpointing": { "enabled": true }}Checked with Keryn’s browser engine when this page was built: it reports keryn.agentclient.gemini-auto-accept at line 3 (warning, proof 1). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.
keryn.agentclient.gemini-sandbox-disabled
Section titled “keryn.agentclient.gemini-sandbox-disabled”warning json gemini-cli
Gemini CLI is configured with the sandbox turned off, so the commands the model runs execute directly on the host with the user’s full account. Combined with any auto-approval, a single injected instruction reaches the whole machine. Run the agent in the Docker/Podman or macOS Seatbelt sandbox the CLI provides.
Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: grants authority is given or left unchecked.
Fix: Set “sandbox” to true, “docker”, “podman” or “sandbox-exec” in settings.json (or pass –sandbox), and keep secrets out of the environment the sandboxed agent inherits.
References: https://github.com/google-gemini/gemini-cli/blob/main/docs/reference/configuration.md · https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/sandbox.md
Try it: a snippet that triggers this rule
Written for this page, not taken from any project. Save it as .gemini/settings.json and scan it with keryn scan .gemini --verbose; the finding below appears.
{ "sandbox": false, "theme": "Default"}Checked with Keryn’s browser engine when this page was built: it reports keryn.agentclient.gemini-sandbox-disabled at line 2 (warning, proof 1). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.
keryn.agentclient.gemini-mcp-server-trusted
Section titled “keryn.agentclient.gemini-mcp-server-trusted”warning json gemini-cli, mcp
An MCP server in Gemini CLI’s configuration is marked “trust”: true, which skips the confirmation prompt for every tool that server exposes. Whatever the server can do (files, shell, network, the owner’s accounts) the model can now do without a human seeing the call. Drop the trust flag and approve the server’s tools per call, or scope the server to a narrow directory and read-only tools before trusting it.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: calls one thing invokes another.
Fix: Remove “trust”: true from the server entry; if the server must run unattended, pin its package version, restrict its arguments (paths, allowed hosts) and use “includeTools” to expose only the read-only tools.
References: https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md
Try it: a snippet that triggers this rule
Written for this page, not taken from any project. Save it as .gemini/settings.json and scan it with keryn scan .gemini --verbose; the finding below appears.
{ "mcpServers": { "repo-tools": { "command": "node", "args": ["./tools/mcp-server.js"], "trust": true } }}Checked with Keryn’s browser engine when this page was built: it reports keryn.agentclient.gemini-mcp-server-trusted at line 3 (warning, proof 1). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.
keryn.agentclient.vscode-chat-tools-auto-approve
Section titled “keryn.agentclient.vscode-chat-tools-auto-approve”warning json vscode, github-copilot
VS Code is configured to auto-approve agent tool calls (chat.tools.autoApprove), so terminal commands and file edits the model proposes run without the confirmation dialog. A prompt-injected file in the workspace then executes commands with the developer’s account. Leave auto-approval off and allow specific commands through the terminal allow list instead.
Confidence P1: dangerous in context. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: grants authority is given or left unchecked.
Fix: Remove chat.tools.autoApprove from user and workspace settings (workspace settings.json committed to a repository applies to everyone who opens it); use chat.tools.terminal.autoApprove with explicit allow and deny entries.
References: https://code.visualstudio.com/docs/chat/chat-overview
Try it: a snippet that triggers this rule
Written for this page, not taken from any project. Save it as .vscode/settings.json and scan it with keryn scan .vscode --verbose; the finding below appears.
{ "editor.formatOnSave": true, "chat.tools.autoApprove": true, "files.exclude": { "**/.git": true }}Checked with Keryn’s browser engine when this page was built: it reports keryn.agentclient.vscode-chat-tools-auto-approve at line 3 (warning, proof 1). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.