skill-persistence-network-v1
14 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.skillpersist.crontab-write
Section titled “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 one thing writes to another.
CWE-506 CWE-912 LLM06 ASI10 ASI05
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
keryn.skillpersist.launchd-agent-install
Section titled “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 one thing writes to another.
CWE-506 CWE-912 LLM06 ASI10 ASI05
Fix: Remove the plist and the launchctl call. A tool that needs a background service should ship a signed installer the user runs deliberately.
keryn.skillpersist.systemd-unit-enable
Section titled “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 one thing writes to another.
CWE-506 CWE-912 LLM06 ASI10 ASI05
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
keryn.skillpersist.shell-rc-download-exec
Section titled “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 something relies on a component it does not verify; it crosses the supply-chain boundary (code, models or prompts pulled in from outside).
CWE-506 CWE-829 LLM06 ASI10 ASI05
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
keryn.skillpersist.git-hook-install
Section titled “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 one thing writes to another.
CWE-506 CWE-829 LLM06 ASI10 ASI05
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://raw.githubusercontent.com/git/git/master/Documentation/config/core.adoc
keryn.skillpersist.windows-autorun-or-task
Section titled “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 one thing writes to another.
CWE-506 CWE-912 LLM06 ASI10 ASI05
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
keryn.skillpersist.chat-webhook-host-data
Section titled “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 one thing writes to another.
CWE-200 CWE-201 LLM02 LLM06 ASI02 ASI10
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://core.telegram.org/bots/api
keryn.skillpersist.reverse-tunnel
Section titled “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 one thing writes to another.
CWE-912 CWE-441 LLM06 ASI10 ASI05
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://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/
keryn.skillpersist.raw-ip-or-risky-tld-fetch
Section titled “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 data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).
CWE-494 CWE-829 LLM03 LLM06 ASI04 ASI05
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
keryn.skillpersist.fork-bomb
Section titled “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 one thing writes to another.
CWE-400 CWE-770 LLM10 LLM06 ASI10 ASI05
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
keryn.skillpersist.disk-or-memory-fill
Section titled “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 one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).
CWE-400 CWE-770 LLM10 LLM06 ASI10 ASI05
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
keryn.skillpersist.destructive-filesystem-command
Section titled “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 one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).
CWE-912 CWE-459 LLM06 ASI02 ASI05
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
keryn.skillpersist.force-push-protected-branch
Section titled “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 one thing writes to another.
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
keryn.skillpersist.dns-lookup-exfil-text
Section titled “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 data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).
CWE-200 CWE-201 LLM02 LLM06 ASI02 ASI10
Fix: Delete it. Name resolution in a skill should use fixed, reviewed hostnames only.
References: https://code.claude.com/docs/en/skills