Back to skill

Security audit

Health Assistant

Security checks for vulnerabilities and agentic risk

Overview

This health skill is not clearly malicious, but it ships named medical records and stores sensitive health data in plaintext with limited privacy controls, so it should be reviewed before installation.

Before installing, require the publisher to remove or prove the bundled health reports are synthetic, harden local storage permissions, document retention and deletion, and ask before sending any health-related query to third-party services. Treat its medical and supplement outputs as informational only, especially for abnormal reports, medications, pregnancy, serious symptoms, or emergency situations.

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
data/health-reports/default/history.json:2
Finding

Named Longitudinal Medical Records Included in the Distributed Package

Content
View full analysis

Vulnerability Details

File Location: data/health-reports/default/history.json:2-51; data/health-reports/default/2025-04-27.json:2-113
Vulnerability Type: Plaintext sensitive health information disclosure
Risk Level: High

Vulnerable Code Snippets

From data/health-reports/default/history.json:

json
{
  "user_id": "default",
  "user_name": "\u7e41\u54e5",
  "reports": [
    {
      "date": "2022-10-30",
      "file": "2022-10-30.json",
      "source": "\u4f53\u68c0\u62a5\u544a",
      "summary": {
        "bmi": 22.8,
        "ldl": 2.41,
        "key_findings": [
          "\u7aa6\u6027\u5fc3\u52a8\u8fc7\u7f13",
          "\u7ea2\u7ec6\u80de\u538b\u79ef\u504f\u9ad8"
        ]
      }
    },
    {
      "date": "2025-04-27",
      "file": "2025-04-27.json",
      "source": "\u4f53\u68c0\u62a5\u544a",
      "summary": {
        "bmi": 24.2,
        "ldl": 2.95,
        "key_findings": [
          "\u8102\u86cb\u767d589\u2191",
          "C\u80bd\u504f\u4f4e",
          "\u7532\u72b6\u817a\u7ed3\u8282TI-RADS 3\u7ea7",
          "\u80ba\u7ed3\u8282"
        ]
      }
    }
  ]
}

From data/health-reports/default/2025-04-27.json:

