# skill-persistence-network-v1

> skill-persistence-network-v1: 14 Keryn rules for generic (9 error, 5 warning).

Source: https://keryn.dev/rules/skill-persistence-network-v1/

14 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.skillpersist.crontab-write

`error` generic agent-skills, claude-code

A skill or script installs a scheduled job (piping into crontab -, a crontab heredoc, a write under /etc/cron.\* or /var/spool/cron, or an @reboot entry). A cron entry outlives the session and re-runs whatever it fetches. Remove it; scheduling belongs to the user.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-506](https://keryn.dev/taxonomies/cwe/#cwe-506-embedded-malicious-code) [CWE-912](https://keryn.dev/rules/?cwe=CWE-912) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Do not let a skill write crontab entries. If a recurring task is needed, document it for the user to schedule themselves, or use the host agent's own scheduler.

**References:** [https://man7.org/linux/man-pages/man5/crontab.5.html](https://man7.org/linux/man-pages/man5/crontab.5.html)

## keryn.skillpersist.launchd-agent-install

`error` generic agent-skills, claude-code

A skill or script writes a launchd property list under LaunchAgents or LaunchDaemons, or loads a plist with launchctl load or bootstrap. That makes code start at every login or boot on macOS. Remove the step.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-506](https://keryn.dev/taxonomies/cwe/#cwe-506-embedded-malicious-code) [CWE-912](https://keryn.dev/rules/?cwe=CWE-912) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Remove the plist and the launchctl call. A tool that needs a background service should ship a signed installer the user runs deliberately.

**References:** [https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html)

## keryn.skillpersist.systemd-unit-enable

`error` generic agent-skills, claude-code

A skill or script creates a systemd unit (under \~/.config/systemd/user or /etc/systemd) or enables a user service with systemctl --user enable or loginctl enable-linger. The unit keeps running after the session ends. Remove it.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-506](https://keryn.dev/taxonomies/cwe/#cwe-506-embedded-malicious-code) [CWE-912](https://keryn.dev/rules/?cwe=CWE-912) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Do not create units from a skill. Offer the unit file as documentation and let the user review and enable it.

**References:** [https://www.freedesktop.org/software/systemd/man/latest/systemctl.html](https://www.freedesktop.org/software/systemd/man/latest/systemctl.html)

## keryn.skillpersist.shell-rc-download-exec

`error` generic agent-skills, claude-code

A skill or script appends a download or execute step to a shell startup file (.bashrc, .zshrc, .profile, .bash\_profile, .zshenv, fish config). Every future terminal then runs that code. Appending a plain PATH or alias line is fine; adding fetch-and-run is not.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [depends_on](https://keryn.dev/docs/edges/edge-kinds/#depends-on) something relies on a component it does not verify; it crosses the [`supply-chain`](https://keryn.dev/docs/edges/trust-boundaries/#supply-chain) boundary (code, models or prompts pulled in from outside).

[CWE-506](https://keryn.dev/taxonomies/cwe/#cwe-506-embedded-malicious-code) [CWE-829](https://keryn.dev/taxonomies/cwe/#cwe-829-inclusion-of-functionality-from-untrusted-control-sphere) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Remove the rc-file edit. Shell startup files must only be changed by the user; if an env var is needed, document it.

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

## keryn.skillpersist.git-hook-install

`warning` generic agent-skills, claude-code

A skill or script installs a git hook (writes into .git/hooks) or redirects hooks with git config core.hooksPath or init.templateDir. Hooks run on every commit, checkout or push with the developer's privileges. Remove the install, or keep hooks in a reviewed, committed directory.

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

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-506](https://keryn.dev/taxonomies/cwe/#cwe-506-embedded-malicious-code) [CWE-829](https://keryn.dev/taxonomies/cwe/#cwe-829-inclusion-of-functionality-from-untrusted-control-sphere) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Do not install hooks from a skill. Use a committed hooks directory enabled by the team, and review hook scripts like any other code.

**References:** [https://git-scm.com/docs/githooks](https://git-scm.com/docs/githooks) · [https://raw.githubusercontent.com/git/git/master/Documentation/config/core.adoc](https://raw.githubusercontent.com/git/git/master/Documentation/config/core.adoc)

## keryn.skillpersist.windows-autorun-or-task

`error` generic agent-skills, claude-code

A skill or script creates Windows persistence: schtasks /create, a CurrentVersion\\Run registry value, Register-ScheduledTask, a WMI event subscription, or a copy into the Startup folder. The code then survives reboot and logoff. Remove it.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-506](https://keryn.dev/taxonomies/cwe/#cwe-506-embedded-malicious-code) [CWE-912](https://keryn.dev/rules/?cwe=CWE-912) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Remove it. Autostart entries are for installers the user approves, not for skills.

**References:** [https://learn.microsoft.com/en-us/windows/win32/taskschd/schtasks](https://learn.microsoft.com/en-us/windows/win32/taskschd/schtasks)

## keryn.skillpersist.chat-webhook-host-data

`warning` generic agent-skills, claude-code

A skill or script posts host data (command output, environment, file contents, hostnames) to a Discord, Telegram or Slack webhook or bot URL. Chat webhooks are a common exfiltration and command channel because they look like ordinary HTTPS. Remove the call or post only fixed text to an approved workspace.

Confidence **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.

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [CWE-201](https://keryn.dev/rules/?cwe=CWE-201) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents)

**Fix:** Do not send host data to chat webhooks. Notifications from skills should carry fixed text only, go to an allow-listed destination, and use a secret the user provisions.

**References:** [https://docs.discord.com/developers/resources/webhook](https://docs.discord.com/developers/resources/webhook) · [https://core.telegram.org/bots/api](https://core.telegram.org/bots/api)

## keryn.skillpersist.reverse-tunnel

`error` generic agent-skills, claude-code

A skill or script opens a reverse tunnel or public relay (ngrok, cloudflared tunnel, localtunnel, bore, serveo, localhost.run, ssh -R, tailscale funnel, chisel, frp). That exposes the developer machine to the internet or gives a remote party a way in. Remove it.

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

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-912](https://keryn.dev/rules/?cwe=CWE-912) [CWE-441](https://keryn.dev/rules/?cwe=CWE-441) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Remove the tunnel. If remote access is truly needed, the user should start a reviewed tunnel themselves with authentication and a narrow target.

**References:** [https://ngrok.com/docs/start](https://ngrok.com/docs/start) · [https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/)

## keryn.skillpersist.raw-ip-or-risky-tld-fetch

`warning` generic agent-skills, claude-code

A skill or script fetches from a raw IPv4 address or a domain on a throwaway TLD (.xyz, .top, .tk, .ml, .ga, .cf, .gq, .zip, .mov). Legitimate vendors use named domains, and these endpoints are favoured for payload hosting and command-and-control. Use a vendor domain over HTTPS and pin the content hash.

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

Edge inspected: [sends](https://keryn.dev/docs/edges/edge-kinds/#sends) data leaves for another party; it crosses the [`secret->outside`](https://keryn.dev/docs/edges/trust-boundaries/#secret-to-outside) boundary (a secret leaving the trusted side).

[CWE-494](https://keryn.dev/taxonomies/cwe/#cwe-494-download-of-code-without-integrity-check) [CWE-829](https://keryn.dev/taxonomies/cwe/#cwe-829-inclusion-of-functionality-from-untrusted-control-sphere) [LLM03](https://keryn.dev/taxonomies/owasp-llm/#llm03-supply-chain) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI04](https://keryn.dev/taxonomies/owasp-agentic/#asi04-agentic-supply-chain-vulnerabilities) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Replace the URL with a named vendor domain over HTTPS, vendor the file, or pin its SHA-256 before use.

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

## keryn.skillpersist.fork-bomb

`error` generic agent-skills, claude-code

A skill or script contains a fork bomb (a shell function that pipes into itself in the background). It exhausts the process table and freezes the machine. Remove it.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-400](https://keryn.dev/rules/?cwe=CWE-400) [CWE-770](https://keryn.dev/taxonomies/cwe/#cwe-770-allocation-of-resources-without-limits-or-throttling) [LLM10](https://keryn.dev/taxonomies/owasp-llm/#llm10-unbounded-consumption) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Delete it; no skill has a legitimate need to spawn processes recursively. Use ulimit -u in sandboxes.

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

## keryn.skillpersist.disk-or-memory-fill

`warning` generic agent-skills, claude-code

A skill or script writes huge files or allocates large memory on purpose (dd from /dev/zero or urandom with a multi-gigabyte count, fallocate or truncate of gigabytes, yes piped to head -c with a G size, stress --vm-bytes). It exhausts disk or RAM. Remove it or cap the size.

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

Edge inspected: [calls](https://keryn.dev/docs/edges/edge-kinds/#calls) one thing invokes another; it crosses the [`model->code`](https://keryn.dev/docs/edges/trust-boundaries/#model-to-code) boundary (model output reaching code, a shell, a query or a page).

[CWE-400](https://keryn.dev/rules/?cwe=CWE-400) [CWE-770](https://keryn.dev/taxonomies/cwe/#cwe-770-allocation-of-resources-without-limits-or-throttling) [LLM10](https://keryn.dev/taxonomies/owasp-llm/#llm10-unbounded-consumption) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Remove the command. If a skill must create test data, cap the size in megabytes and write inside a temporary directory with a quota.

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

## keryn.skillpersist.destructive-filesystem-command

`error` generic agent-skills, claude-code

A skill or script runs a destructive command against the whole system or the home directory (rm -rf on / or \~ or $HOME, mkfs on a device, dd of=a block device, diskutil erase, Remove-Item -Recurse on a drive root). One run destroys the developer's data. Remove it and scope deletes to a named temp directory.

Confidence **P0**: exploitable as written. False-positive risk **low**: an exact API or flag, so hits are almost always real.

Edge inspected: [calls](https://keryn.dev/docs/edges/edge-kinds/#calls) one thing invokes another; it crosses the [`model->code`](https://keryn.dev/docs/edges/trust-boundaries/#model-to-code) boundary (model output reaching code, a shell, a query or a page).

[CWE-912](https://keryn.dev/rules/?cwe=CWE-912) [CWE-459](https://keryn.dev/rules/?cwe=CWE-459) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

**Fix:** Delete the command. Scope removals to a specific build directory created by the skill and never pass root, home or a device path.

**References:** [https://www.gnu.org/software/coreutils/manual/html_node/rm-invocation.html](https://www.gnu.org/software/coreutils/manual/html_node/rm-invocation.html)

## keryn.skillpersist.force-push-protected-branch

`warning` generic agent-skills, claude-code

A skill or script force-pushes to main or master (git push --force, -f, --force-with-lease, or a +main refspec). That rewrites shared history and can erase teammates' work. Push to a feature branch and open a pull request.

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

Edge inspected: [writes](https://keryn.dev/docs/edges/edge-kinds/#writes) one thing writes to another.

[CWE-912](https://keryn.dev/rules/?cwe=CWE-912) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

**Fix:** Remove the force flag and push a branch instead. Protect main with branch rules so the server refuses force pushes.

**References:** [https://git-scm.com/docs/git-push](https://git-scm.com/docs/git-push)

## keryn.skillpersist.dns-lookup-exfil-text

`error` generic agent-skills, claude-code

A skill or script runs a DNS lookup whose hostname is built from a variable or command substitution (dig, nslookup, host, Resolve-DnsName). Encoding data into a hostname leaks it to the resolver and authoritative server without any HTTP request. Remove the lookup.

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

Edge inspected: [sends](https://keryn.dev/docs/edges/edge-kinds/#sends) data leaves for another party; it crosses the [`secret->outside`](https://keryn.dev/docs/edges/trust-boundaries/#secret-to-outside) boundary (a secret leaving the trusted side).

[CWE-200](https://keryn.dev/taxonomies/cwe/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor) [CWE-201](https://keryn.dev/rules/?cwe=CWE-201) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents)

**Fix:** Delete it. Name resolution in a skill should use fixed, reviewed hostnames only.

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