Back to skill

Security audit

Qmd Memory 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

This memory-search skill is not evidently malicious, but it needs review because setup can globally install an unpinned npm package and automatically index sensitive OpenClaw workspace files into persistent local search data.

Install only if you are comfortable with QMD indexing your OpenClaw Markdown files into a persistent local cache. Consider installing a reviewed/pinned QMD version yourself first, limiting OPENCLAW_WORKSPACE to a non-sensitive directory, removing secrets from Markdown before setup, checking ~/.cache/qmd retention, and using the MCP server only when localhost/shared-agent access is acceptable.

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

T08 · Insecure Dependencies

Warning
Location
scripts/setup.sh:16
Finding

Unpinned Global Installation of a Third-Party npm Package

Content
View full analysis
/dev/null; then echo "📦 Installing QMD..." npm install -g @tobilu/qmd echo "✅ QMD installed" fi ``` ### Technical Analysis The setup script installs `@tobilu/qmd` without specifying an exact version, validating an integrity hash, or using a lockfile. Consequently, npm resolves the mutable package version associated with the registry's current default distribution tag. npm package installation can execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. Because the package is installed globally, those scripts execute with the permissions of the user running the skill and can modify files accessible to that user. The script also does not request confirmation immediately before installing the package or verify that npm is using an expected trusted registry. This does not establish that the current QMD package is malicious. The vulnerability is the unsafe dependency acquisition mechanism: future package changes, registry compromise, maintainer-account compromise, or registry configuration manipulation could turn the setup command into a code-execution path. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or the registry configuration used by the victim. 2. The attacker publishes a malicious release or changes the package's default distribution tag. 3. A user without an existing `qmd` executable invokes the skill's setup command. 4. `npm install -g @tobilu/qmd` resolves and downloads the attacker-controlled package version. 5. Malicious package code or lifecycle scripts execute with the invoking user's permissions. 6. The payload can access or modify files available to that user and may alter globally installed Node.j ...[truncated 778 chars]
Remediation
View remediation
``` 2. Record and validate the expected package integrity digest before installation. 3. Verify that npm is configured to use the intended HTTPS registry and reject unexpected registry overrides. 4. Prefer a project-local dependency with a lockfile instead of modifying global Node.js tooling. 5. Disable lifecycle scripts with `--ignore-scripts` if QMD does not require them; otherwise, audit all lifecycle scripts for the pinned release. 6. Prompt for explicit user consent before downloading and executing third-party package code. 7. Run installation and indexing as an unprivileged account, never through `sudo` or a privileged service. 8. Document the exact dependency version and provide a controlled update procedure that reviews new releases before adoption. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/setup.sh:25
Finding

Broad Automatic Indexing of Sensitive Agent Memory and Configuration

Content
View full analysis
/dev/null || true qmd context add qmd://daily-logs "Daily work logs and session notes" 2>/dev/null || true fi if [ -d "$WORKSPACE/intelligence" ]; then echo "📁 Found: intelligence/ → Creating 'intelligence' collection" qmd collection add "$WORKSPACE/intelligence" --name intelligence --mask "**/*.md" 2>/dev/null || true qmd context add qmd://intelligence "Analysis, research, dashboards, and reference documents" 2>/dev/null || true fi if [ -d "$WORKSPACE/projects" ]; then echo "📁 Found: projects/ → Creating 'projects' collection" qmd collection add "$WORKSPACE/projects" --name projects --mask "**/*.md" 2>/dev/null || true qmd context add qmd://projects "Project documentation and work files" 2>/dev/null || true fi # Always create workspace collection for core files echo "📁 Creating 'workspace' collection for core agent files" qmd collection add "$WORKSPACE" --name workspace --mask "*.md" 2>/dev/null || true qmd context add qmd://workspace "Core agent files: MEMORY.md, SOUL.md, USER.md, TOOLS.md" 2>/dev/null || true ``` ### Technical Analysis The setup process automatically creates broad QMD collections for memory logs, intelligence documents, project files, and top-level workspace Markdown files. It explicitly targets persistent Agent files such as `MEMORY.md`, `SOUL.md`, `USER.md`, and `TOOLS.md`. Although indexing local memory is the skill's documented purpose, the implementation does not provide: - Per-directory or per-file consent. - A preview of files that will be indexed. - Default exclusions f ...[truncated 2239 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README advertises nightly auto-updates and automatic setup behavior without clearly warning users that the skill may initiate network activity and modify local state on an ongoing basis. In an agent-skill context, hidden background downloads or updates can surprise operators, affect reproducibility, and expand supply-chain risk if remote resources change over time.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Stating that models download automatically on first run, especially with a ~2GB payload, without a prominent warning about network use and disk impact can lead to unexpected resource consumption and unreviewed third-party code/model retrieval. In a local agent environment, this also increases operational and supply-chain exposure because users may trigger the download implicitly during normal use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The quick-start setup implies a simple installation, but elsewhere the skill reveals it auto-downloads roughly 2GB of models and builds local indexes from workspace documents. Omitting that warning undermines informed consent and may cause users to ingest sensitive files into a persistent search system without understanding the storage, bandwidth, and privacy implications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill advertises automatic indexing and nightly cron updates but does not clearly warn users that local documents will be continually scanned, embedded, and stored on disk. This can expose sensitive workspace content to broader local persistence and increase privacy risk, especially if users do not realize the scan is ongoing or that additional folders may be indexed over time.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script performs a global package installation with npm install -g @tobilu/qmd if qmd is missing, which changes system state outside the workspace without any confirmation, dry-run option, or explicit notice of the scope of the change. In an agent skill context, setup scripts may be run with elevated trust, so silent global installs increase risk of unintended system modification and supply-chain exposure from downloading and executing external package install hooks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script automatically scans workspace directories and creates searchable collections over markdown content, then runs indexing and embedding generation, without a clear privacy or data-handling consent step. Even though it targets local files, this can expose sensitive notes, project documents, or intelligence files to broader local search surfaces and potentially to downstream tooling behavior the user may not expect.

Content

No source excerpt is available for this finding.