T09 · Insecure Skill Coding Practices
- Location
api/geo_api.py:21- Finding
Hardcoded API Key Grants Unauthorized Pro Service Access
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real brand visibility monitoring skill, but it needs review because it sends business queries to external services and ships unsafe API and licensing controls.
Install only if you are comfortable sending brand names, competitor terms, result snippets, and reports to external AI/search services and to Feishu when configured. Do not expose the bundled Flask API publicly unless the hardcoded key, input validation, rate limits, and network binding are fixed. Review the local quota/report files and pin dependencies before production use.
api/geo_api.py:21Hardcoded API Key Grants Unauthorized Pro Service Access
api/geo_api.py:86Unvalidated Search Parameters Permit Upstream Resource Abuse
scripts/geo_report.py:139Predictable Shared Temporary File Enables Symlink-Based File Overwrite
api/requirements.txt:1Open-Ended Dependency Versions Create Non-Reproducible Supply-Chain Exposure
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def search_brand_tavily(brand_name, max_results=5):
"""使用Tavily搜索品牌信息"""
try:
response = requests.post(
TAVILY_API_URL,
json={
"api_key": TAVILY_API_KEY,
The code partially overlaps with the description in that it performs brand-related searching and outputs a 0-100 score. However, the primary behavior is materially narrower and different from the declared product. It exposes a small authenticated Flask API that submits a single Tavily search query like ' 品牌 AI 服务' and assigns a score via min(len(results)*15, 100). It does not integrate with or search Kimi/Xunfei/Zhipu/Wenxin/DeepSeek/etc., does not analyze recommendation failures, does not push to Feishu, and does not implement competitor monitoring. The use of API-key authentication is a supporting implementation detail, not itself a mismatch, but the major declared capabilities are absent or substituted with a generic web-search backend.
The declared description presents a broader end-to-end monitoring tool with platform searching, visibility detection, scoring, analysis, and notification support. The supplied code implements only a narrower analysis module that consumes already-provided search results and an already-provided GEM score. While the 'analyze why brand was not recommended' portion aligns with the description, the primary behavior of this specific code chunk does not include the other major declared capabilities. There is also an undeclared optional external network call to an AI endpoint via curl, but it is directly in service of the analysis function rather than an unrelated capability.
The declared description presents an end-user monitoring product focused on searching AI platforms, evaluating brand visibility, generating scores, and producing analysis/pushes. The supplied code does not perform any of those monitoring or analysis functions. Instead, it handles monetization and access control: validating API keys with a remote service, limiting free-tier brands/platforms, persisting monthly quota state locally, and exposing upgrade/downgrade helpers. While quota enforcement could be a supporting implementation detail for the broader product, this chunk also introduces undeclared external verification and licensing behavior that is materially different from the declared functionality and not represented in the description or permissions.
The core purpose mostly aligns: the code does search multiple AI platforms for a brand keyword and generates a GEM-style visibility score/report. However, several declared capabilities are not implemented. There is no logic for AI-generated causal analysis of why the brand was not recommended, and no Feishu push support appears anywhere in the code. Additionally, while the interface accepts multiple keywords, the search logic uses only self.keywords[0] for querying, so multi-keyword monitoring is overstated. The code also saves reports to the local Desktop, which is an undeclared resource access, though this is secondary to the main mismatch. Therefore the description overstates the implemented functionality enough to count as a mismatch.
This service makes HTTP requests to an external API, but that network capability is not covered by declared permissions. In a skill context, undisclosed egress is security-relevant because user input and operational metadata may be transmitted to third parties without explicit approval.
This service makes HTTP requests to an external API, but that network capability is not covered by declared permissions. In a skill context, undisclosed egress is security-relevant because user input and operational metadata may be transmitted to third parties without explicit approval.
This skill contains shell-capable behavior by launching curl through subprocess, but the declared permissions do not cover that capability. In an agent-skill context, undeclared execution capabilities reduce transparency and can bypass operator expectations or policy controls, making the skill more dangerous than equivalent standalone code.
The skill uses 'file_read' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
The skill uses 'file_write' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
The module includes undocumented local functions to upgrade a user to pro or enterprise by simply editing the local quota file. In a brand monitoring skill, this capability is unrelated to core business logic and effectively provides a built-in license-escalation mechanism that can be abused to unlock paid functionality without valid authorization.
The README explicitly advertises that Pro requests are routed through the vendor's server, but it does not clearly warn users that brand queries and related monitoring data leave the local environment and are transmitted to a third party. This creates a real privacy and confidentiality risk, especially because monitored brand terms, competitive research, and visibility results may be commercially sensitive.
The README tells users to configure a Feishu webhook for report delivery but does not warn that generated report contents will be sent to an external messaging endpoint outside the local execution context. If reports contain sensitive brand-monitoring results, prompts, or competitive intelligence, this can lead to unintended disclosure to third-party systems or overly broad internal audiences.
The trigger phrases are very broad and overlap with common user requests about GEO, AI visibility, or competitor monitoring. In agent ecosystems, overly broad triggers can cause accidental invocation, leading the skill to process sensitive brand queries or initiate external lookups in contexts where the user did not intend to use this tool.
The skill advertises external API usage and Feishu webhook support, but it does not clearly warn that user-supplied brand names, queries, and potentially generated results may be transmitted to third-party services. This creates a privacy and data-governance risk, especially for confidential competitor analysis, unreleased brands, or internal monitoring terms.
The skill explicitly routes functionality through an external server and performs API-key verification against api.yk-global.com. Any time user queries, telemetry, or keys are sent to a third-party endpoint, there is a real data exposure and trust-boundary risk; in this skill context, brand-monitoring queries may be commercially sensitive and the server-mediated design increases that sensitivity.
- ✅ Routed through our server — no local environment needed
- ✅ Stable and efficient, no IP blocking
> After purchasing Pro/Enterprise, get your API key at [https://yk-global.com](https://yk-global.com) and use `--api-key YOUR_KEY` to unlock all features. Verification: `POST https://api.yk-global.com/v1/verify`. On failure, auto-downgrades to Free — no disruption.
## Supported AI Platforms
The module description and error message text are written in Chinese, and the query string is also hard-coded with Chinese terms, with no indication that users may choose another language or that the service is intentionally region-specific. This can violate language/locale policy where skills should not force a specific language without opt-in or clear justification.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TAVILY_API_KEY = os.environ.get('TAVILY_API_KEY', '')
if not TAVILY_API_KEY:
raise ValueError("请设置 TAVILY_API_KEY 环境变量")
TAVILY_API_URL = "https://api.tavily.com/search"
# API认证(简易版:检查X-API-Key头)
API_KEYS = {
The code sends user-provided brand queries to an external third-party endpoint. While external transmission is functionally required for this service, it is still a real security/privacy concern because business-sensitive queries leave the local trust boundary and are processed by another provider.
def search_brand_tavily(brand_name, max_results=5):
"""使用Tavily搜索品牌信息"""
try:
response = requests.post(
TAVILY_API_URL,
json={
"api_key": TAVILY_API_KEY,
User-supplied brand data is transmitted to a third-party service together with a service credential, yet the code provides no disclosure, consent, or data-handling notice. In this skill's brand-monitoring context, inputs may contain sensitive business terms or client identifiers, making silent external transmission more risky.
The docstring and printed messages are entirely in Chinese (for example at L02, L10, L16, and L21), which imposes a specific language on users. The policy for this category says to flag language or locale constraints unless the skill offers user opt-in or clearly documents a justified region-specific scope, neither of which appears here.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def test_search(brand="91tokenhub"):
"""测试搜索"""
resp = requests.post(
API_URL,
headers={"X-API-Key": TEST_KEY},
json={"brand": brand, "max_results": 5}
The config sets the report language to "zh-CN", which is a natural-language locale constraint. Because this file does not indicate that the user can choose another language or opt in to Chinese output, it may violate the policy against forcing a specific language without user consent.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# ⚠️ 如需启用AI分析功能,请在此填入您的AI接口地址
# 例如:https://your-api-server.com/v1/chat/completions
# 当前默认使用本地分析框架(见 _get_fallback_analysis)
AI_ENDPOINT = "" # <-- 填入AI接口地址,如 https://api.minimax.chat/v1/chat/completions
if not AI_ENDPOINT:
return self._get_fallback_analysis()
If AI_ENDPOINT is configured, the code sends the brand name, GEM score, and summarized search-result snippets to an external AI service without any runtime disclosure or consent gate. In this skill's monitoring context, those snippets may contain sensitive business intelligence, customer-related text, or proprietary competitive-analysis data, so silent transmission creates a real privacy and data-governance risk.