Back to skill

Security audit

VIN查车辆信息(精准版) - 聚合数据

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims: it looks up vehicle details by sending a VIN to Juhe's VIN API using the user's Juhe API key.

Before installing, understand that each lookup sends the VIN and your Juhe API key to Juhe. Prefer the JUHE_VIN_CAR_DETAIL_KEY environment variable or a protected .env file, and avoid putting the API key directly in command-line arguments.

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
scripts/vin_info.py:179
Finding
API Key Exposure Through Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `scripts/vin_info.py:9-13, 179-181, 225-229`; `SKILL.md:36-37` **Vulnerability Type**: Sensitive credential exposure through process arguments and shell history **Risk Level**: Medium ### Complete Code Snippets `scripts/vin_info.py:9-13`: ```python API Key 配置(任选其一,优先级从高到低): 1. 命令行参数:python vin_info.py --key your_api_key --vin LBV21AF05MSZ88595 2. 环境变量:export JUHE_VIN_CAR_DETAIL_KEY=your_api_key 3. 脚本同目录的 .env 文件:JUHE_VIN_CAR_DETAIL_KEY=your_api_key ``` `scripts/vin_info.py:179-181`: ```python if args[i] == "--key" and i + 1 < len(args): cli_key = args[i + 1] i += 2 ``` `scripts/vin_info.py:225-229`: ```python print("❌ 未找到 API Key,请通过以下方式之一配置:") print(" 1. 环境变量:export JUHE_VIN_CAR_DETAIL_KEY=your_api_key") print(" 2. .env 文件:在脚本目录创建 .env,写入 JUHE_VIN_CAR_DETAIL_KEY=your_api_key") print(" 3. 命令行参数:python vin_info.py --key your_api_key --vin LBV21AF05MSZ88595") print(f"\n申请 Key: {REGISTER_URL}") ``` `SKILL.md:36-37`: ```bash # 方式三:每次命令行传入 python scripts/vin_info.py --key 你的 AppKey --vin LBV21AF05MSZ88595 ``` ### Technical Analysis The script accepts the Juhe API key through the `--key` command-line argument, and the documentation explicitly recommends this as a supported configuration method. Command-line secrets can be exposed through: - Shell history files. - Process argument inspection while the command is running. - Process-monitoring and endpoint telemetry. - Debug logs generated by wrappers, schedulers, or automation systems. - Command transcripts and CI/CD job logs. Although the script also supports an environment variable and a local `.env` file, the command-line method creates unnecessary credential exposure and is not the least-risk configuration mechanism. The separate transmission of the API key and VIN to `https://apis.juhe.cn/carinfo/vinInfo` is consistent with the declared VIN lookup functionality. The reviewed code uses HTTPS and does not transmit these val ...[truncated 1644 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove support for the `--key` command-line argument so credentials cannot be placed in process arguments. 2. Remove all command-line key examples from `SKILL.md`, the module documentation, help output, and error messages. 3. Prefer the existing `JUHE_VIN_CAR_DETAIL_KEY` environment variable for noninteractive execution. 4. For interactive use, accept the credential through `getpass.getpass()` so it is not echoed or retained in shell history. 5. If `.env` support is retained: - Require or recommend restrictive permissions such as `0600`. - Ensure `.env` is excluded from version control. - Reject symlinks or unexpectedly permissive files where practical. 6. Avoid logging command lines, environment values, request bodies, or complete request URLs containing the key. 7. Rotate any API key previously supplied through command-line arguments if shell history, telemetry, or build logs may have retained it. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill instructs sending a VIN to juhe.cn but does not clearly warn users that the VIN will be transmitted to a third-party service. A VIN can be sensitive in context because it can be tied to a specific vehicle, ownership records, or other personal/business data, so silent transmission creates a privacy and consent risk.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
The script sends both the VIN and API key to a third-party external service, and VINs can be sensitive in some contexts because they identify a specific vehicle and may be linked to ownership, fleet, or insurance records. While the transmission uses HTTPS, the code provides no explicit privacy disclosure, consent step, or minimization guidance before exfiltrating user-supplied data to juhe.cn.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/vin_info.py:14