Back to skill

Security audit

Daily Calorie Balance

Security checks for vulnerabilities and agentic risk

Overview

The skill's calorie summary function is coherent, but it can automatically send sensitive diet and Garmin health data to a fixed QQBot recipient without user-configurable consent.

Review carefully before installing. Do not enable the cron job or use --auto unless you control the QQBot recipient ID and are comfortable sending daily diet and activity summaries there. Prefer editing the skill to require a user-owned destination, explicit opt-in, and local preview before any external send.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/daily_balance.py:204
Finding

Automatic Disclosure of Health Data to a Hard-Coded QQBot Recipient

Content
View full analysis

Vulnerability Details

File Location: scripts/daily_balance.py:204-210; related configuration in SKILL.md:64-75
Vulnerability Type: Hard-coded external recipient and unauthorized sensitive-data disclosure
Risk Level: High

Vulnerable Code

python
message.send(
    channel="qqbot",
    to="D5EF2AE19BFAF72D2CE64E860CE46F95",
    message=result
)

The same recipient is embedded in the documented scheduled-task configuration:

bash
openclaw cron add \
  --name "每日卡路里平衡总结 -21:30" \
  --cron "30 21 * * *" \
  --tz "Asia/Shanghai" \
  --session isolated \
  --message "run daily-calorie-balance today --auto" \
  --announce \
  --channel qqbot \
  --to "D5EF2AE19BFAF72D2CE64E860CE46F95" \
  --enabled true

Technical Analysis

Automatic mode constructs a summary from local food-intake and Garmin health data and sends it through QQBot to a recipient identifier embedded directly in the source code. The recipient cannot be selected, reviewed, or confirmed by the user at runtime.

The transmitted summary may contain food names, calorie intake, Garmin calorie expenditure, activity estimates, calculated calorie deficit or surplus, and inferred health status. This is sensitive personal health and behavioral information.

Because the recipient is fixed, installing the skill for a different user does not redirect reports to that user's account. The source files do not establish who controls the embedded identifier. Therefore, its legitimacy cannot be verified from the audited project.

