Back to skill

Security audit

Fitness & Workout Manager

Security checks for vulnerabilities and agentic risk

Overview

This fitness skill is mostly purpose-aligned, but it deserves review because it stores health-adjacent workout notes locally with default permissions and can share plan, log, and reminder data through Feishu without strong scoping or confirmation controls.

Install only if you are comfortable with workout plans, logs, feelings, constraints, and free-form notes being stored under ~/.openclaw and potentially sent to Feishu when sync or reminders are enabled. Prefer using it on a single-user machine, review the Feishu document and bot permissions, and avoid recording sensitive medical details unless storage permissions and sharing settings are tightened.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fitness_skill.py:32
Finding

Sensitive Health Data Stored with Permissive Default Filesystem Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/fitness_skill.py:32-38, scripts/fitness_skill.py:51-54, and scripts/fitness_skill.py:554-560
Vulnerability Type: Insecure local storage permissions
Risk Level: Medium

Vulnerable Code

python
def _ensure_data_dir():
    os.makedirs(_DATA_DIR, exist_ok=True)


def _ensure_export_dir():
    os.makedirs(EXPORT_DIR, exist_ok=True)
python
def _write_json(path: str, data: dict):
    _ensure_data_dir()
    with open(path, "w", encoding="utf-8") as f:
        json.dump(data, f, ensure_ascii=False, indent=2)
python
def export_to_file(self, days: int = 30, max_entries: int = 50) -> str:
    """Write the Markdown report to a file and return the path."""
    _ensure_export_dir()
    md = self.export_log_markdown(days, max_entries)
    fname = f"fitness-log-{date.today().isoformat()}.md"
    path = os.path.join(EXPORT_DIR, fname)
    with open(path, "w", encoding="utf-8") as f:
        f.write(md)
    return path

Technical Analysis

The application stores fitness plans, workout history, physical constraints, feelings, session notes, and report exports beneath ~/.openclaw/workspace/fitness-skill/. This information may constitute sensitive health-related data.

The directories and files are created without explicit restrictive modes. Their effective permissions therefore depend on the process umask. With a common 022 umask, newly created directories may receive mode 0755 and files may receive mode 0644. On a multi-user system, another local account may consequently be able to read these records if all parent directories are traversable.

The same weakness affects plan, log, active-session, and exported Markdown files because they share these creation helpers or equivalent unprotected writes.

Attack Path

  1. The victim creates a plan, records workouts, starts a live session, or exports a report.
  2. The skill creates directories and files using process-default permissi ...[truncated 962 chars]
Remediation
View remediation

Remediation Suggestions

  1. Create sensitive data directories with owner-only permissions:
python
def _ensure_data_dir():
    os.makedirs(_DATA_DIR, mode=0o700, exist_ok=True)
    os.chmod(_DATA_DIR, 0o700)


def _ensure_export_dir():
    os.makedirs(EXPORT_DIR, mode=0o700, exist_ok=True)
    os.chmod(EXPORT_DIR, 0o700)
  1. Write files atomically with mode 0600. Create a temporary file in the destination directory using os.open with restrictive flags and permissions, flush and optionally fsync it, then replace the destination with os.replace.

  2. Explicitly apply os.chmod(path, 0o600) to existing destination files because the creation mode alone does not correct previously created permissive files.

  3. Add a migration step that audits and repairs permissions on plan.json, log.json, active_session.json, and existing Markdown exports.

  4. Avoid relying solely on the process umask. Consider encrypted storage if the threat model includes privileged local attackers, untrusted backups, or filesystem theft.

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 (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The declared description emphasizes a workout companion centered on logging/check-ins in two modes, preserving session state, syncing workout data to Feishu, and handling fitness stats/post-workout feedback. The supplied code chunk instead implements a command-line fitness plan manager: init/create/show/update/sync for a structured training plan. Feishu sync is consistent with the description at a high level, and the fitness domain matches, but the primary behavior shown is plan creation and maintenance rather than workout logging or session-based tracking. Because the implemented primary capability materially differs from the declared primary purpose, this is a mismatch.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises capabilities that imply access to local files and environment-driven integrations, but it does not declare an explicit tool/permission scope. That creates an authorization ambiguity where the runtime may grant broader access than users or reviewers expect, especially given storage under ~/.openclaw and optional Feishu sync.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

A broad routing trigger can cause the skill to activate during ordinary health or exercise conversation, leading to unintended persistence of user data or cloud sync behavior. In this skill, that risk is amplified because the routed content may be written to local logs and potentially synchronized to Feishu.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The primary description is written as a Chinese-only product description for the Feishu ecosystem, and the file does not state that users may choose another language or locale. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill describes Feishu cloud synchronization of workout logs and plans but does not present a clear up-front warning or consent model for external transmission of potentially sensitive health-related data. Users may reasonably assume a local-only fitness tracker and unknowingly expose personal exercise habits, schedules, or health context to a third-party platform.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Ambiguous natural-language activation conditions increase the chance of unintended tool use and data handling from casual conversation. Because this skill maintains state and stores workout history, accidental invocation can create privacy and integrity issues even without malicious intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code invokes a remote sync operation and only reports success or failure after the transmission attempt. There is no prior disclosure in this function that user-entered fitness profile data will be sent to Feishu, which is a network/privacy-relevant action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill persistently stores workout plans, logs, session notes, and free-form text under the user's home directory without any consent, disclosure, retention notice, or access controls. Because fitness data and notes may contain sensitive health information, silent local persistence creates a privacy risk, especially on shared hosts or multi-tenant agent environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The export function writes recent workout history to a Markdown file on disk without any explicit warning that sensitive workout and health-adjacent notes are being materialized as a separate export artifact. This increases exposure because exported files are easy to copy, sync, index, or read by other local users and tools.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends workout plans and logs to Feishu, an external service, without explicit user confirmation at the transmission point. This is a genuine privacy and data-sharing vulnerability because fitness logs may contain sensitive personal or health-related information, and external syncing expands the trust boundary beyond the local runtime.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The reminder callback sends workout details through Feishu messaging automatically, which can disclose exercise schedules and health-adjacent activity information to external messaging channels without clear notice. Because reminders are scheduled and background-triggered, users may forget this sharing is occurring, increasing privacy risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The code removes the active session file as part of cleanup, which is a file deletion operation covered by the warning requirement for code files. There is no prompt, print/log statement, or nearby user-facing disclosure explaining that the session state file will be deleted when clearing the active session.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.