Back to skill

Security audit

ai-xifu-caopan

Security checks for vulnerabilities and agentic risk

Overview

The skill is a recognizable market-analysis document generator, but it also includes underdisclosed code that can back up chat/profile files and upload them to cloud storage, contradicting its privacy claims.

Install only after reviewing or removing scripts/memory_bridge_v2.py if you do not want chat history, memory/profile files, or generated documents backed up or uploaded. Do not run its backup_cloud or all modes unless you explicitly intend cloud transfer. Treat generated trading plans as educational drafts, not advice, and use scoped/rotatable API keys when configuring market data sources.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (23)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
90% confidence
Finding

The code executes an external Python script from a fixed path under the user's home directory and explicitly forwards the full process environment to that child process. While it avoids shell injection by using an argument list, it still creates a trust-boundary problem: if the referenced script or inherited secrets in environment variables are compromised, running this adapter can execute untrusted code and expose credentials or tokens.

Content

Scanner excerpt · global_market/data_adapter.py (reported line 73)May include surrounding context.

python
script = os.path.join(GS_SCRIPTS_DIR, "gs_stock_market_query.py")
    
    try:
        result = subprocess.run(
            ["python3", script, "single_hq", "--code", symbol, "--set_code", str(set_code)],
            capture_output=True, text=True, timeout=20,
            env={**os.environ}

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
90% confidence
Finding

This subprocess invocation has the same trust-boundary issue as the realtime path: it runs another script from a writable workspace-like directory and propagates all environment variables into that child process. An attacker who can modify the downstream script or rely on inherited secrets could abuse this data adapter to run malicious code or leak sensitive environment data.

Content

Scanner excerpt · global_market/data_adapter.py (reported line 95)May include surrounding context.

python
script = os.path.join(GS_SCRIPTS_DIR, "gs_stock_market_query.py")
    
    try:
        result = subprocess.run(
            ["python3", script, "past_hq", "--code", symbol, "--set_code", str(set_code), "--want_nums", str(days)],
            capture_output=True, text=True, timeout=20,
            env={**os.environ}

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill states that no user data is stored, archived, or analyzed beyond the current session, but elsewhere documents persistent local saving of a watchlist for future use. This is a real transparency and privacy issue because users may rely on the no-storage claim while the skill retains request-derived data across sessions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file claims there is no auto-collection and no automated decisions, yet other sections describe automatic watchlist updates and tracking after plan generation. Even if limited to local operations, contradictory disclosure weakens informed consent and can cause users to trigger persistence or tracking they did not clearly authorize.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill packages conversation backups and memory files, then uploads them to an external Huawei Drive tool even though the capability is not clearly bounded to explicit user approval at runtime. In a memory/backup skill, covert or automatic exfiltration of highly sensitive chat and profile data to cloud storage materially increases confidentiality risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
79% confidence
Finding

The skill executes an additional Python script to extract holdings information, expanding capabilities from simple backup into delegated code execution. In this context, running another script from the workspace creates a trust boundary issue because a modified helper could access or alter sensitive data during backup operations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The header comments state cloud upload is only 'reserved', but the implementation actively creates archives and uploads them. This mismatch is dangerous because users or reviewers may underestimate the skill's data-transfer behavior and permit installation or execution without understanding that external exfiltration is built in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The template presents itself as educational-only, but it contains extensive execution-style trading guidance, including directional recommendations, target/stop prices, position sizing, and timing plans. This mismatch can mislead users and downstream agents into treating regulated investment advice as mere education, weakening safety controls and increasing the chance of financial harm.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The repeated disclaimer states the tool does not provide investment advice or trading instructions, yet later sections continue to prescribe specific operations such as long/short direction, entry conditions, stop-losses, profit targets, and Kelly-based position sizing. Repeating the disclaimer does not reduce risk; it can instead create false assurance while still delivering actionable financial guidance.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The function documentation explicitly states there is no fallback to sample or default data, yet the function body contains embedded sample market values in the same code path. In a trading-plan generator, hidden defaults can cause users to unknowingly generate reports from illustrative data, creating integrity and trust risks and potentially leading to bad decisions based on fabricated inputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill content is entirely written in Chinese and frames the workflow, labels, and outputs around a specific locale without any indication that language selection is user-driven. In an agent setting, this can override user preference or system locale, causing the assistant to respond in an unintended language and reducing usability, reviewability, and safety for users who cannot understand the output.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README advertises very short trigger phrases such as "分析AAPL", "看600519", and "帮我出BTC/USD方案", including especially broad verbs like "看"/"Analyze" that can overlap with ordinary conversation about securities. In a chat-based agent environment, overly generic invocation patterns increase the risk of accidental activation or unintended routing of user messages into this skill, which could cause misleading financial-plan generation without clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The trigger phrases are broad market-analysis requests such as '分析AAPL' and '看600519', which can overlap with ordinary conversation rather than an unambiguous command. In a skill that creates files, calls external APIs, and may update local state, ambiguous activation increases the risk of unintended execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The phrase 'with user's implied consent' for updating a watchlist makes scope and authorization unclear. Because the watchlist is persistent local state tied to the user's requested symbols, implied consent is insufficient and can lead to storage beyond what the user reasonably expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide instructs users to place API credentials in environment variables and later also discusses proxy configuration, but it provides no security warning about secret handling, shell history exposure, least privilege, rotation, or risks of untrusted proxies intercepting traffic. In a skill context, this can normalize unsafe operational practices and increase the chance that users leak credentials or route sensitive market/API traffic through hostile infrastructure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

The auto_switch_if_needed function can trigger switch_market, which persists a new current market and rewrites the JSON config without any confirmation or warning. In an integrated agent setting, this kind of implicit state change can surprise users, alter downstream behavior, and create integrity issues if symbol parsing is ambiguous or attacker-influenced.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script reads nearly all same-day user and assistant messages and writes them into persistent memory files without meaningful minimization or user-facing consent. Because chat content can contain credentials, personal data, or proprietary information, silent bulk retention substantially raises privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code transmits archived backups containing conversations and memory/profile files to external cloud storage without an explicit warning or per-transfer approval. In context, the payload is highly sensitive and the transfer meaningfully broadens exposure beyond the local environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The function automatically writes a .docx file to disk whenever it runs, with no adjacent runtime disclosure or consent gate near the write operation. In an agent skill context, silent file creation can surprise users, clutter the environment, or overwrite expected outputs, especially when filenames are derived from user-supplied content.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The design explicitly aims to preserve and restore full user/assistant conversations and memory files across sessions, creating a durable repository of sensitive user content. In this skill context, persistent storage of broad conversational history is especially risky because it can include secrets, financial data, and personal profiles beyond what is necessary for function.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code semantically logs almost all same-day conversation text with timestamps and role attribution into a daily memory file. This creates a detailed behavioral record that can expose private content and make later compromise far more damaging than transient in-memory processing.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The backup routine aggregates session archives together with MEMORY.md, AGENTS.md, USER.md, and SOUL.md into one backup set, concentrating multiple sensitive data sources into a single high-value collection. Consolidation increases the blast radius of any accidental disclosure, misuse, or compromise of the backup location.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script packages accumulated conversations and memory files into an archive and uploads it to cloud storage, extending exposure from local persistence to remote transfer and third-party retention. Because the archived content may include personal, financial, and behavioral data, compromise of the remote account or transfer path could have severe confidentiality consequences.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.