Back to skill

Security audit

aiheal cli

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent CLI operator, but it exposes high-impact billing, raw API, credential, and mutable package-execution paths without enough scoping or user-control warnings.

Review before installing. Use only a vetted and pinned `aihealingmecli` version, avoid one-shot unpinned `npx` on sensitive machines, use least-privilege or test credentials, and require explicit human approval before billing, deletion, upload/download, raw API, memory, behavior, chat, or emotional-health data operations.

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
scripts/smoke_check.sh:29
Finding

Unpinned Third-Party npm Package Is Downloaded and Executed

Content
View full analysis

Vulnerability Details

File Location: scripts/smoke_check.sh:4, 29-32; also documented in SKILL.md:25-26, 83 and references/command-map.md:22-23, 366-367
Vulnerability Type: Supply-chain exposure through an unpinned executable dependency
Risk Level: Medium

Vulnerable Code

bash
PKG_NAME="${AIHEAL_NPM_PACKAGE:-aihealingmecli}"
CACHE_DIR="${AIHEAL_NPM_CACHE_DIR:-${TMPDIR:-/tmp}/aiheal-cli-npm-cache-${UID}}"
bash
if command -v aiheal >/dev/null 2>&1; then
  echo "[smoke] using global aiheal binary"
  run_cli_checks aiheal
else
  mkdir -p "${CACHE_DIR}"
  echo "[smoke] using npx package ${PKG_NAME}"
  run_cli_checks env NPM_CONFIG_CACHE="${CACHE_DIR}" npx -y -p "${PKG_NAME}" aiheal
fi

The corresponding installation guidance in SKILL.md is:

markdown
- Global runtime: `npm install -g aihealingmecli` then `aiheal ...`.
- No-global runtime: `npx -y -p aihealingmecli aiheal ...`.

Technical Analysis

The Skill downloads and executes aihealingmecli without pinning an exact, reviewed version or verifying artifact integrity. The npx -y option permits unattended package resolution, installation, and execution. Consequently, the code that runs can change after this Skill has been reviewed.

The AIHEAL_NPM_PACKAGE environment variable additionally permits the package specification to be replaced with another npm source or tarball. Although this override may support legitimate testing, the script applies no package-name allowlist, exact-version requirement, checksum validation, or trusted-source restriction.

The package implementation is not included in the audited project. Therefore, this finding does not assert that the current package is malicious; it identifies that the project delegates execution to a mutable and unverifiable supply-chain component.

