T09 · Insecure Skill Coding Practices
- Location
src/config.js:108- Finding
Plaintext storage of TikTok and Feishu credentials in an insufficiently protected configuration file
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a plausible TikTok Shop automation tool, but it handles live commerce actions, credentials, and customer/order data with weak safeguards and misleading security posture.
Review this carefully before installing on a real shop. Use only with mock or sandbox data until credential storage is fixed, Feishu sync is strictly opt-in per command, live inventory/order/refund actions require confirmation or dry-run, and customer PII exports are documented and minimized. Rotate any TikTok cookies, API secrets, or Feishu webhook URLs already saved by this version.
src/config.js:108Plaintext storage of TikTok and Feishu credentials in an insufficiently protected configuration file
commands/order.js:39Explicit synchronization destination is overridden, causing unexpected disclosure of customer order data to Feishu
The exported getCurrentAccount function calls itself recursively with no termination condition, causing infinite recursion and a stack overflow whenever it is invoked. In this account-management context, that creates a reliable denial of service for any feature that depends on retrieving the current account and also prevents callers from accessing the intended configuration-backed value.
The inventory sync routine claims to synchronize with an ERP system, but instead fabricates stock levels using Math.random() and can push those values to TikTok when autoUpdate is enabled. In a product-management skill, this is dangerous because it can corrupt live inventory data, causing overselling, underselling, or operational disruption based on false stock counts.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
async getAccessToken(shopId) {
console.log('🔐 获取 TikTok Access Token...');
// TODO: 实现真实的 OAuth 2.0 流程
// 1. 构建授权 URL
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
async getAccessToken(shopId) {
console.log('🔐 获取 TikTok Access Token...');
// TODO: 实现真实的 OAuth 2.0 流程
// 1. 构建授权 URL
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
async getAccessToken(shopId) {
console.log('🔐 获取 TikTok Access Token...');
// TODO: 实现真实的 OAuth 2.0 流程
// 1. 构建授权 URL
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
'tiktok-shop'
);
const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
const CREDENTIALS_FILE = path.join(CONFIG_DIR, 'credentials.json');
/**
* 配置 schema
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
/**
* 认证 - 模拟获取 access token
*/
async getAccessToken(shopId) {
console.log('🔐 [Mock] 获取 Access Token...');
The README promotes fully automated order processing and automatic competitor-price adjustment without any visible safeguards, approval steps, rollback guidance, or warnings about operational and financial risk. In an e-commerce automation context, users may enable these features expecting safe defaults, which can lead to erroneous order handling, price wars, margin loss, or store policy violations if the automation behaves unexpectedly.
The skill explicitly documents customer data export functionality but does not pair it with any privacy, consent, retention, or access-control guidance. In an e-commerce context, exported customer datasets can contain personal information, so normalizing export workflows without safeguards increases the risk of unauthorized disclosure, misuse, or noncompliance with privacy laws.
The file includes natural-language descriptions such as the header and command/help text in Chinese, but there is no indication that users can choose another language or locale. This can violate a language/locale policy when a skill forces a specific language without user opt-in.
The code explicitly formats timestamps with the fixed locale 'zh-CN', which imposes a specific language/locale on users. The file also uses Chinese-only user-facing messages throughout, but line L57 is the clearest hardcoded locale policy issue because it programmatically forces a locale rather than honoring user settings or offering opt-in.
This code contains natural-language descriptions and console messages in Chinese throughout the file, which effectively forces a specific language for users interacting with the skill. The policy only permits this when the skill offers language/locale choice or clearly documents a justified regional constraint, neither of which is present here.
The function is presented as competitor monitoring, but when options.alert is set it also performs an outbound Feishu webhook send. This hidden side effect can leak monitored business data to an external system and create unexpected network activity that users or higher-level agents may not anticipate from a read/analysis-style command.
This code changes order state to 'shipped', which is a consequential and potentially irreversible business operation. Although it logs basic context, there is no confirmation prompt or explicit user-facing warning that the action will mark orders as shipped and generate tracking numbers before the API call executes.
When autoNotify is enabled, the code transmits order identifiers and tracking numbers through Feishu webhook messaging. The function logs that buyer notification is enabled, but it does not clearly warn that customer/order data will be sent to an external integration.
This API call changes the order to a refunded or returned state, which can have financial and operational consequences. The surrounding logs show the selected action but do not provide an explicit warning or confirmation gate before the status change is performed.
This JavaScript file contains natural-language comments and console output entirely in Chinese, including operational status and error messaging. Under the stated policy, forcing a specific language without user opt-in or a documented locale justification is a natural-language policy violation.
The function advertises email-based notification via notifyEmail, but the implementation only sends Feishu alerts when config.feishu?.enabled || options.notifyEmail is truthy. This mismatch can cause operators to believe alerts are reaching an email destination when they are not, leading to missed low-stock events and business-impacting failures in monitoring.
This JavaScript file contains natural-language comments and runtime messages entirely in Chinese, including user-facing status and error output. Under the policy rule, forcing a specific language without user opt-in or documented regional justification is a natural-language policy violation.
The description forces a specific language/locale in user-facing natural language content: "TikTok Shop 自动化运营技能 - 商品管理、订单处理、数据分析、营销自动化". There is no indication that users can choose another language or that the Chinese-only presentation is a justified region-specific constraint.
This JavaScript file contains natural-language documentation and operational log messages exclusively in Chinese, such as the class header and method status messages. Under the policy rule for language/locale, forcing a single language without user opt-in or justification is a policy concern because users may be unable to understand warnings or operational behavior.
This JavaScript file uses Chinese-only natural-language comments and console messages throughout, starting with the module description and continuing in exported function documentation and runtime output. Under the policy rule for language/locale, this is a violation because the skill does not offer user opt-in or indicate that the skill is intentionally restricted to a Chinese-speaking or region-specific context.
The function documentation says it retrieves a tenant access token using app credentials, but the implementation always returns a fabricated mock token. This can mislead callers into believing authentication is real, causing security controls and environment validation to be bypassed and potentially leading to unsafe deployment behavior.
This method batches and sends order records to the Feishu Bitable API, including customer name and email fields, which is a network transmission of user data to an external service. While the code logs that syncing is happening, it does not disclose that personally identifiable customer data will be sent, nor does it prompt for confirmation before transmission.
This function sends arbitrary message content to a configured Feishu webhook via HTTP POST, which can transmit user or system data to an external service. Although it logs that a message is being sent, it does not warn users that message contents are being sent outside the local system or describe the privacy impact.
No suspicious patterns detected.