ComfyUI-Manager/comfyui_manager/common
Dr.Lt.Data fca7ef149d
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
feat(security): dedicated install flags decouple git_url/pip install from security_level (#2962)
* feat(security): dedicated install flags decouple git_url/pip from security_level

Install via git URL and pip install are no longer gated by
security_level. Each surface gets a dedicated config.ini flag —
allow_git_url_install / allow_pip_install (both default false, secure
by default) — that fully REPLACES the security-level term for these two
features. The network-position invariant is retained: a non-local
listener stays denied regardless of the flags unless
network_mode = personal_cloud.

- New pure predicate is_dedicated_install_allowed() in
  common/manager_security (no config access; callers resolve config)
- Legacy endpoints /v2/customnode/install/git_url and .../pip switch
  from is_allowed_security_level('high+') to the flag gate; batch
  installs of unknown git URLs likewise (middle+ entry gate unchanged,
  unknown-pip 'block' stays unconditional; response shapes preserved)
- Config readers/writers (glob + legacy) parse and persist the flags;
  denial logs and frontend 403 messages name the responsible flag and
  note the non-local-listener requirement (network_mode=personal_cloud)
- No auto-seed from security_level — users previously on weak/normal-
  must opt in explicitly (see CHANGELOG migration notes; README
  documents the new contract)
- Update the pre-existing permissive E2E harness
  (start_comfyui_permissive.sh + test_e2e_legacy_real_ops.py) to the
  new contract: it now also sets allow_git_url_install /
  allow_pip_install = true, since security_level = normal- alone no
  longer opens the git_url/pip endpoints

Tests: predicate truth table proving security_level independence in
both directions, dual-reader config contract, security-level-matrix
freeze guards, legacy gate regression guards (121 unit), plus 22
real-server E2E tests incl. URL-form pip install with self-clean.

* test(e2e): fix fresh-env failures in customnode_info and git_clone harnesses

Two pre-existing harness defects that fail deterministically on a fresh
E2E environment (unrelated to the dedicated-install-flags change):

- test_e2e_customnode_info: TestInstalledPacks asserted the seed pack
  ComfyUI_SigmoidOffsetScheduler is installed, but nothing seeded it —
  the installing module (test_e2e_endpoint) runs alphabetically later
  and uninstalls it at the end. Add a module-scoped autouse fixture
  that installs the pack via cm-cli BEFORE the server starts (the
  imported-mode test asserts against the startup-frozen snapshot, so
  API-based seeding after boot cannot work) and removes it on teardown
  only if the fixture installed it.
- test_e2e_git_clone: _ensure_cache ran cm-cli update-cache with a
  120s timeout; the full DB download routinely exceeds that on slow
  links, erroring the whole module at setup. Raise to 600s.

Verified from a fresh state (seed pack absent): both modules pass
(13 tests, incl. previously-failing TestInstalledPacks 2 and
TestNightlyInstallCycle 3).
2026-06-11 01:44:12 +09:00
..
__init__.py fix(git): handle divergent branches safely + datetime fallback 2025-12-12 22:45:05 +09:00
cm_global.py restructuring 2025-04-13 09:26:02 +09:00
cnr_utils.py refactor(core): add verbose config, improve module lookup, fix is_valid_url 2025-12-27 03:57:19 +09:00
context.py feat: add pygit2 compatibility wrapper for standalone Desktop 2.0 installs (#2719) 2026-03-27 08:42:26 +09:00
enums.py modified: security policy 2025-06-27 01:38:38 +09:00
git_compat.py fix(git_compat): follow-ups for pygit2 fallback hardening (#2974) 2026-06-10 18:19:55 +09:00
git_helper.py feat: add pygit2 compatibility wrapper for standalone Desktop 2.0 installs (#2719) 2026-03-27 08:42:26 +09:00
git_utils.py fix(api): improve import_fail_info_bulk lookup for cnr_id and aux_id 2025-12-15 02:54:30 +09:00
manager_downloader.py Merge branch 'main' into draft-v4 2025-07-24 12:41:48 +09:00
manager_security.py feat(security): dedicated install flags decouple git_url/pip install from security_level (#2962) 2026-06-11 01:44:12 +09:00
manager_util.py feat(deps): add unified dependency resolver using uv pip compile (#2589) 2026-03-07 06:51:53 +09:00
node_package.py restructuring 2025-04-13 09:26:02 +09:00
README.md Merge branch 'main' into draft-v4 2025-06-01 06:23:11 +09:00
security_check.py fix(security): add litellm supply chain attack detection (PYSEC-2026-2) (#2732) 2026-03-26 04:17:50 +09:00
timestamp_utils.py feat: add pygit2 compatibility wrapper for standalone Desktop 2.0 installs (#2719) 2026-03-27 08:42:26 +09:00
unified_dep_resolver.py feat(cli): expand --uv-compile to all node management commands with conflict attribution (#2682) 2026-03-14 07:58:29 +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.

Core Modules

  • manager_downloader.py: Handles downloading operations for models, extensions, and other resources.
  • manager_util.py: Provides utility functions used throughout the system.

Specialized Modules

  • cm_global.py: Maintains global variables and state management across the system.
  • cnr_utils.py: Helper utilities for interacting with the custom node registry (CNR).
  • git_utils.py: Git-specific utilities for repository operations.
  • node_package.py: Handles the packaging and installation of node extensions.
  • security_check.py: Implements the multi-level security system for installation safety.