Back to skill

Security audit

Medical Email Polisher

Security checks for vulnerabilities and agentic risk

Overview

The skill is a simple local email-polishing tool, but it may process patient or medical text without clear safeguards and accepts drafts through command-line arguments.

Review before installing or using with real patient or confidential medical content. If used at all, avoid putting PHI or sensitive details in command-line arguments, keep drafts de-identified, and treat the HIPAA-aware claim as unsupported by the implementation.

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/main.py:99
Finding

Sensitive Medical Email Content Exposed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/main.py, lines 99–100
Vulnerability Type: Sensitive data exposure through process arguments
Risk Level: Medium

Vulnerable Code

python
draft = sys.argv[1] if len(sys.argv) > 1 else "hey, wanted to follow up on our discussion"
recipient = sys.argv[2] if len(sys.argv) > 2 else "mentor"

Technical Analysis

The script accepts the complete email draft through sys.argv[1]. Because the skill supports patient correspondence, a draft may contain protected health information or other confidential medical data.

Command-line arguments can be retained in shell history, captured by process-monitoring or audit systems, and—depending on operating-system permissions—observed through process-inspection facilities while the program is running. Consequently, sensitive content may be disclosed outside the intended program execution.

This handling is inconsistent with the skill's documented claim of “HIPAA-aware patient communication,” because the implementation provides no secure input channel, PHI detection, redaction, or warning against supplying sensitive information through command arguments.

Attack Path

  1. A user runs the script with a confidential medical draft, for example:

    bash
    python scripts/main.py "Patient Alice has been diagnosed with [condition]..." patient
    
  2. The shell may save the complete invocation in its command-history file.

  3. While the process is running, a local user or monitoring component with sufficient access inspects the process command line.

  4. Alternatively, an administrator, support tool, telemetry collector, or audit system records the invocation.

  5. The observer obtains the medical content without needing to compromise the script itself.

Exploitation requires local access to relevant process metadata, history, or logs. The audit found no remote transmission mechanism.

Impact Assessment

The issue can disclose the full email draft, potentia ...[truncated 372 chars]

Remediation
View remediation

Remediation Suggestions

  1. Accept email drafts through standard input rather than command-line arguments:

    python
    import sys
    
    draft = sys.stdin.read()
    if not draft.strip():
        raise SystemExit("No email draft was provided through standard input.")
    
  2. Support permission-restricted input files only when necessary, validate the path, and document appropriate file permissions.

  3. Retain only non-sensitive options, such as the recipient type, as command-line flags.

  4. Explicitly warn users not to place protected health information or other confidential content in shell arguments.

  5. Do not log raw drafts, command lines, or generated correspondence.

  6. Review deployment telemetry, process monitoring, and shell-history controls to ensure they do not capture sensitive input.

  7. Either implement and test concrete PHI-handling safeguards or narrow the “HIPAA-aware” documentation claim so it accurately reflects the implementation.

Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description omits an upfront warning that the skill may process sensitive medical or patient information, even though later sections reference patient communication and HIPAA awareness. Without a prominent sensitivity notice, users may submit regulated data without appropriate safeguards, consent checks, or environment controls, increasing privacy and compliance risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The activation guidance is broad enough to encourage use beyond narrowly defined medical email polishing, including generic academic writing and loosely specified fallback/error scenarios. In a medical context, ambiguous routing can cause the skill to be invoked on sensitive or inappropriate inputs, increasing the chance of mishandling protected health information or producing medically inappropriate communications.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The usage description is broad enough to invite application beyond simple email polishing, and the preserved stress-case failure explicitly shows scope-control and boundary-guidance breakdowns. In a medical correspondence context, ambiguous scope can cause the skill to drift into drafting advice-like or research-like content without adequate safeguards, increasing the chance of unsafe or misleading outputs.

Content

No source excerpt is available for this finding.