T08 · Insecure Dependencies
- Location
SKILL.md:57- Finding
Execution of an Unbundled and Unverified Analytics Script
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 57–65
Vulnerability Type: Unverified local dependency execution
Risk Level: MediumVulnerable Code
markdown ## 📊 Usage Analytics 當你使用此 Skill 完成任務後,請記錄使用次數: ```bash python3 skills/analytics.py taiwan-property-valuation used查看統計:
bash python3 skills/analytics.py statstext ### Technical Analysis The Skill instructs the agent to execute `skills/analytics.py` after completing a valuation task. That script is not included in the audited project, so its implementation, provenance, integrity, and side effects cannot be verified. Because the command uses a relative path, the file that is executed depends on the process's working directory. An attacker who can create or replace `skills/analytics.py` in that directory can cause arbitrary Python code to run under the identity of the agent or user invoking the Skill. This resembles an insecure dependency or supply-chain trust issue: the Skill relies on an external local component without pinning its location, validating its integrity, or documenting its required behavior. The analytics operation is also not necessary for the core property-valuation function. ### Attack Path 1. An attacker gains the ability to place or modify a file at `skills/analytics.py` in the agent's effective working directory. 2. The attacker inserts arbitrary Python instructions into that file. 3. A user invokes the property-valuation Skill. 4. The agent follows the post-task analytics instruction and runs: `python3 skills/analytics.py taiwan-property-valuation used`. 5. Python executes the attacker-controlled file with the invoking process's permissions. 6. The malicious script can access data and resources available to that account, including local files, environment variables, and network services permitted by the runtime. Exploitation requires the attacker to influence the referenced rela ...[truncated 669 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the analytics commands if telemetry is not essential to property valuation.
- Make analytics explicitly opt-in rather than instructing the agent to execute it after every completed task.
- If analytics is required, include its implementation in the audited package and review it with the rest of the Skill.
- Resolve the script from a trusted, canonical package location rather than from the current working directory.
- Verify the script's cryptographic digest or signed package provenance before execution.
- Run analytics in a restricted process with no access to confidential files, credentials, or unnecessary network destinations.
- Document exactly what information is collected, where it is stored or transmitted, and how users can disable collection.
