Back to skill

Security audit

maldives-island-picker

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Maldives travel assistant, but it asks agents to run an unpinned external CLI and automatically write reports, which warrants Review before installation.

Install only if you are comfortable with the agent running an unpinned npm CLI for travel product lookup and saving reports into the active workspace. Prefer pinning or pre-approving the CLI version, confirming before any file write, and using the PDF exporter only on trusted Markdown in a restricted environment.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:83
Finding

Unpinned Third-Party Package Is Downloaded and Executed Through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 83
Vulnerability Type: Unpinned dependency execution and software supply-chain exposure
Risk Level: Medium

Vulnerable Code

bash
npx @fly-ai/flyai-cli keyword-search --query "马尔代夫 {已验证的岛屿名} 酒店"

Technical Analysis

The Skill directs the Agent to execute @fly-ai/flyai-cli through npx without specifying a reviewed package version. No lockfile, package integrity hash, trusted registry configuration, or package-signature verification is present.

When the package is not already available locally, npx can retrieve it from the configured package registry and execute its installation hooks and command-line entry point. The effective code may therefore change after the Skill has been audited. Validating the island name protects against some shell metacharacter injection, but it does not protect against a compromised dependency, maintainer account, registry, or package release.

Attack Path

  1. An attacker compromises the package maintainer account, package registry resolution, or a subsequently published version of @fly-ai/flyai-cli.
  2. The compromised version includes malicious installation hooks or command-line code.
  3. A user invokes the island-product lookup workflow.
  4. The Agent executes the unversioned npx @fly-ai/flyai-cli command.
  5. npx downloads and runs the attacker-controlled package code with the privileges and environment of the Agent process.
  6. The malicious dependency can access files, environment variables, network resources, and other capabilities available to that process.

Impact Assessment

