Back to skill

Security audit

算卦(小六壬 · 大六壬 · 六爻 · 梅花易数)

Security checks for vulnerabilities and agentic risk

Overview

This divination skill is purpose-aligned and mostly transparent, with privacy and routing caveats users should understand before use.

Before installing, be aware that unknown city names may be sent to Open-Meteo and cached locally, and the broad trigger words may activate the skill for ambiguous fortune-telling-like requests. Use a manual longitude if you want to avoid geocoding, and install dependencies in a normal restricted virtual environment.

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

Note
Location
requirements.txt:1
Finding

Python Dependency Installed Without Artifact Integrity Verification

Content
View full analysis

Vulnerability Details

File Location: requirements.txt:1-10
Additional Locations: SKILL.md:108-109, 317; README.md:88
Vulnerability Type: Third-party dependency supply-chain risk
Risk Level: Low

Complete Code Snippet:

text
# comprehensive-divination-skill dependencies
#
# IMPORTANT VERSION NOTE:
# The original documentation pinned `zhdate>=1.0`, but PyPI only ships
# `zhdate==0.1` for Windows (the 1.0 release only published a macOS ARM wheel).
# The 0.1 release provides every API this skill actually uses:
#   - ZhDate.from_datetime(dt) / to_datetime()
#   - .leap_month / .lunar_year / .lunar_month / .lunar_day
# Therefore we pin to 0.1 explicitly so installs succeed on all platforms.
zhdate==0.1

The documented installation commands include:

bash
python -m pip install zhdate==0.1
pip install -r requirements.txt

Technical Analysis

The project requires users or agents to install the executable third-party Python package zhdate directly from the configured Python package index. Pinning the dependency to version 0.1 prevents unreviewed version upgrades, but it does not authenticate the downloaded artifact because no cryptographic hashes or independently verified package artifacts are provided.

Python packages can execute code during installation, import, or normal use. Consequently, the effective code trusted by the project extends beyond the audited repository to the package-index infrastructure, the package publisher, mirrors, and the user's package-manager configuration. A compromised release artifact, malicious package-index mirror, or index-configuration redirection could cause code different from the reviewed dependency artifact to be installed under the expected version.

This finding does not establish that zhdate==0.1 is malicious. It identifies the absence of artifact-level integrity controls in a workflow that installs and imports third-party ex ...[truncated 1370 chars]

Remediation
View remediation

Remediation Suggestions

  1. Generate a lock file containing SHA-256 hashes for every approved distribution artifact and supported platform.
  2. Require hash verification during installation:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Obtain hashes from independently verified artifacts rather than trusting only package-index metadata at installation time.
  4. Where practical, vendor and review this small dependency or maintain an internally reviewed package artifact in a controlled repository.
  5. Install dependencies in a dedicated, non-privileged virtual environment or container with restricted filesystem and network access.
  6. Avoid running pip as an administrator or root user.
  7. Add automated dependency provenance, vulnerability, and hash verification to release checks.
  8. Document the trusted package index explicitly and prohibit untrusted mirrors or --extra-index-url settings in deployment environments.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (28)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list is extremely broad and includes common words such as '算', '预测', and related everyday phrases, making accidental invocation likely. Over-broad activation is dangerous because it can cause the skill to seize control of unrelated conversations, ask for unnecessary location data, and initiate file/network-capable workflows without clear user intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The changelog states the skill can make external geocoding API calls and persist results in a local cache, but this capability is not apparent from the divination-focused metadata. Undisclosed network access expands the skill’s effective permissions and can expose user-supplied location data or enable unexpected outbound requests, which is risky even if the feature is functionally related to true-solar-time calculation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

