Back to skill

Security audit

Bazi Name Master

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent BaZi naming assistant with some dependency and localization caveats, but no evidence of hidden, destructive, or deceptive behavior.

Install only if you are comfortable sharing birth and naming details with the agent workflow. Prefer running the calculation script in a restricted environment, and consider pinning lunar-python to a reviewed exact version and fixing the script path before relying on it.

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
scripts/calculate_bazi.py:1
Finding

Unpinned Third-Party Dependency Allows Supply-Chain Code Execution

Content
View full analysis

Vulnerability Details

File Location: scripts/calculate_bazi.py:1-10
Vulnerability Type: Unpinned executable third-party dependency
Risk Level: Medium

Vulnerable Code

python
#!/usr/bin/env -S uv run
# /// script
# dependencies = ["lunar-python>=1.4.8,<2"]
# ///

import argparse
import json
import re
import sys
from dataclasses import asdict, dataclass

from lunar_python import Lunar, Solar

Technical Analysis

The script uses uv run with inline dependency metadata that permits any lunar-python release from version 1.4.8 up to, but not including, version 2. No project lockfile, exact version constraint, integrity hash, or vendored audited package is present.

When the script runs in an environment where the dependency is not already securely locked and cached, uv may resolve and download a later package release satisfying this range. The subsequent import of lunar_python executes the package's module initialization code in the local Python process.

This is a supply-chain weakness rather than evidence that the currently published dependency is malicious. Exploitation requires compromise of the package, its publisher account, the package registry, or another relevant dependency-resolution channel.

Attack Path

  1. An attacker compromises the lunar-python publishing account or otherwise gains the ability to publish a malicious release under that package name.
  2. The attacker publishes a version satisfying >=1.4.8,<2.
  3. A user or Agent invokes scripts/calculate_bazi.py through uv run.
  4. In the absence of an exact lock and integrity verification, uv resolves and installs the attacker-controlled compatible release.
  5. The statement from lunar_python import Lunar, Solar imports that release.
  6. Malicious package initialization code executes with the privileges and environment access of the process running the Skill.

Impact Assessment

Su ...[truncated 572 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin lunar-python to a specific version that has been reviewed and tested, rather than accepting a broad compatible range.
  2. Generate and commit a dependency lockfile so all executions resolve the same dependency graph.
  3. Require cryptographic integrity verification, such as package hashes, where supported by the deployment workflow.
  4. Configure dependency resolution to use an explicitly trusted package index and prevent fallback to untrusted or unintended indexes.
  5. Review dependency updates before changing the pinned version, including package ownership, release history, source changes, and transitive dependencies.
  6. Run the script with least privilege in a restricted environment that has no unnecessary credentials, filesystem permissions, or outbound network access.
  7. In higher-assurance deployments, build from an internally mirrored or vendored, audited copy of the dependency and prohibit runtime package downloads.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The code substantially covers only one subset of the declaration: calculating BaZi/four pillars from raw birth data and verifying supplied pillars. However, the declared purpose is broader and primarily framed as a naming skill for baby naming, naming analysis, and judging existing names against a chart. None of those naming-related behaviors appear in the code. The script accepts birth data, computes the chart, exposes detailed BaZi fields, and optionally compares provided pillars for consistency. That makes the implemented behavior materially narrower and different from the declared skill purpose, especially because the declaration says to use it whenever the request involves 命理起名, 名字打分, 名字排序, or checking whether a specific name fits a chart, which this code does not do.

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 title and all prescribed user-visible opening scripts and phrasing rules are written exclusively in Chinese, and the document directs the agent to use these as user-facing responses. There is no indication that the user may choose another language, which creates a language/locale policy concern for a general-purpose skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

These lines say the constraint applies to all user-visible wording, and the surrounding required scripts are Chinese-only. Because the skill does not provide an explicit option to respond in the user's preferred language, it effectively forces a locale/language choice.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a skill for BaZi-based chart calculation, naming analysis, and evaluating names against a verified chart. Lines L315-L321 explicitly authorize researching Douyin, Xiaohongshu, Zhihu and handling unavailable network search, introducing an external web-research capability that is not necessary to calculate a chart or judge name fit to a chart.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill hard-codes gendered naming expectations and only permits neutral naming when the user explicitly asks for it. In a naming assistant, this can steer users toward stereotyped or exclusionary outputs, misgender children or family preferences, and reduce autonomy for users who want flexible or nontraditional naming guidance.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest frames the skill around BaZi naming, chart calculation, and evaluating candidate names. The output schema at L380-L392 requires fields such as '社交示范' and includes presentation-oriented content for social usage, which is a broader branding/copywriting capability rather than a necessary part of BaZi-based analysis.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script description and argument help text are written only in Chinese, and the runtime error/output strings are also Chinese-only. This enforces a specific language for interaction without user opt-in, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.