Back to skill

Security audit

Travel Itinerary Planner by Chaceclaw

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real travel-planning helper, but it overstates live/safety-critical features and can persist travel data to local files with weak path controls.

Review before installing. Treat the weather, emergency, visa, exchange-rate, booking, sharing, and budget-accuracy outputs as examples unless independently verified. Be aware it stores trip details under ~/.travel-planner and should be hardened to restrict filenames before use with untrusted inputs.

Vulnerability Patterns
  • 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
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
travel_planner.py:723
Finding

Caller-Controlled Filenames Permit Arbitrary File Overwrite

Content
View full analysis

Vulnerability Details

File Locations:

  • travel_planner.py:723-734
  • travel_planner_extensions.py:632-641
  • travel_planner_extensions.py:967-976

Vulnerability Type: Path traversal and unrestricted file write
Risk Level: Medium

Vulnerable Code

python
def save_itinerary(self, itinerary: Dict, filename: Optional[str] = None) -> str:
    if not filename:
        timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
        filename = f"itinerary_{timestamp}.json"

    filepath = os.path.join(self.data_dir, filename)

    serializable_itinerary = self._make_serializable(itinerary)

    with open(filepath, 'w', encoding='utf-8') as f:
        json.dump(serializable_itinerary, f, ensure_ascii=False, indent=2)

    return filepath
python
def save_pdf_content(self, content: str, filename: Optional[str] = None) -> str:
    if not filename:
        timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
        filename = f"itinerary_{timestamp}.md"

    filepath = os.path.join(self.data_dir, filename)

    with open(filepath, 'w', encoding='utf-8') as f:
        f.write(content)

    return filepath
python
def save_diary_template(self, content: str, filename: Optional[str] = None) -> str:
    if not filename:
        timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
        filename = f"travel_diary_{timestamp}.md"

    filepath = os.path.join(self.data_dir, "diaries", filename)

    with open(filepath, 'w', encoding='utf-8') as f:
        f.write(content)

    return filepath

Technical Analysis

These public save methods directly combine a caller-supplied filename with an intended storage directory. They do not reject absolute paths, parent-directory components, path separators, symbolic-link targets, or filenames resolving outside the expected directory.

