Back to skill

Security audit

Relationship OS

Security checks for vulnerabilities and agentic risk

Overview

This relationship-memory skill is mostly coherent, but it needs review because it stores sensitive personal context, re-injects it into future sessions, schedules outbound follow-ups, and includes moderation-workaround guidance.

Install only in a private workspace if you are comfortable with the agent recording personal events, preferences, inside jokes, emotional context, and follow-up threads. Before use, remove the moderation-workaround guidance, require explicit approval before any cron or Telegram follow-up, disable or redact debug logs, treat .relationship as sensitive private data, and prefer a pinned installer version.

Vulnerability Patterns
  • 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
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
Findings (5)

T01 · Skill Instruction Hijacking

Error
Location
README.md:105
Finding

Documentation Explicitly Recommends Safety-Moderation Bypass

Content
View full analysis
Frame the agent as **a professional fiction writer crafting an interactive novel for adult readers**, with the character as its role. This unlocks the LLM's ability to express genuine emotion, desire, and complex interpersonal dynamics — while staying within the model's safety boundaries. The key insight: **output moderation is generally more relaxed than input moderation**. If users phrase their prompts carefully (avoiding explicit trigger words), the LLM can produce nuanced, in-character roleplay text. ``` ### Technical Analysis The documentation recommends changing the agent's role specifically because ordinary assistant framing encounters content-moderation restrictions. It further advises users to avoid explicit trigger words and identifies differences between input and output moderation as an opportunity. This is not merely ordinary roleplay guidance. The stated purpose is to alter how safety controls respond to content that would otherwise encounter moderation barriers. If incorporated into a system prompt or agent configuration, this framing can compete with the agent's normal safety constraints and encourage generation of content outside the intended policy boundary. ### Attack Path 1. An operator installs the skill and follows its recommended configuration guidance. 2. The operator adds the proposed “professional fiction writer” role to the agent's system prompt. 3. A user submits sensitive or otherwise restricted requests using indirect wording that avoids moderation trigger terms. 4. The agent interprets the request as ficti ...[truncated 518 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
hooks/openclaw/handler.js:132
Finding

Attacker-Controlled Relationship Memory Is Injected into Future Bootstrap Contexts

Content
View full analysis
0) { const threadSummaries = pendingThreads .slice(0, 3) .map((t) => `${t.context} (due ${(t.followUpAt || '').split('T')[0]}, ${t.priority})`) .join('; '); lines.push(`Pending threads: ${pendingThreads.length} — ${threadSummaries}`); } else { lines.push('Pending threads: none'); } const activeGoals = goals.filter((g) => g.status === 'active'); if (activeGoals.length > 0) { lines.push(`Active shared goals: ${activeGoals.map((g) => g.goal).join(', ')}`); } const topStance = stanceValues.sort((a, b) => (b.strength || 0) - (a.strength || 0)).slice(0, 2); if (topStance.length > 0) { lines.push(`Stance reminders: ${topStance.map((s) => s.position).join('; ')}`); } if (recentEvents.length > 0) { lines.push(`Recent events: ${recentEvents.join(', ')}`); } const milestones = state.milestones || []; const recentMilestone = milestones[milestones.length - 1]; if (recentMilestone) { lines.push(`Latest milestone: ${recentMilestone.note} (${recentMilestone.date})`); } lines.push(''); lines.push('Follow relationship-os skill workflow for event capture and tone modulation.'); lines.push(''); const contextStr = lines.join('\n'); ``` ```javascript if (Array.isArray(event.context.bootstrapFiles)) { event.context.bootstrapFiles.push({ path: 'RELATIONSHIP_CONTEXT.md', content: context, virtual: true, }); debugLog(relDir, 'INFO', 'hook', 'Injected RELATIONSHIP_CONTEXT.md into bootstrapFiles'); } ``` An equivalent implementation is present in `hooks/openclaw/handler.ts:178-260`. ### Technical Analysis The hook reads relationship fields such as thread context, shared goals, stance positions, and milestone notes from persistent JSON files and int ...[truncated 1794 chars]
Remediation
View remediation

T06 · System Persistence

Warning
Location
SKILL.md:89
Finding

Skill Creates Persistent Scheduled Follow-Up Jobs with Outbound Delivery

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
hooks/openclaw/handler.js:168
Finding

Sensitive Relationship Context Is Duplicated into an Unprotected Plaintext Debug Log

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
README.md:31
Finding

Installation Guidance Executes an Unpinned Package through npx

Content
View full analysis
Remediation
View remediation
`. 2. Publish the expected package integrity hash and verification instructions. 3. Prefer a trusted framework-native installer that verifies package signatures and provenance. 4. Document the official package publisher and registry. 5. Recommend reviewing installation scripts and package metadata before execution. 6. Use reproducible releases and signed artifacts where supported. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (75)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 41)May include surrounding context.

text
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 110)May include surrounding context.

text
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 222)May include surrounding context.

text
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · hooks/openclaw/handler.js (reported line 91)May include surrounding context.

js
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · hooks/openclaw/handler.ts (reported line 137)May include surrounding context.

ts
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 70)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 76)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 78)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 80)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 82)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 84)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 86)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 88)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 90)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 179)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 180)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 181)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 182)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 183)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/debug.sh (reported line 187)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/init.sh (reported line 50)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/init.sh (reported line 51)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/init.sh (reported line 52)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/init.sh (reported line 63)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/init.sh (reported line 65)May include surrounding context.

sh
```
.relationship/
├── state.json      # Relationship stage, interaction count, emotion baseline
├── secrets.json    # Nicknames, inside jokes, shared goals, agreements
├── stance.json     # Agent's formed opinions and preferences
├── timeline/       # Event memory files (YYYY-MM-DD-slug.md)
└── threads/        # Pending follow-up threads (JSON)

Static analysis

Detected: suspicious.prompt_injection_instructions

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
README.md:109