T09 · Insecure Skill Coding Practices
- Location
scripts/search_wechat.py:68- Finding
HTTPS Certificate Validation Is Globally Disabled for WeChat Search Requests
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This real-estate advisor skill is coherent, but it stores sensitive buyer data and map credentials behind a weak local web API and includes risky scraping code, so users should review it carefully before installing.
Before installing, assume the local workspace may contain sensitive family, budget, commute, school, and property-search information. Keep the server bound to localhost, do not expose the port on a network, restrict or rotate any AMap credentials, avoid using the WeChat fetcher until TLS validation and domain controls are fixed, and prefer pinned dependencies plus Markdown sanitization before relying on the dashboard.
scripts/search_wechat.py:68HTTPS Certificate Validation Is Globally Disabled for WeChat Search Requests
scripts/server.py:73Unauthenticated Local API Exposes and Modifies Sensitive Customer Data
SKILL.md:229Third-Party Packages and Browser Binaries Are Installed Without Version or Integrity Pinning
The skill includes instructions to scrape WeChat content via Sogou/Playwright, follow redirect links, persist fetched data locally, and use browser automation to obtain dynamically rendered content. That materially exceeds a simple advisory role and introduces web-scraping, content-ingestion, and local persistence risks, including ingestion of untrusted content, potential policy evasion behavior, and exposure to malicious pages or sensitive data capture during automated browsing.
The skill includes instructions to scrape WeChat content via Sogou/Playwright, follow redirect links, persist fetched data locally, and use browser automation to obtain dynamically rendered content. That materially exceeds a simple advisory role and introduces web-scraping, content-ingestion, and local persistence risks, including ingestion of untrusted content, potential policy evasion behavior, and exposure to malicious pages or sensitive data capture during automated browsing.
The skill includes instructions to scrape WeChat content via Sogou/Playwright, follow redirect links, persist fetched data locally, and use browser automation to obtain dynamically rendered content. That materially exceeds a simple advisory role and introduces web-scraping, content-ingestion, and local persistence risks, including ingestion of untrusted content, potential policy evasion behavior, and exposure to malicious pages or sensitive data capture during automated browsing.
The skill includes instructions to scrape WeChat content via Sogou/Playwright, follow redirect links, persist fetched data locally, and use browser automation to obtain dynamically rendered content. That materially exceeds a simple advisory role and introduces web-scraping, content-ingestion, and local persistence risks, including ingestion of untrusted content, potential policy evasion behavior, and exposure to malicious pages or sensitive data capture during automated browsing.
The skill’s documented runtime layout explicitly references a .env file inside its working data area while also directing the agent to operate over the project root and start backend services. In a skill with file-read capability and no clear permission boundary, normalizing a secrets file within the accessible workspace creates a realistic risk of accidental secret disclosure, prompt-induced exfiltration, or unsafe use of credentials by other components.
│ ├── school_enrollment_policies.md ← 学区房与入学政策参考
│ └── map_display.md ← 地图展示房源方案参考
└── .skills-data/zhongjie/ ← 运行时数据(已 gitignore)
├── .env
└── data/
├── preferences.md ← 客户画像与偏好记录
├── research.md ← 调研资料
This file adds broad微信公众号搜索、URL解析、正文抓取和反自动化规避能力, which is unrelated to a房产买房参谋 skill. In-context, this expands the skill’s data-access and browsing surface beyond its stated purpose, enabling arbitrary content discovery and extraction from third-party sites and increasing the chance of unauthorized scraping, policy bypass, or covert capability misuse.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
管理运行时数据目录结构(遵循 .skills-data 规范):
<project_root>/.skills-data/zhongjie/
.env — 环境变量配置
data/ — 持久化数据(搜索结果等)
cache/ — 可安全删除的缓存
configs/ — 额外配置文件
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
管理运行时数据目录结构(遵循 .skills-data 规范):
<project_root>/.skills-data/zhongjie/
.env — 环境变量配置
data/ — 持久化数据(搜索结果等)
cache/ — 可安全删除的缓存
configs/ — 额外配置文件
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
管理运行时数据目录结构(遵循 .skills-data 规范):
<project_root>/.skills-data/zhongjie/
.env — 环境变量配置
data/ — 持久化数据(搜索结果等)
cache/ — 可安全删除的缓存
configs/ — 额外配置文件
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
LOGS_DIR = os.path.join(SKILL_DATA_DIR, "logs")
TMP_DIR = os.path.join(SKILL_DATA_DIR, "tmp")
ENV_FILE = os.path.join(SKILL_DATA_DIR, ".env")
def ensure_dirs():
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
LOGS_DIR = os.path.join(SKILL_DATA_DIR, "logs")
TMP_DIR = os.path.join(SKILL_DATA_DIR, "tmp")
ENV_FILE = os.path.join(SKILL_DATA_DIR, ".env")
def ensure_dirs():
The skill instructs the agent to read and write local files, access environment-backed configuration, and use networked tooling, but it declares no explicit tool scope or permission boundaries. This increases the chance of unintended file access, overbroad network use, or misuse of sensitive runtime context because neither the platform nor the user is given a least-privilege contract.
Line L292 explicitly requires '沟通全程使用中文', which forces a specific language choice for all interactions. The policy for this audit flags language or locale constraints unless the skill offers user choice or clearly documents a justified region-specific need.
Suspicious Unicode normalization or mixed-script content
The manifest emphasizes advisory, search, comparison, and recommendation behavior for home-buying decisions. In the actual code, the app performs persistent write operations to backend endpoints such as /api/preferences, /api/research, and /api/report using PUT requests, which makes the skill an editor/content-management interface in addition to an advisor.
Visible UI labels and guidance throughout the bundled file are exclusively in Chinese, such as navigation labels and configuration instructions, with no indication of language selection or opt-in. This creates a natural-language policy concern if the skill is expected to be locale-neutral, because users are implicitly forced into a specific language.
The bundled markdown renderer is configured with html: true and its output is later rendered into the page, enabling persisted content to contain raw HTML. In this skill, profile/research/report content is fetched from and written back to backend endpoints, so any malicious HTML stored there can become a persistent XSS payload affecting later viewers.
Rendered markdown is assigned to innerHTML in multiple places (for both preview and saved content views) after being processed by a renderer that allows raw HTML. Because this content is persisted via backend APIs, an attacker can inject HTML/JS-bearing payloads that execute when any user opens the affected page, resulting in stored XSS.
The document explicitly instructs users to disclose their AMap API key and security code to the agent and store them in a local .env file, but provides no warning that these are sensitive credentials or guidance on limiting exposure. Even though these are third-party map credentials rather than highly privileged system secrets, normalizing credential sharing with the skill increases the risk of accidental leakage, misuse, or insecure storage.
This code file contains natural-language descriptions, comments, output strings, and error text exclusively in Chinese, which effectively forces a specific language for users. The policy requires flagging language or locale constraints unless the skill offers user opt-in or clearly documents a justified region-specific limitation.
The code hard-codes the HTTP Accept-Language header to prefer zh-CN and zh, which imposes a specific language/locale choice rather than reflecting user preference. This matches the language/locale policy violation category because there is no user opt-in or documented justification for forcing Chinese.
The Playwright browser context is explicitly created with locale="zh-CN" and timezone_id="Asia/Shanghai", which forces a specific regional setting for all users. The file does not offer a user-selectable option or explain why this locale restriction is required.
The /api/config endpoint returns AMap API values directly to any caller, and CORS is configured to allow any origin. Even if these are intended for browser use, exposing them without origin restrictions or a stronger justification increases the risk of unauthorized reuse, quota theft, and third-party abuse of the associated map account.
The PUT handlers for preferences, research, report, and properties persist incoming data to files under .skills-data, which can affect user data. Although the code performs these writes as part of the service behavior, this file does not include endpoint-level comments, prompts, or other user-facing disclosure that these requests will overwrite stored content.
The stylesheet sets font-family on html,body,#app to include PingFang SC, Hiragino Sans GB, and Microsoft YaHei, which are Chinese locale-oriented fonts, as part of the primary UI font stack. This is natural-language or locale-related behavior that appears to impose a specific locale preference without any visible user choice or justification in this file.