# comfyui security audit

> Identify and triage malicious models, risky custom nodes, and dangerous workflows in ComfyUI.

comfyui security audit is a free AI agent skill on Agensi by Sean Michael, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Sean Michael](https://www.agensi.io/creators/sean-michael)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-11-19
- Security: scan passed (2026-11-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/comfyui-security-audit
- Tags: comfyui, security, ai-models, malware, supply-chain

## About this skill

ComfyUI environments are vulnerable to malicious models and untrusted custom nodes that execute with full system permissions. This skill performs static analysis on your local install to identify malware, supply-chain attacks, and risky workflow patterns before they compromise your machine.

### What it does
- **Model scanning** audits Safetensors, Pickle, and GGUF files for embedded malicious code or suspicious opcodes.
- **Node auditing** scans installed custom node packs for network calls, shell execution, or sensitive file access.
- **Workflow analysis** inspects JSON workflow files for known attack patterns or suspicious node configurations.
- **Security triaging** classifies findings as true positives, false positives, or benign based on code context and maintainer reputation.
- **Remediation guidance** points out critical threats and recommends next steps, such as quarantining a file, without changing any files itself.

### How it works
1. **Environment discovery** locates your ComfyUI installation path and confirms scanning permissions.
2. **Scanner deployment** installs the TensorTrap CLI and the ComfyUI-TensorTrap node pack for local analysis.
3. **Static analysis** runs model scans and node audits via terminal commands without executing any untrusted code.
4. **Contextual review** analyzes flagged code blocks or workflow nodes to determine if the behavior matches the tool's purpose.

### Frameworks & tools
This skill utilizes the **TensorTrap** security scanner (CLI) and the **ComfyUI-TensorTrap** node pack. It requires Python 3.10+ and standard ComfyUI directory structures.

### Why this beats prompting it yourself
Manual code review of thousands of lines in custom nodes is impractical for most users, and binary model files cannot be read by standard LLMs. This skill automates the execution of specialized security tooling and provides expert-level triage of technical findings that non-security developers might miss.

### Use cases
- Auditing a newly downloaded model from an unfamiliar source before loading it into VRAM.
- Checking a batch of updated custom nodes for hidden telemetry or unauthorized network calls.
- Validating a complex workflow JSON downloaded from Civitai or Discord for safety.
- Performing a routine security health check on a production ComfyUI environment.

### Known limitations
This tool performs static analysis and cannot guarantee safety or act as a sandbox. A clean result reduces risk but does not eliminate it, as custom nodes run with full system access.

## Requires

- Python
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the comfyui security audit skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill protect my machine from malicious ComfyUI models?

This skill protects your local machine by scanning for 'Pickle' malware, unauthorized network requests in custom nodes, and malicious logic hidden within JSON workflow files, preventing system compromise or data theft.

### Which AI agents and environments are compatible with this security audit skill?

The skill is designed for any AI agent with terminal and file system access. It utilizes the TensorTrap CLI to perform analysis locally on your ComfyUI installation path.

### Do I need to run the risky models or nodes for the scanner to work?

The audit uses static analysis, meaning it inspects the code and file headers without actually executing the untrusted files, ensuring your system remains safe during the scanning process.

### What do I get with this free skill?

You get a set of agent instructions that walk your AI agent through a full ComfyUI security audit. The agent finds your install and asks for your consent, then installs the open-source TensorTrap scanner with pip. It scans your models, audits your custom nodes and checks your workflows, then reports what it found by severity. After that it can triage each finding as a true positive, false positive, benign, or needs review. The skill contains no scripts or binaries. Everything it runs comes from TensorTrap's public PyPI and GitHub releases.

### Does a successful scan mean a model or node is 100% safe to use?

While it significantly reduces risk by identifying known attack patterns and suspicious opcodes, it is not a sandbox; custom nodes still run with full system permissions, so a 'clean' scan should be treated as a risk reduction rather than a total guarantee of safety.

### How does the skill stay current with new threats?

Detection comes from TensorTrap, so coverage improves as TensorTrap gets updated. During setup the agent installs the TensorTrap version that's current on PyPI. If you already have it installed, run `pip install --upgrade tensortrap` before an audit to get the latest detection rules. The skill doesn't download signatures on its own or update in the background.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
