ComfyUI-Manager/comfyui_manager
Dr.Lt.Data 16ba874566 feat(security): dedicated install flags decouple git_url/pip from security_level
Add two boolean config.ini [default] flags — allow_git_url_install and
allow_pip_install (both default false) — that fully REPLACE the
security_level term on the legacy install surfaces:

- POST /v2/customnode/install/git_url (S-A) and
  POST /v2/customnode/install/pip (S-B) are now gated solely by their
  dedicated flag AND the retained network-position invariant
  (loopback listener OR network_mode=personal_cloud). security_level
  no longer affects these two surfaces in either direction.
- The batch unknown-URL branch (S-C) routes through the same predicate;
  the unknown-pip branch stays unconditionally blocked; the general
  middle+ batch entry gate is unchanged.
- New pure predicate is_dedicated_install_allowed() in
  common/manager_security.py (config-import-free; callers pass values
  from their own reader). Both config readers (glob + legacy) register
  the keys in read/write/fallback paths.
- Denial logs and frontend copy name the responsible flag instead of
  the misleading security_level guidance. Public listeners remain
  denied regardless of the flags (no exposure widening).
- README security policy updated: config keys documented, git-url/pip
  removed from the security_level risky table, and a dedicated-flags
  subsection (REPLACE semantics, network rule, batch behavior,
  restart-only activation, weak/normal- opt-in migration note).
- Migration: existing weak/normal- users must opt in via the new flags
  (CHANGELOG note; deliberate no auto-seed).

Includes the unit/config/guard test suites (88 tests): predicate truth
table, dual-reader config contract (missing/malformed keys read false,
round-trip, cache staleness), security_level-matrix freeze guards, and
suite-order-independent test stubs.
2026-06-08 02:12:14 +09:00
..
common feat(security): dedicated install flags decouple git_url/pip from security_level 2026-06-08 02:12:14 +09:00
data_models fix(security): harden CSRF with Content-Type gate and expand E2E coverage (#2818) 2026-04-22 05:04:30 +09:00
glob feat(security): dedicated install flags decouple git_url/pip from security_level 2026-06-08 02:12:14 +09:00
js feat(security): dedicated install flags decouple git_url/pip from security_level 2026-06-08 02:12:14 +09:00
legacy feat(security): dedicated install flags decouple git_url/pip from security_level 2026-06-08 02:12:14 +09:00
__init__.py chore(release): 4.2.1 — register extension.manager.supports_csrf_post feature flag (#2823) 2026-04-22 22:07:16 +09:00
alter-list.json Merge branch 'main' into draft-v4 2025-09-03 01:24:47 +09:00
channels.list.template fixed: missing channels.list.template 2025-04-23 08:58:47 +09:00
custom-node-list.json Merge branch 'main' into manager-v4 2025-11-26 22:14:11 +09:00
extension-node-map.json Merge branch 'main' into manager-v4 2025-11-26 22:14:11 +09:00
extras.json Merge branch 'main' into draft-v4 2025-09-03 01:24:47 +09:00
github-stats.json Merge branch 'main' into manager-v4 2025-11-26 22:14:11 +09:00
model-list.json Merge branch 'main' into manager-v4 2025-11-26 22:14:11 +09:00
prestartup_script.py feat(deps): add unified dependency resolver using uv pip compile (#2589) 2026-03-07 06:51:53 +09:00
README.md Merge branch 'main' into draft-v4 2025-06-01 06:23:11 +09:00

ComfyUI-Manager: Core Backend (glob)

This directory contains the Python backend modules that power ComfyUI-Manager, handling the core functionality of node management, downloading, security, and server operations.

Directory Structure

  • glob/ - code for new cacheless ComfyUI-Manager
  • legacy/ - code for legacy ComfyUI-Manager

Core Modules

  • manager_core.py: The central implementation of management functions, handling configuration, installation, updates, and node management.
  • manager_server.py: Implements server functionality and API endpoints for the web interface to interact with the backend.

Specialized Modules

  • share_3rdparty.py: Manages integration with third-party sharing platforms.

Architecture

The backend follows a modular design pattern with clear separation of concerns:

  1. Core Layer: Manager modules provide the primary API and business logic
  2. Utility Layer: Helper modules provide specialized functionality
  3. Integration Layer: Modules that connect to external systems

Security Model

The system implements a comprehensive security framework with multiple levels:

  • Block: Highest security - blocks most remote operations
  • High: Allows only specific trusted operations
  • Middle: Standard security for most users
  • Normal-: More permissive for advanced users
  • Weak: Lowest security for development environments

Implementation Details

  • The backend is designed to work seamlessly with ComfyUI
  • Asynchronous task queuing is implemented for background operations
  • The system supports multiple installation modes
  • Error handling and risk assessment are integrated throughout the codebase

API Integration

The backend exposes a REST API via manager_server.py that enables:

  • Custom node management (install, update, disable, remove)
  • Model downloading and organization
  • System configuration
  • Snapshot management
  • Workflow component handling