T09 · Insecure Skill Coding Practices
- Location
scripts/vehicle-query.sh:113- Finding
Remote API timestamp is evaluated as a Bash arithmetic expression
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This vehicle lookup skill appears purpose-aligned, but it stores sensitive vehicle tokens and location history locally without enough protection or user control.
Review before installing. Use this only if you trust the publisher and the vehicle API, avoid running it with elevated privileges, and assume the local cache/history files may contain sensitive tokens and precise vehicle locations. On shared or managed machines, do not use it unless storage permissions, deletion controls, and timestamp/input validation are hardened.
scripts/vehicle-query.sh:113Remote API timestamp is evaluated as a Bash arithmetic expression
scripts/vehicle-query.sh:404Predictable shared temporary file enables symlink and race attacks
scripts/vehicle-query.sh:183Sensitive credentials and vehicle history are written without enforced restrictive permissions
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
echo "$history" | jq --argjson new "$new_record" '. + [$new] | .[-10:]' > "${TMP_DIR}/history_tmp.json"
jq -n --slurpfile queries "${TMP_DIR}/history_tmp.json" '{queries: $queries[0]}' > "$HISTORY_FILE"
rm -f "${TMP_DIR}/history_tmp.json"
}
# ==================== 主函数 ====================
The README instructs users to provide authentication material and states that it is automatically cached for later use, but it does not warn that sensitive tokens will be stored locally or describe any protections such as restricted file permissions, encryption, or token expiration. If the host is shared, compromised, or backed up insecurely, cached tokens could be recovered and used to access vehicle location and status data.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo apt-get install curl jq
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo apt-get install curl jq
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo apt-get install curl jq
The skill documentation instructs the agent or user to execute shell scripts, but the manifest shown in this file does not declare any tool restrictions or allowed shell capability scope. This creates a governance gap: an agent may invoke shell unexpectedly without explicit permission boundaries, making misuse or overbroad execution harder to control or audit.
The skill tells users that authentication tokens will be automatically cached locally, but it does not warn that these are sensitive credentials or describe the security properties of the cache file. Storing vehicle-related access tokens in a predictable plaintext local file can expose account access and vehicle telemetry to other local users, malware, backups, or logs if file permissions are weak.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| 系统 | 依赖安装 |
|------|----------|
| Linux (Ubuntu/Debian) | `sudo apt-get install curl jq` |
| Linux (CentOS/RHEL) | `sudo yum install curl jq` |
| macOS | `brew install curl jq` |
| Windows (Git Bash) | 已包含 |
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| 系统 | 依赖安装 |
|------|----------|
| Linux (Ubuntu/Debian) | `sudo apt-get install curl jq` |
| Linux (CentOS/RHEL) | `sudo yum install curl jq` |
| macOS | `brew install curl jq` |
| Windows (Git Bash) | 已包含 |
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| 系统 | 依赖安装 |
|------|----------|
| Linux (Ubuntu/Debian) | `sudo apt-get install curl jq` |
| Linux (CentOS/RHEL) | `sudo yum install curl jq` |
| macOS | `brew install curl jq` |
| Windows (Git Bash) | 已包含 |
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| 系统 | 依赖安装 |
|------|----------|
| Linux (Ubuntu/Debian) | `sudo apt-get install curl jq` |
| Linux (CentOS/RHEL) | `sudo yum install curl jq` |
| macOS | `brew install curl jq` |
| Windows (Git Bash) | 已包含 |
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| 系统 | 依赖安装 |
|------|----------|
| Linux (Ubuntu/Debian) | `sudo apt-get install curl jq` |
| Linux (CentOS/RHEL) | `sudo yum install curl jq` |
| macOS | `brew install curl jq` |
| Windows (Git Bash) | 已包含 |
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| 系统 | 依赖安装 |
|------|----------|
| Linux (Ubuntu/Debian) | `sudo apt-get install curl jq` |
| Linux (CentOS/RHEL) | `sudo yum install curl jq` |
| macOS | `brew install curl jq` |
| Windows (Git Bash) | 已包含 |
The script persists sensitive authentication material (accessToken and vehicleToken) to a local cache file in the user's home directory. For a vehicle lookup skill, storing long-lived tokens expands exposure beyond the immediate query and creates a local secret-at-rest risk if the workstation is shared, backed up, or compromised.
Authentication tokens are cached locally without any warning, consent flow, or protection measures visible in the script. Users may unknowingly leave valid vehicle-access credentials on disk, allowing later misuse by other local users, malware, or forensic recovery.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
local response
while [ $retry -lt $MAX_RETRIES ]; do
response=$(curl -s -X POST "${API_BASE_URL}/iot/v1/condition" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-d "{\"vehicleToken\": \"${vehicleToken}\"}" \
The script writes historical query data including vehicle address and timestamp to a local history file, which creates a location-tracking record over time. In the context of a car-location skill, retaining past addresses materially increases privacy and stalking risk compared with a one-time read-only lookup.
The script stores vehicle location history locally without notifying the user that precise address data is being retained. Because the skill's purpose is to reveal where the user's car is, silent retention of historical locations increases the sensitivity of the data and the harm from local compromise.
The README instructions and examples are entirely in Chinese, which can amount to a language policy issue when the skill implicitly forces one language without user opt-in or explanation. There is no indication that the skill is region-specific or that alternative language support is intentionally limited.
All user-facing comments, prompts, status messages, and output are in Chinese, with no indication that the user can choose another language or locale. This can violate a language/locale policy when a skill is not explicitly documented as region-specific.