# agent-client-configs-generic-v1

> agent-client-configs-generic-v1: 3 Keryn rules for generic (3 warning).

Source: https://keryn.dev/rules/agent-client-configs-generic-v1/

3 rules · Keryn Software Licence · rules 0.8.0 · [all packs](https://keryn.dev/rules/)

**How to read a rule**

- **Severity**: How bad the finding is if it is real: `error` fails a default gate, `warning` and `info` do 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.codex-approval-policy-never

`warning` generic codex-cli

Codex CLI is configured with approval\_policy = "never", so every command and edit the model decides on runs without asking. Whatever a prompt-injected file, issue or page talks the model into executes with the user's account, bounded only by the sandbox (if any). Use "untrusted" or "on-request" so the agent asks before leaving the sandbox or running unknown commands.

Confidence **P1**: dangerous in context. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-862](https://keryn.dev/taxonomies/cwe/#cwe-862-missing-authorization) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI09](https://keryn.dev/taxonomies/owasp-agentic/#asi09-human-agent-trust-exploitation)

**Fix:** Set approval\_policy = "untrusted" (or "on-request") in \~/.codex/config.toml and in every [profiles.\*] table; reserve "never" for a disposable container with no credentials and no network.

**References:** [https://github.com/openai/codex/blob/main/docs/config.md](https://github.com/openai/codex/blob/main/docs/config.md) · [https://raw.githubusercontent.com/openai/codex/main/codex-rs/protocol/src/protocol.rs](https://raw.githubusercontent.com/openai/codex/main/codex-rs/protocol/src/protocol.rs)

## keryn.agentclient.codex-sandbox-full-access

`warning` generic codex-cli

Codex CLI is configured with sandbox\_mode = "danger-full-access": the model's commands run with the user's full filesystem and network. Combined with a permissive approval policy, one injected instruction can read keys, modify any repository and exfiltrate over the network. Use "workspace-write" (or "read-only") and widen it per task when needed.

Confidence **P1**: dangerous in context. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-250](https://keryn.dev/taxonomies/cwe/#cwe-250-execution-with-unnecessary-privileges) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation)

**Fix:** Set sandbox\_mode = "workspace-write" and keep network access off inside the sandbox unless the task needs it; run full-access sessions only inside a container that holds no credentials.

**References:** [https://github.com/openai/codex/blob/main/docs/config.md](https://github.com/openai/codex/blob/main/docs/config.md) · [https://raw.githubusercontent.com/openai/codex-action/main/action.yml](https://raw.githubusercontent.com/openai/codex-action/main/action.yml)

## keryn.agentclient.skill-allowed-tools-unrestricted

`warning` generic claude-code

A skill's frontmatter pre-approves an unrestricted write or execute tool (Bash, Bash(\*), Write, Edit, MultiEdit, NotebookEdit) through allowed-tools. Whenever the skill is invoked, those tools run without the usual permission prompt, so the skill's instructions, and any content the skill reads, can drive arbitrary commands or edits. Scope allowed-tools to the specific commands the skill needs (Bash(git status:\*), Bash(npm test)) or leave the prompt in place.

Confidence **P1**: dangerous in context. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-862](https://keryn.dev/taxonomies/cwe/#cwe-862-missing-authorization) [CWE-250](https://keryn.dev/taxonomies/cwe/#cwe-250-execution-with-unnecessary-privileges) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI04](https://keryn.dev/taxonomies/owasp-agentic/#asi04-agentic-supply-chain-vulnerabilities)

**Fix:** Replace bare Bash / Write / Edit entries with command-scoped ones (Bash(git log:\*), Bash(node tools/check.mjs)) and read-only tools; keep editing tools behind the prompt unless the skill writes to a known path.

**References:** [https://code.claude.com/docs/en/skills](https://code.claude.com/docs/en/skills) · [https://code.claude.com/docs/en/settings#permissions](https://code.claude.com/docs/en/settings#permissions)
