Back to skill

Security audit

健康追踪

Security checks for vulnerabilities and agentic risk

Overview

This health-tracking skill is coherent and local-only, but users should understand that it stores personal health logs in a plaintext JSON file.

Install only if you are comfortable with health logs being saved locally as plaintext JSON. Avoid using it from shared or synced folders, and delete the generated health_data.json file when you no longer want the records retained.

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
SKILL.md:48
Finding

Health Records Stored in a Plaintext File Without Explicit Access Restrictions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 48-60
Vulnerability Type: Plaintext storage of sensitive health data
Risk Level: Medium

python
class HealthTracker:
    def __init__(self, data_file: str = "health_data.json"):
        self.data_file = data_file
        self.data = self._load()
    
    def _load(self) -> dict:
        if Path(self.data_file).exists():
            with open(self.data_file, 'r') as f:
                return json.load(f)
        return {'water': [], 'sleep': [], 'steps': []}
    
    def _save(self):
        with open(self.data_file, 'w') as f:
            json.dump(self.data, f, indent=2)

Technical Analysis

The implementation stores personal health records as unencrypted JSON at a relative, caller-selectable filesystem path. The file is opened without explicitly enforcing owner-only permissions, so its effective permissions depend on the process umask and the security of the working directory.

On systems with permissive default permissions, shared directories, backup agents, synchronization services, or multiple local users, unauthorized principals may be able to read the recorded water, sleep, and step information. Allowing the caller to select data_file also increases the chance that sensitive records will be placed in an unintended or publicly accessible location.

This finding does not provide an attacker with code execution or elevated system privileges. Exploitation requires an existing ability to access the directory, file, backup, or synchronized copy containing the records.

Attack Path

  1. A user invokes HealthTracker and records personal health information.
  2. _save() creates or overwrites health_data.json using ambient filesystem permissions.
  3. The file is stored in the current working directory or another caller-selected location without encryption or an explicit owner-only permission mode.
  4. Another local user, pr ...[truncated 659 chars]
Remediation
View remediation

Remediation Suggestions

  • Store the database in a dedicated per-user application-data directory rather than the current working directory.
  • Create the data file with owner-only permissions, such as mode 0600, and ensure its parent directory is restricted to the owning user.
  • Validate or constrain caller-supplied paths to prevent accidental storage in shared, public, or otherwise unsafe locations.
  • Consider authenticated encryption for health records when confidentiality must be maintained against filesystem readers, backup operators, or synchronization providers.
  • Write updates atomically through a securely created temporary file in the same protected directory, then replace the destination file.
  • Detect existing files with unsafe ownership, symbolic-link behavior, or overly broad permissions before reading or overwriting them.
  • Document the sensitivity, retention policy, backup behavior, and deletion procedure for the stored health data.
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 (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill persistently stores sensitive health-related data (water intake, sleep, steps, and potentially weight per the description) in a local JSON file without any notice, consent flow, retention policy, or access protections. Even though the file is local rather than exfiltrated, health data is privacy-sensitive, and silent persistence can expose users to unintended disclosure through shared devices, backups, or other local processes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The natural-language instructions, description, and trigger phrases are in Chinese, which effectively forces a specific language for use and discovery. There is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-language context.

Content

No source excerpt is available for this finding.