Attack Path

  1. An attacker compromises the npm publisher account, publishes a malicious future release, influences dependency resolution, or causes an unsafe ...[truncated 1457 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to an exact reviewed version, for example aihealingmecli@X.Y.Z, in both the script and documentation.
  2. Commit package-lock or equivalent integrity metadata where practical, and install with a deterministic mechanism such as npm ci.
  3. Verify the downloaded artifact against an approved integrity hash or signed provenance before execution.
  4. Avoid automatic execution of a mutable package through npx -y; install and review the approved artifact separately.
  5. Remove AIHEAL_NPM_PACKAGE if arbitrary package substitution is unnecessary. Otherwise:
    • Validate it against an explicit allowlist.
    • Require an exact version.
    • Reject URLs, Git sources, local paths, and unapproved tarballs.
  6. Disable npm lifecycle scripts with --ignore-scripts where compatible, while recognizing that this does not make untrusted runtime code safe.
  7. Run the CLI in a sandbox with minimal filesystem, network, credential, and environment-variable access.
  8. Audit the source and published contents of the pinned package before deployment, including lifecycle scripts and transitive dependencies.
  9. Ensure the global-binary path also verifies the installed binary's expected version and origin before use.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (20)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Read [references/command-map.md](references/command-map.md) for full command syntax and parameter meanings.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

subscription admin-refund is an administrative billing action that exceeds a normal end-user subscription workflow and can directly affect financial state. Exposing or documenting admin-grade operations in a general operator skill increases the risk of unauthorized refunds, abuse of privileged credentials, and financial loss if the capability is invoked improperly or by an over-permissioned agent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

api request provides a generic raw API primitive that can target arbitrary endpoints and optionally disable auth. This bypasses the guardrails of task-specific commands, enabling unexpected reads, writes, enumeration, or misuse of backend functionality beyond the intended operator workflow. In an agent skill, such a universal transport greatly increases abuse potential because it turns the skill into a general-purpose API client.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill advertises operations over user, subscription, notification, feedback, memory, and behavior data but does not warn that these actions may modify sensitive account state or expose private behavioral/emotional information. In this context, the omission increases the likelihood of unsafe execution by an agent or operator without informed consent, least-privilege checks, or data-handling safeguards.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill instructs use of npx -y -p aihealingmecli without pinning an exact package version or integrity-verified source. This allows silent retrieval of whatever package version is current at execution time, increasing supply-chain risk and making behavior non-reproducible; in an agent skill context, that can lead to arbitrary code execution if the package is compromised or typo-squatted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The login/token setup guidance tells operators to use auth/config flows but omits any warning about secure handling of credentials, API tokens, and command-line secret exposure. In CLI workflows, tokens may be leaked through shell history, logs, process listings, screenshots, or shared config files, which is particularly risky given the account and health-related data this service appears to manage.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The smoke-test guidance again uses npx -y -p aihealingmecli without version pinning, creating the same runtime supply-chain exposure during verification steps. Because smoke scripts are likely to be run automatically and repeatedly, an upstream package compromise could be triggered with minimal scrutiny.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The reference expands the skill from a task-focused CLI operator into broader advanced-access functionality, including raw API and internal-service operations not clearly justified by the manifest description. That scope expansion increases the chance an agent or user will invoke privileged or unsafe capabilities outside the intended workflow boundary, weakening least-privilege assumptions.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The documentation instructs users to execute npx -y -p aihealingmecli without pinning a specific package version. That causes code to be fetched and executed from the registry at runtime, so a compromised upstream package, malicious update, or dependency hijack could immediately lead to arbitrary code execution in the user's environment. In a security-sensitive operator skill, this is especially dangerous because the CLI handles tokens, account actions, and file operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The auth commands include email, phone, password, onboarding, and password-update operations, and the file presents them as usage references without any privacy or credential-handling warning. For markdown files, omission of warnings about behaviors affecting user privacy or account data is in scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file documents operations such as audio create, audio update, audio delete, and downloads to --output <path> without any warning about modifying or deleting data. Under the markdown-specific SQP-2 criteria, descriptions should disclose behaviors that may affect user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Commands such as subscription admin-refund, subscription order-cancel, and payment confirmation/capture operations can change billing state and may be difficult to reverse, yet the markdown provides no cautionary disclosure. This is a missing-warning issue because the skill description omits warnings about actions affecting user data and system/business integrity.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The healing commands accept caller-supplied base URLs and perform pipeline, plan, voice-preview, and file-download operations against those endpoints. Allowing arbitrary base URLs broadens the skill into a generic network client and can facilitate access to unintended internal services, data exfiltration, or SSRF-like behavior if used in connected environments. This is more dangerous here because the skill is positioned as an operator for healing workflows, so the expanded capability may not be expected or reviewed as carefully.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The smoke-check recipe again uses npx -y -p aihealingmecli without a pinned version, which means the command may install and run whatever version is current on the npm registry. That creates a supply-chain execution path where an attacker controlling the package or a dependency could execute arbitrary code during troubleshooting workflows. Repetition in diagnostic guidance increases the likelihood that users will actually run the unsafe pattern.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

This second smoke-check command repeats the same unpinned npx execution pattern, creating another direct runtime supply-chain risk. Because the command is framed as a path-independent health check, operators may run it on production or privileged systems, increasing the blast radius if the package is tampered with.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The documentation instructs users to run npx -y -p aihealingmecli aiheal --help without pinning a package version. Unpinned npx execution can pull the latest published package at runtime, creating supply-chain risk if the package is compromised, typo-squatted, or unexpectedly changed; the -y flag further reduces friction for silent execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The runtime note recommends npx -y -p aihealingmecli aiheal ... when the global binary is unavailable, again allowing runtime installation of whatever version is current. In an operator skill focused on auth, subscription, and API workflows, this is more dangerous because the executed CLI may handle tokens, user data, and network endpoints, amplifying the impact of a malicious package release.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The script executes a package via npx -y -p "${PKG_NAME}" aiheal without pinning an exact version, so it may fetch and run whatever version is currently resolved from the registry. If the package is updated maliciously, compromised upstream, or a different package name is injected through AIHEAL_NPM_PACKAGE, arbitrary code could execute during the smoke check.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The playbook instructs users to ensure the token slot matches --region zh|en, which embeds a language/locale constraint in the workflow. The document does not explain the reason for this locale split or offer user choice guidance, so it may violate language/locale policy expectations.

Content

No source excerpt is available for this finding.