Back to skill

Security audit

大类资产配置月报

Security checks for vulnerabilities and agentic risk

Overview

The reporting workflow fits its purpose, but it requests an API key in chat and automatically updates external code before running it.

Review before installing. Configure the API key locally rather than pasting it into chat, and rotate any key already shared. Use a reviewed, fixed runner revision and control updates explicitly. Queries are processed by Cue, and reports receive share links, so consider confidentiality before including client information. The supplied artifacts support these concerns but do not establish malicious intent.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Authentication and Cue API access are consistent supporting implementation details, not unrelated capabilities. However, the supplied chunk stops at diagnostics and availability discovery; it never invokes the reporting capability it locates. Its implemented purpose is therefore materially narrower and different from the declared one-click report-generation workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Installing a runner is a legitimate prerequisite, so repository bootstrapping alone is not a purpose mismatch. However, this workflow clones or automatically updates an unpinned external repository, including a fallback mirror, and subsequently executes its Python code with the user's permissions and access to Cue credentials. A compromised upstream repository or mirror could therefore introduce arbitrary local code execution.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 174)May include surrounding context.

CUE_KEY=$(python3 -c "import json;print(json.load(open('$HOME/.cue/config.json'))['api_key'])" 2>/dev/null || echo "$CUE_API_KEY") echo "=== 1/3 API Key ===" && [ -n "$CUE_KEY" ] && echo "已配置" || echo "未配置!" echo "=== 2/3 Cue 服务 ===" && curl -sS --max-time 10 "https://cuecue.cn/api/health" -H "Authorization: Bearer $CUE_KEY" echo "=== 3/3 搭子 ===" && curl -sS --max-time 10 "https://cuecue.cn/api/playbook" -H "Authorization: Bearer $CUE_KEY" | python3 -c "import sys,json;scenes=json.load(sys.stdin).get('data',{}).get('scenes',[]);buddy=[b for s in scenes if s.get('secondary_category')=='财富投顾' for b in s.get('buddies',[]) if b.get('title')=='大类资产配置月报'];print(f'可用:{len(buddy)}个') if buddy else print('暂不可用')"

text

| 检查 | 预期 | 异常处理 |

The setup instructions require users to paste their API key into the agent conversation without warning about credential exposure.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The setup explicitly asks users to paste an API key into the agent conversation, unnecessarily exposing a reusable credential to chat processing, retention, and any transcript or logging integrations. The claim that the agent cannot view the key does not protect a secret supplied directly in chat; disclosure could permit unauthorized Cue usage and consumption of account credits.

Content

No source excerpt is available for this finding.

Credential setup instructions direct the agent to solicit the user's API key in chat.

Medium
Category
Data Exfiltration
Confidence
99% confidence
Finding

The mandatory setup wording directs the agent to solicit an API key in chat, crossing a secret-handling boundary without a technical need to do so. This is the same underlying credential-exposure issue as the SQP-2 finding, not an independent compromise.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 151)May include surrounding context.

md
| 目标格式 | 依赖 | macOS | Ubuntu |
|----------|------|-------|--------|
| Word (.docx) | pandoc | `brew install pandoc` | `sudo apt install pandoc` |
| PDF (.pdf) | pandoc + LaTeX | `brew install --cask basictex` | `sudo apt install texlive-xetex` |

## 架构说明

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 152)May include surrounding context.

md
| 目标格式 | 依赖 | macOS | Ubuntu |
|----------|------|-------|--------|
| Word (.docx) | pandoc | `brew install pandoc` | `sudo apt install pandoc` |
| PDF (.pdf) | pandoc + LaTeX | `brew install --cask basictex` | `sudo apt install texlive-xetex` |

## 架构说明

The health-check code reads the user's API key despite documentation stating that the agent is not authorized to view it.

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

L112, L160, and L179 explicitly state that the agent has no authority to view the user's API key. However, the agent-executed diagnostic at L171 directly reads api_key from ~/.cue/config.json (or CUE_API_KEY), stores it in a shell variable, and uses it in requests at L173–L174. Authentication is appropriate for this skill, and the snippet does not print the key, but its credential-access behavior conflicts with the unqualified documentation restriction.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.