Back to skill

Security audit

Vin Query - 车架号VIN查询

Security checks for vulnerabilities and agentic risk

Overview

This skill performs a straightforward VIN lookup through TianAPI, with some credential-handling practices users should treat carefully.

Install only if you are comfortable sharing queried VINs with TianAPI. Prefer TIANAPI_VIN_KEY over passing the key on the command line, avoid copying full key-bearing URLs into logs or tickets, and protect or omit scripts/.env if you use it.

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/fetch_vin-query.py:78
Finding

API Credential Exposure Through Query Strings and Command-Line Arguments

Content
View full analysis
scripts/.env # Option 3: Pass it on every command invocation python3 scripts/fetch_vin-query.py --key yourAPIKey --vin LSVAX60E8K2018698 ``` `SKILL.md:58-63`: ```bash # Query VIN LSVAX60E8K2018698 GET https://apis.tianapi.com/chavin/index?key=YOUR_API_KEY&vincode=LSVAX60E8K2018698 ``` ### Technical Analysis The script inserts the TianAPI credential directly into the request URL as a query parameter. Although the endpoint uses HTTPS and therefore protects the URL during transport against ordinary passive network observers, complete URLs may still be recorded by the API provider, reverse proxies, debugging infrastructure, monitoring systems, exception telemetry, or application logs. The documentation also recommends supplying the API key using the `--key` command-line option. Command-line arguments can be retained in shell history and may be visible to local process-monitoring tools or other users where operating-system process visibility permits it. The direct API example likewise encourages users to place credentials in URLs that may be copied, logged, or retained in tooling history. Transmission of the VIN and an authentication credential to the declared ...[truncated 2074 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 27)May include surrounding context.

md
Env Config:
    export TIANAPI_VIN_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_VIN_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

md
Env Config:
    export TIANAPI_VIN_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_VIN_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_vin-query.py (reported line 14)May include surrounding context.

python
Env Config:
    export TIANAPI_VIN_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_VIN_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_vin-query.py (reported line 34)May include surrounding context.

python
Env Config:
    export TIANAPI_VIN_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_VIN_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_vin-query.py (reported line 39)May include surrounding context.

python
Env Config:
    export TIANAPI_VIN_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_VIN_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_vin-query.py (reported line 48)May include surrounding context.

python
Env Config:
    export TIANAPI_VIN_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_VIN_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_vin-query.py (reported line 49)May include surrounding context.

python
if env_val: return env_val
        
        # 2. .env 文件
        env_file = Path(__file__).parent / ".env"
        if env_file.exists():
            try:
                content = env_file.read_text(encoding="utf-8")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents use of environment variables, local files, and outbound network access but does not declare an explicit tool scope such as permissions or allowed-tools. That creates a transparency and policy gap: an agent or user may invoke capabilities broader than expected, increasing the chance of unintended secret access or external data transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation explains how to submit VINs and an API key to TianAPI but does not clearly warn that both the VIN and credentials are sent to a third-party service. VINs can be sensitive vehicle-identifying data, so failing to disclose this transmission undermines informed consent and can lead to privacy or compliance issues.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The example shows passing the API key directly on the command line, which can expose the secret through shell history, process listings, logs, and terminal recording tools. This is a common credential-handling weakness that can lead to unauthorized API use if the host is shared or monitored.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.