Back to skill

Security audit

HMR Memory

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed local memory-integration skill, with some setup and dependency risks users should understand before installing.

Install only if you want durable local agent memory. Review and obtain the HMR service from a trusted source, use a virtual environment or container with pinned dependencies where possible, do not expose the service beyond localhost, and avoid storing secrets or untrusted external content in memory.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
README_EN.md:35
Finding

Unpinned Third-Party Python Dependencies Create Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Locations:

  • README_EN.md:35-36
  • README.md:35-36
  • hmr-memory/README_EN.md:35-36
  • hmr-memory/README.md:35-36

Vulnerability Type: Unpinned third-party dependencies
Risk Level: Medium

Vulnerable Code:

bash
# Get HMR (https://github.com/snowfoxHQ/HMR)
pip install pydantic numpy fastapi uvicorn

Technical Analysis

The documented installation command installs four packages without exact version constraints, integrity hashes, or a lockfile. Consequently, package resolution depends on whichever releases and transitive dependencies are available from the configured Python package index at installation time.

This makes installation non-reproducible and allows the reviewed dependency set to change without changes to this repository. If a named package, transitive dependency, package-index account, or configured package source is compromised, users following the instructions could install attacker-controlled code that was not included in this audit.

The comment also states that the command obtains HMR, while the command only installs general Python dependencies. It does not retrieve a pinned or verifiable version of the HMR service itself. The runtime service implementation is absent from this project and therefore falls outside the audited code boundary.

Attack Path

  1. An attacker compromises a named dependency, one of its transitive dependencies, or a package source used by the victim.
  2. The attacker publishes a malicious release that remains compatible with the unconstrained package names.
  3. A user follows the documented pip install pydantic numpy fastapi uvicorn command.
  4. Pip resolves and installs the malicious or compromised release because no version or hash restrictions prevent it.
  5. Attacker-controlled code may execute during package installation or later when the HMR service imports the affected package.
  6. The malicious dependency the ...[truncated 919 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace unconstrained package names with exact, reviewed versions in a dedicated requirements or lock file.
  2. Generate and verify cryptographic hashes for every direct and transitive dependency, then install with:
    bash
    pip install --require-hashes -r requirements.txt
    
  3. Use a reproducible dependency-management workflow such as pip-tools, Poetry, or an equivalent lockfile-based system.
  4. Review dependency updates before regenerating the lockfile, including transitive changes and package provenance.
  5. Obtain the HMR service from an explicitly documented release tag or immutable commit, and provide a checksum or signature-verification procedure.
  6. Correct the documentation so it distinguishes installing Python dependencies from obtaining the HMR service.
  7. Run the service in a dedicated, unprivileged virtual environment or container with restricted filesystem and network access.
  8. Apply the same corrected installation instructions to all four duplicated README files to prevent users from following an outdated unsafe command.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is about persistent agent memory across sessions, including saving and recalling user/context data. The supplied code does none of that. Instead, it is a standalone validation/linting script for skill packaging and safety compliance. Its primary behavior is to read local project files, parse frontmatter/JSON, compare versions/names, scan for suspicious text patterns, print warnings/errors, and exit with CI-appropriate status codes. This is a materially different purpose and introduces capabilities unrelated to memory storage or retrieval.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is agent memory persistence across sessions, but the actual code does not implement storage, retrieval, recall, or restoration of memory/state. Instead, it performs static repository validation and safety checks for a skill package. This is a materially different primary purpose and an undeclared capability unrelated to persistent memory. No evidence in the code supports the advertised memory functionality.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The primary README content is written entirely in Chinese, while the English content is only linked indirectly at L003 rather than offering an explicit language choice in the document itself. This can be read as a language/locale constraint without user opt-in, which matches the policy category for natural-language language-policy violations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The primary skill description and usage instructions are presented in Chinese, while only a separate linked English version is offered. This can be interpreted as a language-policy issue because the file itself defaults to a specific language without giving an in-document language choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and user-facing validation messages are written entirely in Chinese, which imposes a specific language on users of the skill. The file does not indicate that language choice is optional or that the locale restriction is justified for a region-specific tool, so it fits the language-policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python file contains its primary docstring, validation messages, and console output entirely in Chinese, which imposes a specific language on users of the skill tooling. The policy for natural-language violations applies to all file types, and there is no indication of user choice, locale selection, or a documented region-specific justification.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
hmr-memory/package.json:16

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
package.json:16