T09 · Insecure Skill Coding Practices
- Location
scripts/reconcile.py:48- Finding
Unvalidated API destination can receive WMS authentication material
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real WMS billing reconciliation skill, but it needs review because it handles WMS credentials and business data with weak scoping and disclosure.
Install only if you are comfortable providing WMS API credentials to this local script. Verify the WMS base URL yourself, prefer HTTPS, avoid putting real AppSecret values in shared shells or logs, and treat generated HTML reports as sensitive files that may contain business data.
scripts/reconcile.py:48Unvalidated API destination can receive WMS authentication material
scripts/reconcile.py:650AppSecret is exposed through command-line arguments
scripts/reconcile.py:447Unescaped spreadsheet and API values enable stored HTML injection
| 序号 | 业务单号 | 运单号 | Excel金额 | 状态 | 拦截 | 问题 |
|---|---|---|---|---|---|---|
| {r['index']} | {r.get('order_sn','')} | {r.get('tracking_no','')} | {r.get('excel_fee','')} | {r['status']} | {r.get('hold_up_status','')} | {r.get('issue','')} |
The skill directs users to run a script that performs network access and writes files, but the skill manifest does not declare any explicit tool scope or permissions. This weakens reviewability and least-privilege controls: an agent or user may invoke a skill with broader capabilities than are obvious from the metadata, increasing the chance of unintended data access, credential use, or file modification.
Several triggers in this range, such as “核账”, “收费核对”, and fee-type phrases, are ambiguous enough to overlap with broader finance, ERP, or non-WMS workflows. In this skill’s context, that ambiguity is more dangerous because the manifest declares sensitive API-key usage plus Read/Write/Bash permissions, increasing the chance of unintended execution against local files or credential-handling paths.
The trigger phrase at line 25 is simply “对账”, which is extremely broad and likely to match many unrelated accounting or reconciliation requests. Because this skill requests API credentials and has Bash permission, accidental activation could cause the agent to invoke a higher-risk workflow in contexts where the user did not intend to use this warehouse-reconciliation skill.
This markdown file describes a Base URL for external API calls, the use of an appSecret for request signing, and AppKey/Signature headers, but it does not include any warning about privacy, credential handling, or the fact that operational data will be transmitted to an external system. For markdown files, SQP-2 applies when the skill description omits warnings about behaviors that could affect user data, privacy, or system integrity.
This code writes a generated HTML report to disk, and elsewhere in the script also writes JSON output and may modify or create Excel files. Although these file operations are part of the tool's purpose, the write sites themselves provide no prior warning comment or confirmation, and the top-level docstring does not clearly warn that running the script will create output files and may overwrite the original Excel when marking is enabled.
When --mark-excel is used, the script modifies workbook content and may overwrite an existing file path without a strong explicit confirmation step at the point of write. In a skill/agent context, file modification of user-supplied documents is more sensitive because users may not realize the original workbook or a chosen output file will be changed, leading to data integrity loss or accidental overwrite.
This markdown file is almost entirely presented in Chinese, including the primary legal and safety-related notice content. Under the policy rule, forcing a specific language without giving users a choice or documenting a justified locale restriction is a natural-language policy violation.
The skill asks users to supply AppKey/AppSecret and run a script that can modify the original Excel workbook via --mark-excel, but the warning about in-place file changes is not prominent. This creates a risk of accidental alteration of source billing evidence or operational spreadsheets, which can affect audit integrity and user trust even if no malicious behavior is intended.
The script's user-facing documentation and CLI messages are entirely in Chinese, with no indication that another language can be selected. Under the stated policy, forcing a single language without offering user choice is a locale/language policy issue unless clearly justified as region-specific.
技能描述将用途聚焦于仓库收费清单与WMS业务记录逐笔核对,并在触发词中明确列举了仓租费、出库费、包装费、退件费等场景,但未提及销毁费。这里额外实现了销毁费明细核对逻辑,属于对已声明对账范围的扩展,而不是实现上述已声明能力所必需的细节。
No suspicious patterns detected.