T09 · Insecure Skill Coding Practices
- Location
scripts/geekbi_auth.py:69- Finding
Bearer tokens are unnecessarily replicated across multiple storage locations
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This AliExpress research skill appears purpose-built rather than malicious, but it needs Review because it stores GeekBI login tokens in multiple local places and allows unvalidated authentication destinations.
Review before installing in environments with sensitive workspaces. Only use it if you are comfortable authenticating to GeekBI and storing session tokens on disk; avoid custom --base-url values, verify login links before opening them, and prefer a version that stores credentials in one protected user-specific location with an HTTPS allowlist for GeekBI origins.
scripts/geekbi_auth.py:69Bearer tokens are unnecessarily replicated across multiple storage locations
scripts/geekbi_auth.py:698Unrestricted API base URL permits authentication over untrusted or plaintext origins
scripts/geekbi_auth.py:498Server-controlled action URLs are exposed to users without origin validation
requirements.txt:1Dependency resolution is not reproducibly pinned or hash-verified
The declared purpose omits materially sensitive behavior: local persistence of authentication state, login/device-code flows, token handling, automatic authenticated requests, and auth-state management commands. Undisclosed credential storage and auth automation are security-relevant because they can expose tokens, create unexpected persistence on disk, and expand the blast radius if the skill or host environment is compromised.
The declared purpose omits materially sensitive behavior: local persistence of authentication state, login/device-code flows, token handling, automatic authenticated requests, and auth-state management commands. Undisclosed credential storage and auth automation are security-relevant because they can expose tokens, create unexpected persistence on disk, and expand the blast radius if the skill or host environment is compromised.
The skill advertises executable/scripted behavior (scripts/aliexpress_site_list.py, aliexpress_goods_search.py, aliexpress_goods_info.py) but does not declare any explicit tool scope or permission boundaries. That makes the effective access to file, shell, and network capabilities opaque to reviewers and increases the risk of overprivileged execution or unexpected side effects.
The description says to use the skill whenever the user mentions topics like AliExpress product search, hot products, new products, ranking lists, price bands, growth trends, candidate filtering, or single-product research. This trigger language is broad and lacks explicit boundaries or negative examples, which could cause the skill to activate for general discussion or analysis requests that are not intended to invoke this specific capability.
The instruction '原样使用服务端中文 msg' requires the skill to present Chinese content as-is, which enforces a specific language on the user without any opt-in or alternative. This is a natural-language policy concern because the file does not indicate the skill is region-specific or that users can choose their preferred language.
This Python file contains natural-language strings entirely in Chinese, including the module description and multiple exception messages shown to users. Under the policy, forcing a specific language without opt-in is a locale/language policy violation unless the constraint is explicitly justified, which is not present in this file.
This code's natural-language interface is entirely Chinese, including the module docstring, CLI argument descriptions, and error messages. Under the stated policy, forcing a specific language without offering a user choice or documenting a justified locale constraint is a natural-language policy violation.
This Python file contains its top-level docstring entirely in Chinese, and the rest of the script consistently uses Chinese-only user-facing strings for errors, prompts, and CLI descriptions. Under the language/locale policy rule, forcing a specific language without user choice is a natural-language policy violation unless clearly documented as region-specific, which is not evident in this file.
The auth state is stored under a different namespace (temu-research-skill) than the declared AliExpress skill, creating unintended state sharing and confusion between skills. If another skill or workflow uses the same storage path, tokens or pending login state can be reused, overwritten, or cleared across unrelated skills, causing cross-skill credential mix-up and possible unauthorized API access within the same local user context.
This code presents its primary natural-language interface in Chinese only, including the module docstring and command description. The policy for natural-language violations applies to all file types, and there is no visible user choice or opt-in for language/locale in this file.
The module docstring claims 'Bearer request wrapping', which ordinarily means using the HTTP Authorization: Bearer ... header. However, the implementation places the returned bearer string into a custom token header instead, so the documentation actively misstates how authentication is performed.