Back to skill

Security audit

mmxagent-guardian

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed local file-protection tool, but it can copy, move, restore, and persist sensitive files outside the project without strong boundaries.

Install only if you are comfortable with an agent-maintained local backup store that can retain sensitive files. Avoid using it on credential directories, .env files, cloud profiles, SSH/GPG keys, or system paths unless you explicitly intend that, and keep operations limited to trusted project files.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/minivcs/minivcs.py:493
Finding

Unrestricted File Operations Outside the Project Root

Content
View full analysis
str: if absolute_path.startswith(self.project_root + os.sep): return absolute_path[len(self.project_root) + 1 :] return absolute_path ``` The modification and deletion operations accept the resulting unrestricted path: ```python def record_modify(self, file_path: str) -> Dict[str, Any]: abs_path = os.path.abspath(file_path) if not os.path.exists(abs_path): return {"success": False, "error": f"File not found: {file_path}"} ``` ```python def record_delete(self, file_path: str) -> Dict[str, Any]: abs_path = os.path.abspath(file_path) if not os.path.exists(abs_path): return {"success": False, "error": f"File not found: {file_path}"} ``` Restore operations preserve absolute paths and can write directly to them: ```python file_path = record.get("filePath", "") target_path = file_path if os.path.isabs(file_path) else os.path.join(self.project_root, file_path) success = self.file_manager.restore_from_trash(trash_file, target_path) ``` ```python file_path = record.get("filePath", "") target_path = file_path if os.path.isabs(file_path) else os.path.join(self.project_root, file_path) os.makedirs(os.path.dirname(target_path), exist_ok=True) with open(target_path, "w", encoding="utf-8") as f: f.write(content) ``` ### Technical Analysis `project_root` is used only to convert paths into relative record names. It is not enforced as an authorization boundary. If a target is outside the project, `_get_relative_path()` deliberately returns its absolute path. As a result, th ...[truncated 2432 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/minivcs/minivcs.py:186
Finding

Plaintext Sensitive Backups Created Without Enforced Restrictive Permissions

Content
View full analysis
str: timestamp = int(time.time() * 1000) safe_path = _make_safe_path(relative_path) diff_path = os.path.join(self.diffs_dir, f"{timestamp}_{safe_path}.patch") with open(diff_path, "w", encoding="utf-8") as f: f.write(diff_content) return diff_path def save_snapshot(self, relative_path: str, content: str) -> str: timestamp = int(time.time() * 1000) safe_path = _make_safe_path(relative_path) snap_path = os.path.join(self.snapshots_dir, f"{timestamp}_{safe_path}.snap") with open(snap_path, "w", encoding="utf-8") as f: f.wri ...[truncated 3713 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (14)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Runtime requirement**: Python 3 is required to run `scripts/minivcs/minivcs.py`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Runtime requirement**: Python 3 is required to run `scripts/minivcs/minivcs.py`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Script location**: `scripts/minivcs/minivcs.py` in the same directory as this `SKILL.md`

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

md
If Python 3 is missing:

- Do **not** run dependency installation commands from this Skill
- Do **not** run remote install scripts such as `curl | bash`
- Do **not** write to shell config files such as `~/.zshrc` or `~/.bash_profile`
- Do **not** modify global environment variables on the user's behalf from this Skill
- Tell the user that Python 3 is required, and ask them to install it first or explicitly authorize a separate environment-setup flow

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The retention policy explicitly treats highly sensitive directories such as ~/.ssh, ~/.gnupg, ~/.aws, ~/.azure, ~/.kube, and ~/.docker as files to be copied into local backup/trash storage. This can duplicate credentials, tokens, and private keys into a secondary location under ~/.openclaw/minivcs/, expanding the attack surface and increasing the chance of credential theft if that store is accessed.

Content

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

md
| File Type | Retention Days | Decision Rule |
|---------|---------|---------|
| Important files | **14 days** | System paths (`/etc/`, `/root/`, `/usr/local/etc/`, `/opt/`), user config directories (`~/.ssh/`, `~/.gnupg/`, `~/.config/`, `~/.openclaw/`, `~/.kube/`, `~/.docker/`, `~/.aws/`, `~/.azure/`, `~/.local/share/`), Windows system directories (`C:\Windows\`, `C:\ProgramData\`, `C:\Program Files\`), config files (`.yaml/.toml/.env`, etc.), entry files (`main.py/index.ts`, etc.) |
| Normal files | **7 days** | All other files |

When each record is created, the `expireAt` (expiration timestamp) and `expireAtDatetime` (human-readable time) fields are set automatically.

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The inclusion of '.env' in IMPORTANT_FILENAME_PATTERNS signals special retention of a file type that commonly contains secrets such as API keys, tokens, and database credentials. In this skill, that increases the chance that plaintext secrets are copied into persistent backup/snapshot storage under the user's home directory, expanding credential exposure if that store is compromised.

Content

Scanner excerpt · scripts/minivcs/minivcs.py (reported line 69)May include surrounding context.

python
".ini",
    ".cfg",
    ".conf",
    ".env",
    "main.py",
    "app.py",
    "server.py",

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill clearly instructs file modification, deletion, restore, and history operations, but it does not declare any tool scope or allowed-tools restrictions. That mismatch weakens sandboxing and review controls, because an agent could be granted broader file read/write capability than users or policy expect.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
- Do **not** run dependency installation commands from this Skill
- Do **not** run remote install scripts such as `curl | bash`
- Do **not** write to shell config files such as `~/.zshrc` or `~/.bash_profile`
- Do **not** modify global environment variables on the user's behalf from this Skill
- Tell the user that Python 3 is required, and ask them to install it first or explicitly authorize a separate environment-setup flow

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The example trigger "Help me restore/roll back xxx" is broad and conversational, and could overlap with ordinary user requests outside a narrowly defined skill-invocation context. The document does not provide explicit trigger constraints, exclusions, or a bounded activation scope for when this skill should engage on such phrasing.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly treats credential and configuration directories such as ~/.ssh, ~/.gnupg, ~/.aws, ~/.docker, ~/.kube, and .env/config-style files as 'important' and therefore retains copies of them longer. That behavior expands the data collection scope beyond the stated openclaw file-protection use case and increases exposure of highly sensitive material in ~/.openclaw/minivcs if the host or that directory is accessed by another process or user.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

record_modify accepts any supplied path, converts it to an absolute path, and proceeds as long as the path exists and is not on a small skip list; similar behavior exists for delete/restore/cleanup flows. This means the skill can snapshot, move to trash, restore, and clean up files outside the intended project/openclaw scope, enabling unintended manipulation of arbitrary filesystem locations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

restore_file restores deleted files or overwrites current files from stored snapshots/backups without any built-in confirmation, dry-run, or destination validation. In an agent context, that makes destructive rollback or file recreation easier to trigger programmatically, especially when combined with broad path handling and sensitive-file retention.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

delete_record_by_id permanently removes metadata and associated diff/trash/snapshot/backup artifacts immediately, with no confirmation or soft-delete stage. In an agent-driven workflow this can erase recovery material and audit history, making accidental or malicious cleanup of backups harder to detect or reverse.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The record_modify docstring states it should be called once after each edit and that later calls save the pre-edit snapshot needed for rollback. However, this restore error says rollback is only possible when record_modify was called both before and after the edit, which directly contradicts the documented and implemented single-post-edit workflow.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.