Back to skill

Security audit

Shwuyechaxunhetongdaoqi

Security checks for vulnerabilities and agentic risk

Overview

The skill appears aimed at the advertised Shanghai property-contract lookup, but its install and runtime path depend on unpinned and external code that was not fully present for review.

Review the dependency installation path before installing. Prefer a Python-native, pinned dependency file or lockfile, and verify the separate shwuyeyanjiu skill before running the documented batch_extract_dates_v2.py workflow. Expect the skill to contact the Shanghai property-announcement site, download PDFs, perform OCR, and write CSV output locally.

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
package.json:15
Finding

Mutable and ecosystem-mismatched third-party dependencies create supply-chain risk

Content
View full analysis

Vulnerability Details

File Location: package.json:15-21
Supporting Locations: SKILL.md:147-164, scripts/query_contract_expiry.py:32-36
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code

json
"dependencies": {
  "shwuyeyanjiu": ">=1.0.0",
  "requests": ">=2.31.0",
  "beautifulsoup4": ">=4.12.0",
  "pdf2image": ">=1.16.0",
  "pytesseract": ">=0.3.10",
  "python-dateutil": ">=2.8.0"
},

Technical Analysis

The project declares Python dependency names in package.json, whose dependency entries are ordinarily resolved from the npm ecosystem. An npm client will not interpret these entries as Python packages from PyPI. It may instead install unrelated npm packages that happen to use the same names, creating an ecosystem-confusion risk.

Every dependency also uses an open-ended lower-bound constraint. For example, ">=1.0.0" permits any future version satisfying the constraint. Without an integrity-protected lockfile, exact version pins, or package hashes, dependency behavior can change after the project has been reviewed.

The advertised contract-analysis implementation is not present in this artifact. Documentation and the wrapper script direct users to execute batch_extract_dates_v2.py from the separately installed shwuyeyanjiu skill. Consequently, the principal executable responsible for network requests, PDF processing, OCR, and output generation is outside the reviewed package.

The local wrapper only prints the suggested command and does not automatically download or execute the external script. Exploitation therefore requires the user or an installation process to resolve the declared dependencies or follow the documented execution instructions.

Attack Path

  1. A user runs an npm-compatible installation command against this project or otherwise installs the declared dependencies.
  2. The package manager resolves dependency names fr ...[truncated 1281 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove Python package names from package.json. Declare them through a Python-native manifest such as pyproject.toml or requirements.txt.
  2. Pin dependencies to reviewed exact versions and commit an integrity-protected lockfile. Where supported, require hashes for downloaded distributions.
  3. Verify package names, publishers, source repositories, and distribution hashes before installation.
  4. Ship the actual contract-query implementation in this repository so that its network, parsing, OCR, file-handling, and output behavior can be audited.
  5. If shwuyeyanjiu must remain external, pin it to a verified immutable version or commit, validate its integrity before execution, and clearly identify the expected package ecosystem and publisher.
  6. Remove the unused sys.path.insert operation from scripts/query_contract_expiry.py:17, or replace it with a normal import from an explicitly installed and verified Python package.
  7. Add automated dependency scanning and lockfile verification to the release process.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire skill description, examples, and usage guidance are presented only in Chinese, and there is no indication that users may choose another language or that the skill is restricted to Chinese-speaking users for compliance reasons. Under the policy, forcing a specific language without opt-in is 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
94% confidence
Finding

SQP-3 covers natural-language policy issues across all file types, including language or locale constraints. This skill appears to require Chinese by presenting all instructions and examples only in Chinese, without offering an alternative language or stating that the user can choose their preferred language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill instructs the agent to download remote PDFs, perform OCR on them, and write CSV output, but it does not clearly disclose that it will use network access and create local files. This is a real transparency and safety issue because users may trigger external requests and filesystem changes without informed consent, though the described behavior is aligned with the skill's stated business purpose rather than overtly malicious.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The package metadata is entirely scoped to Shanghai/Chinese-language usage, including the description and keywords. For this manifest file, there is no accompanying indication that the locale restriction is optional or explicitly justified as a region-specific compliance/domain skill, which can be interpreted as a language/locale policy issue under the stated rule.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: beautifulsoup4 has 1 known advisory(ies) (MAL-2025-3615 (Malicious code in beautifulsoup4 (npm))), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
86% confidence
Finding

The manifest declares beautifulsoup4 with a loose lower-bound version constraint instead of pinning to a known-safe release. Because the finding references a known malicious/advisory-affected package release in an ecosystem manifest and the exact resolved version is uncontrolled here, consumers could install an unsafe version through dependency resolution or cross-ecosystem confusion, increasing supply-chain risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The docstring, argument help text, and runtime messages are all in Chinese, with no indication that other languages are supported or that the locale is intentionally restricted. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.