T05 · Unauthorized Access and Privilege Escalation
- Location
compress_and_analyze_palm.py:101- Finding
Unnecessary Access to an Unrelated DeepSeek Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s main purpose is coherent, but it should be reviewed because it keeps sensitive image/report files in predictable temporary locations and exposes credential prefixes during its security check.
Review before installing. Use only limited-scope API keys, avoid private or identifying images unless you accept third-party processing, do not run the security checker in shared or logged terminals, and manually delete /tmp/tianji_fengshui, /tmp/tianji_fengshui_public, and /tmp/tianji_fengshui_reports after use. Treat fortune, health, and personal-profile outputs as entertainment or cultural reference, not medical, financial, or life-decision advice.
compress_and_analyze_palm.py:101Unnecessary Access to an Unrelated DeepSeek Credential
security_check_fixed.py:97API Key Prefixes Disclosed Through Console Output
compress_and_analyze_palm.py:65Sensitive Biometric Images and Reports Persist in Predictable Temporary Paths
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
print("📡 调用豆包视觉模型进行分析...")
start_time = time.time()
response = requests.post(url, headers=headers, json=payload, timeout=120)
response_time = time.time() - start_time
if response.status_code == 200:
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
on3 compress_and_analyze_palm.py /path/to/image.jpg --max-dimension 512
ping ark.cn-beijing.volces.com
python3 -c " from PIL import Image img = Image.new('RGB', (100, 100), color='red') img.save('/tmp/test_small.jpg', 'JPEG') print('测试图片已创建') "
## 📈 最佳实践
### 1. 配置管理
```bash
# 使用环境变量管理密钥
echo 'export DOUBAO_API_KEY="your_key"' >> ~/.bashrc
source ~/.bashrc
# 或使用OpenClaw配置文件
openclaw configure --section env --set DOUBAO_API_KEY=your_key
# 确保图片清晰
# 掌纹分析:手掌完全展开,光线充足
# 面相分析:正面清晰,无遮挡
# 风水分析:全景拍摄,包含所有元素
# 使用合适的图片尺寸
python3 compress_and_analyze_palm.py image.jpg --max-dimension 1024
# 批量处理时添加延迟
import time
time.sleep(2) # 避免API限流
The description presents the assistant entirely in Chinese and frames it as a fixed persona for Chinese fengshui and fortune-telling analysis, with no indication that users may choose another language. Under the policy, a language or locale constraint should either be optional or clearly documented as a justified region-specific limitation.
The module description frames the tool as an image compression utility, but the implementation also uploads palm images to a third-party AI service and stores analysis reports locally. That mismatch can mislead users about what the script does with potentially sensitive biometric-like image data, undermining informed consent and increasing privacy risk in the skill context.
The prompt hard-codes analysis instructions in Chinese and instructs the model to respond in that language/style, with no option for the user to select another language or locale. This is a natural-language locale policy issue because the skill imposes a specific language experience without opt-in or documented justification.
The code performs an external network transmission of user-provided palm imagery to a third-party model endpoint. In a skill handling personal images, that is security-relevant because it exposes sensitive user data outside the local environment, especially since the destination, retention, and downstream processing are not surfaced to the user.
print("📡 调用豆包视觉模型进行分析...")
start_time = time.time()
response = requests.post(url, headers=headers, json=payload, timeout=120)
response_time = time.time() - start_time
if response.status_code == 200:
The script base64-encodes a palm image and sends it to a remote AI API without any explicit warning, consent prompt, or privacy notice. In this context, the data is user-supplied hand imagery that may be personal or sensitive, so silent third-party transmission materially increases privacy and compliance risk.
With no manifest available, the only stated intent comes from the module/class/docstrings, which describe a generic vision model analyzer using a public API key. The hardcoded prompts add specialized face-reading, palm-reading, and fengshui interpretation behaviors that go beyond generic image description and are not documented as part of the skill's purpose.
This code performs external network transmission of image-derived content and prompts to a remote endpoint using an API key, which is expected for cloud inference but still security-relevant. In this skill's context, the danger is not the mere presence of a request, but that potentially sensitive user images are exfiltrated off-host with limited transparency and no apparent trust-boundary enforcement.
print("🚀 调用豆包视觉模型API...")
start_time = time.time()
response = requests.post(
self.api_config["base_url"] + "/chat/completions",
headers=headers,
json=payload,
The skill sends user-supplied image data to a third-party API as a base64-encoded payload without any explicit consent flow, privacy notice, or data minimization step. Because images may contain faces, documents, interiors, or other sensitive information, silent transmission can expose personal or confidential data to an external provider and create privacy/compliance risk.
The file’s user-facing docstrings and printed interaction examples are entirely in Chinese, including the example invocation and assistant persona language. There is no indication that users may choose another language or that the locale restriction is required for a region-specific purpose, which matches the language/locale policy-violation category.
The template explicitly includes health status, disease susceptibility, and wellness advice fields, which can lead the agent to generate quasi-medical guidance without clearly telling users that the content is not medical advice. In a fortune-telling or physiognomy context, users may over-trust speculative health claims and delay appropriate diagnosis or treatment.
The file documents palm/image analysis and states that a vision model is used, but there is no user warning that uploaded hand photos will be sent to an AI image-processing system. Users may unknowingly submit biometric or highly personal images without informed consent, creating privacy, compliance, and trust risks.
The knowledge file contains specific individuals' birth details and operational guidance to collect complete personal birth information for analysis. Even if included as examples, this exposes personal data in a reusable knowledge source and normalizes collection of sensitive information without safeguards, increasing privacy and data-protection risk.
The skill explicitly says it will collect complete birth details or images for analysis, but it does not provide any privacy notice, minimization guidance, retention limits, or consent language. Birth data and biometric-like hand images are sensitive personal data, and collecting them without clear disclosure increases the risk of misuse, overcollection, and non-compliant processing.
The document instructs users to collect and input highly sensitive personal data such as birth date, time, and sex for fortune-analysis workflows, but provides no privacy notice, consent language, retention limits, or warning about how that data will be processed. Because this is a personal profiling use case, users may disclose data they would not otherwise share, creating avoidable privacy and compliance risk if the skill logs, transmits, or stores it.
The skill advertises palm-image analysis and explicitly states that image analysis uses an external visual model, but does not warn users that uploaded hand images may be transferred to a third-party service for processing. Images of hands can contain biometric or uniquely identifying features, so silent external processing materially increases privacy risk and may violate user expectations or policy requirements.
The entire usage guide, examples, and assistant persona are presented only in Chinese, and the examples consistently assume Chinese-language exchanges. There is no indication that users may choose another language or that the Chinese-only behavior is a justified region-specific constraint, which can violate language/locale policy requirements.
The script still prints the first 10 characters of sensitive environment variable values to stdout, which is a form of credential disclosure. Even partial secrets can aid correlation, leak key presence to logs/terminals, and undermine the stated security goal of removing key printing.
Printing a prefix of environment variable secrets to stdout can disclose credential material into shell history, terminal capture, CI logs, or support bundles. The absence of any warning increases the chance that operators run the script in shared or logged environments and unintentionally expose live credentials.
The examples use only Chinese-language queries such as "人工智能", "最新新闻", and "旅游景点", which indicates a language-specific usage pattern. The document does not state that the skill is China-region or Chinese-language only, nor does it offer users a choice of language, so this creates a natural-language locale policy concern.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Visit: **https://console.bce.baidu.com/ai-search/qianfan/ais/console/apiKey**
- Log in to your Baidu Cloud account
- Create an application or view existing API keys
- Copy your **API Key** (only API Key is needed)
### 2. Configure OpenClaw
The guide instructs users to place a live API key directly into a plaintext JSON configuration file under the home directory, but provides no warning about file permissions, secret exposure, or safer secret-management options. If that file is readable by other local users, included in backups, logged, or accidentally committed, the credential could be stolen and abused.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
# 使用POST方法发送JSON数据
response = requests.post(url, json=requestBody, headers=headers)
response.raise_for_status()
results = response.json()
if "code" in results:
This code sends the user-provided query and related request body to Baidu's external web search endpoint via requests.post. While the script prints parsing status and API-key errors, it does not provide any explicit user-facing notice that input data will be sent to a third-party service.