Back to skill

Security audit

AI Fortune Teller

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent AI fortune-telling tool, but it handles personal birth data and API credentials with under-scoped network and local-file behavior that users should review before installing.

Install only if you are comfortable sharing names, birth details, questions, and generated prompts with MiniMax. Avoid placing unrelated secrets in $HOME/.clawd/.env, do not set MINIMAX_API_HOST to an untrusted endpoint, and treat the generated fortune outputs as entertainment rather than reliable advice. Review or patch the scripts before standalone use if you need strong privacy or local multi-user safety.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fortune.sh:11
Finding

Overbroad credential loading and bearer-token disclosure through a configurable API endpoint

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/kline_generator.py:159
Finding

Predictable user-controlled temporary files permit symlink overwrite and data exposure

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (28)

Tainted flow: 'req' from os.environ.get (line 35, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The request destination is derived from the MINIMAX_API_HOST environment variable and then used directly in urllib.request.urlopen. If an attacker can influence the environment, they can redirect the bearer token and submitted user data to an attacker-controlled host, causing credential exfiltration and unauthorized outbound requests; the skill context increases risk because it handles personal profile data and an API key.

Content

Scanner excerpt · scripts/kline_generator.py (reported line 46)May include surrounding context.

python
)
    
    try:
        with urllib.request.urlopen(req, timeout=60) as response:
            result = json.loads(response.read().decode('utf-8'))
            if result.get('base_resp', {}).get('status_code') == 0:
                return result

Tainted flow: 'req' from os.environ.get (line 35, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
96% confidence
Finding

The request destination is derived from environment-controlled input via MINIMAX_API_HOST and then used in urllib.request.urlopen. In many agent/runtime deployments, environment variables can be influenced by operators, wrappers, or compromised execution contexts, which can turn this into SSRF-style outbound access or silent exfiltration of prompts and API credentials to an attacker-controlled host.

Content

Scanner excerpt · scripts/portrait_generator.py (reported line 46)May include surrounding context.

python
)
    
    try:
        with urllib.request.urlopen(req, timeout=60) as response:
            result = json.loads(response.read().decode('utf-8'))
            if result.get('base_resp', {}).get('status_code') == 0:
                return result

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

Accessing a general-purpose home .env file gives the skill visibility into credentials unrelated to its stated purpose, which is excessive for a fortune-telling script. Even if only MINIMAX_API_KEY is intended, the export pattern loads all secrets into the process environment where they may be consumed by child processes or accidentally exposed.

Content

Scanner excerpt · scripts/fortune.sh (reported line 11)May include surrounding context.

sh
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILL_DIR="$(dirname "$SCRIPT_DIR")"

if [ -f "$HOME/.clawd/.env" ]; then
    export $(grep -v '^#' "$HOME/.clawd/.env" | xargs)
fi

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The export command on the .env contents causes every parsed variable from the user's home configuration to become available to this script and any subprocesses it spawns. In a script that also performs network requests, this unnecessarily increases the risk of credential misuse or leakage if later code changes, dependencies, or prompt content become adversarial.

Content

Scanner excerpt · scripts/fortune.sh (reported line 12)May include surrounding context.

sh
SKILL_DIR="$(dirname "$SCRIPT_DIR")"

if [ -f "$HOME/.clawd/.env" ]; then
    export $(grep -v '^#' "$HOME/.clawd/.env" | xargs)
fi

# 默认 API 配置

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/kline_generator.py (reported line 102)May include surrounding context.

python
Create a visually stunning image that tells the story of a soul's previous incarnation, blending traditional Chinese spiritual aesthetics with mystical portrait art.
"""
    return prompt

def generate_future_partner_prompt(bazi_info, partner_traits):
    """

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/portrait_generator.py (reported line 94)May include surrounding context.

python
Create a visually stunning image that tells the story of a soul's previous incarnation, blending traditional Chinese spiritual aesthetics with mystical portrait art.
"""
    return prompt

def generate_future_partner_prompt(bazi_info, partner_traits):
    """

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/portrait_generator.py (reported line 136)May include surrounding context.

