Back to skill

Security audit

北京住宅全信息助手 (房价/学区/交通)

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Beijing housing and school-lookup purpose, but it needs Review because it launches an unsandboxed browser against an HTTP site and submits community or address data without clear user consent.

Install only in an isolated virtual environment or container under a low-privilege account. Do not submit a precise home address unless you are comfortable sending it to the referenced external education site, and prefer manual browser verification where possible. The publisher should pin dependencies, remove --no-sandbox, prefer HTTPS-verified official endpoints, and add a clear privacy prompt before automated lookups.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding
Unpinned Third-Party Python Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-3` **Vulnerability Type**: Unrestricted dependency resolution and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```text requests beautifulsoup4 selenium ``` The corresponding installation instructions in `SKILL.md:11-14` also install these packages without version constraints or integrity verification: ```bash pip install requests beautifulsoup4 selenium ``` ### Technical Analysis All third-party dependencies are specified without exact versions, hashes, or a lock file. Consequently, each installation resolves whatever package versions are available from the configured Python package index at that time. This prevents reproducible builds and means the code that is installed can differ from the code reviewed during the audit. If a dependency account, release pipeline, package index, or configured mirror is compromised, a malicious release could be selected automatically. Even without a compromise, an incompatible future release could introduce exploitable behavior or break the Skill. The package names appear legitimate and there is no evidence that any currently referenced dependency is malicious. The vulnerability is the absence of dependency version and integrity controls. ### Attack Path 1. An attacker compromises the publishing account or release process of one of the listed dependencies, or compromises a package mirror used by the operator. 2. The attacker publishes a malicious version that satisfies the unrestricted dependency declaration. 3. A user follows the documented installation command or installs `requirements.txt`. 4. `pip` resolves and downloads the malicious release because no reviewed version or cryptographic hash is required. 5. Attacker-controlled code may execute during package installation or when the package is imported by the Skill. 6. The code runs with the privileges of the user or service account performing installation or executing t ...[truncated 502 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an explicitly reviewed version, for example: ```text requests==<reviewed-version> beautifulsoup4==<reviewed-version> selenium==<reviewed-version> ``` 2. Generate and commit a lock file that includes resolved transitive dependencies. 3. Add cryptographic hashes and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Install dependencies from a trusted, explicitly configured package index. 5. Run dependency vulnerability and provenance checks in CI before accepting updates. 6. Update `SKILL.md` so its installation command uses the reviewed requirements or lock file rather than installing unrestricted package versions directly. 7. Perform installation and execution in an isolated virtual environment or container under a non-privileged account. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/query_school_browser.py:16
Finding
Sandboxed Browser Isolation Disabled While Loading a Plaintext HTTP Page<![CDATA[ ## Vulnerability Details **File Location**: `scripts/query_school_browser.py:16-31` **Vulnerability Type**: Insecure browser configuration and plaintext transport **Risk Level**: Medium ### Vulnerable Code ```python options = webdriver.ChromeOptions() options.add_argument('--headless') options.add_argument('--no-sandbox') options.add_argument('--disable-dev-shm-usage') options.add_argument('--window-size=1920,1080') driver = webdriver.Chrome(options=options) result_data = { "district": "朝阳", "community": community_name, "schools": [], "status": "success", "message": "" } try: driver.get("http://xqcx.bjchyedu.cn/") ``` ### Technical Analysis The Selenium-controlled Chrome process is started with `--no-sandbox`, explicitly disabling a significant browser security boundary. The same process then loads a remote page over unencrypted HTTP. HTTP does not provide server authentication or transport integrity. A network-positioned attacker can observe or modify the page and its scripts before Chrome processes them. This can cause the Skill to display manipulated school-assignment results and exposes the submitted community name or address to interception. Loading attacker-modified active content is dangerous even in a normally sandboxed browser. Disabling the browser sandbox increases the potential effect of a browser-renderer exploit because a successful exploit has fewer isolation boundaries to cross. The `--disable-dev-shm-usage` option is not independently identified as a vulnerability here, but it is part of the browser configuration shown for context. Exploitation for local code execution would require a vulnerability applicable to the installed Chrome/Chromium version. No such exploit is embedded in this project, so local compromise is conditional rather than directly demonstrated. ### Attack Path 1. A user invokes the Chaoyang school lookup with a community name or detailed address. 2. The script launches headless Ch ...[truncated 1355 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the HTTP endpoint with a verified HTTPS endpoint controlled by the intended organization. 2. Do not silently fall back to HTTP if TLS validation or HTTPS connectivity fails. 3. Remove the following browser argument: ```python options.add_argument('--no-sandbox') ``` 4. Configure the runtime so Chrome can operate with its sandbox enabled. If containerization is used, provide a compatible seccomp policy, user namespace configuration, and non-root user rather than disabling browser isolation. 5. Run the browser under a dedicated, unprivileged account with: - A read-only project filesystem where practical. - No access to unrelated user files or browser profiles. - Minimal environment variables and credentials. - Restricted outbound network access. 6. Keep Chrome or Chromium and ChromeDriver patched and version-compatible. 7. Validate that the final page origin is the expected HTTPS origin before entering or submitting the address. 8. Consider warning users that detailed residential addresses are transmitted to the remote service and minimize the submitted data where possible. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The documented purpose promises comprehensive housing information including price, district, and transport, but the described behavior appears incomplete or focused on a narrower school-zone workflow. Security-sensitive systems depend on accurate capability declarations; when a skill materially overstates or misstates what it does, users and operators cannot make informed trust decisions and may act on false assumptions.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding
The documented purpose promises comprehensive housing information including price, district, and transport, but the described behavior appears incomplete or focused on a narrower school-zone workflow. Security-sensitive systems depend on accurate capability declarations; when a skill materially overstates or misstates what it does, users and operators cannot make informed trust decisions and may act on false assumptions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill instructs the agent to run local Python scripts, install dependencies, and access external websites, but it does not declare any explicit tool scope or permissions. This creates an authorization gap where the skill's effective capabilities are broader than its declared contract, increasing the chance of unintended file access or network use without proper review.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
The instruction mandates that all results include a fixed Chinese statement: "信息来源于 2025 年官方公开资料...". This is a natural-language locale policy constraint because it requires a specific language for output without stating that the user can choose another language or that the locale restriction is necessary for compliance.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The script types a user-supplied community or address into a live third-party government website via Selenium, which transmits potentially sensitive location information off-platform. The code does not provide any inline warning, consent check, or minimization step before sending the data, so users or upstream agents may disclose precise residential information without realizing it.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests
beautifulsoup4
selenium
Confidence
96% confidence
Finding
The dependency 'requests' is unpinned, so installs may resolve to different versions over time, making builds non-reproducible and potentially pulling in a vulnerable or breaking release. In a skill that performs network access and external verification, dependency drift increases supply-chain risk even if no specific exploit is guaranteed from this file alone.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding
The manifest includes 'requests' without a version pin, and that package has multiple known advisories across releases. Because the installed version is unspecified, there is a real risk that deployment could resolve to an affected version, which is especially relevant for a skill that makes outbound HTTP requests and may handle redirects, authentication material, or remote content.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests
beautifulsoup4
selenium
Confidence
95% confidence
Finding
The dependency 'beautifulsoup4' is unpinned, which allows uncontrolled version changes during installation. This creates reproducibility and supply-chain integrity issues and can introduce security regressions or incompatibilities without any code change.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests
beautifulsoup4
selenium
Confidence
96% confidence
Finding
The dependency 'selenium' is unpinned, so future installs may pick up unexpected versions with known flaws or behavior changes. This is somewhat more sensitive here because Selenium commonly drives browsers and interacts with untrusted web content, increasing exposure if a bad version is installed.

Unverifiable Dependency: selenium has 2 known advisory(ies) (CVE-2022-28108 (Selenium Server (Grid) before 4 allows CSRF because it permits non-JSON content ); CVE-2023-5590 (NULL Pointer Dereference in GitHub repository seleniumhq/selenium prior to 4.14.)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
87% confidence
Finding
The manifest includes 'selenium' without a version pin even though known advisories exist in some releases. Since Selenium automates browser activity against external sites, leaving the installed version undefined creates avoidable exposure to known flaws and makes it impossible to verify whether deployments are patched.

Natural-Language Policy Violations

Low
Confidence
87% confidence
Finding
The note field is written entirely in Chinese and does not indicate that the content is intentionally limited to Chinese-language users or a China-specific workflow. Under the policy rule, forcing a specific language without user opt-in can be a natural-language locale violation.

Static analysis

No suspicious patterns detected.