Back to skill

Security audit

Historical Guide

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Chinese museum-guide skill, but its automatic persona generation can persist model-generated files with insufficient validation, creating review-worthy risk.

Review or patch before installing in a sensitive environment. Disable or gate dynamic persona generation, validate generated persona IDs and schemas, prevent path traversal and overwrites, use only trusted HTTPS API endpoints, and keep API keys in environment variables or a secret manager rather than a committed config file. Expect Chinese-language behavior.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (5)

T02 · Agent Memory Poisoning

Error
Location
scripts/character_loader.py:96
Finding

Persistent Prompt Poisoning and Path Traversal Through Generated Persona IDs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/persona_generator.py:67
Finding

Persona Safety Filter Accepts Explicit Negative Decisions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/tour_guide.py:81
Finding

Bearer Credentials and User Content Can Be Sent to an Unvalidated Insecure Endpoint

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:40
Finding

Unpinned Runtime Dependency Installation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/persona_generator.py:35
Finding

API Requests Can Block Indefinitely Due to Missing Timeouts

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (43)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding points to materially expanded behavior beyond simple museum narration: the skill can generate arbitrary new personas via an external model, review/filter them, and persist them locally. That broader capability changes the trust model because unbounded persona generation and disk persistence create opportunities for unsafe content generation, prompt injection propagation into stored artifacts, or unintended long-term data retention.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding points to materially expanded behavior beyond simple museum narration: the skill can generate arbitrary new personas via an external model, review/filter them, and persist them locally. That broader capability changes the trust model because unbounded persona generation and disk persistence create opportunities for unsafe content generation, prompt injection propagation into stored artifacts, or unintended long-term data retention.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/utils.py (reported line 78)May include surrounding context.

