Back to skill

Security audit

Buyma Order Automation

Security checks for vulnerabilities and agentic risk

Overview

The skill is an order-automation workflow, but it asks for broad browser/session access and can send order files externally without enough safeguards.

Review before installing. Use a dedicated Chrome profile only for BUYMA/Naver Mail, require confirmation before editing memos or sending any email/Telegram attachment, verify recipients and file paths, sanitize spreadsheet cells against formulas, and define retention/cleanup for generated workbooks and state files.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/parse_buyma_csv.py:57
Finding
Untrusted CSV Values Can Be Written as Executable Spreadsheet Formulas<![CDATA[ ## Vulnerability Details **File Location**: `scripts/parse_buyma_csv.py:57-69`, `scripts/build_order_sheet.py:36-40`, `scripts/validate_output.py:13-18` **Vulnerability Type**: Spreadsheet formula injection **Risk Level**: High ### Vulnerable Code `scripts/parse_buyma_csv.py:57-69`: ```python record = { "order_no": order_no, "memo_no": (raw[FIELD_INDEX["memo"]] or "").strip(), "ship_method_raw": (raw[FIELD_INDEX["ship_method"]] or "").strip(), "ship_method": map_ship_method(raw[FIELD_INDEX["ship_method"]]), "product_name_ko": (raw[FIELD_INDEX["product_name"]] or "").strip(), "price": (raw[FIELD_INDEX["price"]] or "").strip(), "option": (raw[FIELD_INDEX["option"]] or "").strip(), "qty": (raw[FIELD_INDEX["qty"]] or "").strip(), "contact_note_raw": (raw[FIELD_INDEX["contact_note"]] or "").strip(), "name_roman": (raw[FIELD_INDEX["name_roman"]] or "").strip(), "region": (raw[FIELD_INDEX["region"]] or "").strip(), } ``` `scripts/build_order_sheet.py:36-40`: ```python for rec in records: for col, key in TARGET_COLS.items(): ws[f"{col}{row}"] = rec.get(key, "") row += 1 wb.save(out_path) ``` `scripts/validate_output.py:13-18`: ```python blanks: List[Dict[str, object]] = [] for row in range(start_row, end_row + 1): missing = [col for col in REQUIRED_COLS if ws[f"{col}{row}"].value in (None, "")] if missing: blanks.append({"row": row, "missing": missing}) ``` ### Technical Analysis Fields obtained from the BUYMA CSV are preserved as strings and subsequently assigned directly to `openpyxl` cells. In particular, `openpyxl` treats strings beginning with `=` as formulas when they are assigned to cells. The affected data includes product names, prices, options, quantities, shipping information, and notes. No validation or neutralization occurs before these values are written. The output validator only checks whether required cells are blank; it does not inspect the cell data type ...[truncated 1790 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat every CSV-derived field as untrusted. 2. Reject formula values in fields that should be numeric, such as price and quantity, and parse them into strict numeric types. 3. For textual fields, neutralize values that begin with formula indicators. At minimum, reject or escape leading `=` characters. Consider leading whitespace and control characters before checking. 4. Write untrusted content explicitly as text rather than allowing `openpyxl` to infer a formula: ```python def safe_spreadsheet_text(value: object) -> str: text = "" if value is None else str(value) stripped = text.lstrip() if stripped.startswith(("=", "+", "-", "@")): return "'" + text return text cell = ws[f"{col}{row}"] cell.value = safe_spreadsheet_text(rec.get(key, "")) cell.data_type = "s" ``` 5. Do not apply textual escaping to legitimate numeric fields. Validate and convert those fields to `int`, `Decimal`, or another expected numeric type instead. 6. Extend `validate_output.py` to inspect `cell.data_type` and fail if any externally populated cell is a formula: ```python if cell.data_type == "f": formula_cells.append(cell.coordinate) ``` 7. Add tests using values with leading `=`, whitespace followed by `=`, and other common formula prefixes. 8. Do not send or publish the workbook if formula validation fails. ]]>

other

Warning
Location
SKILL.md:31
Finding
Workflow Requests Unrestricted Access to General Agent Memory<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:31` **Vulnerability Type**: Excessive access to general Agent memory and free-form historical instructions **Risk Level**: Medium ### Vulnerable Instruction ```markdown - Follow MEMORY.md and recent memory logs before acting ``` ### Technical Analysis The Skill directs the Agent to read and follow general `MEMORY.md` content and recent memory logs. This access is not limited to BUYMA-specific state, trusted fields, or a defined directory. The project already defines a dedicated state mechanism through `config/last_state.json`, including the last order number, file, mail status, mode, and processed range. General free-form memory is therefore broader than necessary for the declared workflow. The phrase “follow” also causes historical text to be treated as operative instructions rather than untrusted context. If unrelated, stale, or attacker-influenced content exists in memory, it could alter order processing or expose information unrelated to the current task. The audited package does not itself write malicious content to memory, so this is not classified as Agent Memory Poisoning; it is an excessive and insufficiently constrained memory-read instruction. ### Attack Path 1. A prior conversation or another workflow places attacker-controlled or stale instructions in `MEMORY.md` or a recent memory log. 2. The BUYMA Skill is loaded for a later order-processing run. 3. The Agent follows the instruction to read and obey general memory content. 4. The historical content changes target ranges, recipients, attachment behavior, file selection, or another workflow decision. 5. The Agent performs unintended actions using authenticated BUYMA, Naver Mail, or Telegram sessions. This exploitation path requires the attacker or another untrusted process to influence the Agent's general memory before the Skill runs. ### Impact Assessment Potential impact includes: - Exposure of unrelated information stor ...[truncated 484 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the instruction to read and follow general `MEMORY.md` and recent memory logs. 2. Read only the dedicated BUYMA state file: ```text ~/.openclaw/workspace/buyma_order/config/last_state.json ``` 3. Define and enforce a strict state schema containing only expected fields such as `last_order_number`, `last_file`, `last_mode`, and the previous range. 4. Treat state values as data, never as instructions. 5. Validate that `last_file` resolves inside the expected BUYMA workspace before opening it. 6. Ignore unknown state keys and reject malformed types or out-of-range order numbers. 7. If historical context is operationally necessary, store a structured BUYMA-specific event log and explicitly prohibit instruction execution from log text. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:26
Finding
Use of the Default Chrome Profile Violates Least Privilege<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:26` **Vulnerability Type**: Overprivileged browser-profile access **Risk Level**: Medium ### Vulnerable Instruction ```markdown - Always use Chrome default profile for BUYMA and Naver Mail ``` Related workflow instruction at `SKILL.md:62`: ```markdown 3. Access BUYMA in Chrome default profile ``` ### Technical Analysis The Skill explicitly requires use of Chrome's default profile. A default profile commonly contains authenticated sessions, cookies, browsing history, autofill information, installed extensions, and access to services unrelated to BUYMA order processing. The legitimate workflow requires authenticated access to BUYMA and Naver Mail, but it does not require access to every other session and profile resource available in the user's default browser profile. Using the unrestricted profile therefore expands the authority and data exposed to browser automation beyond the minimum necessary scope. This issue is particularly relevant because browser-rendered content is externally controlled. A compromised BUYMA page, malicious product content, unexpected navigation, or Agent error could potentially influence browser actions while unrelated authenticated accounts remain available in the same profile. ### Attack Path 1. The operator runs the Skill using the Chrome default profile as instructed. 2. The profile contains active sessions for BUYMA, Naver Mail, and unrelated websites. 3. Malicious page content, unexpected redirects, or incorrect Agent navigation causes the browser workflow to leave the intended origins. 4. The automation encounters another authenticated service or exposes profile-derived information. 5. Unintended actions are performed using the authority of the default profile. A second plausible path involves a malicious product page influencing browser-assisted translated-name extraction and directing the Agent toward unintended browser actions. ### Impact Assessment ...[truncated 701 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create a dedicated Chrome profile used only for BUYMA and Naver Mail. 2. Do not store unrelated credentials, sessions, payment details, or autofill data in that profile. 3. Restrict browser automation to an explicit origin allowlist for BUYMA and Naver Mail. 4. Block unexpected redirects and require confirmation before navigating to any non-allowlisted origin. 5. Require explicit operator confirmation before: - Sending mail. - Attaching a workbook. - Sending a Telegram message. - Modifying BUYMA order memos. 6. Validate mail recipients, subject, attachment path, and target order range immediately before submission. 7. Ensure attachment paths resolve inside the designated BUYMA output directory. 8. Disable unnecessary extensions and browser synchronization in the automation profile. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (25)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description describes a broad operational automation workflow involving web access, CSV handling, workbook generation/enrichment, email delivery, and failure notifications. The supplied code does none of those things. It only performs a localized workbook-editing task: loading JSON, mapping order numbers to Korean product names, writing values into column F for a given row range, optionally coloring cells red when multiple names exist for the same order number, and saving the workbook. This is a materially different and much narrower behavior than the declared purpose, so it is a clear mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description presents an end-to-end BUYMA order-processing automation with web access, CSV acquisition/usage, workbook enrichment, email delivery, and Telegram failure alerts. The supplied code chunk only performs one narrow step: writing already-normalized records from a JSON file into an Excel workbook template. While this partially overlaps with the declared workbook-writing aspect, it does not implement most of the claimed workflow or external integrations. Because the actual behavior is materially narrower and uses different inputs/resources than described, this is a mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description describes a broad operational workflow for BUYMA order processing involving browser interaction, CSV/workbook handling, email delivery, and Telegram error notification. The supplied code does none of these things. It is a narrow utility that parses a local input text file in 2-line blocks, extracts a 6-digit order number with regex, and outputs JSON. This is a materially different primary purpose and lacks the major declared behaviors and integrations, so the description does not accurately represent the code chunk.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description focuses on an end-to-end operational workflow for Buyma order processing with browser interaction, CSV/workbook handling, email delivery, and Telegram failure alerts. The actual code does none of those things. It only parses command-line arguments, reads a local JSON file, performs simple hardcoded text replacements to translate product names from Japanese to Korean, filters rows missing order number or product name, and writes a new JSON file. This is a materially different primary purpose and lacks the key resources and behaviors described in the declaration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description is for a broad order-processing automation workflow involving Buyma, Chrome access, CSV/workbook handling, email delivery, and Telegram alerts. The supplied code does none of those things. It only parses a plain text input file, looks for 6-digit numbers in alternating lines, and emits a translated_names-style JSON structure. This is a materially different primary purpose and lacks the declared external system interactions entirely.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
This code chunk is a narrow utility for composing an output filename from a date and order range. That may support the larger workflow, but by itself it does not implement the declared skill description's substantive behavior. The declared description portrays a full automation pipeline with browser access, data processing, workbook generation/enrichment, email delivery, and failure notifications; none of those capabilities appear here. Therefore the supplied code chunk does not accurately represent the declared purpose.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description describes a broad end-to-end operational automation workflow involving browser access, BUYMA interaction, receipt memo handling, workbook generation/enrichment, email delivery, and Telegram error reporting. The supplied code chunk does only one narrow subtask: parse an input BUYMA CSV and emit normalized JSON. While CSV parsing is mentioned in the declaration as one component of the overall skill, this code does not implement most of the declared primary behavior or external integrations. Therefore the supplied chunk's actual behavior is materially narrower and different from the declared purpose, so this should be flagged as a mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description describes a broad operational workflow for BUYMA order processing with browser automation, CSV/workbook handling, email delivery, and failure alerts. The actual code chunk does none of those things. It only validates the structure of a local text file and reports counts/warnings in JSON. This is a materially different primary purpose rather than a mere helper detail, so the description does not accurately represent the supplied code chunk.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description presents a broad end-to-end Buyma order-processing workflow involving web access, CSV handling, workbook generation/enrichment, email delivery, and Telegram failure notification. The actual code chunk does none of those tasks. It only validates whether certain cells in an existing Excel workbook are blank within a specified row range and prints the results as JSON. This is a materially different and much narrower purpose than the declared automation, so the description does not accurately represent the behavior of this code chunk.

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill declares broad operational behavior involving local file reads and writes but does not define any explicit tool scope or permission boundaries. In an agent setting, missing scope increases the chance that the runtime grants overly broad filesystem access, enabling unintended access to adjacent files, prior workbooks, templates, and sensitive workspace data.

Session Persistence

Medium
Category
Rogue Agent
Content
---
name: buyma-order-automation
description: automate buyma order processing for regular daily runs and ad hoc order-range runs. use when chatgpt needs to access buyma in chrome, check or fill receipt memo numbers, download or use a provided buyma csv, write the tmazon order workbook, enrich rows from prior workbook history, and send the result by naver mail before a deadline or after an ad hoc request. stop immediately and notify by telegram with file attachment on buyma, csv, or mail failure.
---

# Overview
Confidence
85% confidence
Finding
The skill relies on persistent state across runs, including prior workbook history, latest delivered files, and Chrome default profile sessions. Persistent session and state reuse can expose prior user data, cross-contaminate runs, and unintentionally reuse authenticated browser sessions or sensitive artifacts beyond the minimum needed for the current task.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill instructs sending result files and failure attachments through Naver Mail and Telegram without explicit safeguards, approval checks, recipient validation, or warning about possible disclosure of order/customer data. This creates a real risk of exfiltrating sensitive business or personal information to third-party services or the wrong destination during both normal and failure handling.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The file instructs operators to translate content to Korean and to use a Korean product name from Chrome auto-translation when filling fields. This is a natural-language locale requirement, but the document does not provide user opt-in, alternatives, or a documented justification that the workflow is explicitly region-specific.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The prescribed failure text format is fixed in Korean (`BUYMA 자동화 실패 / 단계: {stage} / 파일 첨부`) with no indication that the user can choose language or that the workflow is intentionally Korea-specific. This can violate language/locale policy when a skill mandates a specific language without opt-in or documented justification.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The instruction to 'Start at any practical time before deadline' does not define a concrete trigger or clear boundary for when this run mode should activate. In a markdown skill reference, this kind of broad activation language can lead to inconsistent or unintended invocation because almost any pre-deadline time could qualify as 'practical'.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly instructs the agent to send Telegram notifications with a file attachment when failures occur, which creates an external data transmission path for potentially sensitive order or workbook data. Without explicit data-minimization rules, recipient validation, and user/operator warning, failure artifacts could leak customer, order, or business information to an external messaging platform.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The ad hoc mode says to 'send mail immediately' after building the workbook, which directs external transmission of order/workbook data without any visible confirmation, recipient verification, or warning about sensitivity. In a skill that processes order data and prior workbook history, this increases the chance of accidental disclosure, especially during ad hoc runs where operator input may be rushed or incomplete.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The workflow explicitly sends the generated workbook by Naver Mail, but it provides no user-facing confirmation, warning, or data-classification check before transmitting potentially sensitive order data to an external service. Because this skill handles order information and workbook history, silent outbound transmission increases the risk of unintended disclosure to the wrong recipient, unauthorized sharing, or sending data outside approved channels.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The workflow instructs the agent to notify via Telegram with a file attachment on failure, but it does not warn the user that operational failures may trigger external sharing of order-related files. Error paths are especially risky because they can exfiltrate partial outputs, CSVs, or workbooks to a third-party messaging platform without review, which is dangerous in a skill that processes business order data.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The function converts shipping method values into Korean-specific labels such as "사가" regardless of user preference or runtime locale selection. This is a natural-language locale policy concern because the script forces a specific language in generated output without offering opt-in or documenting that the tool is intentionally Korean-localized.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
When the region is OKINAWA, the script appends the Korean string "오키나와" to the normalized note automatically. This forces a specific output language in generated data and does not provide a language choice or explain why Korean localization is required.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The workflow requires filling fields using auto-translated Korean product names, which imposes a specific language/locale behavior. The document does not offer user opt-in or explain why Korean is required as a documented regional or compliance constraint.

Missing User Warnings

Low
Confidence
86% confidence
Finding
The rule explicitly requires preserving the generated workbook in `orders/current/` after mail failure, but it does not mention retention limits, access controls, or notifying the user/operator that order data will remain on disk. In an automation handling order records, silent persistence can increase exposure of potentially sensitive business or customer data if the host is shared, compromised, or logs/artifacts are later collected.

Missing User Warnings

Low
Confidence
89% confidence
Finding
This code performs a file write by saving the workbook to the provided output path, which can overwrite or create a spreadsheet file. While the script prints a summary after completion, there is no prior warning, confirmation prompt, or comment/docstring disclosing that it will modify filesystem contents.

Missing User Warnings

Low
Confidence
87% confidence
Finding
This code performs a file write containing parsed BUYMA order records, including fields such as contact notes, romanized names, and region data. While the CLI argument implies output generation, there is no visible disclosure in code comments, prompts, or logging that potentially sensitive order information will be persisted to disk.

Static analysis

No suspicious patterns detected.