Back to skill

Security audit

ComfyUI DirectML AMD

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent ComfyUI-on-AMD setup guide, but users should review its local patch script and mutable downloads before running them.

Install only in a dedicated ComfyUI environment. Before running apply-directml-fixes.py, inspect the script, confirm it targets the intended ComfyUI directory, and keep a separate backup or version-control copy of comfy\model_patcher.py. Prefer pinned package versions and verify downloaded model checksums when possible.

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 (3)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:27
Finding

Unpinned DirectML Package Installation

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:104
Finding

Remote Model Downloads Lack Immutable Revision and Integrity Verification

Content
View full analysis
Remediation
View remediation
" $actual = (Get-FileHash .\sd_xl_turbo_1.0_fp16.safetensors -Algorithm SHA256).Hash.ToLower() if ($actual -ne $expected) { Remove-Item .\sd_xl_turbo_1.0_fp16.safetensors throw "Model integrity verification failed" } ``` 4. Download to a temporary location and only install the model after verification succeeds. 5. Configure curl to fail on HTTP errors and restrict redirects where practical, for example with `--fail --show-error` and an appropriate redirect policy. 6. Record the model source, immutable revision, file size, and digest in a reviewed manifest. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
apply-directml-fixes.py:104
Finding

Fragile and Non-Atomic Modification of External ComfyUI Source Code

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README documents a forceful process-termination command (Stop-Process -Force) targeting Python processes associated with ComfyUI, but it does so without an explicit safety warning about killing active workloads or potentially terminating the wrong process. In a how-to skill, users may copy-paste this directly, which can cause data loss, interrupted jobs, or unintended disruption if the path filter is overly broad or matches more than expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs users to run an automated fix script that modifies ComfyUI source files, but the documentation does not clearly warn that local application code will be patched. This creates a trust and integrity risk: users may execute the script without understanding it changes installed files, which can introduce breakage, persistence of unsafe modifications, or conceal malicious behavior if the script is later altered.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.