Back to skill

Security audit

IP Geo Location - IP归属地查询

Security checks for vulnerabilities and agentic risk

Overview

This IP lookup skill does what it says, but it should be reviewed because it sends the Juhe API key and queried IP addresses over plaintext HTTP.

Install only if you are comfortable sending queried public IP addresses to Juhe. Before using it with a real API key, change the script endpoint to HTTPS and avoid passing the key on the command line; prefer an environment variable or a protected local config file.

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

Error
Location
scripts/ip_lookup.py:26
Finding

API Key and Queried IP Addresses Transmitted over Plaintext HTTP

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
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
API Key 配置(任选其一,优先级从高到低):
    1. 环境变量: export JUHE_IP_KEY=your_api_key
    2. 脚本同目录的 .env 文件: JUHE_IP_KEY=your_api_key
    3. 直接传参: python ip_lookup.py --key your_api_key <IP>

免费申请 API Key: https://www.juhe.cn/docs/api/id/1

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
API Key 配置(任选其一,优先级从高到低):
    1. 环境变量: export JUHE_IP_KEY=your_api_key
    2. 脚本同目录的 .env 文件: JUHE_IP_KEY=your_api_key
    3. 直接传参: python ip_lookup.py --key your_api_key <IP>

免费申请 API Key: https://www.juhe.cn/docs/api/id/1

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/ip_lookup.py (reported line 13)May include surrounding context.

python
API Key 配置(任选其一,优先级从高到低):
    1. 环境变量: export JUHE_IP_KEY=your_api_key
    2. 脚本同目录的 .env 文件: JUHE_IP_KEY=your_api_key
    3. 直接传参: python ip_lookup.py --key your_api_key <IP>

免费申请 API Key: https://www.juhe.cn/docs/api/id/1

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/ip_lookup.py (reported line 222)May include surrounding context.

python
API Key 配置(任选其一,优先级从高到低):
    1. 环境变量: export JUHE_IP_KEY=your_api_key
    2. 脚本同目录的 .env 文件: JUHE_IP_KEY=your_api_key
    3. 直接传参: python ip_lookup.py --key your_api_key <IP>

免费申请 API Key: https://www.juhe.cn/docs/api/id/1

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/ip_lookup.py (reported line 62)May include surrounding context.

python
if env_key:
        return env_key

    env_file = Path(__file__).parent / ".env"
    if env_file.exists():
        for line in env_file.read_text(encoding="utf-8").splitlines():
            line = line.strip()

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises capabilities that involve environment-variable access, file reading, and outbound network use, but it does not declare an explicit tool scope or permissions boundary. That omission increases the risk of over-broad execution or accidental access to sensitive resources because operators and runtime policy engines cannot clearly constrain what the skill is allowed to do.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description uses broad, everyday trigger phrases like '查一下这个IP' and '帮我查IP归属地', which can cause the skill to activate in loosely related conversations. Over-broad invocation is dangerous because it may send user-supplied data to an external service when the user did not intend to invoke this specific integration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly states that provided IP addresses will be queried through a third-party API, but it does not warn users that their input will leave the local environment and be disclosed to juhe.cn. IP addresses can be sensitive in some contexts, so silent third-party transmission creates a privacy and data-handling 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 sends user-supplied IP addresses and the API key to a third-party service over the network without clearly warning the user at execution time that this data will leave the local environment. In this case the risk is amplified because the endpoint uses plain HTTP, so the API key and queried IPs can be exposed to interception or tampering in transit.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language instructions, usage, and error/help text are written in Chinese only, which effectively forces a specific language for users. The file does not indicate that Chinese is optional, selectable, or justified as a region-specific constraint.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.