Back to skill

Security audit

Bazi Fortune — 八字四柱命理

Security checks for vulnerabilities and agentic risk

Overview

This fortune-telling skill is not malware, but it silently reuses and stores personal birth-profile data in local memory files without clear user consent or lifecycle controls.

Review before installing if you do not want your birth date, birth time, sex, optional birthplace, and derived fortune profile stored in local MEMORY.md files or silently reused from a related fortune-hub memory file. Prefer using it only in a private workspace, and delete or avoid creating MEMORY.md if you want session-only use.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:65
Finding

Silent Cross-Skill Access and Plaintext Persistence of Personal Profile Data

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:65-89 and SKILL.md:233-235
Vulnerability Type: Cross-skill data access and insecure storage of personal data
Risk Level: Medium

Vulnerable Code

SKILL.md:65-89:

markdown
## User Context

This Skill requires the user's birth date, birth time, and sex to complete its calculations.

**Read**: Before execution, inspect these locations in order:
1. This directory's `MEMORY.md` — use as the primary source
2. The same repository's `fortune-hub/MEMORY.md`, if present — use it to supplement missing profile fields

If usable data is available, use it directly without asking the user again.

**Write**: After collecting user information, write it to this directory's `MEMORY.md`:

# User Information

## Basic Profile
- Gregorian birth date: YYYY-MM-DD
- Birth time: XX hour (HH:00-HH:59)
- Sex: male/female
- Birthplace: optional

## Calculation Cache
- Year pillar: heavenly stem and earthly branch
- Month pillar: heavenly stem and earthly branch
- Day pillar: heavenly stem and earthly branch
- Hour pillar: heavenly stem and earthly branch
- Five-element distribution
- Day-master strength
- Favorable element
- Unfavorable element

SKILL.md:233-235:

markdown
### Step 5: Save Results

After the first complete calculation, cache the four pillars, five-element distribution, day-master strength, favorable element, and unfavorable element in `MEMORY.md` so later annual-fortune or major-cycle queries do not require recalculation.

The snippets above are faithful English renderings of the instructions in the source file.

Technical Analysis

The Skill directs the Agent to read personal profile information from both its own persistent memory and a sibling Skill's fortune-hub/MEMORY.md. It further instructs the Agent to use imported information without asking the user again. This crosses the expected isolation boundary between Skills and provides no field-level authorization, provenance vali ...[truncated 2809 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit consent before reading persistent data

    • Inform the user which file and fields will be read.
    • Require affirmative approval before importing data from another Skill.
    • Never interpret previous consent in a different Skill as consent for the current Skill.
  2. Remove silent cross-Skill imports

    • Do not read fortune-hub/MEMORY.md by default.
    • If interoperability is necessary, use an explicit, user-approved import operation.
    • Restrict imports to named fields and display those fields for confirmation before use.
  3. Require consent before persistent storage

    • Make storage opt-in rather than automatic.
    • Explain what will be stored, why it is needed, and how long it will remain.
    • Provide a session-only mode that performs calculations without writing a memory file.
  4. Minimize collected and retained data

    • Do not retain birthplace unless a requested calculation requires it.
    • Prefer retaining non-identifying derived results instead of exact birth information.
    • Avoid storing fields that can be recalculated at low cost.
  5. Protect stored data

    • Use platform-provided protected memory storage where available.
    • If a local file must be used, require restrictive owner-only permissions.
    • Keep memory files outside shared or version-controlled project directories.
    • Ensure MEMORY.md is excluded from source control and packaging.
  6. Add lifecycle controls

    • Define a retention period and automatic expiration.
    • Provide commands to review, correct, export, and delete stored data.
    • Delete superseded or stale records rather than indefinitely accumulating them.
  7. Bind data to the correct user and context

    • Associate stored data with an authenticated user or isolated session where supported.
    • Confirm the imported birth profile before every new analysis.
    • Reject or quarantine sibling-memory data whose provenance cannot be establishe ...[truncated 240 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs the agent to read and persist highly sensitive personal data including birth date, birth time, and sex/gender into MEMORY.md, then reuse it automatically without a clear user-facing privacy notice or consent step. In this context, that data is especially sensitive because it is both identifying and used to infer personal profile attributes, increasing privacy and unintended retention risk.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs persistent storage and later automatic reuse of sensitive user data without re-asking, which creates a durable privacy exposure if MEMORY.md is accessed by other skills, users, or repository processes. Because the skill domain involves intimate personal data and profile inference, the context makes persistence more sensitive than ordinary session state.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The specified profile cache goes beyond raw inputs and stores derived personal attributes such as strength assessment, useful/avoidance elements, and other fortune-analysis outputs tied to the user. This expands the sensitivity footprint from personal data collection into persistent inferred profiling, raising risks of overcollection, secondary use, and disclosure without clear necessity or consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

该 markdown 文档全文以中文编写,并在 L003 明确要求“所有计算必须严格按照此文档执行”。对于面向通用用户的 skill,这构成了对中文规则集的强制依赖,但文档未说明可提供其他语言版本,也未提供用户语言偏好或 opt-in 机制。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire guide mandates Chinese-language phrasing and stylistic conventions such as using terms like "命主" and provides all examples only in Chinese, with no indication that users may choose another language. This creates a language/locale policy concern because the skill appears to enforce a specific language by default rather than documenting it as optional or region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instructions specify '默认使用中文命理专业顾问型风格', which forces a specific language by default. There is no accompanying opt-in or statement that the assistant should adapt to the user's preferred language, creating a locale/language policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.