Back to skill

Security audit

Autoresearch Skill Optimizer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a plausible skill optimizer, but it asks for broad access to prior session history and gives ambiguous authority to modify other skill files.

Review this skill before installing if you use it on important or private workflows. Require explicit approval before any file writes, provide safe test inputs yourself, and do not allow it to inspect unrelated memory or session history.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:42
Finding

Unnecessary Access to Agent Memory and Session History

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 42
Vulnerability Type: Unauthorized access to potentially unrelated session data
Risk Level: Medium

Vulnerable Code

markdown
- Use recent real invocations from memory/session history

Technical Analysis

The skill instructs the agent to inspect memory or session history when the user does not supply representative test inputs. Prior interactions may contain personal information, credentials, confidential project data, or content unrelated to the current optimization task.

This violates least-privilege principles because suitable alternatives are already available in the surrounding workflow, including examples in the target skill's documentation and prompts supplied by the user. The instruction also lacks requirements for explicit user consent, scope restrictions, data minimization, or redaction before historical content is reused.

Attack Path

  1. A user invokes the optimizer without providing test inputs.
  2. Following SKILL.md, the agent searches its memory or session history for recent invocations.
  3. The selected history contains information unrelated or sensitive to the current task.
  4. The optimizer uses that information as test input.
  5. Sensitive content may consequently appear in generated outputs, evaluation results, or the optimization changelog.

This path does not require code execution or an external attacker-controlled server. It relies on the agent following the skill's documented fallback procedure.

Impact Assessment

The instruction may expose data accessible through the agent's memory or current session context beyond what is necessary for skill optimization. Potentially affected information includes prior prompts, generated responses, personal data, confidential business material, and secrets previously placed in conversational context.

The issue does not grant operating-system privileges, establish persistence, or directly exfiltrate data to a ...[truncated 193 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the memory/session-history fallback and prefer test material from the target skill's documentation.
  2. If no safe examples exist, explicitly ask the user to provide two or three representative inputs.
  3. If historical data must be used, obtain explicit informed consent before accessing it.
  4. Restrict access to invocations specifically associated with the target skill rather than general session history.
  5. Redact credentials, personal data, confidential information, and unrelated context before testing.
  6. Prevent raw test inputs from being copied into persistent changelogs unless necessary and approved.

A safer replacement would be:

markdown
- If suitable examples are unavailable in the skill documentation, ask the user for 2-3 representative test inputs. Do not inspect unrelated memory or session history without explicit user consent.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger condition 'before running any skill at scale' is overly broad for a skill that can rewrite other skills and generate optimization artifacts. Broad activation guidance increases the chance of this skill being invoked in inappropriate or sensitive contexts, causing unnecessary prompt mutation, workflow interference, or propagation of low-quality changes across high-impact automations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill gives conflicting instructions about when file modifications may occur: one part says fixes are applied only if approved, while another says some structural changes should be applied immediately. In a toolchain that can write files, ambiguous mutation authority can lead to unauthorized edits, unexpected artifact creation, or silent changes to prompts that later run at scale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill describes optimization behavior but does not prominently warn that it may modify working copies of skill content and create new files such as optimized variants and changelogs. In the context of a meta-skill that operates on other prompts, insufficient disclosure is risky because users may trigger write operations or prompt changes without understanding the side effects.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The description presents an in-place autoresearch loop with 'keeps if better, reverts if worse,' which implies direct modification and rollback of the skill under test. Later instructions state the output is written to SKILL-optimized.md with the original untouched, which is a materially different workflow than the manifest suggests.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.