Successful exploitation provides arbitrary code execution under the operating-system account running the Agent. The attainable scope includes reading or modifying files accessible to that account, accessing inherited environment variables, making outbound network requests, and tampering with generated reports or other fi ...[truncated 293 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to an explicitly reviewed version, for example:
    bash
    npx --yes @fly-ai/flyai-cli@X.Y.Z keyword-search --query "..."
    
  2. Maintain a lockfile and verify the package tarball with a known integrity hash before execution.
  3. Configure an explicit trusted registry rather than relying on ambient npm configuration.
  4. Review the pinned package, its transitive dependencies, command-line entry point, and installation scripts.
  5. Disable dependency lifecycle scripts where compatible with the package:
    bash
    npm_config_ignore_scripts=true npx --yes @fly-ai/flyai-cli@X.Y.Z ...
    
  6. Run the CLI in a restricted container or sandbox with minimal filesystem access, no unnecessary credentials, and tightly limited network access.
  7. Prefer a documented HTTPS API with strict request and response validation over downloading executable package code at runtime.
  8. Define an approved-version update process so that package upgrades require review and integrity verification.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/export-pdf.py:38
Finding

Markdown-to-PDF Conversion Permits Unrestricted External and Local Resource Loading

Content
View full analysis

Vulnerability Details

File Location: scripts/export-pdf.py, lines 38-45 and line 116
Vulnerability Type: Unsafe rendering of untrusted Markdown and resource URLs
Risk Level: Medium

Vulnerable Code

python
with open(input_path, "r", encoding="utf-8") as f:
    markdown_content = f.read()

html_body = markdown.markdown(
    markdown_content,
    extensions=["tables", "fenced_code", "toc"]
)

The resulting HTML is later passed directly to WeasyPrint:

python
weasyprint.HTML(string=full_html).write_pdf(output_path)

Technical Analysis

The converter accepts an arbitrary Markdown file, converts it to HTML without sanitizing raw HTML or validating embedded resource URLs, and renders the result with WeasyPrint. Markdown image references, raw HTML, and CSS resource declarations can contain attacker-selected absolute URLs.

During PDF rendering, WeasyPrint may resolve supported remote or local resource schemes. Consequently, a crafted report can cause the renderer to make requests to attacker-controlled hosts, loopback services, private-network addresses, cloud metadata endpoints, or supported local-file locations. Local images or other supported resources may also be incorporated into the resulting PDF.

The risk is increased by the intended workflow because generated reports include image and booking URLs obtained from external search and product data. If an upstream source supplies a malicious URL and the value is inserted into the report without validation, exploitation can occur when the user exports that report.

Attack Path

  1. An attacker supplies a crafted Markdown report or influences an external product or search result used to generate one.
  2. The Markdown includes a malicious image, raw HTML, or CSS resource reference, such as a URL targeting an internal service or a supported local-file URI.
  3. The user runs scripts/export-pdf.py against the report.
  4. The script ...[truncated 1198 chars]
Remediation
View remediation

Remediation Suggestions

  1. Sanitize the generated HTML with a strict allowlist before passing it to WeasyPrint. Permit only the tags and attributes required by the report format.
  2. Remove raw HTML support from untrusted Markdown or escape raw HTML before conversion.
  3. Validate every image, link, CSS, and other resource URL before rendering.
  4. Allow only HTTPS resources from explicitly approved hosts. Reject file:, data:, ftp:, and other unnecessary schemes.
  5. Resolve hostnames and reject loopback, link-local, multicast, reserved, and private-network destinations for both IPv4 and IPv6.
  6. Revalidate every redirect destination to prevent an approved public URL from redirecting to an internal address.
  7. Configure a custom restrictive WeasyPrint url_fetcher that enforces the URL policy, response-size limits, content-type restrictions, connection timeouts, and redirect limits.
  8. Download approved images through a controlled fetch layer, validate their actual media type, and render only validated local copies from a dedicated temporary directory.
  9. Run PDF conversion in a sandbox with no access to sensitive files, cloud metadata services, internal networks, or unnecessary credentials.
  10. Add security tests covering local-file URIs, loopback URLs, private IPv4 and IPv6 addresses, link-local metadata addresses, redirects, oversized resources, and hostile raw HTML or CSS.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest presents the skill as a recommendation/reporting assistant, but the implementation expands into local file reads, CLI execution, booking-link generation, and file export behavior not clearly disclosed to the user. Description-behavior mismatches are dangerous because they hide operational risk behind a benign travel-assistant framing and can cause users or orchestrators to invoke the skill under false assumptions.

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: maldives-island-picker
description: 马尔代夫选岛助手,帮助用户根据旅行类型、个人诉求、交通偏好和预算,从各种攻略中筛选合适的马尔代夫岛屿,并生成结构化选岛报告。当用户提到"马尔代夫选岛"、"马代选岛"、"马尔代夫去哪个岛"、"马尔代夫推荐"、"马代推荐岛屿"、"马尔代夫亲子/蜜月/度假选岛"、"马尔代夫预算"等关键词时,请使用此 skill。即使用户只是笼统地说想去马尔代夫但不知道选哪个岛,也应该触发此 skill。英文关键词:Maldives island selection, Maldives resort recomm

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

SQP-3 applies to natural-language policy concerns in any file type, including markdown. The document forces a specific language/locale for the skill description and usage guidance, and there is no indication that users can opt into another language or that the Chinese-only presentation is intentionally limited to a specific region or audience.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill uses local file reads (references/...) and also creates files, but the manifest does not declare any explicit tool scope or allowed-tools boundaries. This weakens reviewability and can let the skill exercise more capability than users or the platform expect, increasing the chance of unintended file access or privilege creep.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger criteria are overly broad and instruct activation even when the user merely expresses generic interest in Maldives travel. Over-broad triggering increases the chance that the skill runs in contexts where its extra capabilities—web access, file reads, external CLI use, and file writes—were neither needed nor expected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The description and invocation guidance are written to operate in Chinese, including mandated trigger phrases and Chinese output expectations, while only briefly listing English keywords. There is no explicit user opt-in or documented justification that the skill is intended to be Chinese-only or region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill broadens from island filtering into booking-product retrieval and direct reservation-link generation, which is a material capability expansion from advisory content into transactional guidance. That shift can expose users to link-trust issues, affiliate-style abuse, or unintended commercial actions if not clearly disclosed and controlled.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs execution of an external CLI via npx for a task that could expose the environment to arbitrary third-party package code. Even though the functional goal is travel-product lookup, invoking an unpinned external tool from the skill meaningfully increases the attack surface beyond ordinary content retrieval.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

Running npx @fly-ai/flyai-cli without a pinned version introduces a supply-chain risk: a future or compromised package release could execute attacker-controlled code at runtime. The built-in input validation for island names does not mitigate malicious behavior inside the fetched package itself.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Defaulting to create_file in the current working directory without an explicit confirmation at the moment of action is an unsafe side effect. In agent environments, implicit writes can clobber files, create persistence artifacts, or place generated content into sensitive repositories or workspaces.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The eval prompts and expected behavior define very broad trigger conditions around general Maldives travel queries without clear exclusion boundaries, which can cause over-invocation of the skill on ambiguous requests. In an agent setting, overly broad activation increases the chance of unintended web/search actions and irrelevant data collection, especially when the user has not explicitly asked for island-selection assistance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The evals require Chinese-language interaction and Chinese-platform sourcing behavior as the default, but there is no documented check for the user's preferred language or consent to use locale-specific sources. This can lead to mismatched language output, reduced accessibility, and potentially inappropriate routing to region-specific content that the user did not request.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file explicitly instructs the system to load this reference when user information is incomplete or when the user says vague phrases like '随便推荐', and the surrounding skill metadata also encourages triggering on broad Maldives-related queries. This can cause the skill to activate without clear user intent for structured island-selection assistance, increasing the chance of unintended invocation and irrelevant or intrusive follow-up questioning.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file title and instruction require the report to be produced in Chinese (e.g., '选岛报告模板' and '严格按照以下模板输出') with no indication that users may choose another language. This is a natural-language locale policy issue because it forces a specific language without opt-in or stated regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring and all user-facing CLI messages are only in Chinese, and the generated HTML explicitly sets lang="zh-CN". This imposes a specific language/locale on all users without offering a choice or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script converts arbitrary Markdown into HTML and then renders it with WeasyPrint, which can process embedded HTML, images, and linked resources during PDF generation. If untrusted Markdown is supplied, this can trigger outbound network requests or local file inclusion attempts through HTML tags and resource URLs, which is unnecessary for a Maldives recommendation skill and expands the attack surface.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README states that generated reports are automatically saved to a local file, but it does not clearly warn users before describing that write behavior. Silent or unexpected file creation can violate user expectations, expose sensitive travel preferences in local storage, and create privacy or workspace hygiene issues in shared environments.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill writes a report file to the current working directory by default, but that side effect is not disclosed in the manifest description. Undisclosed file creation can overwrite user files, leak generated content into sensitive directories, or surprise orchestrators that expected a read-only travel-assistant workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The README is entirely written in Chinese and explicitly highlights Chinese typography optimization, which suggests the skill is oriented toward a single language/locale. Under the policy rules, a forced language or locale without user opt-in can be a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.