Back to skill

Security audit

Happy IMG2 Direct

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for image generation, but it needs Review because it stores full prompts/logs and can fetch unvalidated provider-supplied image URLs.

Install only if you trust the configured image provider and are comfortable with prompts and generator logs being saved locally. Avoid putting secrets or sensitive business data in prompts, review or clean the generated run directories, and prefer providers that return bounded inline image data until URL validation and log-retention controls are added.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate-image.js:13
Finding

Unvalidated Provider-Supplied Image URL Enables SSRF and Unbounded Response Buffering

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The documented behavior does not match the detected capabilities and likely implementation: it omits sensitive actions like reading local configuration/environment for credentials and writing files, while also overstating safeguards such as retries and bounded batch concurrency. This mismatch is dangerous because users may approve or invoke the skill under false assumptions, leading to credential exposure, unexpected local side effects, or unsafe operational behavior when reliability controls are absent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises executable behavior that includes shell, network, filesystem, and environment/config access, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a trust and containment problem: callers and policy systems cannot accurately understand or restrict what the skill may access, increasing the chance of unintended data exposure or misuse of local resources.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/batch_run.py (reported line 64)May include surrounding context.

python
(task_dir / 'batch_task.json').write_text(json.dumps(meta, ensure_ascii=False, indent=2), encoding='utf-8')

    try:
        proc = subprocess.run(
            cmd,
            cwd=str(WORKSPACE),
            text=True,

Tainted flow: 'WORKSPACE' from os.environ.get (line 5, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/batch_run.py (reported line 64)May include surrounding context.

python
(task_dir / 'batch_task.json').write_text(json.dumps(meta, ensure_ascii=False, indent=2), encoding='utf-8')

    try:
        proc = subprocess.run(
            cmd,
            cwd=str(WORKSPACE),
            text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script writes the full prompt and generation parameters to request.json under a persistent directory in the user's home folder. Prompts often contain sensitive business data, personal information, or secrets, so silent persistence increases the risk of local disclosure through backups, shared machines, other local users, or later exfiltration by unrelated software.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/run.py (reported line 65)May include surrounding context.

python
(attempt_dir/'request.json').write_text(json.dumps({'prompt': args.prompt, 'task_name': attempt_name, 'provider': args.provider, 'model': args.model, 'size': args.size, 'timeout_ms': args.timeout_ms, 'output': str(output)}, ensure_ascii=False, indent=2), encoding='utf-8')
        started=time.time()
        try:
            proc=subprocess.run(cmd, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=args.timeout_ms/1000+90)
            stdout=proc.stdout or ''; stderr=proc.stderr or ''
            try: data=json.loads(stdout.strip())
            except Exception: data={'ok':False,'stage':'wrapper_parse','returncode':proc.returncode,'stdout':stdout[-4000:],'stderr':stderr[-4000:],'diagnosis':{'category':'wrapper_error','human_reason':'Generator did not return parseable JSON.','retryable':True}}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Persisting full stdout and stderr from the generator can capture sensitive provider responses, error traces, request identifiers, prompts, or even secrets if downstream tooling logs them. Because these logs are written automatically to a durable run directory, the skill expands the blast radius of any accidental secret disclosure or sensitive content returned by the subprocess.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The inline comment says the public skill is generation-only and delivery should be handled by other tools, yet the code continues to accept and persist delivery-oriented fields such as send_to_feishu and to_open_id in task/default processing and metadata. This is not merely incomplete documentation; the comment suggests delivery concerns are excluded while the implementation still carries them through.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The timeout result includes a human-facing diagnostic string in Chinese ('批量任务外层等待超时。') with no option for locale selection or indication that the skill is region-specific. This creates a natural-language locale policy issue because users may receive forced non-default language output without prior opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The batch runner persistently stores full prompts, command metadata, stdout/stderr, and per-task results under a predictable workspace hierarchy. In an agent setting, prompts and model outputs may contain sensitive business data, personal data, secrets, or copyrighted material, so broad on-disk retention increases exposure if the workspace is shared, synced, or later accessed by other tools/users.

Content

No source excerpt is available for this finding.