Back to skill

Security audit

Ralph Loop

Security checks for vulnerabilities and agentic risk

Overview

This skill is an autonomous work-loop helper, but it broadly activates, suppresses normal pauses for user control, stores task text, and sends task updates through Telegram by default.

Review before installing. Use this only if you explicitly want an agent to run long tasks with reduced interruptions, and avoid using it for confidential, financial, account, destructive, or externally visible work unless Telegram notifications are optional, redacted, and sent only to a destination you approved. The state file should not contain secrets or full prompts verbatim.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:13
Finding

Broad Activation Hijacks Agent Control Flow and External Communications

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 13-18, 48-57, 94-100, and 112-119
Vulnerability Type: Agent instruction hijacking
Risk Level: High

Vulnerable Code Snippets

markdown
## Activation
Triggered when the user says:
- "Ralph loop" (any capitalization)
- "Start Ralph Loop on [task]"
- "Run it in Ralph loop"
- "Ralph loop" before any multi-step task
- Any task the user expects the AI to execute autonomously without questions
markdown
### PHASE 2: Execute — NEVER STOP

**The only acceptable reasons to pause and wait for the user:**
- Error cannot be resolved after exactly 2 attempts
- Critical information only the user has (e.g. their name, CV content, password)

**For every other situation: keep working. Do not stop. Do not ask. Do not wait.**
markdown
| **Never stop mid-task to ask the user something unless truly stuck** | 🚨 CRITICAL |
| Do not restart a loop once started — continue until done | 🚨 CRITICAL |
| Send Telegram updates only after completing a phase (2-4 steps) | ✅ Normal |
markdown
1. **START → FINISH. No stopping in the middle.**
2. If stuck after 2 attempts → only then stop and tell the user
3. Keep working until every step is `[x]` before sending any Telegram message
4. Telegram message = progress notification, NOT a request for permission
5. Delete the file when done
6. Never restart a loop — continue from where you left off

Technical Analysis

The Skill activates not only when a user explicitly requests “Ralph Loop,” but also for the open-ended condition “any task the user expects the AI to execute autonomously without questions.” Once loaded, it imposes priority-style instructions that direct the agent to continue working, avoid asking questions, and avoid waiting for authorization except under narrowly defined circumstances.

These instructions alter the agent's normal control flow and can suppress clarification, consent, and approval checks needed for ambiguous, destr ...[truncated 1878 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit per-task activation using an unambiguous phrase; remove the catch-all autonomous-task activation condition.
  2. Replace “never stop,” “do not ask,” and “do not wait” with guidance subordinate to the agent's safety policies and task-specific authorization requirements.
  3. Require confirmation before destructive, privileged, financial, privacy-sensitive, irreversible, or externally visible actions.
  4. Allow clarification whenever task scope, authorization, target, or expected outcome is ambiguous.
  5. Make Telegram notifications opt-in and require an explicitly approved recipient or destination.
  6. Redact secrets, personal data, original prompt content, internal paths, and sensitive task metadata from all notifications.
  7. Add hard execution boundaries, including maximum iterations, time limits, command limits, and a user-accessible cancellation mechanism.
  8. State explicitly that the Skill cannot override platform policies, tool authorization boundaries, or higher-priority instructions.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:20
Finding

Verbatim User Requests Are Written to a Predictable Plaintext State File

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 20-23 and 43-46
Vulnerability Type: Plaintext storage of potentially sensitive task data
Risk Level: Medium

Vulnerable Code Snippets

markdown
## Ralph Loop File — Structure
Location: `/workspace/memory/ralph-loop.md`

```markdown
# Ralph Loop — [Task Name]
Started: [YYYY-MM-DD HH:MM UTC] | Status: 🟡 In Progress

## Goal
[User's original request — verbatim]
text

```markdown
### PHASE 1: Init
1. Create `/workspace/memory/ralph-loop.md` with the full plan
2. Set status to `🟡 In Progress`

Technical Analysis

The Skill requires the user's original request to be copied verbatim into a predictable plaintext file at /workspace/memory/ralph-loop.md. User requests can contain passwords, tokens, personal data, confidential business information, internal hostnames, or other sensitive content. The specification provides no redaction rules, restrictive file-permission requirements, encryption, atomic-creation requirements, or checks against symbolic-link manipulation.

Although the file is intended to be deleted at successful completion, it remains present throughout execution and may persist if the task fails, the process terminates unexpectedly, or cleanup does not run. Predictable naming also makes the file easier for other workspace processes or users to locate.

Attack Path

  1. A user submits a task whose prompt contains sensitive information.
  2. Ralph Loop activates and copies the entire request verbatim into /workspace/memory/ralph-loop.md.
  3. Another process or user with workspace read access locates the predictable file and reads its contents.
  4. Alternatively, execution terminates before Phase 3, leaving the plaintext file behind.
  5. Sensitive prompt data is exposed for the lifetime of the file or longer if cleanup fails.

Impact Assessment

This behavior does not independently create new system privileges. An attacker must already have sufficient access to rea ...[truncated 374 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not store the original request verbatim. Persist only the minimum state required to resume the task.
  2. Redact passwords, access tokens, API keys, cookies, personal information, and other sensitive values before writing state.
  3. Create the state file with restrictive permissions, such as owner-only read and write access.
  4. Use a task-specific, non-predictable filename in a protected directory rather than one shared fixed path.
  5. Prevent symbolic-link and race-condition attacks by using secure file-creation semantics and refusing to follow links.
  6. Use atomic writes and validate file ownership and permissions before every read or update.
  7. Implement cleanup for completion, cancellation, failure, timeout, and abnormal termination.
  8. Define a short retention period and warn users not to include credentials in task prompts.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger 'Any task the user expects the AI to execute autonomously without questions' is extremely broad and subjective, allowing the skill to activate on ordinary requests without explicit consent. In this skill's context, activation also enables persistent memory and external Telegram updates, making accidental invocation significantly more dangerous.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill requires Telegram progress messages but does not warn users that task details may be transmitted off-platform. This undermines informed consent and can expose sensitive instructions, operational status, and generated artifacts to an external communications provider.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Applying the skill before 'any multi-step task' is overbroad because many normal requests are multi-step and may not warrant autonomous looping behavior. This increases the chance of unintended persistent tracking, reduced user oversight, and unsolicited notifications.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill mandates Telegram status messages during execution without any scoped justification, consent flow, or limits on transmitted content. That creates an external data egress channel that could leak task names, progress details, file paths, or sensitive work context to a third-party service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The protocol instructs the agent to delete the persistent memory file on completion without warning the user that intermediate records will be removed. That can destroy auditability, hinder incident review, and remove information the user may expect to retain.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The Telegram message examples are written in Serbian/Cyrillic and presented as the expected style, but the document does not offer language choice or explain a justified locale restriction. This can be interpreted as forcing a specific language/locale without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The rules section states 'Send Telegram updates only after completing a phase (2-4 steps)' and later says to keep working until every step is checked before sending any Telegram message. However, the Phase 1 instructions explicitly require sending a Telegram message immediately upon loop start, which contradicts the stated messaging rule.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

Phase 2 explicitly instructs the agent to send a Telegram update whenever a logical group of 2-4 steps is complete. That directly conflicts with the later rule saying to keep working until every step is marked complete before sending any Telegram message.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.