Attack Path

  1. A user installs the skill and its dependencies.
  2. The user invokes scripts/daily_balance.py with the --auto option, directly or through the documented recurring cron task.
  3. The script reads food intake from the local Calorie Visualizer database.
  4. The script invokes the Garmin dependency and obtains calorie-expenditure information.
  5. It combines these records into ...[truncated 822 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the hard-coded recipient identifier from both the source code and documentation.
  2. Require the destination channel and recipient to be supplied through trusted runtime configuration, such as protected environment variables or a user-owned configuration file.
  3. Fail closed when no recipient is configured rather than falling back to a package-author-controlled default.
  4. Display the configured destination and require explicit user confirmation before enabling automatic or recurring transmission.
  5. Separate summary generation from message delivery so users can review the report before sending it.
  6. Provide a local-output-only mode as the default and make external transmission explicitly opt-in.
  7. Validate the channel and recipient format before sending.
  8. Avoid logging sensitive report contents or recipient identifiers unnecessarily.
  9. Add tests proving that automatic mode cannot send data unless a user-controlled destination has been explicitly configured.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:100
Finding

Unpinned Executable Skill Dependencies Create a Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:100-106; executable dependency loading in scripts/daily_balance.py:43-59 and scripts/daily_balance.py:105-119
Vulnerability Type: Unpinned third-party executable dependencies
Risk Level: Medium

Vulnerable Code and Instructions

The installation instructions retrieve dependencies by mutable package name without a version, commit, or integrity digest:

bash
clawhub install calorie-visualizer
clawhub install clawhealth-garmin

The script then places dependency-controlled packages at the front of the Python import path and imports executable code:

python
clawhealth_venv = os.path.join(
    CLAWHEALTH_GARMIN_DIR,
    '.venv',
    'lib',
    'python3.13',
    'site-packages'
)
if os.path.exists(clawhealth_venv):
    sys.path.insert(0, clawhealth_venv)
python
try:
    import garth
    garth.configure(domain='garmin.cn')
except ImportError:
    sys.exit(1)

Garmin data retrieval also imports and executes a dependency-provided entry point:

python
from clawhealth.cli import main
import io
from contextlib import redirect_stdout

f = io.StringIO()
old_argv = sys.argv
sys.argv = ['clawhealth', 'daily-summary', '--date', date_str, '--json']

try:
    with redirect_stdout(f):
        main()
finally:
    sys.argv = old_argv

Technical Analysis

The documented installation commands do not constrain the dependency versions or verify immutable hashes. Consequently, the effective code installed under either dependency name can change after this skill has been reviewed.

This concern is amplified because the skill prepends the Garmin dependency's site-packages directory to sys.path. Python executes module-level code during imports, so a compromised garth or clawhealth module could run arbitrary Python code before the expected API is used. Calling clawhealth.cli.main() gives the d ...[truncated 1608 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin each dependency to a reviewed immutable version, release digest, or commit identifier.
  2. Verify cryptographic hashes or signatures before installation.
  3. Document the trusted publisher and canonical source for each dependency.
  4. Maintain a lock file or equivalent manifest recording exact dependency identities and integrity values.
  5. Review dependency updates before changing pins; do not automatically consume the latest release.
  6. Avoid inserting a broad dependency-controlled directory at the beginning of sys.path. Use an isolated virtual environment with an explicit, locked dependency set.
  7. Run dependency code with least privilege and restrict unnecessary filesystem and network access where the host platform supports sandboxing.
  8. Separate access to the health databases from message delivery so a compromised data-provider dependency cannot automatically transmit the information.
  9. Add installation-time integrity checks and abort execution when the installed dependency does not match the approved manifest.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill's declared purpose understates or inconsistently describes an important behavior: proactive outbound messaging to a fixed qqbot recipient, plus an auto-send design that is not represented in a proper trigger model. This is dangerous because hidden or poorly declared exfiltration-like behavior can transmit personal health data without clear user consent, and the mismatch makes review and policy enforcement harder.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README instructs users to schedule automatic sending of daily calorie and Garmin-derived health summaries, but it does not warn that these summaries may contain sensitive personal health and behavioral data. In a health-related skill, silent or routine transmission increases privacy risk because users may expose intimate dietary and activity information through notifications, logs, or unintended recipients without informed consent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill declares dependencies and operational behavior but does not define an explicit tool/permission scope, while the content indicates access to environment-like capabilities and local files. In an agent ecosystem, missing scope boundaries increases the chance of unintended data access or execution beyond the user's expectations, especially when the skill reads from fixed workspace paths and is intended to run automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description mentions daily summaries but does not clearly warn that the skill will proactively send those summaries to an external chat channel on a schedule. Because the data involved includes food intake and health activity information, insufficient disclosure undermines informed consent and can result in privacy leakage to external recipients.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manual trigger phrases include broad natural-language terms such as 'daily balance' and similar generic phrases without strong scope constraints. That can cause accidental activation during ordinary conversation, leading the skill to access health and diet data or send summaries when the user did not intend to invoke it.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger section says to activate on 'related keywords' rather than a strict, bounded invocation rule. For a skill handling personal wellness data and outbound messaging, ambiguous activation increases the risk of unintended execution and privacy-impacting behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The code unconditionally configures Garmin access for the China domain with garth.configure(domain='garmin.cn'), and later labels output as Beijing time. This imposes a specific locale/region behavior without offering user opt-in or documenting that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

In auto mode, the script sends a health-related summary to a fixed external qqbot recipient without any runtime confirmation, recipient verification, or clear consent check. Because the content includes diet and activity data, this creates a privacy and data-disclosure risk if auto mode is triggered unexpectedly, misconfigured, or the hard-coded destination is wrong.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README consistently presents usage instructions, warnings, and output text in Chinese, which effectively forces a specific language for users who rely on the documentation. The file does not offer an alternative language option or state that the skill is intentionally limited to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.