Back to skill

Security audit

天气查询免费版

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a weather helper, but it over-broadly triggers on unrelated data-analysis tasks and includes unsafe local cache-writing guidance.

Install only if you are comfortable with a weather skill that calls third-party weather APIs. Keep it limited to weather requests, prefer explicit HTTPS URLs, ask before sending precise locations, and do not use the cache example unless locations are sanitized or hashed and writes are confined to the cache directory.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:152
Finding

Weather API Requests Use Plaintext HTTP

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:336
Finding

User-Controlled Location Allows Cache Path Traversal

Content
View full analysis
Remediation
View remediation
Path: key = hashlib.sha256(location.encode("utf-8")).hexdigest() candidate = (CACHE_DIR / f"{key}.json").resolve() if candidate.parent != CACHE_DIR: raise ValueError("Invalid cache path") return candidate ``` - If readable filenames are required, enforce a strict allowlist for accepted characters and reject `/`, `\`, `..`, control characters, and absolute paths. - Resolve the destination and verify that it remains inside `CACHE_DIR` before every read or write. - Protect against symbolic-link attacks by using secure file-opening primitives that reject symlinks where supported. - Write to a securely created temporary file inside the cache directory and atomically replace the final cache file. - Apply restrictive directory and file permissions appropriate to the operating system. ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:410
Finding

Python Dependency Is Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
--hash=sha256: ``` - Install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` - Require an explicitly trusted HTTPS package index and review any configured mirrors. - Prefer an isolated virtual environment with minimal filesystem and network privileges. - Regularly scan and update the pinned dependency through a controlled review process. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger condition is overly broad and unrelated to a weather-only skill, stating it should be used for data analysis, report generation, statistical insights, and visualization. In an agent environment, this can cause the skill to be selected outside its intended scope, leading to unnecessary use of exec/networked behavior and disclosure of user-supplied data to external services under false pretenses.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The examples hardcode Chinese locale via 'lang=zh', and the configuration sets the default language to 'zh' without offering a user choice. This imposes a specific language/locale policy rather than making language selection explicit or optional.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill performs external network calls to third-party weather services and encourages passing user-provided locations, but it does not clearly warn users that their query data will be transmitted off-platform. In an agent context, even seemingly low-sensitivity data like location, language, and timing can be privacy-relevant, and silent transmission violates user expectations and informed consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

L271 的注释和周边文档表明此函数会根据空气质量生成合理建议,但代码先判断 aqi > 100,随后才判断更严格的 aqi > 150。由于 aqi > 150 已被前一个条件覆盖,所谓“空气污染严重”的建议永远不会出现,和注释表达的分级意图相矛盾。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.