A network-based geocoding feature is only loosely justified by the manifest’s stated purpose, which emphasizes divination methods rather than external data retrieval. In this context, hidden or weakly disclosed networking is dangerous because users may not expect their location queries to be transmitted to a third party, and the capability could be repurposed for data exfiltration or policy bypass beyond the apparent scope of the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The feature description states that the time baseline is forcibly set to Beijing time (UTC+8), which imposes a locale-specific convention on all users. This is reinforced later in the README as a mandatory behavior rather than an optional or user-selectable setting.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This line explicitly says the time anchor is forced to Beijing time regardless of the user's machine timezone. That is a locale policy concern because it removes user choice and applies a specific regional standard to all users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The English text says the time anchor is always Beijing time, independent of the user's local timezone, making the locale constraint explicit and universal. Because no user choice or opt-in is offered here, it fits the policy-violation criterion for forced locale behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes very generic terms such as '算', '算算', 'predict', and 'oracle', which can appear in ordinary conversation unrelated to divination. In an agent setting, overly broad activation increases the chance of unintended invocation, causing the skill to intercept unrelated requests and potentially influence user workflows without clear intent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill documents capabilities that imply file reads, file writes, and network access, but it does not declare any explicit tool scope or permission boundaries. This creates an over-privilege and transparency problem: an agent runtime may grant broader access than users or reviewers expect, increasing the risk of unintended data access, cache file creation, or network egress during execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The primary description presents the skill as a Chinese metaphysics skill and the operational content is written almost entirely in Chinese, but there is no explicit statement that users may choose their preferred language for interaction or output. This can violate language/locale policy when the skill is invoked by users who have not opted into Chinese-language responses.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow contains contradictory security-critical instructions: one section forbids calling snapshot before method and location confirmation, while another requires immediate time freezing at trigger time. In agent systems, conflicting directives can cause unpredictable execution order, which may bypass intended user confirmation gates or trigger tools prematurely.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document says the implementation no longer uses datetime.now(), but later instructs the agent to immediately freeze time with datetime.now(). This inconsistency can lead to incorrect or environment-dependent behavior, especially across time zones, and may cause agents to fall back to unsafe or inaccurate local-time logic contrary to the documented control model.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The markdown explicitly states that for users outside China, the skill's time anchor is always Beijing time. This enforces a specific locale/time standard on international users without presenting an opt-in, alternative locale handling mode, or user choice, which matches the policy category for language/locale-style constraints.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file presents all example user questions, key signals, and verdicts primarily in Chinese, including quoted prompts the user is expected to use. Because the skill is framed as general quickstart usage rather than a clearly region-specific tool, the lack of an explicit language-choice or opt-in can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file presents all operational instructions and warnings only in Chinese, which can amount to a language/locale policy violation if users are not given a choice. The stated policy requires flagging cases where a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file is entirely written in Chinese and does not state that the skill is region-specific or that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The shared utility library performs outbound geocoding requests and persists results to a local cache file, which exceeds the expected behavior of a 'common' calculation module and creates an unexpected data-flow boundary. This can leak user-supplied location data to a third-party service and write potentially sensitive inputs to disk without explicit consent, which is a real privacy and supply-chain exposure even if not overtly malicious.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains user-facing natural-language text that fixes the interaction language to Chinese in the module docstring and command-line usage. Under the language/locale policy rule, forcing a specific language without offering a user choice or documenting a justified locale constraint is a policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The CLI's visible descriptions and help messages are presented only in Chinese, which imposes a single language on users. Because the file does not provide any locale selection, fallback, or justification for the restriction, this matches the natural-language policy violation criteria.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Using the example input '帮我算个事' normalizes activation on an ambiguous everyday phrase that could overlap with common requests for calculation, advice, or general help. This reinforces loose routing behavior and makes accidental skill activation more likely in real deployments.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

Manifest 和主体描述将技能定位为本地算卦/知识库/计算脚本,并在 L320 进一步强调唯一外部依赖是 zhdate;但 L118 明确说明未知城市名时会调用 Open-Meteo Geocoding API,并把结果缓存到本地。这说明技能实际具备外部网络访问能力,虽属辅助功能,但与“仅 zhdate 外部依赖”的表述不完全一致。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file presents all instructional content in Chinese and does not mention that the language is fixed or optional. Under the policy for natural-language violations, forcing a specific language without user opt-in can be a locale/language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all instructional/reference content exclusively in Chinese, and there is no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file contains only Chinese-language instructional content and does not indicate that the user can choose another language or that the skill is intentionally region- or locale-specific. Under the language/locale policy criteria, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file contains user-facing instructional content exclusively in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to Chinese-speaking users. Under the policy, forcing a specific language without user 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

The request parameters hard-code language: 'zh' for the Open-Meteo geocoding API, which enforces a specific locale in returned place names. This is a natural-language/locale policy concern because the skill does not offer a user choice or document that responses will always be localized to Chinese.

Content

No source excerpt is available for this finding.