T08 · Insecure Dependencies
- Location
analyze.py:13- Finding
Untrusted External Module Loaded Through a Hard-Coded Priority Search Path
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a retail sales analysis tool, but it needs Review because it loads unreviewed code from a hard-coded local path and its store-vs-clerk data scope is unclear.
Review before installing. Use only in an authorized retail BI environment, confirm that the external api_client path is trusted and controlled, and avoid clerk-level requests until the implementation has explicit clerk handling, input validation, and clear privacy guidance.
analyze.py:13Untrusted External Module Loaded Through a Hard-Coded Priority Search Path
analyze.py:35Unvalidated Caller-Controlled Values Interpolated into an API Query
代码的核心目的与描述大体相关,确实是在做销售业绩环比分析、归因、异常识别和建议生成,因此不是完全无关的技能。但声明范围明显大于实际实现。fetch_store_data 固定访问 /api/v1/store/dashboard/bi?storeId=... 门店接口,analyze() 中 subject_type 虽可传 clerk,却没有任何针对导购的接口或分析分支,说明“导购个人业绩分析”并未真正实现。描述中还提到排名、业绩占比、能力雷达图、多门店/多导购对比分析,代码中均未看到相应计算或输出结构。故应判定为描述与实际能力存在实质性不一致,属于部分能力夸大。
The skill metadata and code comments claim both store and clerk performance analysis, but the implementation only supports store-level retrieval and logic. This mismatch is security-relevant because callers may supply clerk identifiers or expect least-privilege clerk-scoped processing while the code actually performs store-level access patterns.
The function advertises support for both store and clerk analysis, but always calls the store dashboard endpoint using the provided subject_id. This can cause incorrect data access semantics, misrouting of identifiers, and accidental exposure or processing of store-level data when the caller intended clerk-scoped analysis.
The activation section uses generic phrases such as “本周业绩怎么样”, “为什么销售下降”, and “业绩达标了吗”, which are common business-chat utterances rather than narrowly scoped invocation commands. The file does not provide exclusion conditions or boundary rules clarifying when these phrases should or should not activate the skill.
The skill specification explicitly handles store IDs, clerk IDs, names, and backend API details without any warning, minimization guidance, or access-control expectations. In a business environment, this can normalize unsafe handling of operational and personnel data and increase the risk of unauthorized disclosure or misuse if the skill is invoked in the wrong context.
The top-level natural-language description and comments present the skill as Chinese-only, without offering the user a language or locale option. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.
The function constructs an API endpoint using a store identifier and date range, then sends that information via get_copilot_data. While the module and function docstrings describe analysis behavior, they do not disclose that the skill transmits business data parameters to an external API, and there is no logging or prompt notifying the user of this network access.
All user-facing natural-language instructions, triggers, and examples are in Chinese, which effectively forces a single language experience. The file does not indicate that this is a region-specific skill or that users can opt into another language.
No suspicious patterns detected.