Back to skill

Security audit

Ai Maker

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it needs review because it stores prompt history and claims image generation while the code only returns placeholder success results.

Review before installing. This appears to be a prototype-style Chinese image-generation skill, but it does not actually generate images in the inspected code, it can retain prompt snippets in plaintext history, and it needs runtime quantity validation plus safer history storage before use with confidential prompts or shared systems.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
agent.py:76
Finding

Unbounded Image Quantity Enables Resource Exhaustion

Content
View full analysis
Dict: """调用即梦生成""" timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") output_dir = f"output/jimeng/{timestamp}" # TODO: 实际调用即梦脚本 images = [] for i in range(quantity): images.append({ "path": f"{output_dir}/image_{i+1}.png", "thumbnail": f"{output_dir}/thumb_{i+1}.png" }) ``` ```python def _call_liblib(self, prompt: str, negative_prompt: str, quantity: int, brief: Dict) -> Dict: """调用 Liblib 生成""" timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") output_dir = f"output/liblib/{timestamp}" product_type = brief.get("product_info", {}).get("type", "") model = self._recommend_liblib_model(product_type) # TODO: 实际调用 Liblib 脚本 images = [] for i in range(quantity): images.append({ "path": f"{output_dir}/image_{i+1}.png", "thumbnail": f"{output_dir}/thumb_{i+1}.png" }) ``` Equivalent unbounded loops are exposed by the public `generate()` methods in both tool wrappers: ```python images = [] for i in range(quantity): images.append({ "path": os.path.join(output_path, f"image_{i+1}.png"), "thumbnail": os.path.join(output_path, f"thumb_{i+1}.png") }) ``` ### Technical Analysis The externally supplied `creative_brief.quantity` value is passed directly to `range()` without validation. Although `skill.json` declares `max_quant ...[truncated 1661 chars]
Remediation
View remediation
int: if isinstance(value, bool) or not isinstance(value, int): raise ValueError("quantity must be an integer") if not 1 <= value <= MAX_QUANTITY: raise ValueError(f"quantity must be between 1 and {MAX_QUANTITY}") return value ``` Invoke this validation from `MakerAgent.generate()`, `JimengTool.generate()`, `LiblibTool.generate()`, and regeneration entry points before allocating results or creating directories. ]]>

T02 · Agent Memory Poisoning

Warning
Location
agent.py:186
Finding

Persistent Markdown Injection in Generation History

Content
View full analysis
Remediation
View remediation
str: text = str(value)[:max_length] return text.replace("\r", "\\r").replace("\n", "\\n") ``` For stronger isolation, write records as JSON Lines: ```python record = { "timestamp": timestamp, "tool": tool, "product_type": product_type, "prompt": prompt, "quantity": len(result.get("images", [])), } f.write(json.dumps(record, ensure_ascii=False) + "\n") ``` ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises operational capabilities and references files such as configuration and generation history, but does not declare any explicit tool scope or permission boundaries. When a skill can read and write files without documented restrictions, it increases the chance of unintended access to local data, prompt-influenced file operations, or unsafe expansion of what the agent may touch at runtime.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest declares language: "zh-CN", which imposes a specific language/locale requirement. The file does not offer opt-in language selection or explain why the restriction is necessary, so it appears to violate the language/locale policy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states that it outputs image files and records generation parameters/history, but it does not warn users that prompts, outputs, and metadata may be stored persistently. This creates privacy and data-governance risk, especially if prompts include confidential product plans, customer data, or proprietary creative material.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language examples are broad enough that ordinary conversational text could be interpreted as an instruction to invoke the skill. This can cause accidental activation, unauthorized image generation, or downstream file writes/API calls when the user did not intend to run the tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The file's title, docstrings, messages, and example inputs are all written in Chinese, and no alternate language option or locale justification is provided. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The agent appends user-derived prompt content and generated output paths to a persistent markdown history file without consent, minimization, or access controls. Prompts can contain sensitive business ideas, personal data, or confidential creative instructions, and storing them in plaintext increases the risk of privacy leakage and unintended retention.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code persistently stores user-provided prompt text in plaintext in memory/generation_history.md. Because prompts may include sensitive personal, commercial, or proprietary information, this creates a data retention and disclosure risk, especially on shared systems, in backups, or if logs are later exfiltrated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest specifies "language": "zh-CN", which imposes a specific language/locale requirement in natural-language metadata. Under the policy, forcing a language without offering user choice or documenting an opt-in is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language strings, comments, docstrings, and output messages entirely in Chinese, including the tool name, descriptions, and success message. Under the policy rule for language/locale, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The docstring on L37 says this method 'calls Jimeng to generate images,' and the module/class context presents this as a Jimeng tool wrapper. However, the implementation never uses self.script_path or contacts Jimeng; instead, it creates placeholder file paths and reports success, which contradicts the documented behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description string is entirely in Chinese ("AI 执行师技能 - 工具配置"), which indicates a language-specific configuration without any accompanying option or note that users may choose another language. Under the policy, locale or language restrictions should be opt-in or clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The markdown content is entirely written in Chinese, including the title and usage guidance, with no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-only audience. Under the policy rule, a language constraint should be optional or clearly justified when it restricts usability by locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file contains user-facing natural-language strings and documentation exclusively in Chinese, including the class description, status messages, and setup guidance. Under the language/locale policy, forcing a specific language without user opt-in or justification can be a policy violation.

Content

No source excerpt is available for this finding.