Back to skill

Security audit

health-reasoner

Security checks for vulnerabilities and agentic risk

Overview

This is mainly a local Chinese-language health scoring tool, but its installer offers an unnecessary unpinned Flask install for an API mode the code does not implement.

Install only if you are comfortable with a Chinese-language, local-only wellness scoring tool. Do not accept the Flask install prompt unless the publisher adds a working reviewed API mode with pinned dependencies; avoid storing history files in shared or synced locations because they contain health-related assessment summaries.

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/setup.sh:18
Finding
Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `scripts/setup.sh`, lines 18–25 **Vulnerability Type**: Unpinned dependency installation from the active pip package index **Risk Level**: Medium ### Vulnerable Code ```bash # Optional: install Flask for REST API mode read -p "Install Flask to enable the API service? (y/N): " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then pip3 install flask echo "Flask installed" else echo "Skipping Flask (CLI/JSON mode remains available)" fi ``` The comments and displayed messages above are English translations of the original text; the executable vulnerable statement is unchanged: ```bash pip3 install flask ``` ### Technical Analysis The setup script installs Flask without an exact version constraint, cryptographic hash verification, an isolated virtual environment, or a restricted trusted package index. Consequently, the package and its transitive dependencies are resolved dynamically from the invoking user's current pip configuration. Python package installation may execute package build or installation logic. If the configured index or mirror is compromised, dependency resolution is manipulated, or a future package release is compromised, accepting the installation prompt could cause attacker-controlled code to run locally. The risk is avoidable because the audited implementation does not contain the advertised Flask API mode: `health_reasoner.py` defines no `--api` argument or Flask server. The setup process therefore introduces mutable third-party supply-chain exposure for functionality that is absent from the project. ### Attack Path 1. An attacker compromises or controls a package source used by the victim's pip configuration, or compromises a package release selected during dependency resolution. 2. The victim runs `scripts/setup.sh`. 3. The script asks whether Flask should be installed. 4. The victim answers `y`. 5. `pip3 install flask` resolves F ...[truncated 1121 chars]
Remediation
## Remediation Suggestions 1. Remove the Flask installation prompt unless a working and reviewed API implementation is added. 2. If Flask is required, declare exact reviewed versions for Flask and every transitive dependency in a lock file. 3. Require cryptographic hashes during installation, for example: ```bash python3 -m pip install --require-hashes -r requirements-api.txt ``` 4. Generate `requirements-api.txt` from a reviewed dependency lock process and include one or more approved hashes for every distribution. 5. Create and use a dedicated virtual environment rather than modifying the invoking user's global Python environment: ```bash python3 -m venv .venv .venv/bin/python -m pip install --require-hashes -r requirements-api.txt ``` 6. Use an explicitly approved HTTPS package index or internal mirror and prevent unintended fallback to untrusted extra indexes. 7. Document the verified Python and dependency versions and regularly review them for published security advisories. 8. Implement and security-review the advertised API functionality before offering its dependencies to users.
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 (12)

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The file presents the entire API specification and all example messages exclusively in Chinese, including user-facing suggestion text such as the `message` fields. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The primary natural-language description is written entirely in Chinese, which can impose a language constraint on users if the skill is intended for a general audience. The file does not indicate that the skill is China/Chinese-specific or provide an opt-in or alternative language.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The manifest description and the entire README content are written in Chinese, with no indication that other languages are supported or that Chinese is an optional locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Natural-Language Policy Violations

Medium
Confidence
82% confidence
Finding
User-facing descriptions, prompts, help text, and guidance are predominantly presented in Chinese, while the tool does not offer any language or locale selection. This can violate language/locale policy expectations when a skill forces one language without explicit opt-in or documented regional justification.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The code persists health assessment history to disk when a history file is configured, which expands the skill's behavior beyond merely producing scores and suggestions. Because the stored data concerns health-related assessments, this creates a privacy risk if users are not clearly informed, if the file is placed in an insecure location, or if other local users/processes can access it.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
Health assessment results are written to a history file without any user-facing warning in the CLI flow, which can lead users to unknowingly persist potentially sensitive wellness data. Silent retention increases the chance of privacy exposure through shared machines, backups, log collection, or misconfigured file permissions.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The script's user-facing messages and prompts are entirely in Chinese, which imposes a specific language on all users. There is no opt-in, fallback, or documentation indicating that the skill is intended only for a Chinese-speaking or region-specific audience.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest says the skill is "纯 Python 标准库" and frames the tool as a simple habit-health reasoner. This setup script explicitly offers installation of Flask to enable a REST API mode, adding a third-party dependency and network-serving capability that exceeds the described implementation scope.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The entire skill guide is written in Chinese, including headings, instructions, and warnings, with no indication that other languages are supported or that Chinese is required for a specific regional or compliance reason. Under the language/locale policy rule, this is a natural-language constraint that should either be optional or explicitly justified.

Description-Behavior Mismatch

Low
Confidence
86% confidence
Finding
The manifest describes a rules-based lifestyle scoring and suggestion tool, but the implementation additionally derives trend reports such as improving/declining/stable from stored history. That analytics capability extends beyond one-off scoring/advice and is not reflected in the stated description.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
The file's natural-language content is entirely in Chinese, including the title and all design notes, with no indication that language selection is optional or that the skill is intended only for a Chinese-speaking or region-specific audience. Under the stated policy, forcing a specific language without user opt-in can constitute a locale-policy violation.

Static analysis

No suspicious patterns detected.