Back to skill

Security audit

Medication Channel

Security checks for vulnerabilities and agentic risk

Overview

The skill is not malicious, but it needs review because it stores sensitive medication history and Discord identifiers and can write unclear messages into the medication log.

Install only if you are comfortable with a local plaintext medication log containing Discord identifiers, and prefer a pinned installer version. Before using it for real medication tracking, add code-side rejection of unknown events, sanitize CSV fields before spreadsheet use, and define retention/deletion and file-permission practices for the log.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T08 · Insecure Dependencies

Error
Location
README.md:17
Finding

Mutable Package Execution Through an Unpinned npx Installation Command

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/tracker_v2.py:201
Finding

Unrecognized Messages Are Persisted as Medication History

Content
View full analysis
dict: rows = read_rows() existing = dedupe_exists(rows, message_id) if existing: return existing parsed = parse_event(text, timestamp_utc) row = build_row(rows, parsed, channel_id, message_id, author_id, timestamp_utc) append_structured_row(row) return row ``` ```python def format_confirmation(row: dict) -> str: med = row["medication"] if med == "ALL": med_text = f"{row['window'].title()} meds" elif med == "UNSPECIFIED" or not med: med_text = f"{row['window'].title()} medication event" else: med_text = med verb_map = { "taken": "taken", "missed": "skipped", "extra": "logged as extra dose", "unknown": "recorded", } verb = verb_map.get(row["event_type"], "recorded") return f"Logged: **{med_text} {verb}** ({row['date_local']} {row['time_local'].upper()} {row['timezone']})." ``` ### Technical Analysis `parse_event()` explicitly represents text that does not match a medication event as `event_type == "unknown"`. However, `log_from_message()` does not validate the parser result before constructing and appending a persistent CSV row. Consequently, any message passed to the preferred logging p ...[truncated 1659 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/tracker_v2.py:73
Finding

Spreadsheet Formula Injection Through Unsanitized CSV Fields

Content
View full analysis
None: initialize_logs() with open(STRUCTURED_LOG_FILE, "a", newline="", encoding="utf-8") as f: writer = csv.DictWriter(f, fieldnames=CSV_FIELDS) writer.writerow(row) ``` ```python return { "entry_id": next_entry_id(rows), "timestamp_utc": dt_utc.astimezone(timezone.utc).isoformat().replace("+00:00", "Z"), "date_local": dt_local.strftime("%Y-%m-%d"), "time_local": format_time_local(dt_local), "timezone": TZ_STR, "window": parsed.window, "event_type": parsed.event_type, "medication": parsed.medication, "notes": parsed.notes, "source_channel_id": channel_id, "source_message_id": message_id, "source_author_id": author_id, } ``` ### Technical Analysis The tracker writes message text and source metadata directly into CSV cells. In particular, `parsed.notes` originates from the source message text. The `csv.DictWriter` correctly escapes CSV delimiters and quotation marks, but CSV escaping does not prevent spreadsheet formula interpretation. Spreadsheet applications may interpret cells beginning with characters such as `=`, `+`, `-`, or `@` as formulas. A message such as `=HYPERLINK("https://attacker.example","taken")` can still be classified as a taken event because it contains the standalone word `taken`, while the complete formula-prefixed text is retained in the `notes` field. Whether a formula is evaluated, and what capabilities it has, depends on the spreadsheet application and its security settings. ### Attack Path 1. An attacker sends a medication-channel message whose first character is a spreadsheet formula marker and whose text also triggers event parsing. 2. The integration passes the mess ...[truncated 915 chars]
Remediation
View remediation
Vulnerability Patterns
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The README instructs users to install and execute clawhub via npx ...@latest, which pulls the newest published package rather than a reviewed, pinned version. If the upstream package is compromised or a breaking/malicious release is published, users following the documentation could execute attacker-controlled code on their system during installation or skill setup.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly documents persistent logging of medication events, timestamps, and source identifiers to a CSV file, but does not warn users that this is sensitive health data. In this skill context, the data is especially privacy-sensitive because it can reveal medical conditions, treatment adherence, and user identity linkage via Discord metadata; lacking disclosure increases the risk of accidental retention, insecure storage, or sharing.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill uses environment variables and reads/writes persistent local files, but it does not declare an explicit tool scope such as permissions or allowed-tools. That creates an authorization ambiguity where a host may grant broader capabilities than reviewers or users expect, increasing the risk of unintended file access or persistent data modification. In this case, the skill is designed to log medication data locally, so the behavior is contextually relevant, but the undeclared scope still weakens least-privilege controls around sensitive health-related data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly documents that the skill stores sensitive health-related medication events together with Discord identifiers in a CSV file, but it provides no privacy, retention, access-control, or handling guidance. In the context of medication tracking, this creates a real confidentiality risk because operators may deploy the skill without understanding that it persists regulated or highly sensitive personal data linked to identifiable users.

Content

No source excerpt is available for this finding.

Tainted flow: 'STRUCTURED_LOG_FILE' from os.environ.get (line 27, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/tracker_v2.py (reported line 69)May include surrounding context.

python
def initialize_logs() -> None:
    ensure_dirs()
    if not os.path.exists(STRUCTURED_LOG_FILE):
        with open(STRUCTURED_LOG_FILE, "w", newline="", encoding="utf-8") as f:
            writer = csv.DictWriter(f, fieldnames=CSV_FIELDS)
            writer.writeheader()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script persistently stores sensitive health data together with source channel, message, and author identifiers in a plaintext CSV on disk. In the context of a medication-tracking skill, this is especially sensitive because it creates a durable record of medication behavior and user-linked metadata without any retention controls, minimization, encryption, or explicit consent handling in code.

Content

No source excerpt is available for this finding.

Tainted flow: 'STRUCTURED_LOG_FILE' from os.environ.get (line 27, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/tracker_v2.py (reported line 82)May include surrounding context.

python
def append_structured_row(row: dict) -> None:
    initialize_logs()
    with open(STRUCTURED_LOG_FILE, "a", newline="", encoding="utf-8") as f:
        writer = csv.DictWriter(f, fieldnames=CSV_FIELDS)
        writer.writerow(row)