Back to skill

Security audit

AIDraw批量图生图

Security checks for vulnerabilities and agentic risk

Overview

The skill’s image automation purpose is coherent, but its script handles saved browser session cookies in an unsafe, under-scoped way that warrants Review before installation.

Review this before installing if you will use corporate or sensitive images. Only run it in a trusted environment, with a dedicated timiai browser profile/account if possible, and avoid confidential source folders unless you are authorized to upload them. The publisher should constrain downloads to trusted timiai image hosts and avoid copying all browser cookies into requests.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/batch_img2img.py:326
Finding

Browser Cookies Can Be Disclosed to an Unvalidated Image Host

Content
View full analysis
300 and box['height'] > 300: area = box['width'] * box['height'] if area > latest_image_size: latest_image_size = area latest_image_url = src print(f"[发现] 新生成图片: {int(box['width'])}x{int(box['height'])}") # ... cookies = await page.context.cookies() cookies_dict = {cookie['name']: cookie['value'] for cookie in cookies} headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', 'Referer': 'https://timiai.woa.com/', } response = requests.get( latest_image_url, cookies=cookies_dict, headers=headers, timeout=60 ) ``` ### Technical Analysis The download destination is derived from the `src` attribute of any newly appearing image whose rendered dimensions exceed the configured threshold. The script does not validate the URL scheme, hostname, port, resolved address, or redirect destination before making the request. After selecting the URL, the script retrieves all cookies available from the Playwright browser context and reduces them to a name/value dictionary. It then explicitly attaches that dictionary to a separate `requests.get()` call. This conversion discards browser-enforced cookie attributes and scoping information, including domain, path, `Secure`, and `SameSite` restrictions. Consequently, cookies that a browser would not send to the selected image host may be transmitted by the `requests` clien ...[truncated 1507 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:57
Finding

Runtime Dependencies and Browser Components Are Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README describes batch img2img automation against a remote platform but does not prominently warn that local reference images will be uploaded automatically to timiai.woa.com. In a corporate/internal environment, users may supply sensitive or proprietary images, so lack of explicit disclosure increases the risk of unintentional data exfiltration to a remote service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill describes capabilities that read local files and interact with a remote website, but it does not declare any explicit tool scope or permission boundaries. This creates an overbroad-trust problem: users and host systems cannot easily tell what data access and network actions the skill requires, increasing the chance of unintended file exposure or unauthorized remote interactions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill processes local reference images and text prompts by sending them to Tencent Hunyuan, but it does not clearly disclose this privacy-sensitive remote upload. Users may provide confidential images or prompts without realizing they leave the local environment, creating data exposure and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script extracts all browser context cookies from the persistent Playwright session and forwards them in a separate requests.get call to download the image. This expands the attack surface by reusing authenticated session material outside the browser, risking unintended credential leakage to image hosts, redirects, logs, or any URL misidentification, especially since the image URL is scraped from page content rather than constrained to a trusted origin.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
79% confidence
Finding

The script saves downloaded content directly to a local file using open(..., 'wb') and write(...). Although the script prints status messages, there is no clear user-facing warning or confirmation that batch execution will create many files on disk, which is a safety-relevant file write operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The document describes automatic downloading and saving behavior, but it does not present this as a caution affecting user data and filesystem state. For markdown files, behaviors that modify local data or create files should be accompanied by an explicit warning so users understand where outputs will be written and that storage may be consumed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill automates downloading and saving generated images to a local folder, but the description does not prominently warn users about this write-to-disk behavior. While expected for this workflow, undisclosed local file creation can still surprise users, consume storage, or place sensitive generated content in unintended locations.

Content

No source excerpt is available for this finding.