Back to skill

Security audit

事实核查

Security checks for vulnerabilities and agentic risk

Overview

This fact-checking skill needs review because it automatically updates and runs external code that can access its saved API key.

Prefer a reviewed runner version pinned to a commit, with explicit approval before updates. Use a dedicated Cue key and restrict the runner's file access. Submit only material you may share with Cue, check credit costs, and confirm report-link access before sharing sensitive reports.

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
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Document conversion could support a fact-checking workflow, but it is the entirety of the supplied code. The chunk does not retrieve independent sources, review underlying data, assess claims, or construct the declared evidence-backed report. The mismatch concerns the primary behavior, not the use of Pandoc or XeLaTeX as implementation details.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Installing a runner is consistent with the disclosed fact-checking workflow, so downloading dependencies is not itself a purpose mismatch. However, the skill automatically clones or updates an unpinned repository, including a fallback mirror, and subsequently executes its Python runner; a compromised upstream could therefore execute code with the agent's filesystem and credential access.

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 179)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 workflow sends original fact-checking material to Cue without a privacy warning about submitting sensitive information.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The workflow passes original material to an external service and explicitly targets potentially confidential due-diligence and business information. Although the architecture section discloses remote processing, the invocation instructions do not require sensitivity screening, redaction, or confirmation before transmitting such material, creating a risk of unintended third-party disclosure.

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 154)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 155)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 may not view it.

Low
Category
Excessive Agency
Confidence
92% confidence
Finding

L113, L165, and L184 explicitly state that the agent has no right to view the user's API key. However, L176 reads the complete key from ~/.cue/config.json or CUE_API_KEY into a shell variable, and L178–L179 use it for authentication. Authentication is appropriate for this skill, but the documented prohibition contradicts the supplied credential-handling code.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.