Back to skill

Security audit

China Housing Price Data

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does its stated housing-data job, but its network fetching is under-scoped enough to merit Review before installation.

Install only if you are comfortable with the skill making outbound web requests from your agent environment. Prefer running it in a network-restricted environment that can reach only the official stats.gov.cn endpoints, and consider pinning dependencies before use. Optional chart and validation outputs can write files to user-specified paths, so choose output locations deliberately.

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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_data.py:138
Finding

Unvalidated RSS Item URLs Permit Server-Side Request Forgery

Content
View full analysis
bytes: if timeout is None: timeout = REQUEST_CONFIG["timeout"] normalized_url = url.strip() if _cache: cached = _cache.get(normalized_url) if cached: return cached last_err = None for attempt in range(REQUEST_CONFIG["max_attempts"]): try: response = requests.get( normalized_url, headers=REQUEST_CONFIG["headers"], timeout=timeout, ) response.raise_for_status() content = response.content if _cache: _cache.set(normalized_url, content) return content except Exception as exc: last_err = exc if attempt < len(REQUEST_CONFIG["retry_delays"]): time.sleep(REQUEST_CONFIG["retry_delays"][attempt]) raise NetworkError(f"Network request failed: {last_err}", url=normalized_url) ``` ```python for item in root.iter("item"): title_el = item.find("title") link_el = item.find("link") if title_el is None or link_el is None: continue title = normalize(title_el.text or "") link = (link_el.text or "").strip() if TITLE_KEY not in title: continue label = parse_period(title) if label: items.append((label, link)) ``` ```python for period_label, url in selected_items: try: content = fetch_url(url) except NetworkError: page_failures += 1 continue ``` ### Technical Analysis The initial RSS endpoint is fixed, but each announcement URL is extracted from remotely retrieved XML and passed directly to `requests.get`. The implementation does not verify the URL scheme, ho ...[truncated 2337 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unpinned Third-Party Dependencies Create Non-Reproducible Supply-Chain Exposure

Content
View full analysis
=2.28.0 beautifulsoup4>=4.11.0 matplotlib>=3.5.0 ``` ### Technical Analysis All dependencies use minimum-version constraints without upper bounds or exact pins. Each installation can therefore resolve to a different future release from the configured package index. The listed package names are established packages and do not show evidence of dependency confusion or typographical substitution. The risk arises from accepting future, unreviewed versions rather than from a currently identified malicious package. If a future release is compromised, removed and replaced, or introduces insecure behavior, users following the documented installation process may receive it automatically. This also prevents reproducible verification of the audited dependency set. ### Attack Path 1. A user installs the project dependencies from `requirements.txt`. 2. The package resolver selects the newest versions satisfying the minimum constraints. 3. A selected release contains malicious, compromised, or materially insecure code. 4. The dependency executes during installation, import, or normal Skill operation with the privileges of the invoking user. This path requires compromise or insecurity in an upstream release or package-index delivery chain; no such compromise was established during this audit. ### Impact Assessment Potential impact is determined by the privileges of the process installing or running the dependencies. A compromised dependency could theoretically read files accessible to that user, access the network, alter outputs, or execute arbitrary Python code. The current repository contains no evidence that these named dependencies are malicious. Therefore, this finding represents supply-chain hardening and reproducibility risk rather than evidence of active comprom ...[truncated 8 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is a domain-specific data retrieval skill for Chinese housing price indices. The actual code chunk is only a supporting utility: a simple in-memory cache. It has no network access, no data source integration, no city/index handling, and no logic tied to 房价指数, 环比, 同比, 定基, 新建商品住宅, or 二手住宅. Because the supplied code’s primary purpose is materially different from the declared skill purpose, this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares network access and file-writing behavior in its instructions and examples, but does not define any explicit tool scope or permissions boundaries. That creates an authorization gap: an agent may invoke network and write-capable operations without clear restriction, increasing the risk of unintended outbound requests, local file creation, or abuse if the referenced scripts behave unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all user-facing instructions and examples exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or a clearly documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The Accept-Language header is hard-coded to "zh-CN,zh;q=0.9,en;q=0.8", which imposes a specific locale preference on all requests. Forcing a language/locale without user opt-in matches the natural-language policy violation criteria, and this file does not document a user choice mechanism or region-specific justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a data-fetching skill for official housing price index data, which implies retrieving and returning data. However, the implementation includes an optional chart-generation path that creates directories and saves PNG files to the local filesystem, which goes beyond simple fetching/output of data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file contains user-facing natural-language descriptions entirely in Chinese, including the module summary and later CLI help text, without indicating that Chinese is optional or that the tool is intentionally region/language-specific. The audit rules treat forced language or locale without user opt-in or explicit justification as a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This JSON dataset uses Chinese field values and metric labels such as "北京", "新建商品住宅销售价格指数", "环比", and "同比" throughout the file. Under the language/locale policy rule, forcing a specific language without user opt-in or documented regional justification can be a policy concern, and no such opt-in or justification is present in this file.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency specification uses a lower bound only (requests>=2.28.0), which makes builds non-reproducible and allows future package releases to be installed without prior validation. In a data-fetching skill that performs network requests, this increases supply-chain and stability risk because a vulnerable or breaking upstream release could be pulled in automatically.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.28.0
beautifulsoup4>=4.11.0
matplotlib>=3.5.0

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
93% confidence
Finding

The manifest includes requests without pinning to a specific release, and that package has multiple known advisories affecting some versions. Because this skill is intended to fetch remote housing-price data over the network, using an unknown requests version creates meaningful risk that an affected release could be installed and expose credentials, request integrity, or other network-handling weaknesses.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

beautifulsoup4>=4.11.0 is unpinned, so installations may resolve to different future versions over time. This creates reproducibility and supply-chain risk, as unreviewed upstream changes could introduce security issues or parsing behavior changes in a skill that consumes external web content.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
requests>=2.28.0
beautifulsoup4>=4.11.0
matplotlib>=3.5.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

matplotlib>=3.5.0 is also specified with only a minimum version, permitting automatic installation of later releases that have not been reviewed. While this package is less security-sensitive than networking libraries, unpinned dependencies still increase supply-chain exposure and can introduce unexpected code paths or breakages.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
requests>=2.28.0
beautifulsoup4>=4.11.0
matplotlib>=3.5.0

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code file contains natural-language instructions and help text that are exclusively in Chinese, starting with the module docstring and continuing through the CLI interface. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation when no alternative language or locale choice is offered.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.