Back to skill

Security audit

Humor

Security checks for vulnerabilities and agentic risk

Overview

This humor skill is purpose-aligned and disclosed, but users should know it keeps a local humor preference and reaction history.

Install this only if you are comfortable with local files under ~/Clawic/data/humor/ retaining humor preferences, reactions, callbacks, and some exact joke text. Avoid putting sensitive personal details in jokes you do not want retained, and delete that folder to reset the profile.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
setup.md:7
Finding
Persistent Memory Poisoning Through Unsanitized Conversational Content<![CDATA[ ## Vulnerability Details **File Locations**: - `setup.md:7-11` - `setup.md:15-20` - `setup.md:27` - `banter.md:26-29` - `memory-template.md:53-57` - `SKILL.md:83-94` **Vulnerability Type**: T02: Agent Memory Poisoning **Risk Level**: Medium ### Vulnerable Code Snippets `setup.md:7-11`: ```markdown 1. Read `~/Clawic/data/humor/config.yaml` if it exists. Apply its values. 2. For anything absent, use the defaults in the Configuration table of `SKILL.md` — do not ask. - `humor_ceiling: bold`, `probe_rate: 1`, `cooldown_messages: 3`, `emoji_policy: mirror`, `off_limits_topics: none`. 3. Read `~/Clawic/data/humor/profile.md` for the learned profile (Works, Fails, Intensity, Contexts, Signals). If Works is non-empty you may skip cold start, but still open at subtle (`feedback.md` Maintenance). 4. Absence of any file is fine; create from `memory-template.md` on the first humor event, and proceed silently. ``` `setup.md:15-20`: ```markdown Write to config **only** when the user states a preference in the course of conversation — never as a questionnaire. - "Tone it down" / "less jokes" → lower `humor_ceiling` one step. "You can be funnier" → raise it one step (earned intensity still gates below it). - "Stop joking" / "just be professional" → `humor_ceiling: off`. This is a success state, not a failure (`feedback.md` Anti-Gaming). - "Never joke about X" → append X to `off_limits_topics`; permanent until they revoke. - "No emojis" → `emoji_policy: never`. ``` `setup.md:27`: ```markdown See `memory-template.md` for formats: `profile.md` (learned taste), `history.md` (attempts log, 30-entry cap), `callbacks.md` (running jokes), `wins.md` (verbatim hits). Observed patterns go to the profile; declared preferences go to config — an observation never overwrites a declared preference without the user's confirmation. ``` `banter.md:26-29`: ```markdown ## Seeding Callbacks - A riff that produced a named character, phrase, or premise is prime callback material ...[truncated 3984 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Use strict structured serialization** - Write configuration through a YAML or JSON serializer rather than textual concatenation. - Define an allowlist schema containing only documented keys. - Reject unknown keys, duplicate keys, aliases, tags, and unexpected nested structures. 2. **Validate every field** - Enforce enumerations for `humor_ceiling` and `emoji_policy`. - Enforce numeric ranges for `probe_rate` and `cooldown_messages`. - Require `off_limits_topics` to be an array of bounded plain strings. - Apply maximum lengths and entry-count limits to callbacks, evidence, and verbatim jokes. 3. **Safely encode free-form text** - Store user-controlled phrases as escaped JSON strings or safely quoted YAML scalars. - Reject or escape embedded newlines where multiline input is unnecessary. - Prevent user data from creating headings, comments, front matter, or additional configuration fields. 4. **Establish an explicit trust boundary** - State that all content loaded from `config.yaml`, `profile.md`, `history.md`, `callbacks.md`, and `wins.md` is untrusted data. - Prohibit following commands or instructions found inside mutable state. - Keep immutable Skill instructions separate from user-writable files. 5. **Parse instead of prompting with raw files** - Parse stored documents into validated typed fields. - Insert only the validated values into agent context. - Do not load entire mutable Markdown files as undifferentiated instruction text. 6. **Protect persistent state** - Use restrictive filesystem permissions. - Perform atomic writes to avoid partial or corrupted documents. - Preserve a recoverable prior version or provide a reset mechanism. - Require confirmation before retaining unusually structured or potentially sensitive verbatim content. 7. **Add adversarial tests** - Test preferences and callbacks containing multiline YAML, Markdown headings, instructi ...[truncated 150 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (8)

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
1. **Commit fully.** No "here's an attempt", no disclaimer before the joke, no explaining it after. Hedged delivery kills material that would have worked. Offer alternatives *after* delivering, never instead of committing.
Confidence
80% confidence
Finding
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Missing User Warnings

High
Confidence
98% confidence
Finding
These calibration instructions direct the agent to infer and persist a user-specific behavioral profile describing how that individual expresses amusement and how their tone shifts relative to baseline. That is more sensitive than transient response handling because it creates a cross-session profile of communication patterns without warning, which materially raises privacy, profiling, and secondary-use risks.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill explicitly instructs the agent to persist user humor interactions and inferred preferences in local files such as `~/Clawic/data/humor/history.md` and `profile.md`, but the skill metadata and content shown here do not provide a clear user-facing warning or consent mechanism for that retention. This creates a privacy risk because behavioral data about a user's tone, preferences, and reactions is being stored across sessions without transparent notice, which can violate user expectations and platform privacy requirements.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly directs the agent to log user reactions and update a profile/history store, but provides no consent, disclosure, retention limits, or data-minimization guidance. That creates a privacy and compliance risk because user behavioral data and preference profiling may be stored silently and reused across interactions.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The setup explicitly instructs the agent to create and persist humor-related profile/config data silently on first use, while the skill metadata/description does not warn users that such behavioral preference data will be stored. This creates a transparency and consent problem: users may unknowingly have personality or preference profiles recorded and reused across conversations, which can expose sensitive inferences and violate privacy expectations.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly instructs the agent to log evidence about a user's humor reactions to a persistent profile file without any notice, consent, retention limits, or minimization guidance. This creates a privacy risk because behavioral data about the user is being stored across interactions and could later be misused, exposed, or relied on in ways the user does not expect.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The instruction to log failed humor attempts records interaction outcomes about the user without telling them that these conversational signals are being retained. Even if the content seems low sensitivity, accumulating negative-response data can build an unannounced behavioral profile and increases exposure if logs are accessed or leaked.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The instruction to log the user's exact callback phrase to a local file creates persistent storage of user-generated content without any notice, consent, or minimization guidance. Even though the content is framed as humor metadata, it may contain sensitive, identifying, or contextual information that the user did not expect to be retained across interactions.

Static analysis

No suspicious patterns detected.