T09 · Insecure Skill Coding Practices
- Location
scripts/query_tracking.py:43- Finding
Unrestricted API Endpoint Allows Disclosure of Authenticated Request Data and SSRF
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This courier-tracking skill is mostly aligned with its purpose, but it needs review because it can send tracking data and API-authenticated request material to an arbitrary URL and includes credential-looking examples.
Review before installing. Use only your own Kdniao credentials, avoid the --api-url option unless you fully trust and control the destination, and treat tracking numbers as potentially sensitive shipment data that will be sent to an external logistics API.
scripts/query_tracking.py:43Unrestricted API Endpoint Allows Disclosure of Authenticated Request Data and SSRF
SKILL.md:37Credential-Like API Value Published in Documentation and Error Messages
The skill does not clearly warn that using it sends the user's tracking number to a third-party logistics API. Tracking numbers can reveal shipment activity and potentially sensitive personal or business logistics information, so undisclosed transmission creates a meaningful privacy and consent issue.
The trigger condition is broadly phrased as any request involving logistics lookup, tracking, or delivery status, without defining consent, supported carriers, or when third-party transmission is appropriate. Overbroad activation can cause the agent to invoke the skill and send tracking numbers to an external API more readily than the user expects, increasing privacy and data-handling risk.
The skill is explicitly designed to transmit user-supplied tracking numbers and credentials to an external endpoint, which is expected functionality but still a real data egress path. In this context the danger is not that external communication exists, but that it occurs without strong disclosure, minimization, and consent controls around potentially sensitive shipment data.
- 不同快递公司的查询结果格式可能略有差异
- 建议在查询前提醒用户确认运单号准确性
- API使用默认正式环境地址:`https://api.kdniao.com/api/dist`
The file's natural-language strings, including the module description, CLI description, help text, and error messages, are all fixed in Chinese. This enforces a specific language experience without any user opt-in or indication that the tool is intentionally limited to a Chinese-language or region-specific audience.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
CHARSET = 'UTF-8'
# 默认正式环境API地址
DEFAULT_API_URL = 'https://api.kdniao.com/api/dist'
# 接口类型配置
INTERFACE_TYPE = {
The CLI accepts a user-supplied --api-url and then sends both the shipment query data and the API credentials to that endpoint. This enables exfiltration of secrets to an arbitrary host and exceeds the justified scope of a courier-tracking helper, especially because the credentials are long-lived and transmitted automatically once the URL is overridden.
All user-facing instructions and descriptions in the file are written in Chinese, which effectively forces a specific language for users without any opt-in or explanation. Under the policy, language constraints should either be optional for the user or clearly documented and justified as region-specific.
This code sends the tracking request data to an external API and includes authentication material derived from environment-provided credentials, but the runtime flow does not display any user-facing notice or confirmation before transmitting that data. Although the function docstrings state that it calls the KDNiao API, there is no explicit warning to the user at execution time that shipment identifiers and credential-derived data will be sent off-system.