T09 · Insecure Skill Coding Practices
- Location
scripts/anomaly-detector.js:545- Finding
Arbitrary File Write Through Path Traversal in Discord Alert Filename
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s logistics automation purpose is mostly disclosed, but its implementation has real safety flaws around local file writes and unescaped customer-facing email content.
Treat this as requiring review before installation. Fix the alert filename path traversal and HTML escaping issues first, use dry-run until verified, keep API/SMTP credentials dedicated and least-privileged, and run any scheduler under an unprivileged account with limited writable paths.
scripts/anomaly-detector.js:545Arbitrary File Write Through Path Traversal in Discord Alert Filename
scripts/customer-notify.js:290Stored HTML Injection in Customer Notifications and Anomaly Alert Emails
Great news! Your order${orderId ? ' ' + orderId + '' : ''} has been shipped via ${carrierName}.
Tracking Number
| Order ID | ' + orderId + ' |
| Carrier | ${carrierName} |
| Tracking No. | ${trackingNumber} |
Dear ${customerName},
We have an update regarding your shipment${orderId ? ' for order ' + orde ...[truncated 3731 chars]
The skill's declared purpose does not fully disclose its effective behaviors, including reading order data, writing shipment state, and sending alerts through additional channels. This mismatch can mislead operators into approving a skill with broader data access and side effects than expected, increasing the chance of unintended data exposure or unauthorized actions.
The skill's declared purpose does not fully disclose its effective behaviors, including reading order data, writing shipment state, and sending alerts through additional channels. This mismatch can mislead operators into approving a skill with broader data access and side effects than expected, increasing the chance of unintended data exposure or unauthorized actions.
The skill's declared purpose does not fully disclose its effective behaviors, including reading order data, writing shipment state, and sending alerts through additional channels. This mismatch can mislead operators into approving a skill with broader data access and side effects than expected, increasing the chance of unintended data exposure or unauthorized actions.
The skill's declared purpose does not fully disclose its effective behaviors, including reading order data, writing shipment state, and sending alerts through additional channels. This mismatch can mislead operators into approving a skill with broader data access and side effects than expected, increasing the chance of unintended data exposure or unauthorized actions.
The skill's declared purpose does not fully disclose its effective behaviors, including reading order data, writing shipment state, and sending alerts through additional channels. This mismatch can mislead operators into approving a skill with broader data access and side effects than expected, increasing the chance of unintended data exposure or unauthorized actions.
Referenced artifact was not completely inspected
node scripts/scheduler.js
Referenced artifact was not completely inspected
node scripts/scheduler.js
Referenced artifact was not completely inspected
node scripts/scheduler.js
Referenced artifact was not completely inspected
node scripts/scheduler.js
Referenced artifact was not completely inspected
node scripts/anomaly-detector.js
Referenced artifact was not completely inspected
node scripts/anomaly-detector.js
Referenced artifact was not completely inspected
node scripts/anomaly-detector.js
Referenced artifact was not completely inspected
node scripts/anomaly-detector.js
Referenced artifact was not completely inspected
node scripts/anomaly-detector.js
Referenced artifact was not completely inspected
node scripts/anomaly-detector.js
Referenced artifact was not completely inspected
node scripts/tracking-extractor.js --text "Your UPS shipment 1Z999AA10123456784 has shipped"
Referenced artifact was not completely inspected
node scripts/tracking-extractor.js --text "Your UPS shipment 1Z999AA10123456784 has shipped"
Referenced artifact was not completely inspected
node scripts/tracking-extractor.js --text "Your UPS shipment 1Z999AA10123456784 has shipped"
Referenced artifact was not completely inspected
node scripts/tracking-extractor.js --text "Your UPS shipment 1Z999AA10123456784 has shipped"
Referenced artifact was not completely inspected
- **Subtask 2** — 创建 17Track API 适配器 `tracking-api.js`(批量注册+查询、3 路径响应解析、配额四级监控、pause_non_critical 降级、exponential backoff)
Referenced artifact was not completely inspected
- **Subtask 3** — 创建状态管理 `shipment-store.js`(原子写入、9 状态状态机、eventId SHA256 去重、赔偿流程提醒)
Referenced artifact was not completely inspected
- **Subtask 4** — 创建客户通知模块 `customer-notify.js`(3 套 HTML 模板、频率控制、决策引擎、17track 自助链接)
The skill documentation describes capabilities that imply access to environment-derived secrets and external integrations, but it does not declare any explicit tool scope or permissions boundary. In agent environments, missing permission declarations can cause overbroad execution authority or make reviewers unaware that API keys, SMTP credentials, and filesystem access are required.
The skill advertises automatic customer notifications and alerting but does not prominently warn that it will transmit customer-related shipment data to external services and recipients. In practice, this can lead to accidental disclosure of personal data, shipment identifiers, or operational details when an operator runs the skill assuming it is passive.
Referencing SMTP credentials in a dependent skill without explicit handling guidance increases the risk of unsafe secret storage, accidental disclosure, or misuse of mail infrastructure. Because the skill can send external messages, poor credential hygiene can also enable spam, impersonation, or broader compromise of communication systems.
Detected: suspicious.dangerous_exec