Back to skill

Security audit

区块城市

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly fetches public BlockCity data, but it overstates detail-page support and can return placeholder or mock values as if they were real.

Review before installing if you need accurate BlockCity detail-page values. Ranking data access is straightforward, but detail fields such as fund balance and remaining popularity may be zeros or mock placeholders. Install in an isolated Python environment, consider pinning dependencies, and do not treat detail-page results as authoritative until the parser is implemented and outputs identify whether data is live or fallback.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unbounded Third-Party Dependency Resolution

Content
View full analysis

Vulnerability Details

File Location: requirements.txt:1-4; related package metadata at setup.py:30-34; documented installation command at SKILL.md:42
Vulnerability Type: Supply-chain exposure through unpinned dependencies
Risk Level: Medium

Vulnerable Code

requirements.txt:1-4:

text
requests>=2.31.0
beautifulsoup4>=4.12.0
lxml>=4.9.0
playwright>=1.40.0

setup.py:30-34:

python
install_requires=[
    "requests>=2.31.0",
    "beautifulsoup4>=4.12.0",
    "lxml>=4.9.0",
],

SKILL.md:42:

bash
pip install -r requirements.txt

Technical Analysis

All declared dependencies use lower-bound-only version constraints. Consequently, a new installation can resolve any future version satisfying those constraints rather than a version that was reviewed with this project. The repository contains no lock file or cryptographic hashes that authenticate the artifacts selected by the package installer.

This makes the effective installed code mutable after the Skill has been audited. If a dependency publisher account, package release process, or distribution artifact is compromised, users following the documented installation procedure could receive attacker-controlled package code. Python packages may execute build-backend or setup logic during installation, and imported dependencies execute application code at runtime.

Dependency declarations are also inconsistent: playwright is declared in requirements.txt but omitted from setup.py. Installing from the requirements file therefore produces a different dependency set from installing the package through its metadata, reducing reproducibility and complicating security review.

This finding does not establish that any currently published dependency version is malicious. Exploitation depends on a compromised, malicious, or otherwise unsafe future release being selected by the unconstrained resolver.

Attack P

...[truncated 1430 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace lower-bound-only dependency declarations with exact versions that have been reviewed and tested, for example requests==X.Y.Z.
  2. Generate and commit a reproducible lock file covering direct and transitive dependencies.
  3. Record trusted artifact hashes and require hash verification during deployment, such as with pip install --require-hashes.
  4. Keep requirements.txt and setup.py synchronized, including an explicit decision about whether playwright is mandatory or optional.
  5. If Playwright is optional, declare it through an optional dependency group and document the separate installation path rather than silently producing different environments.
  6. Use a controlled package index or approved internal mirror in production, and prohibit fallback to untrusted indexes.
  7. Add automated dependency vulnerability and provenance scanning to CI.
  8. Review and update pinned versions on a controlled schedule, testing each update before changing the lock file and hashes.
  9. Install and run the Skill under a dedicated, least-privileged account in an isolated virtual environment or container to reduce the impact of a compromised dependency.
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill claims to retrieve authoritative city-detail information, but the documented/implemented behavior reportedly falls back to stubbed or mock values and may omit detail-page data entirely. This is dangerous because downstream agents or users could make decisions based on fabricated, incomplete, or misleading data while believing it to be live data from blockcity.vip.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description and all user-facing instructions are written exclusively in Chinese, with no indication that another language is supported or that the user may choose their preferred locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code sets the Accept-Language header to prefer zh-CN/zh for all requests, which imposes a specific locale behavior at runtime. The file does not offer a user choice or explain why this locale restriction is required, so it matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Manifest描述称该skill支持从城市详情页获取基金余额、剩余人气值等信息,但详情解析函数 _parse_city_detail_html 只是占位实现并未解析任何HTML,get_complete_city_info 也没有合并详情页数据,最终多数字段恒为默认值或模拟值。这意味着对外宣称的详情页数据获取能力在代码中并未真正实现。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

_parse_city_detail_html 和 get_city_detail 的文档都表述为从详情页解析并返回城市详细信息,但解析函数内部仅 pass,返回的详情字段全部是默认值;在缺少依赖或异常时还会回退到模拟数据。该文档会使调用方误以为返回的是页面真实详情数据。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

get_complete_city_info 的注释明确表示会合并排名页和详情页数据,但函数实际只调用 get_city_by_name 并直接返回排名页数据,完全没有调用 get_city_detail。这不是简单的文档不完整,而是注释对函数意图的主动性误述。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

SQP-3 applies to natural-language policy issues in any file type. The README content is exclusively Chinese and does not mention that the skill is Chinese-language only or offer an alternative language, which can be interpreted as forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This is a markdown file, so SQP-2 applies to missing user-facing warnings about behaviors affecting privacy or system integrity. The README repeatedly describes fetching data from blockcity.vip, but it presents this as functionality rather than an explicit warning/disclosure that using the skill will contact an external third-party service.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

At L184, the API reference says city_id is a '4位数字区号或单个字母', but the rest of the README consistently states supported identifiers are either 4-digit area codes or 4 lowercase letters for custom cities (L011, L033-L035, L072-L073, L229). This is an active documentation contradiction about accepted input format, not just an omission.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

At L057 the example labels get_city_by_name("北京") as '来自排名页', yet the surrounding documentation elsewhere advertises detail fields such as fund balance and remaining popularity as requiring the city detail page. While this is documentation-only, it creates an intent-level inconsistency about which source provides which data.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified with a lower-bound range instead of an exact version, so builds may resolve to different releases over time. This weakens reproducibility and can unintentionally pull in vulnerable or incompatible versions from the supply chain.

Content

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

text
requests>=2.31.0
beautifulsoup4>=4.12.0
lxml>=4.9.0
playwright>=1.40.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
95% confidence
Finding

The manifest does not pin requests, yet the package has multiple known advisories across its release history. Because the installed version is unknown, it is impossible to verify from this file alone whether deployments will avoid vulnerable releases, which is a real supply-chain exposure.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

beautifulsoup4 is not pinned to a specific version, which means installations are not deterministic and may consume future releases without review. In a security context, this increases supply-chain risk and makes it harder to verify what code is actually deployed.

Content

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

text
requests>=2.31.0
beautifulsoup4>=4.12.0
lxml>=4.9.0
playwright>=1.40.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

lxml is version-ranged rather than pinned, allowing dependency resolution to vary across environments and time. Because lxml has a history of security advisories, lack of pinning makes it difficult to ensure deployments avoid affected releases.

Content

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

text
requests>=2.31.0
beautifulsoup4>=4.12.0
lxml>=4.9.0
playwright>=1.40.0

Unverifiable Dependency: lxml has 14 known advisory(ies) (CVE-2021-43818 (lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through); CVE-2014-3146 (lxml Cross-site Scripting Via Control Characters); CVE-2021-28957 (lxml vulnerable to Cross-Site Scripting ) +11 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
96% confidence
Finding

lxml has known historical vulnerabilities, and the unpinned requirement prevents verification that only safe versions will be installed. Given lxml's role in parsing untrusted content in many applications, this uncertainty meaningfully increases risk even though this file alone does not prove exploitation.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

playwright is also unpinned, so future installs may fetch a different package release than expected. This creates reproducibility and supply-chain integrity issues, especially for browser automation tooling that may introduce significant transitive dependencies.

Content

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

text
requests>=2.31.0
beautifulsoup4>=4.12.0
lxml>=4.9.0
playwright>=1.40.0

Static analysis

No suspicious patterns detected.