T09 · Insecure Skill Coding Practices
- Location
scripts/ip_lookup.py:26- Finding
API Key and Queried IP Addresses Transmitted over Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
scripts/ip_lookup.py:26API Key and Queried IP Addresses Transmitted over Plaintext HTTP
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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()
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.
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.
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.
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.
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.
No suspicious patterns detected.