Back to skill

Security audit

Max-Self-Improvement

Security checks for vulnerabilities and agentic risk

Overview

This skill is for persistent agent memory, but it can save broad conversation, project, and error details across sessions without clear opt-in or deletion controls.

Review this carefully before installing. Use it only if you want the agent to maintain persistent local memory, and avoid letting it store secrets, raw command output, private project details, or sensitive user information. Periodically inspect and delete the generated memory and .learnings files, and be cautious with the packaging script.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (3)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:213
Finding

Persistent Memory Can Store and Reapply Attacker-Controlled Behavioral Instructions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/error-detector.sh:11
Finding

Error Logger Persists Arbitrary Tool Output Without Secret Redaction

Content
View full analysis
> "$ERRORS_FILE" << EOF ## [$ERROR_ID] bash_command **Logged**: $TIMESTAMP **Priority**: high **Status**: pending **Area**: config ### Summary Command exited with non-zero status or unexpected output ### Error \`\`\` Exit code: $EXIT_CODE Output: ${TOOL_OUTPUT:-(no output captured)} \`\`\` ``` ### Technical Analysis The script accepts arbitrary output through its second positional argument and writes that output verbatim to `.learnings/ERRORS.md`. Error output may contain access tokens, API keys, authorization headers, database connection strings, environment variables, private filesystem paths, personal data, or command-line arguments. The implementation applies no secret redaction, output-length restriction, data classification, retention policy, or consent check. It also does not establish restrictive permissions before creating `.learnings` and `ERRORS.md`, so access depends on the invoking process’s current `umask`. The supplied value is expanded as heredoc content rather than evaluated as a shell command, so the shown code does not establish shell-command injection. However, an attacker can inject arbitrary Markdown into the log, and sensitive data can remain in plaintext for later access or accidental distribution. ### Attack Path 1. A command or tool fails and its diagnostic output contains a credential or other sensitive value. 2. The caller passes that output as the second argument to `error-detector.sh`. 3. The script interpolates the complete value into its heredoc. 4. The sensitive value is stored in plaintext i ...[truncated 956 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/package_skill.py:14
Finding

Skill Packager Can Include Sensitive Files and External Symlink Targets

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (22)

Self-Modification

High
Category
Rogue Agent
Confidence
91% confidence
Finding

The skill explicitly promotes 'self-evolution' and continuous performance optimization, which is a self-modification pattern. Even if framed as improvement rather than code mutation, it encourages the agent to change durable behavior and memory heuristics based on conversational input, creating a pathway for prompt-driven policy drift, persistence of bad instructions, or adversarial poisoning of future behavior.

Content

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

md
---
name: max-self-improvement
description: MiniMax Agent self-evolution system with 5-layer memory architecture and continuous learning. Triggers: "remember this preference", "continue from last time", "improve your response", "analyze failure", "do you remember", "self-evolve", "record this lesson", build personal memory system.
---

# Max-Self-Improvement — Self-Evolution & Memory System

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/package_skill.py (reported line 18)May include surrounding context.

