Back to skill

Security audit

Yidian Upload

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-built for marketplace upload automation, but it controls a live logged-in browser session and external spreadsheets with insufficient safeguards around high-impact actions.

Install only if you are comfortable with an agent controlling a logged-in seller backend and modifying Feishu records. Use dry-run first, verify the browser account and target shop before live runs, rotate/remove the embedded Feishu token, avoid using a general-purpose browser profile for CDP, and do not feed untrusted product data until the JavaScript interpolation and filename handling are fixed.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/publisher.py:148
Finding

JavaScript Injection Through Unescaped Product Data

Content
View full analysis
bool: return await self.evaluate( f"(function(){{var el=document.querySelector('input[placeholder*=\"{placeholder}\"]')||document.querySelector('textarea[placeholder*=\"{placeholder}\"]');if(el){{el.value=`{value}`;el.dispatchEvent(new Event('input',{{bubbles:true}}));return true}}return false}})()" ) ``` A second exploitable data flow inserts delivery text directly into a JavaScript template literal: ```python await page.evaluate(f"""(function() {{ var ta = document.querySelector('.addproduct-dialog textarea, .el-dialog__body textarea'); if (ta) {{ ta.value = `{pan_text}`; ta.dispatchEvent(new Event('input', {{ bubbles: true }})); }} }})()""") ``` The extraction code and title are similarly interpolated into JavaScript: ```python await page.evaluate(f"""(function() {{ var inputs = document.querySelectorAll('.addproduct-dialog input, .el-dialog__body input'); for (var inp of inputs) {{ if (inp.placeholder && (inp.placeholder.includes('提取码') || inp.placeholder.includes('密码'))) {{ inp.value = '{pan_code}'; inp.dispatchEvent(new Event('input', {{ bubbles: true }})); return; }} }} }})()""") ``` ```python target_row_index = await page.evaluate(f"""(function() {{ var trs = document.querySelectorAll('.el-table__body-wrapper tbody tr'); for (var i = 0; i < trs.length; i++) {{ var tds = trs[i].querySelectorAll('td'); ...[truncated 2452 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/auto_publish.py:37
Finding

Hardcoded Feishu Spreadsheet Token Exposed in Source and Process Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/batch_parser.py:455
Finding

Path Traversal and Arbitrary File Write Through Product Titles

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/publisher.py:43
Finding

CDP Target Selection Falls Back to an Unrelated Browser Tab

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:24
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README promotes automated listing publication and browser remote-control against a live marketplace/admin backend without prominently warning that actions can create or modify real listings. In this context, users may run the tool against a logged-in production session and unintentionally publish goods, alter store data, or trigger platform policy issues before realizing the automation is live.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The usage section includes direct live-run commands for automated publishing alongside preview options, but does not instruct users to validate session/account context before executing the live commands. Because the skill attaches to an existing browser debugging session and operates a seller backend, a mistaken session or stale login could cause unintended listings or changes in the wrong account.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents capabilities that imply file reads/writes, shell execution, browser/CDP control, and network access, but it declares no explicit tool scope or permission boundaries. In an agent environment, this can enable over-privileged execution where the model may read local files, modify scripts, or access remote services beyond what the user expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The Feishu integration describes automatically reading product data and writing status updates back to an external spreadsheet, but it does not present a clear user-facing warning or consent step before modifying third-party data. This is risky because an agent could alter business records, mark items as completed incorrectly, or sync unintended data to an external service without explicit approval.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

md
**同步规则:以 WorkBuddy SKILL.md 为中心,单向推送到飞书文档。**

- **主源**:WorkBuddy SKILL.md(`~/.workbuddy/skills/yidian-upload/SKILL.md`)— 所有修改都在这里进行,当前版本 **v3.4**
- **飞书文档**:作为镜像备份

## 同步方式

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s user-facing documentation and runtime messages are written entirely in Chinese, indicating the skill is designed around a fixed language/locale. Under the policy, forcing a specific language without offering user opt-in or documenting a justified locale restriction is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

When --apply is used, the script writes parsed product data including pan_text and pan_code into generated .txt files. Although preview/apply behavior is disclosed, there is no explicit warning that potentially sensitive share links and extraction codes from the source file will be persisted into new files under the output directory.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/feishu_reader.py (reported line 93)May include surrounding context.

python
"""运行飞书 CLI 命令并返回解析后的 JSON"""
        cmd = [self.node_path, self.lark_script] + args
        try:
            result = subprocess.run(
                cmd, capture_output=True, timeout=30,
                encoding='utf-8', errors='replace'
            )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code performs a write operation to a Feishu spreadsheet by invoking the CLI to set cell values, which changes external user data. Although there is a success/failure log after the write, there is no confirmation prompt or explicit warning before performing the state-changing operation in this skill file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The method marks a matched product as uploaded by calling update_status, causing a remote modification to spreadsheet data. The method's docstring describes what it does, but there is no user-facing warning or confirmation around this potentially irreversible workflow state change.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script immediately navigates to the marketplace admin page and proceeds to create and publish a product using the currently attached browser session, with no interactive confirmation, dry-run mode, or safety gate before the irreversible action. In an agent/automation context, this creates a real risk of unintended listing publication, inventory changes, and store-side operational impact if the script is launched in the wrong context or with stale configuration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script uploads a local file from IMAGE_PATH to a remote platform automatically when the expected image is not found, without presenting the operator with any notice about what file will be sent. This can cause accidental disclosure of local files or unintended publication of the wrong asset, especially since the path is assembled automatically and the active browser session is reused without further validation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script automatically enables auto-delivery and injects externally hosted delivery content, including a Baidu Pan link and extraction code, directly into the platform configuration without any user warning or review step. This is more dangerous in context because it modifies fulfillment behavior for live products and stores external distribution data that could violate policy, distribute unauthorized software, or cause customers to receive malicious or infringing content at scale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script performs end-to-end product publication and post-publication state changes directly against a live browser session, including clicking publish and enabling fulfillment-related switches, without any explicit interactive confirmation or dry-run safeguard at the execution point. In the context of an agent skill, this raises the risk of unintended real-world actions from malformed input, misuse by another component, or execution against the wrong logged-in account/tab.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The code reads a local filesystem path derived from configuration and injects that file into the browser via Chrome DevTools Protocol without presenting a clear warning or requiring confirmation that a local file will be accessed. If untrusted input can influence image_dir or image_file, the automation could upload unintended local files into the remote web application, causing data leakage from the host running the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file begins with a Chinese-only heading "更新日志", and the entire changelog is written in Chinese with no indication that language is configurable or limited to a justified region-specific audience. This is a natural-language locale policy concern because it imposes a specific language on readers without documenting opt-in or scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file presents its purpose, usage instructions, and runtime messages entirely in Chinese, which imposes a specific language on users. The policy allows locale constraints only when documented and justified or when the user is given a language choice, neither of which appears here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module header and class name/documentation emphasize reading product lists from Feishu, but the implemented methods update_status and mark_done perform write operations to the spreadsheet via +cells-set. This is a semantic mismatch because the stated role is narrower than the code's actual read/write behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The usage block presents products = reader.get_pending_products() and then reader.mark_done(p['title'], p['shop']), while the surrounding example output fields include p['shop'] and p['image_file']; this is mostly consistent. However, the documentation context is muddled because the module is introduced as a reader, yet the example prominently performs writeback via mark_done, creating an intent-level inconsistency between '读取器' framing and actual read/write behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The module docstring and class documentation describe a Feishu CLI wrapper for reading a spreadsheet product list and updating status fields. However, _resolve_image additionally probes a local 图片资料目录 and lists files to fuzzy-match image names, which is a separate local filesystem discovery capability not inherent to Feishu sheet access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The top-level natural-language instructions and usage guidance are entirely in Chinese, which can constitute a language policy issue when no opt-in or locale limitation is stated. There is no indication that the skill is intentionally restricted to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

All user-facing messages, comments, and descriptive strings in this skill are Chinese-only, which effectively forces a specific language experience without opt-in. There is no indication that the skill is intentionally limited to a Chinese-speaking audience or region-specific deployment.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.