Back to skill

Security audit

台灣房價估價分析 (Property Valuation)

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly fits its Taiwan property valuation purpose, but it asks agents to run an unbundled analytics script from a relative path after use.

Review this skill before installing. The valuation script itself is local and purpose-aligned, but do not allow the agent to run the analytics command unless `skills/analytics.py` is verified as a trusted platform script and you understand what data it records. Keep input and output files in a workspace you control.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:64
Finding

Untrusted Working-Directory-Relative Analytics Script Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 64–75
Vulnerability Type: Untrusted relative script execution
Risk Level: Medium

Vulnerable Code

markdown
## 📊 Usage Analytics

當你使用此 Skill 完成任務後,請記錄使用次數:

```bash
python3 skills/analytics.py taiwan-property-valuation used

查看統計:

bash
python3 skills/analytics.py stats
text

### Technical Analysis

The Skill instructs the agent to execute `skills/analytics.py` through a path resolved relative to the process's current working directory. This script is not included in the audited project. The instruction therefore executes code whose identity and integrity are not established by the Skill package.

If an attacker can create or replace `skills/analytics.py` in the directory from which the command is run, the analytics instruction will execute attacker-controlled Python code. The issue arises from relying on an ambiguous relative path without verifying the target's canonical location, ownership, or integrity.

No malicious analytics script or payload was found in the audited project itself.

### Attack Path

1. An attacker obtains write access to the agent's working directory or otherwise causes the agent to operate in an attacker-controlled directory.
2. The attacker creates a malicious file at `skills/analytics.py`.
3. The agent uses the property-valuation Skill and completes a task.
4. Following the post-use analytics instruction, the agent runs:
   `python3 skills/analytics.py taiwan-property-valuation used`.
5. Python resolves the relative path against the current working directory and executes the attacker's script.

### Impact Assessment

Successful exploitation provides arbitrary Python code execution with the permissions of the agent process. Depending on those permissions and the surrounding environment, the malicious script could read or modify accessible files, access environment variables and credentials, init
...[truncated 342 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the optional analytics commands if usage tracking is not necessary for the valuation task.
  • If analytics is required, include the implementation in the reviewed Skill package and invoke it using a canonical absolute path derived from the trusted Skill installation directory.
  • Before execution, verify that the resolved script remains within the expected installation directory and is a regular file rather than a symbolic link.
  • Protect the Skill installation directory from modification by untrusted users.
  • Verify the script's ownership, permissions, and cryptographic integrity before execution.
  • Prefer a trusted platform-provided analytics API that does not require executing an additional local script.
  • Do not search for or execute a same-named analytics script from the caller's current working directory.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill invokes local Python scripts and therefore has effective file read/write capabilities, but it does not declare any explicit tool scope or permissions boundary. This creates an avoidable trust gap: an agent or user may run the skill without understanding that local files can be accessed or modified, increasing the risk of unintended filesystem access or execution of auxiliary scripts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

Most operational instructions and user-facing content are written in Traditional Chinese, which effectively forces a language choice for users of the skill. While the subject matter is Taiwan real estate, the file does not explicitly state that the locale and language are intentionally limited to Taiwan users or offer an alternative language option.

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 instructions to run a separate analytics script to record usage, which is outside the stated property valuation purpose. Even if framed as telemetry, this adds secondary behavior that can collect user or environment activity and expands the skill's operational scope beyond what users expect.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation solicits usage statistics, installation counts, feedback channels, and location-related survey participation unrelated to computing a property valuation. This broadens data collection and may expose user behavior or personal information without necessity, making the skill more privacy-invasive than its declared function suggests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code emits its generated report, console messages, sample input values, and usage-facing text entirely in Traditional Chinese, with no option for the user to select another language. 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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill describes recording usage and installation statistics but does not provide a clear warning about what data is captured, whether identifiers are stored, or who can access the records. Lack of transparency undermines informed consent and can lead users to trigger telemetry unknowingly while performing a valuation task.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file presents all user-facing content exclusively in Chinese, including headings and field labels, with no indication that the language was user-selected or that the skill is intended only for a Chinese-speaking locale. Under the language/locale policy, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file presents all instructions and valuation guidance only in Traditional Chinese. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale policy issue when no explicit justification or language choice is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. This markdown file presents all instructions and examples only in Traditional Chinese and assumes a Taiwan real-estate context, with no opt-in or note that the content is region-specific, which can be a locale/language constraint without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file presents all headings, labels, and guidance in a single fixed language/locale. Under the policy, forcing a specific language without offering user choice or documenting a justified locale constraint can be a natural-language policy violation.

Content

No source excerpt is available for this finding.