Back to skill

Security audit

Tianapi Kuaidi - 快递物流查询

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward parcel-tracking skill, but users should avoid passing the API key on the command line and understand shipment details are sent to TianAPI.

Install only if you are comfortable sending parcel tracking numbers, carrier identifiers, and sometimes phone-number suffixes to TianAPI. Use a dedicated, quota-limited TianAPI key where possible, prefer TIANAPI_KUAIDI_KEY over the --key command-line option, protect any scripts/.env file, and rotate the key if it was pasted into shell history or logs.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_kuaidi.py:110
Finding

API Key Exposure Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_kuaidi.py:70
Finding

API Key and Shipment Data Transmitted in a URL Query String

Content
View full analysis
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 (11)

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_KUAIDI_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_KUAIDI_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_KUAIDI_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_KUAIDI_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_kuaidi.py (reported line 20)May include surrounding context.

python
Env Config:
    export TIANAPI_KUAIDI_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_KUAIDI_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_kuaidi.py (reported line 40)May include surrounding context.

python
Env Config:
    export TIANAPI_KUAIDI_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_KUAIDI_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_kuaidi.py (reported line 45)May include surrounding context.

python
Env Config:
    export TIANAPI_KUAIDI_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_KUAIDI_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_kuaidi.py (reported line 54)May include surrounding context.

python
Env Config:
    export TIANAPI_KUAIDI_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_KUAIDI_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_kuaidi.py (reported line 55)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
93% confidence
Finding

The skill invokes a Python script that reads environment variables/files and makes outbound API calls, but it does not declare an explicit tool or permission scope. This weakens the trust boundary for users and hosts because the skill's effective capabilities are broader than what its manifest communicates.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends tracking numbers and, for some carriers, the last four digits of a phone number to TianAPI, but the description does not clearly warn users that this data is transmitted to a third-party service. Tracking and phone suffix data can be sensitive personal or operational information, so lack of disclosure creates a privacy and consent risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script places the API key, tracking number, and optional phone suffix directly into the URL query string of a GET request. Even over HTTPS, query strings are commonly exposed in logs, browser/history tooling, proxies, monitoring systems, and upstream infrastructure, which increases the chance of credential and shipment-data leakage.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language instructions and help text are entirely in Chinese, which can impose a fixed language choice on users. The file does not offer an opt-in language selection or explain that the skill is intentionally limited to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.