Back to skill

Security audit

cue-earnings-analysis

Security checks for vulnerabilities and agentic risk

Overview

The financial research workflow is coherent, but its setup unnecessarily exposes your API key through chat.

Configure the key locally with owner-only permissions instead of pasting it into chat; replace any key already shared there. Review and pin the external runner before execution. Expect research queries and reports to be processed by Cue and consume service credits.

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
  • Rogue AgentSelf-Modification, Session Persistence
Findings (6)

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 218)May include surrounding context.

bash
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('暂不可用')"

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
#   git clone https://gitee.com/sensedeal/cue-skills ~/.cue/cue-skills

# 2. 写入 API Key(在 https://cuecue.cn/api-key?src=clawhub-earnings-analysis 创建后复制)
mkdir -p ~/.cue && echo '{"api_key":"sk..."}' > ~/.cue/config.json

# 3. 验证连通(返回 200 即成功)
curl -sS --max-time 10 "https://cuecue.cn/api/templates" \

The skill instructs users to paste their API key into the agent conversation without warning about exposing a sensitive credential.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The onboarding explicitly tells users to paste a live API key into the agent conversation, unnecessarily exposing the credential to conversation storage, logging, and any systems with access to that transcript. Although the key is legitimately needed for Cue authentication, collecting it through chat can enable unauthorized API use and consumption of the user's credits.

Content

No source excerpt is available for this finding.

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

Medium
Category
Data Exfiltration
Confidence
99% confidence
Finding

The skill requires the agent to solicit the user's API key in chat, making sensitive-data exposure part of the normal onboarding workflow. This is the same underlying issue as SQP-2, not an independent compromise; the statement that the agent has no authority to view the key does not mitigate instructions to receive it directly.

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 196)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 197)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` |

## 架构说明

Static analysis

No suspicious patterns detected.