Skip to content

    Type a page, a command such as keryn scan, or a rule id.

    agent-client-configs-generic-v1

    View as Markdown

    3 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: 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

    Section titled “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 authority is given or left unchecked.

    CWE-862 LLM06 ASI02 ASI09

    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://raw.githubusercontent.com/openai/codex/main/codex-rs/protocol/src/protocol.rs

    keryn.agentclient.codex-sandbox-full-access

    Section titled “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 authority is given or left unchecked.

    CWE-250 LLM06 ASI05 ASI02

    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://raw.githubusercontent.com/openai/codex-action/main/action.yml

    keryn.agentclient.skill-allowed-tools-unrestricted

    Section titled “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 authority is given or left unchecked.

    CWE-862 CWE-250 LLM06 ASI02 ASI04

    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/settings#permissions