Back to skill

Security audit

Reframe

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a reframing aid, but it asks the agent to store conversation context in a shared temp file and to invoke a skill manager for self-updates without clear user control.

Review this skill before installing. It is not showing exfiltration or destructive code, but users should remove or constrain the self-update instructions and replace the fixed temp-file workflow with in-memory handling or a secure per-session temp file with cleanup.

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:29
Finding

Predictable Shared Temporary File Enables Data Disclosure and File Manipulation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 29-41
Vulnerability Type: Unsafe temporary-file handling
Risk Level: Medium

Vulnerable Code

markdown
Write a compressed problem summary to a temp file, then read it back.

1. Collect the essential facts into a structured summary
2. Write to a temp file
3. Read it back
4. Answer the fresh analysis questions
5. Continue based on the reframe

6. **验证**: 确认 reframe 后的方案确实简化了问题。如果仍然复杂或绕圈子,此 skill 需要更新——加载 skill-manager 修复。

## Summary Template

Write this to `/tmp/reframe.md`:

Technical Analysis

The Skill requires the agent to store conversation-derived information at the fixed, predictable path /tmp/reframe.md. The summary may contain project paths, errors, operational constraints, attempted solutions, or other sensitive contextual information.

The instructions do not require:

  • Unique per-run filenames
  • Exclusive file creation
  • Restrictive file permissions
  • File ownership validation
  • Symbolic-link rejection
  • Integrity checks before reading
  • Secure deletion after use

On a shared system, another local process or user may predict and pre-create this path. If the file-writing tool follows symbolic links, the write could be redirected to another file that the agent is permitted to modify. An attacker could also replace or alter the summary before it is read back, causing untrusted content to influence subsequent analysis.

Attack Path

  1. A local attacker predicts that the Skill will use /tmp/reframe.md.
  2. Before invocation, the attacker creates that file or places a symbolic link at that path.
  3. The agent writes conversation-derived information to the attacker-controlled file or linked destination.
  4. The attacker reads the resulting summary, potentially exposing sensitive contextual data.
  5. Alternatively, the attacker modifies the file before the agent reads it back.
  6. The agent consumes the manipulated text as its reframed problem summary, potentially contam ...[truncated 791 chars]
Remediation
View remediation

Remediation Suggestions

Prefer keeping the compressed summary in the agent's active context rather than persisting it to the filesystem.

If file-backed storage is essential:

  1. Create a cryptographically unpredictable, per-invocation temporary filename in a private directory.
  2. Use an operating-system secure temporary-file API with exclusive creation enabled.
  3. Set permissions so only the current user can read or write the file.
  4. Reject symbolic links and verify the file's ownership and type before writing and reading.
  5. Keep the file descriptor open between writing and reading to reduce replacement races.
  6. Do not include secrets, credentials, or unnecessary private context in the summary.
  7. Delete the file immediately after use, including on error paths.
  8. Avoid sharing the same temporary path across users, sessions, or concurrent Skill executions.
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill expands beyond problem reframing into instructing the agent to load a separate skill-manager to repair or update skills. That creates an unnecessary self-modification pathway: a simple analysis aid should not be able to trigger capability escalation into changing other skills, which could be abused to alter behavior or bypass intended boundaries.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The self-optimization and self-evolution language explicitly authorizes the skill to improve itself or trigger optimization when verification passes or fails. This is dangerous because it normalizes recursive modification behavior unrelated to the skill's stated purpose, increasing the chance of prompt-scope drift, unauthorized changes, and abuse through adversarial inputs that manipulate the optimization path.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Trigger phrases like 'simple', 'another method', or 'rethink' are common in ordinary conversation and may match many benign requests. Because this skill contains side effects such as writing summaries to disk and potentially invoking other skills, overly broad phrase matching increases the risk of unintended execution and workflow manipulation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The auto-trigger conditions are broad and subjective, such as when a plan 'seems to be expanding' or there has been 'no progress' after several tries. In practice this can cause the skill to activate unexpectedly, potentially overriding normal reasoning flow and causing unnecessary file writes or cross-skill actions from loosely matched situations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs writing a compressed summary of user context to /tmp/reframe.md without any data-minimization, sensitivity screening, retention, or access guidance. Temp-file storage can expose private conversation data to other processes, later sessions, or logs, especially in shared or persistent environments.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.