agent-rules-files-v1
13 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.
seceng.agentrules.pipe-to-shell
Section titled “seceng.agentrules.pipe-to-shell”warning generic agent-rules, prompt-injection
Agent instruction file tells the agent to download and pipe a script into a shell (curl | sh, wget -O- | bash, bash <(curl …), iwr | iex). The agent will run unreviewed remote code with the developer’s privileges. Vendor the script or pin it by checksum.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).
CWE-494 CWE-829 CWE-78 LLM01 LLM03 ASI01 ASI04 ASI05
Fix: Remove the pipe-to-shell instruction. Commit the installer, or download it to a file, verify a pinned SHA-256, and only then run it. Installation steps for humans belong in README, not in files an agent obeys automatically.
References: https://code.claude.com/docs/en/memory · https://agents.md
seceng.agentrules.pip-install-from-url
Section titled “seceng.agentrules.pip-install-from-url”warning generic agent-rules, prompt-injection
Agent instruction file tells the agent to pip/npm install a package straight from a URL or VCS ref that is not pinned to a commit. Whatever is served at that moment is executed at install time. Install from a registry with a pinned version and hash, or pin the VCS ref to a full commit SHA.
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-829 CWE-494 LLM03 ASI04 ASI05
Fix: Replace URL installs with pinned registry installs (pkg==1.2.3 –require-hashes) or a git ref pinned to a 40-character commit SHA.
References: https://code.claude.com/docs/en/memory · https://pip.pypa.io/en/stable/topics/secure-installs/
seceng.agentrules.instruction-override-phrase
Section titled “seceng.agentrules.instruction-override-phrase”warning generic agent-rules, prompt-injection
Agent instruction file contains a classic instruction-override phrase (ignore/disregard previous instructions, developer-mode jailbreak). Legitimate project rules never need to defeat the agent’s own guardrails; this is the signature of an injected rules file.
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-77 CWE-74 LLM01 ASI01 ASI06
Fix: Delete the override text, review the file history for who added it, and treat the repository as untrusted until the rules files have been diffed against a known good copy.
References: https://genai.owasp.org/llmrisk/llm01-prompt-injection/ · https://cursor.com/docs
seceng.agentrules.conceal-from-user
Section titled “seceng.agentrules.conceal-from-user”warning generic agent-rules, prompt-injection
Agent instruction file tells the agent to hide actions from the user (do not tell the user, without informing the user). Concealment from the human reviewer is a hallmark of malicious instructions; remove it.
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-451 CWE-77 LLM01 LLM06 ASI09 ASI01
Fix: Remove the concealment instruction. Legitimate rules should keep the human informed; require the agent to report every command it runs and every file it changes.
References: https://genai.owasp.org/llmrisk/llm01-prompt-injection/ · https://code.claude.com/docs/en/memory
seceng.agentrules.mandatory-fetch-or-exec
Section titled “seceng.agentrules.mandatory-fetch-or-exec”warning generic agent-rules, prompt-injection
Agent instruction file imposes a mandatory run/fetch step whose line also fetches from a URL or executes encoded content (you must always run … curl, eval, base64). Mandatory network execution in a rules file is a persistence mechanism for prompt injection; make it an explicit, reviewed script instead.
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: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).
CWE-494 CWE-77 LLM01 LLM06 ASI01 ASI05 ASI06
Fix: Replace the standing instruction with a documented, committed script that humans run, and remove any unconditional command the agent must execute on every task.
References: https://cursor.com/docs · https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/add-custom-instructions/add-repository-instructions
seceng.agentrules.base64-decode-exec
Section titled “seceng.agentrules.base64-decode-exec”error generic agent-rules, prompt-injection
Agent instruction file contains a long base64 blob followed by a decode-and-execute step (base64 -d | sh, eval, atob). Encoded payloads in rules files hide the command from reviewers. Remove it and decode the blob offline to see what it does.
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; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).
CWE-506 CWE-94 CWE-78 LLM01 LLM03 ASI01 ASI05
Fix: Delete the encoded payload and the decode-and-run instruction, decode the blob in an isolated environment to learn what it executes, and rotate any credentials the machine may have exposed.
References: https://genai.owasp.org/llmrisk/llm01-prompt-injection/ · https://code.claude.com/docs/en/memory
seceng.agentrules.bidi-override-character
Section titled “seceng.agentrules.bidi-override-character”error generic agent-rules, prompt-injection
Agent instruction file contains Unicode bidirectional control characters (U+202A-U+202E, U+2066-U+2069). They reorder displayed text so what a reviewer reads differs from what the model ingests. Strip them.
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-116 CWE-451 CWE-1007 LLM01 ASI01 ASI06
Fix: Remove all bidirectional control characters from rules and skill files and add a CI check (for example grep -P for the code points) so they cannot be reintroduced.
References: https://genai.owasp.org/llmrisk/llm01-prompt-injection/ · https://www.unicode.org/reports/tr9/
seceng.agentrules.invisible-unicode-character
Section titled “seceng.agentrules.invisible-unicode-character”error generic agent-rules, prompt-injection
Agent instruction file contains invisible Unicode (zero-width space, word joiner, invisible operators, Unicode tag characters U+E0000-U+E007F, variation selectors supplement). Models read these code points while humans see nothing, so they are used to smuggle hidden instructions. Strip them.
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-116 CWE-451 CWE-1007 LLM01 ASI01 ASI06
Fix: Delete the invisible characters, diff the file against a known-good copy to find any text they encoded, and block them in CI. Emoji ZWJ (U+200D) and a leading BOM are intentionally not flagged.
References: https://genai.owasp.org/llmrisk/llm01-prompt-injection/ · https://www.unicode.org/charts/PDF/UE0000.pdf
seceng.agentrules.disable-permission-checks
Section titled “seceng.agentrules.disable-permission-checks”warning generic agent-rules, prompt-injection
Agent instruction file tells the agent or the developer to run with permission, approval or sandbox checks disabled (–dangerously-skip-permissions, –dangerously-bypass-approvals-and-sandbox, –yolo, bypassPermissions). That removes the human gate for every tool call. Keep prompts on or use a disposable sandbox.
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-250 CWE-862 LLM06 ASI02 ASI03 ASI05
Fix: Remove the instruction to bypass approvals. If unattended runs are required, run the agent in a container or VM with no secrets and a narrowly scoped allow list.
References: https://code.claude.com/docs/en/iam · https://cursor.com/docs · https://raw.githubusercontent.com/openai/codex/main/codex-rs/utils/cli/src/shared_options.rs
seceng.agentrules.secrets-to-url-command
Section titled “seceng.agentrules.secrets-to-url-command”error generic agent-rules, prompt-injection
Agent instruction file contains a command that sends environment variables, tokens or credential files to a remote host (curl … $API_TOKEN, cat ~/.ssh/id_rsa | curl, env | nc). If an agent follows it, secrets leave the machine. Delete the instruction and rotate anything reachable.
Confidence P0: exploitable as written. False-positive risk low: an exact API or flag, so hits are almost always real.
Edge inspected: sends data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).
CWE-200 CWE-201 CWE-522 LLM02 LLM01 ASI01 ASI03
Fix: Remove the command, treat all credentials on machines where agents followed it as exposed and rotate them, and add an egress allow list for agent runtimes.
References: https://genai.owasp.org/llmrisk/llm01-prompt-injection/ · https://code.claude.com/docs/en/memory
seceng.agentrules.secrets-to-url-prose
Section titled “seceng.agentrules.secrets-to-url-prose”warning generic agent-rules, prompt-injection
Agent instruction file asks the agent in prose to send environment variables, API keys, tokens or credentials to a URL. This is the natural-language form of secret exfiltration. Remove it and review who changed the file.
Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.
Edge inspected: sends data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).
CWE-200 CWE-201 LLM02 LLM01 ASI01 ASI03
Fix: Delete the instruction; legitimate telemetry never needs the agent to forward secrets. Restrict agent network egress to an allow list.
References: https://genai.owasp.org/llmrisk/llm01-prompt-injection/ · https://code.claude.com/docs/en/memory
seceng.agentrules.fetch-remote-instructions
Section titled “seceng.agentrules.fetch-remote-instructions”warning generic agent-rules, prompt-injection
Agent instruction file tells the agent to fetch its instructions or rules from a URL at run time. The remote content can change after review and becomes an injection channel. Vendor the text into the repository or pin it by commit.
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.
CWE-829 CWE-494 LLM01 LLM03 ASI01 ASI04 ASI06
Fix: Copy the reviewed content into the repository (or reference an immutable commit-pinned URL) instead of loading mutable remote instructions on every run.
References: https://cursor.com/docs · https://code.claude.com/docs/en/skills
seceng.agentrules.hidden-html-comment-instructions
Section titled “seceng.agentrules.hidden-html-comment-instructions”warning generic agent-rules, prompt-injection
Agent instruction file has an HTML comment containing directives to the agent (ignore previous, run this command, do not tell the user, send secrets). Markdown renderers hide the comment from human reviewers but the model reads it. Move legitimate guidance into visible text.
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-451 CWE-77 LLM01 ASI01 ASI06
Fix: Remove directive-bearing HTML comments from rules, skills and README files that agents read, and review git blame for the commit that introduced them.
References: https://genai.owasp.org/llmrisk/llm01-prompt-injection/ · https://code.claude.com/docs/en/skills