A relative value containing parent-directory components can escape `~/.travel-planne ...[truncated 1796 chars]

Remediation
View remediation

Remediation Suggestions

  • Prefer generating all storage filenames internally rather than accepting paths from callers.
  • If custom names are required, accept only a basename and reject absolute paths, parent-directory components, path separators, null bytes, and unexpected extensions.
  • Resolve both the base directory and candidate path with pathlib.Path.resolve(), then verify that the candidate remains beneath the intended base directory.
  • Use separate validation for the itinerary, export, and diary directories.
  • Consider exclusive creation mode when overwriting existing files is not required.
  • Protect against symbolic-link attacks where untrusted users can modify the storage directory.
  • Apply restrictive directory and file permissions appropriate to the sensitivity of travel and expense data.
  • Add tests covering absolute paths, parent traversal, nested traversal, symbolic links, alternate path separators, and valid filenames.

Example hardening pattern:

python
from pathlib import Path

def safe_output_path(base_directory: str, filename: str, suffix: str) -> Path:
    if not filename or Path(filename).name != filename:
        raise ValueError("A plain filename is required")

    if not filename.endswith(suffix):
        raise ValueError("Unexpected file extension")

    base = Path(base_directory).expanduser().resolve()
    candidate = (base / filename).resolve()

    if candidate.parent != base:
        raise ValueError("The output path is outside the allowed directory")

    return candidate

other

Warning
Location
travel_planner_extensions.py:106
Finding

Simulated and Hard-Coded Travel Safety Information Is Presented as Operational Data

Content
View full analysis

Vulnerability Details

File Locations:

  • travel_planner.py:598-640
  • travel_planner_extensions.py:106-164
  • travel_planner_extensions.py:438-476
  • travel_planner_extensions.py:536-545
  • SKILL.md:94-98
  • SKILL.md:284-300

Vulnerability Type: Safety-critical data integrity and misleading capability representation
Risk Level: Medium

Relevant Code

The sharing implementation constructs a non-operational URL under an example domain without publishing itinerary data:

python
def generate_shareable_link(self, itinerary: Dict) -> str:
    timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
    share_id = f"trip_{timestamp}"

    share_link = f"https://travel-planner.example.com/share/{share_id}"

    return share_link

The weather implementation generates forecast dates and conditions locally instead of retrieving a current forecast:

python
for i in range(days):
    date = datetime.now() + timedelta(days=i)
    condition = conditions[i % len(conditions)]

    advice = self._get_weather_advice(condition, uv_index)

    weather_info = WeatherInfo(
        date=date.strftime("%Y-%m-%d"),
        temperature_high=f"{base_temp}°C",
        temperature_low=f"{base_temp - 5}°C",
        condition=condition,
        humidity=humidity,
        wind=wind,
        uv_index=uv_index,
        advice=advice
    )
    weather_data.append(weather_info)

Emergency contact numbers are embedded directly in source data without retrieval, validation, provenance, or freshness metadata:

python
EmergencyContact(
    type="Medical",
    name="International Hospital",
    phone="+66 76 234 567",
    address="Destination city",
    hours="24-hour emergency service"
)

The final excerpt above is an English representation of the corresponding hard-coded record for readability; the audited source record is located at travel_planner_extensions.py:448-455 ...[truncated 2682 chars]

Remediation
View remediation

Remediation Suggestions

  • Integrate weather data from a documented authoritative provider and include retrieval time, forecast time zone, provider attribution, and error handling.
  • Retrieve visa and entry requirements from official government or consular sources. Require users to verify requirements before travel.
  • Source emergency contacts from official police, medical, tourism authority, and diplomatic channels.
  • Store provenance and last-verification dates for every safety-critical contact.
  • Remove unverified contact records until they have been validated.
  • Clearly label all demonstration or simulated data in every formatted output, not only in internal comments or docstrings.
  • Never describe generated template data as real-time.
  • Replace the example-domain sharing URL with a real authenticated storage workflow, or remove the sharing feature.
  • If real sharing is implemented, use unguessable identifiers, access controls, expiration, revocation, transport encryption, and explicit user consent before uploading itinerary data.
  • Validate booking URLs against an allowlist of official domains and periodically check that links remain active and correspond to the named destination.
  • Add safe failure behavior: when current information cannot be retrieved, state that it is unavailable rather than substituting realistic-looking fabricated values.
  • Update README.md, SKILL.md, and metadata so capability claims accurately match the implementation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears not to implement core itinerary-planning capabilities as advertised, yet includes undeclared file-writing features for trackers, diary templates, or markdown output. In a travel-planning context, this makes the deception more concerning because users are likely to provide personal itinerary, budget, and family-travel details while the skill performs unrelated persistence actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill appears not to implement core itinerary-planning capabilities as advertised, yet includes undeclared file-writing features for trackers, diary templates, or markdown output. In a travel-planning context, this makes the deception more concerning because users are likely to provide personal itinerary, budget, and family-travel details while the skill performs unrelated persistence actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill appears not to implement core itinerary-planning capabilities as advertised, yet includes undeclared file-writing features for trackers, diary templates, or markdown output. In a travel-planning context, this makes the deception more concerning because users are likely to provide personal itinerary, budget, and family-travel details while the skill performs unrelated persistence actions.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: travel-itinerary-planner
description: |
  智能旅行行程规划系统 - 一键生成完整旅行计划。
  收集旅行信息,创建详细行程,提供预算估算、餐厅推荐、交通建议、实用贴士。
  支持家庭旅行、情侣旅行、单人旅行等多种场景。
  预算控制精准,误差控制在20%以内。
  包含实时天气、预订链接、儿童友好活动、紧急联系等扩展功能。
version: "1.0.0"
author: "Chaceclaw"
license: "MIT"
triggers:
  - 旅行规划
  - travel plan
  - 行程安排
  - trip itinerary
  - 制定旅行计划
  - 帮我规划旅行
  - travel plannin

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · travel_planner_extensions.py (reported line 69)May include surrounding context.

python
: str
    booking_tips: str

    def to_dict(self) -> Dict:
        return asdict(self)


@dataclass
class EmergencyContact:
    """紧急联系信息数据类"""
    type: str
    name: str
    phone: str
    address: str
    hours: str

    def to_dict(self) -> Dict:
        return asdict(self)


@dataclass
class ExpenseRecord:
    """费用记录数据类"""
    date: str
    category: str
    description: str
    budgeted: float
    actual: float
    notes: str

    def to_dict(self) -> Dict:
        return asdict(self)


@dataclass
class PhotoCategory:
    """照片分类数据类"""
    category: str
    description: str
    tips: str
    suggested_locations: List[str]

    def to_dict(self) -> Dict:
        return asdict(self)


class TravelPlannerExtensions:
    """旅行规划器扩展功能"""

    def __init__(self):
        self.data_dir = os.path.expanduser("~/.travel-planner")
        self.ensure_data_dir()

    def ensure_data_dir(self):
        """确保数据目录存�

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The skill documentation is predominantly in Chinese and presents Chinese trigger phrases and workflow as the default user experience, with only limited English mention and no explicit language-choice or opt-in statement. This can be a natural-language policy concern if the skill effectively forces a locale/language without giving users a choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README advertises share-link generation and social-media sharing for travel itineraries without warning that the shared content may include sensitive personal travel details such as destinations, dates, family composition, budget, and emergency contacts. In a travel-planning context, exposing this information can create privacy and personal-safety risks, especially for families or users sharing future travel plans publicly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README promotes real-time weather and booking-link integrations without warning that destination and itinerary details may be transmitted to external services. In this skill, those details can reveal planned travel location, timing, and preferences to third parties, creating privacy and profiling risk if users are not informed or given a choice.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill documentation describes or implies file read/write behavior but does not declare any tool scope such as permissions or allowed-tools. Undeclared filesystem capabilities are risky because they prevent users and the platform from understanding what data may be accessed or persisted, especially since the related findings indicate local storage under the user's home directory.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Core descriptive and instructional content is written primarily in Chinese and the file does not state that language selection is optional or configurable. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale limitation is explicitly justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases are broad enough to match normal travel conversation rather than an intentional request to invoke a skill. Over-broad activation increases the chance of accidental execution, which is more concerning here because the skill is associated with undeclared file operations and misleading capability claims.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill advertises weather, booking, sharing, and expense-tracking features without disclosing how user data is accessed, transmitted, stored, or shared. In a travel-planning context, this matters because itinerary details, budgets, family-travel status, and contact information can be sensitive and may be exposed to external services or local persistence without informed consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation states there are no external dependencies while also advertising real-time weather and booking-link retrieval, which normally require networked services or external datasets. This inconsistency is risky because it obscures whether the skill reaches external systems, what data is sent out, and what third parties may receive user travel details.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The primary user-facing description is written only in Chinese, which implies a fixed language experience without offering a language choice or documenting a region-specific limitation. Under the language/locale policy, skills should not force a specific language unless the constraint is explicit and justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger list contains very broad, common travel-related phrases such as 'travel plan', 'travel planning', and '旅行计划', which are likely to match ordinary user requests rather than explicit invocation intent. This increases the chance of unsolicited skill activation, causing the skill to intercept benign conversations, collect user trip details unexpectedly, or override a user's intended general-assistant workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file contains user-facing strings entirely in Chinese, including the module description, prompts, status output, and a hard-coded Chinese user request. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes an intelligent travel itinerary planner that collects trip information and generates plans, budgets, recommendations, and related travel assistance. This file instead implements a local ZIP packaging utility that checks for project files and writes an archive, which is unrelated to travel planning functionality.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file presents its primary description, docstrings, and operational messaging in Chinese, signaling a language-specific experience without any opt-in or fallback. The policy allows locale constraints only when clearly documented and justified or when the user is given a choice, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The validation path raises user-facing error messages exclusively in Chinese, which can force a specific language on users regardless of their preferred locale. Because no language choice or region-specific justification is provided, this is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description promises budget accuracy within 20%, but the code uses fixed style multipliers and hardcoded template prices without any destination-specific market data, calibration, or error-bounding logic. This can mislead users into making financial decisions based on unsupported precision claims.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata advertises real-time weather and booking-link capabilities, but the implementation only returns static weather strings and canned app/advice data with no live lookup or booking URL generation. This is a trust and deception issue: users may rely on stale or fabricated travel guidance when making time-sensitive travel decisions.

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, instructions, outputs, and comments in this skill are effectively hard-coded to Chinese, and the file does not offer any language selection or indicate that the locale restriction is intentional. This can violate organizational language policy when a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest explicitly advertises real-time weather as an extension feature, which implies live or externally refreshed weather information. This implementation uses fixed mock data for Phuket, Tokyo, and a generic fallback, so the delivered behavior does not match the stated capability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The share-link feature creates an externally shareable URL for itinerary data without any consent flow, warning, access control description, expiry, or privacy notice. In a travel-planning context, itinerary data can contain sensitive travel dates, destinations, routines, and personal preferences, so silent or unclear sharing increases privacy and physical-security risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill description promises precise budget control with error kept within 20%, which is a concrete behavioral claim. The code merely creates a local expense tracker and summary; it does not estimate budgets, compare prediction error, or enforce any accuracy target.

Content

No source excerpt is available for this finding.