Back to skill

Security audit

Icp Query - 网站备案查询

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to do what it says, but users should handle the TianAPI key carefully because some examples can expose it in command history or logs.

Install only if you are comfortable giving the skill a TianAPI API key and allowing HTTPS requests to TianAPI. Prefer setting TIANAPI_ICP_KEY as an environment variable, avoid putting the key directly in commands or shared URLs, protect any scripts/.env file with restrictive permissions, and rotate the key if it may have been logged or committed.

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_icp-query.py:73
Finding

API Credential Exposure Through URL Query Parameters and Command-Line Arguments

Content
View full analysis
scripts/.env python3 scripts/fetch_icp-query.py 你的APIKey www.baidu.com ``` ```bash python3 scripts/fetch_icp-query.py ``` ```http GET https://apis.tianapi.com/icp/index?key=YOUR_API_KEY&domain=www.baidu.com ``` ### Technical Analysis The script sends the TianAPI credential as the `key` URL query parameter. The request uses HTTPS, so the key is encrypted while traversing the network. However, TLS does not prevent the complete URL from being captured by components that terminate or observe the request locally or at the service boundary, including application logs, reverse proxies, API gateways, monitoring systems, browser or diagnostic history, and exception telemetry. The network transmission itself is necessary for the declared ICP-query functionality and is limited to the documented TianAPI endpoint. The security issue is the credential placement rather than the existence of the request. The documentation additionally encourages passing the key as a command-line argument. Command-line secrets can be retained in shell history and may be visible to local process-inspection facilities while the command is running. The suggested `.env` creation com ...[truncated 1625 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 (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_ICP_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_ICP_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_ICP_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_ICP_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_icp-query.py (reported line 14)May include surrounding context.

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

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

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

python
Env Config:
    export TIANAPI_ICP_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_ICP_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_icp-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
94% confidence
Finding

The skill documentation indicates the use of environment variables, local files (.env), and outbound network access, but it does not declare any explicit tool scope or permissions. This can cause the runtime or user to grant broader capabilities than necessary without clear review boundaries, increasing the risk of unintended secret access or network use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Passing an API key as a command-line argument exposes the secret to shell history, process listings, logs, and debugging tools on the host system. Anyone with local access or log visibility may recover the credential and abuse the paid API account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

Embedding the API key in a URL query string can leak the credential through browser history, proxy logs, server logs, analytics systems, and referrer headers. Once exposed, the key can be reused by third parties to consume quota or access the API under the victim's account.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code file includes natural-language instructions and help text primarily in Chinese, which can impose a language preference on users without opt-in. The stated policy covers language or locale constraints across all file types, and no alternative language option or justification is provided here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.