T09 · Insecure Skill Coding Practices
- Location
skill.py:43- Finding
Automatic Bypass of Browser TLS Certificate Warnings
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This invoice-checking skill needs Review because it handles sensitive invoice data with unsafe browser and file behaviors that are not clearly controlled by the user.
Install only after reviewing the code and running it in a tightly isolated, non-root environment. Do not use it with real invoices unless the file path, destination domain, certificate validation, screenshot handling, and upload confirmation behavior are fixed. Avoid running patch_fp.py because it rewrites an installed skill file and adds unverified URL fetching.
skill.py:43Automatic Bypass of Browser TLS Certificate Warnings
skill.py:153Chrome Browser Sandbox Disabled During Remote Content Processing
patch_fp.py:3Patch Introduces Unverified Remote Image Retrieval and Rewrites an External Skill File
requirements.txt:4Contradictory, Duplicated, and Loosely Pinned Third-Party Dependencies
Automatically bypassing the browser's security warning removes the user's opportunity to evaluate a potentially unsafe or spoofed destination and causes the automation to continue despite a failed trust check. In this skill, that is especially dangerous because the workflow then uploads a local file and interacts with the remote site, compounding the risk of data disclosure to an untrusted endpoint.
The README content is presented in Chinese and does not offer an alternative language or state that the language is region-specific by design. This can violate language or locale policy when users are not given a choice or informed of the constraint.
The skill description invites activation from a very broad natural-language request such as asking to verify an invoice, without clearly constraining when the skill should run or what confirmations are required. Broad triggers can cause unintended invocation on ambiguous user input, leading the agent to collect and transmit invoice data to an external site without sufficient user awareness or scope control.
The description says the skill will access the national VAT invoice platform to verify invoices, but it does not warn users that invoice details will be sent to an external government-operated website. This omission can cause unintentional disclosure of sensitive financial or business data and prevents informed consent before transmission.
The patch description and surrounding comments frame the change as adding image input support, but the actual code also introduces outbound network access by fetching arbitrary URLs. This is security-relevant because it silently expands the trust boundary and can enable SSRF-style behavior, unexpected data exfiltration paths, or access to internal resources if the modified skill later processes attacker-controlled input.
Using requests.get(..., verify=False) disables TLS certificate validation, allowing man-in-the-middle interception and tampering of downloaded image data. Because this patch introduces remote fetching into a skill workflow, an attacker on the network path could substitute malicious or unexpected content, defeat HTTPS protections, and potentially influence downstream image processing.
# 如果是 URL,下载图片
if base64_str.startswith('http'):
print(f"从 URL 下载验证码图片...")
response = requests.get(base64_str, timeout=10, verify=False)
byte_data = response.content
else:
# 是 base64 字符串
The script overwrites another skill file at /root/.openclaw/workspace/skills/fp-skill/skill.py using write mode, which is a potentially impactful file operation. There is no confirmation prompt or prior user-facing warning before the write occurs; the only message is a success print after the modification is complete.
The skill automatically uploads a hardcoded local PDF to a remote government website without any user-facing notice, consent, or validation of what file is being sent. In an agent or shared environment, this creates a data exfiltration risk because local workspace files may contain sensitive invoice or business information and are transmitted off-host automatically.
The function explicitly clicks through the browser's TLS/security interstitial by activating the 'details-button' and 'proceed-link', and even falls back to JavaScript to force the bypass. This defeats an important browser trust boundary and can expose uploaded documents and session data to man-in-the-middle attacks or malicious endpoints if the certificate warning is legitimate.
The code saves a full-page screenshot to a persistent local path during processing without disclosure or access controls. Screenshots can capture sensitive invoice details, verification results, and other page content, creating residual data exposure on disk even after the browser session ends.
The README explicitly describes Selenium-based browser automation that can open pages, fill forms, click buttons, and take screenshots, but it gives no warning about interacting with third-party sites, submitting data, or triggering unintended actions. In documentation for an automation skill, that omission can lead users to run actions against external websites without understanding the consequences, increasing the chance of accidental data disclosure or unauthorized interactions.
All user-facing text in this skill file is presented in Chinese, and the file does not state that the skill is China-specific or that language selection is optional. This can amount to a language or locale policy issue because the skill appears to force a specific language without explicit user opt-in or justification.
The requirement numpy~=2.0.2 is only partially pinned, so the exact installed release is not fixed and may vary within the allowed range. Because NumPy has historical advisories, the lack of an exact version prevents reliable verification that the resolved package is outside affected versions.
The file declares NumPy twice with incompatible version constraints: numpy~=2.0.2 and numpy~=1.26.4. This creates ambiguity or installation failure, and if resolution succeeds through manual modification or tool-specific behavior, security review becomes unreliable because the actual installed version is unclear despite multiple known NumPy advisories existing historically.
The dependency specification Pillow>=9.5.0 is not strictly pinned, so builds may resolve to different versions over time, including versions later found vulnerable or incompatible. In a supply-chain context this weakens reproducibility and makes it harder to verify whether deployed environments are affected by known Pillow issues.
onnxruntime==1.15.1
numpy~=2.0.2
numpy~=1.26.4
Pillow>=9.5.0
selenium~=4.36.0
webdriver_manager>=4.0.0
opencv-python-headless==4.8.1.78
Because Pillow>=9.5.0 is open-ended, the exact Pillow release cannot be verified against known advisories. Given Pillow processes image data and has had memory-safety and resource-consumption issues, leaving the version unconstrained increases uncertainty about whether vulnerable builds may be installed.
selenium~=4.36.0 permits multiple patch-level releases, so the concrete installed version is not directly auditable from this manifest alone. Since Selenium interacts with browser automation infrastructure and has known historical advisories, exact versioning is preferable for reproducibility and assurance.
webdriver_manager>=4.0.0 allows any newer release to be installed, which introduces supply-chain and reproducibility risk because future versions may change behavior or contain malicious or vulnerable code. This is especially relevant for browser automation tooling that downloads and manages external driver binaries.
numpy~=1.26.4
Pillow>=9.5.0
selenium~=4.36.0
webdriver_manager>=4.0.0
opencv-python-headless==4.8.1.78
No suspicious patterns detected.