Preflight Check (TensorTrap)
One node that gates your whole workflow on a security pass
- combined_report
- all_safe
- total_findings
The pitch
The other three TensorTrap nodes each cover one attack surface: model files, installed nodes, workflow graphs. Preflight Check (TensorTrap) is the "just make it safe" option - a single composite node that runs all three audits in one pass and blocks the queue if anything at or above your severity threshold turns up. It's default-on protection for the workflow you actually care about.
Here's why you'd reach for it: ComfyUI gives every custom node full OS access and no sandbox, and the June 2024 LLMVISION incident turned that from a theoretical risk into a federal case. You can't fix ComfyUI's security model, but you can gate your own runs. Drop Preflight at the top of a workflow and it becomes the door the whole graph has to pass through.
How it works
It runs the three engines in sequence and merges them into one report with numbered sections:
- Model scan - only if you give it a
model_path. Scans that one file for malicious pickle opcodes, polyglot attacks, and archive-bypass exploits. - Installed-node audit - the same static sweep as Audit Installed Nodes over everything in
custom_nodes/. - Workflow analysis - the same graph walk as Analyze Workflow over the live workflow.
Each section can be skipped independently, so you can keep the node in a graph and turn pieces off without deleting it. And it degrades gracefully: if the tensortrap CLI package isn't installed, the model-scan section reports that it was skipped instead of crashing the whole check.
If block_on_threat is on (it is by default) and the worst finding meets or beats min_severity, the node raises and the queue stops before anything else runs.
The inputs that matter
Six optional inputs, and honestly four of them do the work:
block_on_threat(defaulttrue) - the gate.min_severity(defaultHIGH) - the CRITICAL / HIGH / MEDIUM / LOW cutoff.model_path(default empty) - a literal file path. Leave it empty and the model section politely skips.skip_model_scan/skip_node_audit/skip_workflow_analysis(all defaultfalse) - the per-section kill switches.
Outputs: combined_report (STRING - wire it to a Show Text node to read the full pass), all_safe (BOOLEAN), and total_findings (INT).
How to install it
Same as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/realmarauder/ComfyUI-TensorTrap.git
pip install tensortrap
Restart ComfyUI, or find "TensorTrap" in ComfyUI Manager. For the model-scan section to actually scan, the tensortrap package needs to be installed - that's the pip line above. The node-audit and workflow-analysis sections run from code bundled in the pack.
Where people get burned
- The block is the feature. When the queue dies with "TensorTrap preflight failed", the message names the worst finding. Your options, straight from the message: lower
min_severity, setblock_on_threat=False, or fix the finding. Lowering the severity to dodge a CRITICAL is... a choice. - "Model scan: skipped (no model_path provided)" is not an error - that's the normal state for a workflow that doesn't target a specific file. If you want the file check, type the path into
model_path. - "Skipped - tensortrap CLI not installed" means the model section can't run;
pip install tensortrapfixes it. The other two sections keep working. - Watch what you share. If you publish a workflow with Preflight Check set to block inside it, everyone who downloads it inherits your gate. Either run it before publishing and remove it, or set
block_on_threat=Falseso recipients get a report instead of a stopped queue.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model_pathopt | STRING | — | |
| block_on_threatopt | BOOLEAN | true | — |
| min_severityopt | COMBO | HIGH | 4 options: CRITICAL, HIGH, MEDIUM, LOW |
| skip_model_scanopt | BOOLEAN | false | — |
| skip_node_auditopt | BOOLEAN | false | — |
| skip_workflow_analysisopt | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| combined_report | STRING | — |
| all_safe | BOOLEAN | — |
| total_findings | INT | — |