Files
realmarauderandClaude Opus 4.7 411f0715bb Add Preflight Check composite node
New TensorTrapPreflightCheck node runs all three security audits in one shot:
optional model scan (if model_path given), installed-node audit, and current
workflow analysis. Blocks the queue on any finding at or above min_severity,
matching the API on the other TensorTrap nodes.

Each section can be skipped independently (skip_model_scan / skip_node_audit /
skip_workflow_analysis). The node degrades gracefully when the tensortrap CLI
package is not installed — the model-scan section reports skipped instead of
crashing the whole preflight.

Registered as TensorTrap_PreflightCheck under "Preflight Check (TensorTrap)".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 16:50:16 -05:00

30 lines
982 B
Python

"""
@author: realmarauder (M2 Dynamics)
@title: TensorTrap Security Scanner
@nickname: TensorTrap
@description: Security scanner for ComfyUI — scans model files, audits custom nodes, and analyzes workflow graphs for threats.
"""
from .nodes.security_nodes import (
TensorTrapAnalyzeWorkflow,
TensorTrapAuditNodes,
TensorTrapPreflightCheck,
TensorTrapScanModel,
)
NODE_CLASS_MAPPINGS = {
"TensorTrap_ScanModel": TensorTrapScanModel,
"TensorTrap_AuditNodes": TensorTrapAuditNodes,
"TensorTrap_AnalyzeWorkflow": TensorTrapAnalyzeWorkflow,
"TensorTrap_PreflightCheck": TensorTrapPreflightCheck,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"TensorTrap_ScanModel": "Scan Model (TensorTrap)",
"TensorTrap_AuditNodes": "Audit Installed Nodes (TensorTrap)",
"TensorTrap_AnalyzeWorkflow": "Analyze Workflow (TensorTrap)",
"TensorTrap_PreflightCheck": "Preflight Check (TensorTrap)",
}
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]