Back to skill

Security audit

天气

Security checks for vulnerabilities and agentic risk

Overview

This weather skill is not clearly malicious, but it asks for broad read, write, and command execution authority that does not fit a weather lookup skill.

Install only if you are comfortable granting this skill broad agent capabilities despite its weather-facing purpose. Prefer a version that removes read/write/exec permissions, limits network access to named weather services, and resolves the API key contradiction before use.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:21
Finding

Excessive Tool Permissions for a Weather Skill

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:21-24
Vulnerability Type: Excessive tool scope and violation of least privilege
Risk Level: Medium

Vulnerable Code

yaml
tools:
- read
- exec
- write

Technical Analysis

The skill declares unrestricted file-reading, file-writing, and command-execution tools even though its stated purpose is to retrieve weather information. A weather lookup should only require narrowly scoped network access to an approved weather service.

The document does not define command allowlists, filesystem path restrictions, trusted weather endpoints, argument validation, or enforceable sandbox controls. Although later text claims that commands execute in a safe sandbox, no implementation or configuration is present to enforce that claim.

Consequently, an Agent loading this skill may grant capabilities unrelated to its legitimate purpose. The issue is a least-privilege violation rather than evidence of an embedded malicious payload: the audited project contains only SKILL.md and no executable scripts.

Attack Path

  1. An Agent loads the weather skill and grants the declared read, write, and exec tools.
  2. The skill accepts a user-provided instruction as its primary input.
  3. A malicious or manipulated instruction requests an operation unrelated to weather, such as reading a local file, modifying a writable file, or executing a system command.
  4. Because the skill defines no enforceable command allowlist, path restriction, or operation-level authorization check, the Agent may invoke the excessive tools.
  5. The operation executes with the permissions already available to the Agent process.

This path is conditional on the host Agent granting and honoring the declared tools. The file does not itself contain commands that actively exploit these permissions.

Impact Assessment

Successful abuse could provide access to the capabilities of the hosting Agent process, including:

  • Reading files acce ...[truncated 514 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove read, write, and exec from the declared tool list because they are not required for weather retrieval.
  2. Replace them with a narrowly scoped HTTPS request tool restricted to explicitly approved weather-service domains.
  3. Permit only required HTTP methods and reject redirects to unapproved hosts.
  4. Validate location, date, language, and forecast-range parameters against strict schemas before making requests.
  5. Prevent user input from being interpreted as a command, file path, URL, shell fragment, or additional Agent instruction.
  6. If command execution is genuinely required, document the exact commands and arguments, enforce an immutable allowlist, avoid shell invocation, and run the operation in a restricted sandbox with minimal filesystem and network access.
  7. If file access is genuinely required, constrain it to a dedicated application directory and prohibit traversal, absolute paths, symbolic-link escapes, and access to credentials or configuration files.
  8. Add explicit authorization checks before sensitive tool calls and require user confirmation for operations outside weather retrieval.
  9. Align the documentation with the actual implementation, including resolving the contradictory statements about whether an API key is required.
  10. Add security tests verifying that weather prompts cannot trigger local file access, file modification, or arbitrary command execution.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Invocation guidance is overly broad and inconsistent with the weather domain, including generic efficiency, automation, design, and decision-support scenarios. In a skill that advertises exec, read, and write capabilities, unclear activation scope is dangerous because the agent may select and run it for unrelated tasks, exposing broader tool permissions than necessary.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest presents this as a weather skill, but the embedded description includes unrelated design, branding, productivity, and workflow-automation use cases. This scope confusion can cause the agent to invoke a tool-enabled skill in contexts unrelated to weather, increasing the chance of unnecessary command execution, file access, or other side effects.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The 'typical scenarios' section is generic and procedural rather than weather-specific, describing generic data processing and status-query patterns. This broadens the interpreted purpose of the skill and can lead to unintended activation in non-weather contexts where its enabled tools may have unnecessary side effects.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill documentation gives conflicting statements about whether an API key is required: earlier sections claim 'no API key required', while later sections instruct users to export API_KEY and say the skill cannot be used without one. This inconsistency can mislead the agent or user into unsafe credential handling, unnecessary secret requests, or incorrect trust in the skill’s operating model.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The FAQ says '目前「天气」技能支持中文查询', which imposes a language restriction in natural-language documentation. There is no opt-in, alternative language option, or documented regional justification, so this conflicts with the policy against forcing a specific language without user choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill advertises file handling, API integration, information retrieval, and command execution, but does not provide clear, user-facing guardrails about when these actions occur or what side effects they may produce. Because the skill metadata also enables read, write, and exec tools, vague operational descriptions can normalize privileged actions without informed user consent.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.