json
{
  "date": "2025-04-27",
  "user_id": "default",
  "user_name": "\u7e41\u54e5",
  "source": "\u4f53\u68c0\u62a5\u544a",
  "indicators": {
    "cardiovascular": {
      "lipoprotein_a": {
        "value": 589.0,
        "unit": "mg/L",
        "ref": "0-300",
        "status": "high"
      },
      "blood_pressure": {
        "value": "112/67",
        "unit": "mmHg",
        "ref": "<120/80",
        "status": "normal"
      }
    },
    "metabolic": {
      "c_peptide": {
        "value": 0.94,
        "unit": "ng/mL",
        "ref": "1.00-4.80",
        "status": "low"
      }
    }
  },
  "imaging": {
    "thyroid": {
      "finding": "\u7532\u
...[truncated 2480 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove all real or potentially real health reports and names from the distributed package.
  2. Replace the records with clearly labeled synthetic fixtures containing invented values and identities.
  3. Purge the exposed files from version-control history, release archives, package registries, caches, and published artifacts where feasible.
  4. Notify the affected data subject and follow the applicable privacy-incident process if the records represent an actual person.
  5. Add automated checks for personal identifiers and health information to the release pipeline.
  6. Keep test fixtures in a dedicated directory and document that production health records must never be committed.
  7. Apply data-minimization and retention rules so only information necessary for testing is included.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/health_manager.py:12
Finding

Plaintext Health Records Created with Ambient Filesystem Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/health_manager.py:12-34, 43-48; scripts/health_storage.py:11-24, 92-100
Vulnerability Type: Insufficient protection of locally stored sensitive data
Risk Level: Medium

Vulnerable Code Snippets

From scripts/health_manager.py:

python
DATA_DIR = Path.home() / ".health_data"

def init_storage():
    """Initialize storage directory and default files"""
    DATA_DIR.mkdir(exist_ok=True)

    files = {
        "profile.json": {},
        "medications.json": [],
        "reminders.json": [],
        "records.json": [],
        "goals.json": {
            "daily_steps": 10000,
            "daily_water": 8,
            "daily_sleep": 8,
            "weekly_exercise": 150
        }
    }

    for filename, default in files.items():
        path = DATA_DIR / filename
        if not path.exists():
            with open(path, 'w') as f:
                json.dump(default, f, indent=2)
python
def save_profile(profile: dict) -> dict:
    """Save user health profile"""
    if profile.get("weight") and profile.get("height"):
        height_m = profile["height"] / 100
        profile["bmi"] = round(profile["weight"] / (height_m ** 2), 1)

    profile["updated_at"] = datetime.now().isoformat()

    with open(DATA_DIR / "profile.json", 'w') as f:
        json.dump(profile, f, indent=2)
    return profile

From scripts/health_storage.py:

python
DATA_DIR = Path.home() / ".health_data"

def init_storage():
    """Initialize storage directory"""
    DATA_DIR.mkdir(exist_ok=True)

    # Create default files
    for file in ["medications.json", "reminders.json", "records.json", "profile.json"]:
        path = DATA_DIR / file
        if not path.exists():
            with open(path, 'w') as f:
                if "records" in file:
                    json.dump([], f)
                else:
   
...[truncated 2355 chars]
Remediation
View remediation

Remediation Suggestions

  1. Create the storage directory with owner-only permissions:
    python
    DATA_DIR.mkdir(mode=0o700, exist_ok=True)
    os.chmod(DATA_DIR, 0o700)
    
  2. Create files atomically with mode 0600, using os.open() with O_CREAT, O_WRONLY, and O_TRUNC, or an equivalent secure helper.
  3. Apply chmod(0o600) to existing health-data files after validating that they are regular files owned by the current user.
  4. Reject symbolic links and unexpected filesystem object types before reading or replacing storage files.
  5. Write through a securely created temporary file in the same directory, flush and synchronize it, then atomically replace the destination to avoid partial or corrupt records.
  6. Offer encryption at rest using an operating-system key store or a user-controlled encryption key when the threat model includes privileged local processes, backups, or device theft.
  7. Document the storage location, data sensitivity, retention policy, export process, and deletion process.
  8. Consolidate the duplicate storage modules into one hardened implementation so security controls cannot diverge.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (45)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This mismatch additionally notes undisclosed local storage/access in the user's home or workspace, which is especially sensitive when handling health reports and medication history. Users may disclose protected health information believing the skill only offers advice, while the skill behavior also implies persistence not transparently reflected in the top-level description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This mismatch additionally notes undisclosed local storage/access in the user's home or workspace, which is especially sensitive when handling health reports and medication history. Users may disclose protected health information believing the skill only offers advice, while the skill behavior also implies persistence not transparently reflected in the top-level description.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The activation guidance includes broad phrases such as 'Travel preparation or trip planning' and 'General wellness questions,' plus generic categories like exercise and diet. These overlap heavily with common everyday requests, making it unclear when this skill should activate versus a more specific travel, fitness, or general assistant skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes storing highly sensitive health profiles locally without a clear upfront warning about privacy, persistence, and deletion. Because the data includes medications, conditions, allergies, and emergency contacts, silent retention materially increases confidentiality risk if the workspace or host is shared, backed up, or later exfiltrated.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · SKILL.md (reported line 673)May include surrounding context.

md
- Thoughts of self-harm

**How to Help:**
- Listen without judgment
- Encourage professional help
- Offer companionship
- Crisis hotline: 400-161-9995 (China)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The uploaded-report workflow omits a clear warning that original PDFs/images and extracted medical data may be retained on disk. This is particularly dangerous because uploaded reports often contain full legal names, IDs, clinic details, and comprehensive lab panels, creating a concentrated repository of protected health information.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill describes local file read/write behavior for highly sensitive health data but does not declare any explicit tool scope or permission boundaries. In a health-focused skill, undeclared storage capability is dangerous because it can lead to silent persistence of medical records, reports, and personal identifiers without informed consent or least-privilege controls.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill claims local-only storage and no external servers by default, yet later documents active use of third-party APIs and remote services. In a health-data context, contradictory statements about data flows create a real privacy and consent risk because users cannot accurately assess whether sensitive medical information may be transmitted externally.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description at L0004 is centered on human health functions such as medical report analysis, supplement recommendations, and wellness guidance. The SKILL content at L0733-L0819 adds a full pet health section covering dogs, cats, and small pets, which is outside the stated scope and not an obvious implementation detail of a human health assistant.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The disclaimer says the skill should never diagnose, but the workflow instructs it to flag abnormalities by severity and provide actionable recommendations from uploaded reports. In medical settings, this can blur the line into quasi-diagnostic behavior, increasing the risk that users over-trust automated interpretations of sensitive lab results.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Several example outputs and labels are written entirely in Chinese, and the mental health section provides a China-specific hotline as the presented crisis contact. Because the skill covers broad, international health use cases, this introduces a locale-specific default without documented opt-in or a user language selection mechanism.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

Documenting a third-party API endpoint for ConsumerLab indicates potential external transmission of user-related query data to a remote service. In a health assistant, even seemingly simple supplement or report-derived queries can reveal sensitive interests or conditions if sent without minimization, notice, and consent.

Content

Scanner excerpt · SKILL.md (reported line 1331)May include surrounding context.

Status: ✅ API available (subscription required)

Endpoint: https://api.consumerlab.com/

Setup:

bash

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · _meta.json (reported line 23)May include surrounding context.

json
},
    "consumerlab": {
      "status": "available",
      "endpoint": "https://api.consumerlab.com/",
      "cost": "Subscription required ($44/year)"
    },
    "pubmed": {

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · data/blockchain-traceability.json (reported line 144)May include surrounding context.

json
},
    "consumerlab": {
      "status": "available",
      "endpoint": "https://api.consumerlab.com/",
      "cost": "Subscription required ($44/year)"
    },
    "pubmed": {

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This JSON manifest-like file contains user-facing purpose, workflow, warnings, and recommendations exclusively in Chinese. The policy requires flagging language or locale constraints when the skill forces a specific language without user opt-in, and no alternative language option or region-specific justification is provided.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This JSON contains multiple user-facing natural-language fields entirely in Chinese, including the user name, source, findings, notes, actions, and reasons. Under the stated policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy issue.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Several natural-language values in the interaction matrix and drug interaction descriptions are written in Chinese, while the rest of the file is in English. This creates a language/locale policy issue because the skill appears to force a specific language for part of its output without user opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The recommendation workflow defines a full medical recommendation pipeline but does not specify when it may be invoked, what prerequisites must be satisfied, or what cases require human/clinical escalation. In a health skill, unrestricted activation can cause the agent to generate supplement or dosing advice from incomplete, stale, or inappropriate inputs, increasing risk of unsafe medical recommendations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.