python
11. 只使用有据可查的历史信息,不要虚构故事
12. 语言要通俗易懂,确保用户能够理解"""
    
    return prompt

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares substantial capabilities (environment access, file read/write, network, shell, and MCP-related behavior) but does not constrain them with an explicit permissions or allowed-tools policy. In a skill that accepts natural-language triggers and can generate/write new persona files, the lack of tool scoping increases the blast radius if the implementation is buggy or later modified to process untrusted input unsafely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description and all documented triggers are written exclusively in Chinese and present activation examples only in Chinese, with no indication that users may choose another language. This can constitute a language/locale policy issue because the skill effectively imposes a single language without opt-in or justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger phrases include broad terms like '历史人物讲解' and '人物伴游', which may activate the skill in ordinary conversation where the user did not intend external API calls, state changes, or persona generation. Over-broad activation is risky in a skill with network and file-write behavior because benign chat could unexpectedly invoke higher-privilege actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill instructs users to place API credentials in environment variables or a local JSON file but does not warn about secure storage, file permissions, secret scanning, or avoiding repository check-in. This can lead to accidental credential exposure, especially because a config file under scripts/ is easy to commit or read by adjacent tooling.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
| 环境变量 | 说明 | 示例 |
|---------|------|------|
| `API_KEY` | 模型 API Key | `sk-xxx` |
| `API_BASE` | 模型 Base URL | `https://api.example.com/v1/chat/completions` |
| `MODEL_NAME` | 模型名称 | `xxx` |

或创建 `scripts/config.json`:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

json
{
  "API_KEY": "your-api-key",
  "API_BASE": "https://api.openai.com/v1/chat/completions",
  "MODEL_NAME": "xxx"
}

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation claims the skill stays tightly focused on artifacts, but the workflow allows automatic generation and persistent storage of personas for arbitrary out-of-library figures. That discrepancy matters because arbitrary persona generation introduces unbounded model output and durable local state, which are both higher-risk than transient museum commentary.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Generating and writing a persona library for arbitrary new figures exceeds the minimum functionality needed for a museum guide and unnecessarily expands attack surface. Any feature that turns user prompts into persisted files can be abused for storage pollution, unsafe content retention, or future prompt contamination if those files are later reloaded as trusted personas.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This JSON skill definition is entirely structured around a fixed Chinese-speaking persona, including Chinese name, greeting, farewell, self-introduction, and speaking style, with no indication that users may choose another language or locale. Under the policy, a skill that enforces a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JSON defines the skill's name, greeting, farewell, and self-introduction entirely in Chinese and configures a Chinese historical persona speaking style, with no indication that the user can choose another language. That creates a natural-language policy concern because it appears to enforce a specific language/locale by default rather than offering opt-in or documenting a justified regional limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This JSON reference defines the skill's name, greeting, farewell, self-introduction, and stylistic fields entirely in Chinese, indicating the skill is designed to respond in a specific language and locale by default. There is no accompanying opt-in, language choice, or justification that the skill is intentionally region-specific, which matches the policy-violation criterion for forced language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This JSON defines all user-facing persona text and speaking style exclusively in Chinese, including greeting, farewell, self-introduction, and sentence patterns. Because the file provides no indication of optional language selection or justified locale restriction, it creates a natural-language policy risk of forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring, function docstring, and error message are written only in Chinese, which imposes a specific language in user-visible and developer-facing text without opt-in or justification. Under the language/locale policy, this is a natural-language locale constraint that should either provide choice or be explicitly documented as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This Python file contains user-facing natural language in Chinese in the module docstring, comments, and function docstrings, but does not indicate that the skill is intentionally Chinese-only or provide any user opt-in for language/locale. Under the policy rule, forcing a specific language without user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes a write primitive that persists arbitrary persona data to local JSON files under the references directory, which exceeds the described read-only museum guide behavior. Even though the path is constrained to that directory, enabling runtime modification of prompt/persona content creates a persistence mechanism that could alter future responses, poison personas, or overwrite bundled data if exposed through higher-level agent flows.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The save_persona method writes caller-supplied persona content to disk without any apparent access control, schema enforcement, or business-need justification for this skill. In a character-driven guide, stored persona files likely influence later model behavior, so unauthorized writes can become a content-tampering or prompt-poisoning vector even if the file extension is fixed to JSON.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes a guide experience where users can invoke figures like Li Bai or Su Shi to explain artifacts, which implies selecting or using known personas. In contrast, the code generates new personas on demand and saves them to the character library, expanding the skill from commentary into content generation and repository mutation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

A museum guide skill can reasonably present stored character-based narration, but this file sends prompts and user-supplied character names to an external model service and relies on API configuration/credentials. That networked content-generation pipeline is a broader capability than the manifest's narrow description of switching among historical narrators.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The script sends user-supplied character names and generated prompt content to an externally configured API endpoint using bearer credentials, with no endpoint validation, timeout, or data-governance controls. In a museum-guide context this is more dangerous because the skill appears user-facing and may silently transmit user inputs and generated profile data to third parties beyond what users would expect.

Content

Scanner excerpt · scripts/persona_generator.py (reported line 37)May include surrounding context.

python
"max_tokens": max_tokens
    }
    
    response = requests.post(
        config['api_base'],
        headers=headers,
        json=payload

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The embedded prompt instructs the model to act specifically as a '中国历史人物画像生成专家' and to generate only '中国历史上公认的正面的历史人物'. This imposes a fixed cultural/locale scope in natural-language instructions without offering the user a language or locale choice or documenting that the tool is intentionally region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Natural-language strings throughout the file, including the module description, prompts, and error message, require Chinese output and interaction by default. The file does not indicate that users can select another language or opt into this locale constraint, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code sends user-provided relic names to an external API together with a bearer token, but this file provides no disclosure, consent flow, or indication to the user that their input is transmitted off-device. In a museum-guide skill, users may reasonably expect local processing, so undisclosed third-party transmission creates a privacy and trust risk even though it appears to be standard LLM integration rather than overtly malicious behavior.

Content

No source excerpt is available for this finding.