Back to skill

Security audit

Bazi Analysis

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local Bazi chart generator with no evidence of hidden access, persistence, exfiltration, or destructive behavior.

Install only if you are comfortable running a local Python charting script on birth date, birth time, and gender inputs. Treat the output as traditional/metaphysical interpretation, not professional advice, and avoid exposing the script directly to untrusted users unless --years and supported year ranges are bounded.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/bazi_chart.py:112
Finding

Unbounded Year-Range Input Can Cause Resource Exhaustion

Content
View full analysis
Remediation
View remediation
int: count = int(value) if not 1 <= count <= 100: raise argparse.ArgumentTypeError("years must be between 1 and 100") return count ap.add_argument( '--years', type=bounded_year_count, default=10, help='Number of annual results to generate, from 1 to 100' ) ``` 3. Validate `--from-year` and the computed ending year against the calendar range supported by `lunar_python`. 4. If invoked by a network-facing or multi-user service, also enforce request timeouts, per-user rate limits, memory limits, and CPU quotas. These controls should supplement rather than replace input validation. 5. Add regression tests covering zero, negative, maximum permitted, above-maximum, and unsupported year-range inputs. ]]>
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (14)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest promises advanced Bazi features such as polished consultation-style interpretation, ten gods, hidden stems, luck cycles, and yearly outlook, but the documentation says the implementation only uses EightChar plus simplified five-element counting without hidden stem weighting or advanced calculations. In a decision-support context, this is dangerous because users may receive authoritative-seeming output that omits core mechanics, leading to materially misleading results and overreliance.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The notes explicitly state the skill is only a basic charting and rough five-element analysis version, while the manifest markets it as a professional consultation tool with advanced outputs. This discrepancy can mislead users and downstream agents into over-trusting the completeness and rigor of the analysis, creating integrity and safety risks when users rely on outputs for consequential decisions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code file contains user-facing natural-language content such as the module description and generated output labels in Chinese, but it does not indicate that the language is optional or region-specific. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 32)May include surrounding context.

python
def pillar_bundle(ec, key: str) -> Dict[str, Any]:
    title = key.capitalize()
    gz = getattr(ec, f"get{title}")()
    gan = getattr(ec, f"get{title}Gan")()
    zhi = getattr(ec, f"get{title}Zhi")()
    return {

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 33)May include surrounding context.

python
def pillar_bundle(ec, key: str) -> Dict[str, Any]:
    title = key.capitalize()
    gz = getattr(ec, f"get{title}")()
    gan = getattr(ec, f"get{title}Gan")()
    zhi = getattr(ec, f"get{title}Zhi")()
    return {
        "ganzhi": gz,

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 34)May include surrounding context.

python
title = key.capitalize()
    gz = getattr(ec, f"get{title}")()
    gan = getattr(ec, f"get{title}Gan")()
    zhi = getattr(ec, f"get{title}Zhi")()
    return {
        "ganzhi": gz,
        "gan": gan,

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 39)May include surrounding context.

python
"ganzhi": gz,
        "gan": gan,
        "zhi": zhi,
        "wuxing": getattr(ec, f"get{title}WuXing")(),
        "nayin": getattr(ec, f"get{title}NaYin")(),
        "xun": getattr(ec, f"get{title}Xun")(),
        "xunkong": getattr(ec, f"get{title}XunKong")(),

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 40)May include surrounding context.

python
"gan": gan,
        "zhi": zhi,
        "wuxing": getattr(ec, f"get{title}WuXing")(),
        "nayin": getattr(ec, f"get{title}NaYin")(),
        "xun": getattr(ec, f"get{title}Xun")(),
        "xunkong": getattr(ec, f"get{title}XunKong")(),
        "dishi": getattr(ec, f"get{title}DiShi")(),

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 41)May include surrounding context.

python
"zhi": zhi,
        "wuxing": getattr(ec, f"get{title}WuXing")(),
        "nayin": getattr(ec, f"get{title}NaYin")(),
        "xun": getattr(ec, f"get{title}Xun")(),
        "xunkong": getattr(ec, f"get{title}XunKong")(),
        "dishi": getattr(ec, f"get{title}DiShi")(),
        "shishen_gan": getattr(ec, f"get{title}ShiShenGan")(),

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 42)May include surrounding context.

python
"wuxing": getattr(ec, f"get{title}WuXing")(),
        "nayin": getattr(ec, f"get{title}NaYin")(),
        "xun": getattr(ec, f"get{title}Xun")(),
        "xunkong": getattr(ec, f"get{title}XunKong")(),
        "dishi": getattr(ec, f"get{title}DiShi")(),
        "shishen_gan": getattr(ec, f"get{title}ShiShenGan")(),
        "shishen_zhi": getattr(ec, f"get{title}ShiShenZhi")(),

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 43)May include surrounding context.

python
"nayin": getattr(ec, f"get{title}NaYin")(),
        "xun": getattr(ec, f"get{title}Xun")(),
        "xunkong": getattr(ec, f"get{title}XunKong")(),
        "dishi": getattr(ec, f"get{title}DiShi")(),
        "shishen_gan": getattr(ec, f"get{title}ShiShenGan")(),
        "shishen_zhi": getattr(ec, f"get{title}ShiShenZhi")(),
        "hide_gan": getattr(ec, f"get{title}HideGan")(),

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 44)May include surrounding context.

python
"xun": getattr(ec, f"get{title}Xun")(),
        "xunkong": getattr(ec, f"get{title}XunKong")(),
        "dishi": getattr(ec, f"get{title}DiShi")(),
        "shishen_gan": getattr(ec, f"get{title}ShiShenGan")(),
        "shishen_zhi": getattr(ec, f"get{title}ShiShenZhi")(),
        "hide_gan": getattr(ec, f"get{title}HideGan")(),
    }

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/bazi_chart.py (reported line 45)May include surrounding context.

python
"xunkong": getattr(ec, f"get{title}XunKong")(),
        "dishi": getattr(ec, f"get{title}DiShi")(),
        "shishen_gan": getattr(ec, f"get{title}ShiShenGan")(),
        "shishen_zhi": getattr(ec, f"get{title}ShiShenZhi")(),
        "hide_gan": getattr(ec, f"get{title}HideGan")(),
    }

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

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

python
"dishi": getattr(ec, f"get{title}DiShi")(),
        "shishen_gan": getattr(ec, f"get{title}ShiShenGan")(),
        "shishen_zhi": getattr(ec, f"get{title}ShiShenZhi")(),
        "hide_gan": getattr(ec, f"get{title}HideGan")(),
    }

Static analysis

No suspicious patterns detected.