python
Create a visually stunning image that tells the story of a soul's previous incarnation, blending traditional Chinese spiritual aesthetics with mystical portrait art.
"""
    return prompt

def generate_future_partner_prompt(bazi_info, partner_traits):
    """

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises capabilities implying access to environment, file writes, network, and shell behavior, but it does not declare any explicit tool scope or permissions boundary. That creates an authorization ambiguity where a host may grant broader powers than users expect, increasing the risk of unintended data access, persistence, or external transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill asks for sensitive personal data including name, gender, birthplace, and full birth date/time, which can be highly identifying, but it does not clearly warn users about privacy risks at the point of collection. In this context, birth data is central to the feature, so the danger is not the collection itself but collecting more than necessary without transparent notice, consent, or minimization.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly states that user chart data is stored in local JSON, but provides no retention, deletion, access-control, or user-warning details. Because the stored data may include full birth details and derived profile data, silent persistence materially increases privacy risk and could expose sensitive information to other local users, backups, logs, or later compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt explicitly requests highly sensitive personal data, including full name, former name, gender, alive/deceased status, birthplace, and precise birth date/time, without any privacy notice, minimization guidance, or handling restrictions. In this skill context, collecting exact identity and birth data for a fortune-telling service is not strictly necessary at full precision and increases privacy, profiling, and potential misuse risks if the data is logged, retained, or exposed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file defines the skill entirely in Chinese and directly instructs the model to act as a fortune analyst in that language context, with no indication that users may choose another language. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The prompt template explicitly requires Chinese output, including a Chinese title, while the file provides no user opt-in or alternative language handling. This is a natural-language policy concern because it imposes a specific language/locale rather than allowing user preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file instructs the model to output the tarot reading in Chinese-specific phrasing and format ('请按以下格式输出塔罗解读') throughout a fully Chinese prompt, but it does not provide any user opt-in or alternative language option. This creates a natural-language locale policy issue because the skill effectively enforces a specific language without documented justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example prompts explicitly request highly sensitive personal data including full name, gender, birthplace, full birth date, and birth time, but provide no privacy notice, data minimization guidance, or explanation of how that data will be handled. In a fortune-telling context this information is not just identifying but often sufficient for profiling, making oversharing likely and increasing privacy and misuse risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The tarot example gives directional advice about whether to stay in a stressful job or consider changing employment, but does not warn users that generated content is entertainment or reflective guidance rather than professional life, financial, or mental health advice. Users under stress may over-rely on authoritative-seeming divination output for consequential decisions, which creates a real risk of harmful action based on unreliable guidance.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script indiscriminately loads and exports every variable from $HOME/.clawd/.env, which expands the skill's access beyond what a fortune-telling feature needs. This can expose unrelated local secrets or configuration to later subprocesses and network calls, violating least-privilege and increasing the blast radius if the script or its dependencies are compromised.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This code performs an external HTTP request carrying user-supplied content and sensitive personal details to a remote model API. External transmission is expected for this kind of tool, but in the security context it remains a genuine data-exposure surface, especially because the host is configurable via environment variables and the payload includes personal information.

Content

Scanner excerpt · scripts/fortune.sh (reported line 49)May include surrounding context.

sh
return 1
    fi
    
    curl -s --max-time 60 \
        -H "Authorization: Bearer $MINIMAX_API_KEY" \
        -H "Content-Type: application/json" \
        -X POST "$MINIMAX_API_HOST/v1/text/chatcompletion_v2" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script sends personal data such as name, gender, birthplace, birth date, and questions to a third-party API, but the script provides no explicit consent prompt, warning, or data minimization. Because fortune-telling inputs are highly personal, this creates a real privacy risk and may transmit more identifying information than users expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file-level description and user-facing behavior are written exclusively in Chinese, and the generated image is instructed to use a Chinese title. This imposes a specific language/locale without any opt-in or alternative, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest describes an AI fortune-telling tool focused on Bazi, tarot, and luck analysis, but this file additionally depends on external image-generation infrastructure by reading MINIMAX_API_KEY/MINIMAX_API_HOST and POSTing generated prompts off-box. While visualization could be related, using external hosted image generation and credential-based network access is a separate capability not expressed in the stated purpose of divination and analysis.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The prompt hard-codes "Title in Chinese" and a Chinese subtitle requirement, ensuring generated content uses a fixed language regardless of user preference. Because no language selection mechanism or justification is present, this is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Lines L119-L120 explicitly state the fortune segmentation is simulated fake data and that real Bazi analysis would be added later. However, the program immediately displays these segments to the user as their fortune preview (L136-L140), uses them to generate the final image (L142-L146), and saves them as result data (L157-L166), creating a direct contradiction between the internal documentation and actual behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script sends user-derived birth-chart attributes and the user's name to an external image-generation service as part of the prompt, but there is no explicit consent flow, privacy notice, or data-minimization step. Even if the data is not highly regulated by itself, it is personal profiling data and may be sensitive in the context of astrology, relationship inference, and spiritual characterization.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language description, instructions, and examples are entirely in Chinese, which can amount to a language policy issue when no user opt-in or locale justification is provided. There is no statement that the skill is intended only for Chinese-speaking users or that alternative language support is unavailable by design.

Content

No source excerpt is available for this finding.