python
"""排除的文件模式"""
    return {
        '__pycache__', '.pyc', '.git', '.DS_Store',
        'Thumbs.db', '*.log', '.env', 'node_modules'
    }

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list in the frontmatter uses broad conversational phrases like 'improve your response', 'do you remember', and 'record this lesson', which can cause the skill to activate in normal discussion rather than from explicit user intent. Because this skill performs persistence and memory actions, accidental activation increases the chance of unintended logging or retention of user and project data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill advertises persistent memory and continuous learning but does not present a clear user warning or consent mechanism for storing conversation-derived information. This is dangerous because users may unknowingly disclose preferences, project details, or sensitive context that the system is instructed to retain across sessions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill's core purpose is to persist user preferences, session context, and lessons into long-term memory files, which creates a direct data retention and disclosure risk. In context, the danger is elevated because broad activation rules can cause storage of conversation-derived material without precise user intent or minimization.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The feature-request patterns include very generic phrases such as 'Can you also...' and 'Is there a way to...', which appear frequently in ordinary conversation. This makes the skill likely to log routine dialogue as feature requests, creating unnecessary persistent records and possible capture of sensitive user intent or context.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The entry templates instruct the system to log full context, error output, inputs, parameters, environment details, and user context in plain language. These fields are likely to capture secrets, personal data, internal paths, tokens, prompts, or proprietary project information, turning routine logging into a durable disclosure surface.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The promotion rules explicitly move behavioral patterns, workflow improvements, tool tips, and project facts into persistent memory locations, encouraging long-term accumulation of user and project data. This increases the blast radius of any mistaken capture, since ephemeral conversation details can be normalized into durable knowledge stores.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instruction to always read prior notes and save all in-progress state before restart promotes wholesale retention of session state. In practice, this can preserve sensitive transient details that should remain ephemeral, especially when no minimization, consent, or redaction requirements are defined.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown template instructs authors to define trigger phrases using placeholders like "When user says..." and "When situation..." without emphasizing specificity, scope limits, or exclusion conditions. If reused as-is or followed loosely, it encourages ambiguous activation criteria that overlap with common speech and makes unintended invocation more likely.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entry point section shows conditions as simply "When...", which provides no guidance on how to distinguish valid activation contexts from invalid ones. For a skill template, this omission can propagate ambiguous invocation logic into downstream skills.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The architecture explicitly defines persistent storage for user preferences marked as never deleted and additional long-term memory files, but it provides no consent, minimization, retention, or privacy controls. In an agent skill, this can lead to silent accumulation of personal or sensitive data across sessions, creating privacy, compliance, and unintended data exposure risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow describes automatically writing successes, failures, lessons, and promoted knowledge into persistent memory without warning users that their task outcomes and interactions may be retained. This is dangerous because task results can contain sensitive prompts, project details, mistakes, or derived personal information that become durable records without transparency or approval.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file includes a persistent preference entry Code comments: en-US and later states that all code comments will automatically use English. This is a natural-language policy concern because it imposes a specific language behavior across sessions rather than offering a language choice or clearly documenting a justified locale constraint.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The note '用户偏好永不自动删除' directs indefinite retention of user preference data across sessions, which creates unnecessary long-term storage of user-provided information. Even if the data seems low sensitivity here, indefinite persistence increases exposure in the event of memory leakage, unauthorized access, over-collection, or future repurposing beyond the user's expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The user_preferences.md template includes Code comments: en-US | zh-CN, which hard-codes language/locale options for generated code comments. This can create a language/locale policy issue because it frames comment language as a preset constraint without stating that the user must explicitly choose or opt in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script persists error details to a local markdown log and only prints a generic confirmation message to stdout. This creates a transparency and privacy problem because users may not realize potentially sensitive failure data is being retained on disk for later exposure to other local users, backups, or tooling.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script writes arbitrary command output directly into a persistent file, and that output may contain secrets such as tokens, API keys, credentials, file contents, or other sensitive data produced during failures. In a skill context that captures command errors automatically, this is more dangerous because failures often include verbose diagnostics and echoed inputs, making accidental secret retention likely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This Python file contains user-facing natural-language strings and comments in Chinese, including the module docstring and function docstrings, without offering a language choice or explaining that the skill is region-specific. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains user-facing natural-language strings and comments in Chinese, including the module docstring and validation descriptions. Under the policy, forcing a specific language without opt-in or a documented locale-specific reason is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The correction-detection phrases are broad enough that ordinary clarification or disagreement could be treated as a structured learning event. While less severe than the main trigger issue, it still creates a risk of unnecessary persistence and inaccurate memory formation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example learning entry states 'Code comments should use English' and suggests changing comment language to English by default. This is a natural-language locale/language constraint presented without opt-in, alternatives, or a documented region-specific justification, which fits the policy-violation criteria.

Content

No source excerpt is available for this finding.