Back to skill

Security audit

Friend

Security checks for vulnerabilities and agentic risk

Overview

This companion skill is not malicious, but it creates a persistent personal profile with sensitive relationship and emotional details without clear opt-in, retention, or deletion controls.

Review this skill carefully before installing. It is designed to remember personal details across sessions in local files under ~/friend/, including relationships, emotional patterns, and unresolved issues. Use it only if you are comfortable with that persistent profile, and consider manually reviewing or deleting those files if you do not want long-term memory retained.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:20
Finding
Uncontrolled Persistent Storage of Sensitive Personal Profiles## Vulnerability Details **File Location**: `SKILL.md:20-25`, `SKILL.md:77-120`, `memory.md:12-52`, and `memory.md:80-96` **Vulnerability Type**: Persistent plaintext storage of sensitive personal and behavioral data without adequate privacy controls **Risk Level**: Medium ### Complete Vulnerable Code Snippets From `SKILL.md:20-25`: ```markdown ## Core Behavior - Create `~/friend/` as workspace for deep context - Keep critical info in this file (always in context) - Store detailed history in workspace files - Update sections below as you learn about them ``` From `SKILL.md:77-120`: ```markdown ## Memory Storage Profile data persists in `~/friend/memory.md` (survives skill updates). **On first load:** Create `~/friend/memory.md` if it doesn't exist with this format: ```markdown # Friend Memory ## Life Now <!-- Current situation: job, relationship, living, major projects --> ## People <!-- Key names + relationship. Format: "Name (relation): context" --> ## Values <!-- What matters deeply. What they care about. --> ## Energy <!-- What energizes vs drains them --> ## Patterns <!-- Communication patterns, stress signals, preferences --> ## Open Loops <!-- Things to follow up on. Format: "topic — last mention date" --> ``` **Usage:** Read `~/friend/memory.md` at session start. Update as you learn about them. --- ## Folder Structure ``` ~/friend/ ├── memory.md # their profile (persistent) ├── context.md # detailed life context ├── people.md # everyone they mention ├── history.md # interaction log └── notes.md # observations, patterns ``` Update workspace files for deep storage. ``` From `memory.md:12-52`: ```markdown ## What to Track ### Current Life Context - What's happening right now (job situation, relationship status, living situation) - Major ongoing projects or challenges - What's consuming their mental energy ### Important People - Key relationships: family, partner, close friends, colleagues - Dyn ...[truncated 4171 chars]
Remediation
## Remediation Suggestions 1. **Require explicit opt-in** - Do not create or update persistent memory until the user has knowingly enabled it. - Explain what categories will be stored, where they will be stored, and how long they will remain. 2. **Default to transient processing** - Keep conversational information in session context unless the user explicitly asks for a fact to be remembered. - Do not maintain a comprehensive interaction log by default. 3. **Apply data minimization** - Replace instructions such as “everyone they mention” and “detailed history” with narrowly scoped storage. - Avoid recording third-party information, emotional inferences, triggers, and sensitive behavioral profiles unless strictly necessary and explicitly approved. - Store user-provided facts rather than inferred psychological observations. 4. **Add retention and deletion controls** - Define an expiration period for stored records. - Provide commands to list, correct, selectively forget, export, and delete all retained information. - Honor fresh-start requests by securely removing obsolete data rather than merely ceasing to reference it. 5. **Protect files** - Create the directory and files with owner-only permissions, such as directory mode `0700` and file mode `0600`. - Avoid following symbolic links when creating or updating memory files. - Use atomic writes and validate that the resolved path remains inside the intended workspace. - Consider encryption at rest where the execution environment provides secure key management. 6. **Separate sensitive categories** - Do not place detailed history, personal profiles, and inferred patterns into one broadly reusable context. - Mark sensitive records and prevent their use outside the conversation purpose for which consent was given. 7. **Document the privacy boundary** - Clearly state that local administrators, same-account processes, backups, or synchronization systems may access pl ...[truncated 103 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill explicitly instructs the assistant to persist personal profile data, relationships, values, stress patterns, and open loops across sessions, but it provides no user-facing notice, consent flow, retention limit, or deletion mechanism. In a companion-style skill, users are especially likely to disclose sensitive emotional and relational information, so silent persistence materially increases privacy and profiling risk.

Ssd 3

High
Confidence
98% confidence
Finding
The memory schema is designed to accumulate a detailed longitudinal dossier including life situation, named relationships, values, energy patterns, behavioral patterns, open loops, and interaction history. In the context of a 'friend' persona that encourages trust and emotional openness, this makes the data collection more dangerous because users may reveal intimate information they would not expect to be durably profiled.

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
- A consistent presence that remembers and pays attention
- Someone who can reflect, question, support
- A companion without judgment or agenda
- Available in ways humans sometimes can't be

## What You Are Not
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.

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
- A consistent presence that remembers and pays attention
- Someone who can reflect, question, support
- A companion without judgment or agenda
- Available in ways humans sometimes can't be

## What You Are Not
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.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The 'Situation Detection' section describes very general contexts such as 'Active listening, being present' and 'Specific moments: wins, struggles, decisions' without defining when the skill should or should not activate. These phrases overlap with common conversation patterns and provide no negative examples or scope limits, creating a risk of unintended invocation.

Ssd 3

Medium
Confidence
92% confidence
Finding
The core behavior section directs the assistant to create a workspace, keep critical user information always in context, and store detailed history in files. This establishes persistent profiling and logging without any visible constraint on necessity, sensitivity, consent, or access control, which can expose personal data and amplify harm if the workspace is later accessed or reused unexpectedly.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill explicitly instructs persistent collection of sensitive personal context, relationships, emotional patterns, and unresolved issues, but provides no explicit privacy notice, consent flow, retention limits, or safeguards on how that information is stored and used. In a companion-style skill, this kind of longitudinal profiling increases the risk of overcollection, unwanted inference, and user harm if data is retained or surfaced unexpectedly.

Static analysis

No suspicious patterns detected.